Kaydet (Commit) 366b9abe authored tarafından Rüdiger Timm's avatar Rüdiger Timm

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
üst 95bfaaab
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: customshapeproperties.cxx,v $ * $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 Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -68,6 +68,17 @@ namespace sdr ...@@ -68,6 +68,17 @@ namespace sdr
{ {
namespace properties 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) SfxItemSet& CustomShapeProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool)
{ {
return *(new SfxItemSet(rPool, return *(new SfxItemSet(rPool,
...@@ -161,9 +172,16 @@ namespace sdr ...@@ -161,9 +172,16 @@ namespace sdr
// call parent // call parent
TextProperties::ItemChange( nWhich, pNewItem ); TextProperties::ItemChange( nWhich, pNewItem );
} }
void CustomShapeProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr)
{
TextProperties::SetStyleSheet( pNewStyleSheet, bDontRemoveHardAttr );
UpdateTextFrameStatus();
}
void CustomShapeProperties::ForceDefaultAttributes() 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(); SdrTextObj& rObj = (SdrTextObj&)GetSdrObject();
sal_Bool bTextFrame(rObj.IsTextFrame()); sal_Bool bTextFrame(rObj.IsTextFrame());
...@@ -227,6 +245,8 @@ namespace sdr ...@@ -227,6 +245,8 @@ namespace sdr
} }
if ( bRemoveRenderGeometry ) if ( bRemoveRenderGeometry )
{ {
UpdateTextFrameStatus();
// local changes, removing cached objects // local changes, removing cached objects
SdrObjCustomShape& rObj = (SdrObjCustomShape&)GetSdrObject(); SdrObjCustomShape& rObj = (SdrObjCustomShape&)GetSdrObject();
rObj.InvalidateRenderGeometry(); rObj.InvalidateRenderGeometry();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment