summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-06-09 09:08:08 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-06-09 10:00:14 +0100
commit65d1e5294c9f0d9300dbb92f6670cdcafa8a1ac2 (patch)
treea1f0379621012b1a26f12202311a0a6914e5a301 /cui/source
parent3217029eaf355ee059dc4d371cf1e65c346405dd (diff)
Resolves: tdf#93135 can't resize shape with "resize shape to fit text"
These are regressions from... commit 4a847bb4a2002d7f8f5854b7276ac67d369bdd3b Date: Sun Aug 2 21:20:48 2015 +0200 tdf#93079: "resize shape to fit text" state can't be disabled Wrong copy-paste and commit b2bae9b940fc34d2eecd7839e3cba1f41d111e87 Date: Thu Apr 9 23:38:47 2015 +0200 Related tdf#34467: Fit to Frame for text boxes is broken Wrong Copy-paste Its turns out that there is *no* SDRATTR_TEXT_AUTOGROWSIZE property. Only a SDRATTR_TEXT_AUTOGROWHEIGHT property e.g. see CustomShapeProperties::UpdateTextFrameStatus of svx/source/sdr/properties/customshapeproperties.cxx "change TextFrame flag when bResizeShapeToFitText changes (which is mapped on the item SDRATTR_TEXT_AUTOGROWHEIGHT for custom shapes, argh)" So the inconsistency between getting the itemstate of SDRATTR_TEXT_AUTOGROWSIZE and then setting/getting SDRATTR_TEXT_AUTOGROWHEIGHT is better resolved by getting the itemstate of SDRATTR_TEXT_AUTOGROWHEIGHT will have a follow up patch to remove SDRATTR_TEXT_AUTOGROWSIZE to show its not used by anything Change-Id: I8b8abde17c15761c621815ed2be62d6a8a5cd69a (cherry picked from commit d1df071c3fc452817746a8daa13000d2df667aba)
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/tabpages/textattr.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx
index 315e6649c885..1e92b6c4cdb6 100644
--- a/cui/source/tabpages/textattr.cxx
+++ b/cui/source/tabpages/textattr.cxx
@@ -204,9 +204,9 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs )
m_pTsbAutoGrowWidth->SaveValue();
// autogrowsize
- if ( rAttrs->GetItemState( SDRATTR_TEXT_AUTOGROWSIZE ) != SfxItemState::DONTCARE )
+ if ( rAttrs->GetItemState( SDRATTR_TEXT_AUTOGROWHEIGHT ) != SfxItemState::DONTCARE )
{
- m_pTsbAutoGrowSize->SetState( static_cast<const SdrOnOffItem&>( rAttrs->Get( SDRATTR_TEXT_AUTOGROWSIZE ) ).
+ m_pTsbAutoGrowSize->SetState( static_cast<const SdrOnOffItem&>( rAttrs->Get( SDRATTR_TEXT_AUTOGROWHEIGHT ) ).
GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
m_pTsbAutoGrowSize->EnableTriState( false );
}
@@ -384,7 +384,7 @@ bool SvxTextAttrPage::FillItemSet( SfxItemSet* rAttrs)
eState = m_pTsbAutoGrowSize->GetState();
if( m_pTsbAutoGrowSize->IsValueChangedFromSaved() )
{
- rAttrs->Put( makeSdrTextAutoGrowSizeItem ( TRISTATE_TRUE == eState ) );
+ rAttrs->Put( makeSdrTextAutoGrowHeightItem( TRISTATE_TRUE == eState ) );
}
eState = m_pTsbWordWrapText->GetState();