From 11ab80fbb1eb0e4849a567ba06af57f789779aff Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Mon, 28 Dec 2009 15:03:56 +0000 Subject: #i107966# check if there really is a handle to avoid a reported crash --- svx/source/table/svdotable.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index 97e06fd4bb61..b048ed3c8cf1 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -2575,7 +2575,7 @@ basegfx::B2DPolyPolygon SdrTableObj::getSpecialDragPoly(const SdrDragStat& rDrag basegfx::B2DPolyPolygon aRetval; const SdrHdl* pHdl = rDrag.GetHdl(); - if(HDL_USER == pHdl->GetKind()) + if( pHdl && (HDL_USER == pHdl->GetKind()) ) { const TableEdgeHdl* pEdgeHdl = dynamic_cast< const TableEdgeHdl* >( pHdl ); @@ -2594,7 +2594,7 @@ basegfx::B2DPolyPolygon SdrTableObj::getSpecialDragPoly(const SdrDragStat& rDrag FASTBOOL SdrTableObj::BegCreate(SdrDragStat& rStat) { - rStat.SetOrtho4Possible(); + rStat.SetOrtho4Possible();5 Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); aRect1.Justify(); rStat.SetActionRect(aRect1); -- cgit From 054c155903b3253f37cfaac0fe586826ce15a37d Mon Sep 17 00:00:00 2001 From: Armin Weiss Date: Thu, 7 Jan 2010 12:31:24 +0000 Subject: #i107839# Added a NbcSetGraphic to SvxGraphicLink and use it in SvxGraphicLink::DataChanged to avoid unwanted ModelChange --- svx/inc/svx/svdograf.hxx | 1 + 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 4f00da997361..238f6953af7a 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 28d192f3956d..d9cdfbb44f37 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(); } -- cgit From cfdc1586406aa489e7afa101e873056fc8aa154f Mon Sep 17 00:00:00 2001 From: Armin Weiss Date: Thu, 7 Jan 2010 14:15:46 +0000 Subject: #i107966# Removed wrong '5' --- svx/source/table/svdotable.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index b048ed3c8cf1..0a537f4f8999 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -2594,7 +2594,7 @@ basegfx::B2DPolyPolygon SdrTableObj::getSpecialDragPoly(const SdrDragStat& rDrag FASTBOOL SdrTableObj::BegCreate(SdrDragStat& rStat) { - rStat.SetOrtho4Possible();5 + rStat.SetOrtho4Possible(); Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); aRect1.Justify(); rStat.SetActionRect(aRect1); -- cgit