summaryrefslogtreecommitdiff
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 09:59:47 +0100
commitd1df071c3fc452817746a8daa13000d2df667aba (patch)
treecc5fa4b6a85e117c47d4a914aaea6e9baa0fe8fe
parent87def0e248cef61e5be8acfb66c191f8552db344 (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
-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();