diff options
Diffstat (limited to 'sw/source/core/doc/doc.cxx')
-rw-r--r-- | sw/source/core/doc/doc.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index c6a5c444c85f..670059091ebe 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1039,11 +1039,14 @@ SwFlyFrmFmt* SwDoc::Insert( const SwPaM &rRg, { if( !pFrmFmt ) pFrmFmt = GetFrmFmtFromPool( RES_POOLFRM_GRAPHIC ); - return _InsNoTxtNode( *rRg.GetPoint(), GetNodes().MakeGrfNode( + SwGrfNode* pSwGrfNode = GetNodes().MakeGrfNode( SwNodeIndex( GetNodes().GetEndOfAutotext() ), rGrfName, rFltName, pGraphic, - mpDfltGrfFmtColl ), + mpDfltGrfFmtColl ); + SwFlyFrmFmt* pSwFlyFrmFmt = _InsNoTxtNode( *rRg.GetPoint(), pSwGrfNode, pFlyAttrSet, pGrfAttrSet, pFrmFmt ); + pSwGrfNode->onGraphicChanged(); + return pSwFlyFrmFmt; } SwFlyFrmFmt* SwDoc::Insert( const SwPaM &rRg, const GraphicObject& rGrfObj, @@ -1053,10 +1056,13 @@ SwFlyFrmFmt* SwDoc::Insert( const SwPaM &rRg, const GraphicObject& rGrfObj, { if( !pFrmFmt ) pFrmFmt = GetFrmFmtFromPool( RES_POOLFRM_GRAPHIC ); - return _InsNoTxtNode( *rRg.GetPoint(), GetNodes().MakeGrfNode( + SwGrfNode* pSwGrfNode = GetNodes().MakeGrfNode( SwNodeIndex( GetNodes().GetEndOfAutotext() ), - rGrfObj, mpDfltGrfFmtColl ), + rGrfObj, mpDfltGrfFmtColl ); + SwFlyFrmFmt* pSwFlyFrmFmt = _InsNoTxtNode( *rRg.GetPoint(), pSwGrfNode, pFlyAttrSet, pGrfAttrSet, pFrmFmt ); + pSwGrfNode->onGraphicChanged(); + return pSwFlyFrmFmt; } SwFlyFrmFmt* SwDoc::Insert(const SwPaM &rRg, const svt::EmbeddedObjectRef& xObj, |