summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svx/source/svdraw/svdpage.cxx16
-rw-r--r--svx/source/unodraw/gluepts.cxx21
-rw-r--r--svx/source/unodraw/unoshape.cxx19
-rw-r--r--svx/source/unodraw/unoshtxt.cxx23
4 files changed, 65 insertions, 14 deletions
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index 5084cfa262bd..fd00e9d5dd20 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: svdpage.cxx,v $
*
- * $Revision: 1.27 $
+ * $Revision: 1.28 $
*
- * last change: $Author: ka $ $Date: 2001-09-26 08:13:31 $
+ * last change: $Author: cl $ $Date: 2001-12-07 15:30:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -251,12 +251,22 @@ void SdrObjList::CopyObjects(const SdrObjList& rSrcList)
void SdrObjList::Clear()
{
ULONG nAnz=GetObjCount();
+
+ if(pModel!=NULL && nAnz!=0)
+ {
+ SdrHint aHint(HINT_OBJLISTCLEAR);
+ aHint.SetPage(pPage);
+ aHint.SetObjList(this);
+ pModel->Broadcast(aHint);
+ }
+
for (ULONG no=0; no<nAnz; no++) {
SdrObject* pObj=GetObj(no);
delete pObj;
}
aList.Clear();
- if (pModel!=NULL && nAnz!=0) {
+ if (pModel!=NULL && nAnz!=0)
+ {
pModel->SetChanged();
SdrHint aHint(HINT_OBJLISTCLEARED);
aHint.SetPage(pPage);
diff --git a/svx/source/unodraw/gluepts.cxx b/svx/source/unodraw/gluepts.cxx
index 351d4258a290..35149847b565 100644
--- a/svx/source/unodraw/gluepts.cxx
+++ b/svx/source/unodraw/gluepts.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: gluepts.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: cl $ $Date: 2001-06-19 14:49:19 $
+ * last change: $Author: cl $ $Date: 2001-12-07 15:26:09 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -75,6 +75,7 @@
#include "svdmodel.hxx"
#include "svdobj.hxx"
#include "svdglue.hxx"
+#include "svdpage.hxx"
using namespace ::com::sun::star;
using namespace ::rtl;
@@ -277,10 +278,24 @@ void SvxUnoGluePointAccess::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if( mpObject == pSdrHint->GetObject() )
mpObject = NULL;
}
- else if( pSdrHint->GetKind() == HINT_MODELCLEARED || pSdrHint->GetKind() == HINT_OBJLISTCLEARED )
+ else if( pSdrHint->GetKind() == HINT_MODELCLEARED )
{
mpObject = NULL;
}
+ else if( pSdrHint->GetKind() == HINT_OBJLISTCLEAR )
+ {
+ SdrObjList* pObjList = mpObject ? mpObject->GetObjList() : NULL;
+ while( pObjList )
+ {
+ if( pSdrHint->GetObjList() == pObjList )
+ {
+ mpObject = NULL;
+ break;
+ }
+
+ pObjList = pObjList->GetUpList();
+ }
+ }
}
}
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 17043403d8d3..314c3453971b 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unoshape.cxx,v $
*
- * $Revision: 1.83 $
+ * $Revision: 1.84 $
*
- * last change: $Author: cl $ $Date: 2001-12-07 10:53:18 $
+ * last change: $Author: cl $ $Date: 2001-12-07 15:26:09 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1012,10 +1012,21 @@ void SvxShape::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) throw()
else if( pSdrHint->GetKind() == HINT_MODELCLEARED )
{
pModel = NULL;
+ pObj = NULL;
}
- else if( pSdrHint->GetKind() == HINT_OBJLISTCLEARED && pSdrHint->GetObjList() == pObj->GetObjList() )
+ else if( pSdrHint->GetKind() == HINT_OBJLISTCLEAR )
{
- pObj = NULL;
+ SdrObjList* pObjList = pObj ? pObj->GetObjList() : NULL;
+ while( pObjList )
+ {
+ if( pSdrHint->GetObjList() == pObjList )
+ {
+ pObj = NULL;
+ break;
+ }
+
+ pObjList = pObjList->GetUpList();
+ }
}
}
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index 1ffce99a0a0c..2810d2ea7189 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unoshtxt.cxx,v $
*
- * $Revision: 1.20 $
+ * $Revision: 1.21 $
*
- * last change: $Author: cl $ $Date: 2001-12-05 15:11:09 $
+ * last change: $Author: cl $ $Date: 2001-12-07 15:26:09 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -235,13 +235,28 @@ void SvxTextEditSourceImpl::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
mbDestroyed = TRUE;
}
}
- else if( pSdrHint->GetKind() == HINT_MODELCLEARED ||
- pSdrHint->GetKind() == HINT_OBJLISTCLEARED )
+ else if( pSdrHint->GetKind() == HINT_MODELCLEARED )
{
if( mpObject )
EndListening( *mpObject->GetModel() );
mbDestroyed = TRUE;
}
+ else if( pSdrHint->GetKind() == HINT_OBJLISTCLEAR )
+ {
+ SdrObjList* pObjList = mpObject ? mpObject->GetObjList() : NULL;
+ while( pObjList )
+ {
+ if( pSdrHint->GetObjList() == pObjList )
+ {
+ mbDestroyed = sal_True;
+ if( mpObject )
+ EndListening( *mpObject->GetModel() );
+ break;
+ }
+
+ pObjList = pObjList->GetUpList();
+ }
+ }
}
if( mbDestroyed )