summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore/unodraw.cxx
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2003-07-11 11:23:40 +0000
committerVladimir Glazounov <vg@openoffice.org>2003-07-11 11:23:40 +0000
commit9466a23cb878251c9a3040861694f93a83411f13 (patch)
tree7a3864576f623b72004957eddf80fa242bbb8d22 /sw/source/core/unocore/unodraw.cxx
parent56521d8cd9e32b8fcd644befaadbdfb6385a5350 (diff)
INTEGRATION: CWS swoddrawings01 (1.49.12); FILE MERGED
2003/07/10 15:17:39 od 1.49.12.1: #110742# <SwXShape::dispose(..)> - delete drawing frame format *not* for 'virtual' drawing objects.
Diffstat (limited to 'sw/source/core/unocore/unodraw.cxx')
-rw-r--r--sw/source/core/unocore/unodraw.cxx19
1 files changed, 15 insertions, 4 deletions
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index d4f303aaa996..ec74fa7f6443 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unodraw.cxx,v $
*
- * $Revision: 1.49 $
+ * $Revision: 1.50 $
*
- * last change: $Author: vg $ $Date: 2003-07-04 13:25:38 $
+ * last change: $Author: vg $ $Date: 2003-07-11 12:23:40 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1601,8 +1601,19 @@ void SwXShape::dispose(void) throw( RuntimeException )
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt)
{
- SdrObject* pObj = pFmt->FindSdrObject();
- if(pObj && pObj->IsInserted())
+ // OD 10.07.2003 #110742# - determine correct <SdrObject>
+ //SdrObject* pObj = pFmt->FindSdrObject();
+ SdrObject* pObj = GetSvxShape()->GetSdrObject();
+ // OD 10.07.2003 #110742# - safety assertion:
+ // <pObj> must be the same as <pFmt->FindSdrObject()>, if <pObj> isn't
+ // a 'virtual' drawing object.
+ ASSERT( !pObj->ISA(SwDrawVirtObj) || pObj == pFmt->FindSdrObject(),
+ "<SwXShape::dispose(..) - different 'master' drawing objects!!" );
+ // OD 10.07.2003 #110742# - perform delete of draw frame format *not*
+ // for 'virtual' drawing objects.
+ if ( pObj &&
+ !pObj->ISA(SwDrawVirtObj) &&
+ pObj->IsInserted() )
{
if( pFmt->GetAnchor().GetAnchorId() == FLY_IN_CNTNT )
{