diff options
author | Armin Weiss <aw@openoffice.org> | 2010-01-07 12:31:24 +0000 |
---|---|---|
committer | Armin Weiss <aw@openoffice.org> | 2010-01-07 12:31:24 +0000 |
commit | 19f6045aa5cb2265b15db1d17c5940c9694868a9 (patch) | |
tree | b5184441363a202143e7d9bf6d1a7dc7687f6273 | |
parent | 2f682e242f80fbe4b9c753bf4b92e9d2e288cdb6 (diff) |
#i107839# Added a NbcSetGraphic to SvxGraphicLink and use it in SvxGraphicLink::DataChanged to avoid unwanted ModelChange
-rw-r--r-- | svx/inc/svx/svdograf.hxx | 1 | ||||
-rw-r--r-- | svx/source/svdraw/svdograf.cxx | 17 |
2 files changed, 9 insertions, 9 deletions
diff --git a/svx/inc/svx/svdograf.hxx b/svx/inc/svx/svdograf.hxx index 8a81917dfe..0d74a071a0 100644 --- a/svx/inc/svx/svdograf.hxx +++ b/svx/inc/svx/svdograf.hxx @@ -144,6 +144,7 @@ public: void SetGraphicObject( const GraphicObject& rGrfObj ); const GraphicObject& GetGraphicObject( bool bForceSwapIn = false) const; + void NbcSetGraphic(const Graphic& rGrf); void SetGraphic(const Graphic& rGrf); const Graphic& GetGraphic() const; diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index 8d150e506c..f31a663311 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -133,14 +133,8 @@ void SdrGraphicLink::DataChanged( const String& rMimeType, Graphic aGraphic; if( SvxLinkManager::GetGraphicFromAny( rMimeType, rValue, aGraphic )) { - GraphicType eOldGraphicType = pGrafObj->GetGraphicType(); // kein Hereinswappen - const sal_Bool bIsChanged = pModel->IsChanged(); - - pGrafObj->SetGraphic( aGraphic ); - if( GRAPHIC_NONE != eOldGraphicType ) - pGrafObj->SetChanged(); - else - pModel->SetChanged( bIsChanged ); + pGrafObj->NbcSetGraphic( aGraphic ); + pGrafObj->ActionChanged(); } else if( SotExchange::GetFormatIdFromMimeType( rMimeType ) != SvxLinkManager::RegisterStatusInfoId() ) @@ -303,11 +297,16 @@ const GraphicObject& SdrGrafObj::GetGraphicObject(bool bForceSwapIn) const // ----------------------------------------------------------------------------- -void SdrGrafObj::SetGraphic( const Graphic& rGrf ) +void SdrGrafObj::NbcSetGraphic( const Graphic& rGrf ) { pGraphic->SetGraphic( rGrf ); pGraphic->SetUserData(); mbIsPreview = sal_False; +} + +void SdrGrafObj::SetGraphic( const Graphic& rGrf ) +{ + NbcSetGraphic(rGrf); SetChanged(); BroadcastObjectChange(); } |