diff options
author | Kurt Zenker <kz@openoffice.org> | 2005-03-18 15:12:17 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2005-03-18 15:12:17 +0000 |
commit | 4b3dc0c28a9f29168bdb6408dce957b68e3be67d (patch) | |
tree | fe097c4a108c3aeb5aa8844b17630b36612ebcc3 /sw/source/core | |
parent | 3d1b0e2ee440081a2431ffdb9d5b6c3e4f7029fb (diff) |
INTEGRATION: CWS dbwizard4 (1.62.112); FILE MERGED
2005/03/12 18:03:10 bc 1.62.112.2: RESYNC: (1.62-1.63); FILE MERGED
2005/02/10 15:37:10 od 1.62.112.1: #i37877# <SwXShape::setPosition(..)> - no adjustment of position properties,
if position is also applied at the drawing object and a contact
is already registered at the drawing object.
Diffstat (limited to 'sw/source/core')
-rw-r--r-- | sw/source/core/unocore/unodraw.cxx | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 9abf6b9b719f..7b6c9b763584 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.63 $ + * $Revision: 1.64 $ * - * last change: $Author: vg $ $Date: 2005-02-22 08:21:49 $ + * last change: $Author: kz $ $Date: 2005-03-18 16:12:17 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -2210,8 +2210,11 @@ void SAL_CALL SwXShape::setPosition( const awt::Point& aPosition ) SdrObject* pTopGroupObj = _GetTopGroupObj(); if ( !pTopGroupObj ) { - // shape isn't a group member. Thus, set positioning attributes - _AdjustPositionProperties( aPosition ); + // --> OD 2005-02-10 #i37877# - no adjustment of position attributes, + // if the position also has to be applied at the drawing object and + // a contact object is already registered at the drawing object. + bool bApplyPosAtDrawObj(false); + bool bNoAdjustOfPosProp(false); // --> OD 2004-10-19 #i35798# - apply position also to drawing object, // if drawing object has no anchor position set. if ( mxShape.is() ) @@ -2224,11 +2227,26 @@ void SAL_CALL SwXShape::setPosition( const awt::Point& aPosition ) pObj->GetAnchorPos().X() == 0 && pObj->GetAnchorPos().Y() == 0 ) { - mxShape->setPosition( aPosition ); + bApplyPosAtDrawObj = true; + if ( pObj->GetUserCall() && + pObj->GetUserCall()->ISA(SwDrawContact) ) + { + bNoAdjustOfPosProp = true; + } } } } // <-- + // shape isn't a group member. Thus, set positioning attributes + if ( !bNoAdjustOfPosProp ) + { + _AdjustPositionProperties( aPosition ); + } + if ( bApplyPosAtDrawObj ) + { + mxShape->setPosition( aPosition ); + } + // <-- } else if ( mxShape.is() ) { |