Kaydet (Commit) 59e19330 authored tarafından Armin Le Grand's avatar Armin Le Grand

RTF import filter review: correction to rtffly.cxx

Patch by: Michael Stahl
üst f07148ee
...@@ -1254,28 +1254,29 @@ void SwRTFParser::InsPicture( const String& rGrfNm, const Graphic* pGrf, ...@@ -1254,28 +1254,29 @@ void SwRTFParser::InsPicture( const String& rGrfNm, const Graphic* pGrf,
"SwRTFParser::InsPicture: fly array empty."); "SwRTFParser::InsPicture: fly array empty.");
if (aFlyArr.Count()) if (aFlyArr.Count())
{ {
// erzeuge nur einen normalen GrafikNode und ersetze diesen gegen // erzeuge nur einen normalen GrafikNode und ersetze diesen gegen
// den vorhandenen Textnode // den vorhandenen Textnode
SwNodeIndex& rIdx = pPam->GetPoint()->nNode; SwNodeIndex& rIdx = pPam->GetPoint()->nNode;
pGrfNd = pDoc->GetNodes().MakeGrfNode( rIdx, pGrfNd = pDoc->GetNodes().MakeGrfNode( rIdx,
rGrfNm, aEmptyStr, // Name der Graphic !! rGrfNm, aEmptyStr, // Name der Graphic !!
pGrf, pGrf,
(SwGrfFmtColl*)pDoc->GetDfltGrfFmtColl() ); (SwGrfFmtColl*)pDoc->GetDfltGrfFmtColl() );
if( pGrfAttrSet ) if( pGrfAttrSet )
pGrfNd->SetAttr( *pGrfAttrSet ); pGrfNd->SetAttr( *pGrfAttrSet );
SwFlySave* pFlySave = aFlyArr[ aFlyArr.Count()-1 ]; SwFlySave* pFlySave = aFlyArr[ aFlyArr.Count()-1 ];
pFlySave->nSttNd = rIdx.GetIndex() - 1; pFlySave->nSttNd = rIdx.GetIndex() - 1;
if( 1 < aFlyArr.Count() ) if( 1 < aFlyArr.Count() )
{ {
pFlySave = aFlyArr[ aFlyArr.Count() - 2 ]; pFlySave = aFlyArr[ aFlyArr.Count() - 2 ];
if( pFlySave->nEndNd == rIdx ) if( pFlySave->nEndNd == rIdx )
pFlySave->nEndNd = rIdx.GetIndex() - 1; pFlySave->nEndNd = rIdx.GetIndex() - 1;
} }
pGrfNd->onGraphicChanged(); pGrfNd->onGraphicChanged();
}
} }
else else
{ {
...@@ -1391,7 +1392,6 @@ void SwRTFParser::_SetPictureSize( const SwNoTxtNode& rNd, ...@@ -1391,7 +1392,6 @@ void SwRTFParser::_SetPictureSize( const SwNoTxtNode& rNd,
if( aSize.Width() > nBoxWidth ) if( aSize.Width() > nBoxWidth )
aSize.Width() = nBoxWidth; aSize.Width() = nBoxWidth;
} }
}
} }
//JP 8.11.2001: bug 94450 - if no size exist, then the size is set by //JP 8.11.2001: bug 94450 - if no size exist, then the size is set by
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment