From e131fe49465037c1ed6475ff3f51bde31cec03f0 Mon Sep 17 00:00:00 2001 From: Armin Weiss Date: Thu, 13 Dec 2001 14:57:04 +0000 Subject: [PATCH] #95876# Also overload ReplaceObject methods to realize when objects are removed with this mechanism instead of RemoveObject --- sd/inc/sdpage.hxx | 9 +++++++-- sd/source/core/sdpage.cxx | 30 +++++++++++++++++++++++++++--- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx index 9437d37f0663..9a49729803a8 100644 --- a/sd/inc/sdpage.hxx +++ b/sd/inc/sdpage.hxx @@ -2,9 +2,9 @@ * * $RCSfile: sdpage.hxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: cl $ $Date: 2001-10-12 16:17:43 $ + * last change: $Author: aw $ $Date: 2001-12-13 15:55:03 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -184,6 +184,11 @@ public: virtual SdrObject* NbcRemoveObject(ULONG nObjNum); virtual SdrObject* RemoveObject(ULONG nObjNum); + // #95876# Also overload ReplaceObject methods to realize when + // objects are removed with this mechanism instead of RemoveObject + virtual SdrObject* NbcReplaceObject(SdrObject* pNewObj, ULONG nObjNum); + virtual SdrObject* ReplaceObject(SdrObject* pNewObj, ULONG nObjNum); + virtual void SetLinkData(const String& rLinkName, const String& rLinkData); void SetObjText(SdrTextObj* pObj, SdrOutliner* pOutliner, PresObjKind eObjKind, const String& rStr ); diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 4a4854ecad64..a7a31e146074 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -2,9 +2,9 @@ * * $RCSfile: sdpage.cxx,v $ * - * $Revision: 1.26 $ + * $Revision: 1.27 $ * - * last change: $Author: aw $ $Date: 2001-12-13 13:18:21 $ + * last change: $Author: aw $ $Date: 2001-12-13 15:57:04 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1847,7 +1847,6 @@ SdrObject* SdPage::RemoveObject(ULONG nObjNum) return(pObj); } - /************************************************************************* |* |* Objekt loeschen, ohne Broadcast @@ -1875,6 +1874,31 @@ SdrObject* SdPage::NbcRemoveObject(ULONG nObjNum) return(pObj); } +/************************************************************************* +|* +|* +|* +\************************************************************************/ + +// #95876# Also overload ReplaceObject methods to realize when +// objects are removed with this mechanism instead of RemoveObject +SdrObject* SdPage::NbcReplaceObject(SdrObject* pNewObj, ULONG nObjNum) +{ + SdrObject* pOldObj = FmFormPage::NbcReplaceObject(pNewObj, nObjNum); + if(pOldObj && pOldObj->GetUserCall()!=this && aPresObjList.GetPos(pOldObj) != LIST_ENTRY_NOTFOUND) + Changed(*pOldObj, SDRUSERCALL_REMOVED, pOldObj->GetBoundRect()); + return pOldObj; +} + +// #95876# Also overload ReplaceObject methods to realize when +// objects are removed with this mechanism instead of RemoveObject +SdrObject* SdPage::ReplaceObject(SdrObject* pNewObj, ULONG nObjNum) +{ + SdrObject* pOldObj = FmFormPage::ReplaceObject(pNewObj, nObjNum); + if(pOldObj && pOldObj->GetUserCall()!=this && aPresObjList.GetPos(pOldObj) != LIST_ENTRY_NOTFOUND) + Changed(*pOldObj, SDRUSERCALL_REMOVED, pOldObj->GetBoundRect()); + return pOldObj; +} /************************************************************************* |*