diff options
author | Rüdiger Timm <rt@openoffice.org> | 2006-03-10 15:20:44 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2006-03-10 15:20:44 +0000 |
commit | 366b9abe46ce5aed4898e7ca890d1d03575cbee6 (patch) | |
tree | 426c75effbaba5813dd5b2b8a6ded1864202fc4a /svx/source/sdr | |
parent | 95bfaaab453076ceb7af0bcef793103ca6ce832e (diff) |
INTEGRATION: CWS impress87 (1.7.270); FILE MERGED
2006/03/06 17:52:59 sj 1.7.270.1: #i61331# TextFrame status has not been updated properly
Diffstat (limited to 'svx/source/sdr')
-rw-r--r-- | svx/source/sdr/properties/customshapeproperties.cxx | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/svx/source/sdr/properties/customshapeproperties.cxx b/svx/source/sdr/properties/customshapeproperties.cxx index dd3b082f71c6..f35afde93550 100644 --- a/svx/source/sdr/properties/customshapeproperties.cxx +++ b/svx/source/sdr/properties/customshapeproperties.cxx @@ -4,9 +4,9 @@ * * $RCSfile: customshapeproperties.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: hr $ $Date: 2005-09-23 13:52:06 $ + * last change: $Author: rt $ $Date: 2006-03-10 16:20:44 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -68,6 +68,17 @@ namespace sdr { namespace properties { + void CustomShapeProperties::UpdateTextFrameStatus() + { + SdrTextObj& rObj = (SdrTextObj&)GetSdrObject(); + SdrTextAutoGrowHeightItem& rAutoGrowHeightItem = + (SdrTextAutoGrowHeightItem&)rObj.GetMergedItem( SDRATTR_TEXT_AUTOGROWHEIGHT ); + rObj.bTextFrame = rAutoGrowHeightItem.GetValue() != 0; + + if ( rObj.bTextFrame ) + rObj.NbcAdjustTextFrameWidthAndHeight(); + } + SfxItemSet& CustomShapeProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) { return *(new SfxItemSet(rPool, @@ -161,9 +172,16 @@ namespace sdr // call parent TextProperties::ItemChange( nWhich, pNewItem ); } + void CustomShapeProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr) + { + TextProperties::SetStyleSheet( pNewStyleSheet, bDontRemoveHardAttr ); + UpdateTextFrameStatus(); + } void CustomShapeProperties::ForceDefaultAttributes() { -/* SJ: Following is is no good if creating customshapes leading to objects that are white after loading via xml + UpdateTextFrameStatus(); + +/* SJ: Following is no good if creating customshapes, leading to objects that are white after loading via xml SdrTextObj& rObj = (SdrTextObj&)GetSdrObject(); sal_Bool bTextFrame(rObj.IsTextFrame()); @@ -227,6 +245,8 @@ namespace sdr } if ( bRemoveRenderGeometry ) { + UpdateTextFrameStatus(); + // local changes, removing cached objects SdrObjCustomShape& rObj = (SdrObjCustomShape&)GetSdrObject(); rObj.InvalidateRenderGeometry(); |