diff options
author | Kurt Zenker <kz@openoffice.org> | 2005-07-14 09:49:53 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2005-07-14 09:49:53 +0000 |
commit | 88baca3c34f2a216d75cca3c2e85953bd64488bb (patch) | |
tree | d0891493666856720a7ecb1872720d2f70504063 /svx | |
parent | 584fa8c6789b198b4959ae276b715c11eb93bf09 (diff) |
INTEGRATION: CWS impress61 (1.133.104); FILE MERGED
2005/07/08 12:37:31 cl 1.133.104.2: #i44633# added ChangeModel()unoshape.cxx
2005/07/08 10:03:32 cl 1.133.104.1: #i44633# added ChangeModel()
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/unodraw/unoshape.cxx | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 03bf849d5a63..0d8609998b8c 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unoshape.cxx,v $ * - * $Revision: 1.133 $ + * $Revision: 1.134 $ * - * last change: $Author: obo $ $Date: 2005-04-12 16:55:34 $ + * last change: $Author: kz $ $Date: 2005-07-14 10:49:53 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -538,6 +538,11 @@ void SvxShape::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage ) throw() { DBG_ASSERT( pNewObj->GetModel(), "no model for SdrObject?" ); + if( pObj && pObj->GetModel() ) + { + EndListening( *pObj->GetModel() ); + } + pObj = pNewObj; Init(); @@ -574,6 +579,24 @@ void SvxShape::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage ) throw() } //---------------------------------------------------------------------- + +void SvxShape::ChangeModel( SdrModel* pNewModel ) +{ + if( pObj && pObj->GetModel() ) + { + if( pObj->GetModel() != pNewModel ) + { + EndListening( *pObj->GetModel() ); + } + if( pNewModel ) + StartListening( *pNewModel ); + } + + pModel = pNewModel; +} + +//---------------------------------------------------------------------- + void SvxShape::ForceMetricToItemPoolMetric(Pair& rPoint) const throw() { if(pObj && pModel) |