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,
"SwRTFParser::InsPicture: fly array empty.");
if (aFlyArr.Count())
{
// erzeuge nur einen normalen GrafikNode und ersetze diesen gegen
// den vorhandenen Textnode
SwNodeIndex& rIdx = pPam->GetPoint()->nNode;
pGrfNd = pDoc->GetNodes().MakeGrfNode( rIdx,
rGrfNm, aEmptyStr, // Name der Graphic !!
pGrf,
(SwGrfFmtColl*)pDoc->GetDfltGrfFmtColl() );
// erzeuge nur einen normalen GrafikNode und ersetze diesen gegen
// den vorhandenen Textnode
SwNodeIndex& rIdx = pPam->GetPoint()->nNode;
pGrfNd = pDoc->GetNodes().MakeGrfNode( rIdx,
rGrfNm, aEmptyStr, // Name der Graphic !!
pGrf,
(SwGrfFmtColl*)pDoc->GetDfltGrfFmtColl() );
if( pGrfAttrSet )
pGrfNd->SetAttr( *pGrfAttrSet );
if( pGrfAttrSet )
pGrfNd->SetAttr( *pGrfAttrSet );
SwFlySave* pFlySave = aFlyArr[ aFlyArr.Count()-1 ];
pFlySave->nSttNd = rIdx.GetIndex() - 1;
SwFlySave* pFlySave = aFlyArr[ aFlyArr.Count()-1 ];
pFlySave->nSttNd = rIdx.GetIndex() - 1;
if( 1 < aFlyArr.Count() )
{
pFlySave = aFlyArr[ aFlyArr.Count() - 2 ];
if( pFlySave->nEndNd == rIdx )
pFlySave->nEndNd = rIdx.GetIndex() - 1;
}
if( 1 < aFlyArr.Count() )
{
pFlySave = aFlyArr[ aFlyArr.Count() - 2 ];
if( pFlySave->nEndNd == rIdx )
pFlySave->nEndNd = rIdx.GetIndex() - 1;
}
pGrfNd->onGraphicChanged();
pGrfNd->onGraphicChanged();
}
}
else
{
......@@ -1391,7 +1392,6 @@ void SwRTFParser::_SetPictureSize( const SwNoTxtNode& rNd,
if( aSize.Width() > nBoxWidth )
aSize.Width() = nBoxWidth;
}
}
}
//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