diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2013-09-27 16:39:56 +0200 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2013-09-27 16:39:56 +0200 |
commit | 134741211d5c95a1a0ef07e13eb4846c62adce22 (patch) | |
tree | 9b220785f4b9f5e0775ef848e76ea9ff08a1acfb /sw/source/core/docnode/swbaslnk.cxx | |
parent | 0854f0566c5d18b919b76df10b4bbd5a3606b7d6 (diff) |
Save Commit: must be squashed!!! ObjectGraphic refactor
Change-Id: I69f0b8bef3a08d1a325ccbe2b5f128df9cc14880
Diffstat (limited to 'sw/source/core/docnode/swbaslnk.cxx')
-rw-r--r-- | sw/source/core/docnode/swbaslnk.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx index ae8ed8a5cde5..c14766c5bcab 100644 --- a/sw/source/core/docnode/swbaslnk.cxx +++ b/sw/source/core/docnode/swbaslnk.cxx @@ -137,7 +137,7 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem ) { SwGrfNode* pSwGrfNode = dynamic_cast< SwGrfNode* >(pCntntNode); OSL_ENSURE(pSwGrfNode, "Error, pSwGrfNode expected when node answers IsGrfNode() with true (!)"); - const GraphicObject& rGrfObj = pSwGrfNode->GetGrfObj(); + const GraphicObject* pGrfObj = pSwGrfNode->GetGrfObj().get(); bDontNotify = pSwGrfNode->IsFrameInPaint(); @@ -148,7 +148,7 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem ) Graphic aGrf; if( sfx2::LinkManager::GetGraphicFromAny( rMimeType, rValue, aGrf ) && ( GRAPHIC_DEFAULT != aGrf.GetType() || - GRAPHIC_DEFAULT != rGrfObj.GetType() ) ) + (pGrfObj && GRAPHIC_DEFAULT != pGrfObj->GetType()) ) ) { aGrfSz = ::GetGraphicSizeTwip( aGrf, 0 ); if( pSwGrfNode->IsChgTwipSizeFromPixel() ) @@ -175,7 +175,7 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem ) bGraphicPieceArrived = sal_False; } - pSwGrfNode->SetGraphic(aGrf, rGrfObj.GetLink()); + pSwGrfNode->SetGraphic(aGrf, pGrfObj ? pGrfObj->GetLink() : String()); bUpdate = true; // In order for the Node to have the right transparency status @@ -246,7 +246,7 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem ) if( pBLink != this && ( !bSwapIn || - GRAPHIC_DEFAULT == pGrfNd->GetGrfObj().GetType())) + GRAPHIC_DEFAULT == pGrfNd->GetGrfObj()->GetType())) { pBLink->bIgnoreDataChanged = sal_False; pBLink->DataChanged( rMimeType, rValue ); |