diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/ndgrf.hxx | 3 | ||||
-rw-r--r-- | sw/source/core/graphic/ndgrf.cxx | 9 |
2 files changed, 9 insertions, 3 deletions
diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx index 65716602c16f..5434d301761a 100644 --- a/sw/inc/ndgrf.hxx +++ b/sw/inc/ndgrf.hxx @@ -39,7 +39,8 @@ class SW_DLLPUBLIC SwGrfNode: public SwNoTextNode std::unique_ptr<GraphicObject> mpReplacementGraphic; tools::SvRef<sfx2::SvBaseLink> refLink; ///< If graphics only as link then pointer is set. Size nGrfSize; - bool bInSwapIn :1; + bool bInSwapIn :1; // to avoid recursion in SwGrfNode::SwapIn + bool bInBaseLinkSwapIn :1; // to avoid recursion in SwBaseLink::SwapIn bool bChgTwipSize :1; bool bFrameInPaint :1; ///< To avoid Start-/EndActions in Paint via SwapIn. diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index f52780ae9001..fdfac6b7a693 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -68,6 +68,7 @@ SwGrfNode::SwGrfNode( SwAttrSet const * pAutoAttr ) : SwNoTextNode( rWhere, SwNodeType::Grf, pGrfColl, pAutoAttr ), maGrfObj(), + bInBaseLinkSwapIn(true), // #i73788# mbLinkedInputStreamReady( false ), mbIsStreamReadOnly( false ) @@ -84,6 +85,7 @@ SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere, SwAttrSet const * pAutoAttr ) : SwNoTextNode( rWhere, SwNodeType::Grf, pGrfColl, pAutoAttr ), maGrfObj(rGrfObj), + bInBaseLinkSwapIn(true), // #i73788# mbLinkedInputStreamReady( false ), mbIsStreamReadOnly( false ) @@ -105,6 +107,7 @@ SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere, SwAttrSet const * pAutoAttr ) : SwNoTextNode( rWhere, SwNodeType::Grf, pGrfColl, pAutoAttr ), maGrfObj(), + bInBaseLinkSwapIn(true), // #i73788# mbLinkedInputStreamReady( false ), mbIsStreamReadOnly( false ) @@ -449,13 +452,15 @@ bool SwGrfNode::SwapIn(bool bWaitForData) if( pLink ) { - if( GraphicType::NONE == maGrfObj.GetType() || - GraphicType::Default == maGrfObj.GetType() ) + if( (GraphicType::NONE == maGrfObj.GetType() || + GraphicType::Default == maGrfObj.GetType()) && + bInBaseLinkSwapIn) { // link was not loaded yet if( pLink->SwapIn( bWaitForData ) ) { bRet = true; + bInBaseLinkSwapIn = false; } else if( GraphicType::Default == maGrfObj.GetType() ) { |