[Libreoffice-commits] core.git: 2 commits - cui/source include/svx sd/source svx/source
Caolán McNamara
caolanm at redhat.com
Thu Jun 9 09:00:15 UTC 2016
cui/source/tabpages/textattr.cxx | 8 ++++----
include/svx/sdasitm.hxx | 4 ----
include/svx/svddef.hxx | 3 +--
sd/source/core/stlsheet.cxx | 6 +++---
svx/source/svdraw/svdattr.cxx | 2 --
5 files changed, 8 insertions(+), 15 deletions(-)
New commits:
commit 8c5452044b54b00a8cd5cd98b01d61995d7e2660
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jun 9 09:15:55 2016 +0100
Resolves: tdf#93135 there is no SDRATTR_TEXT_AUTOGROWSIZE property
as far as I can see there is no use of SDRATTR_TEXT_AUTOGROWSIZE anywhere,
just a reuse of SDRATTR_TEXT_AUTOGROWHEIGHT for a different mechanism to resize
the surrounding shape to fit text in custom shapes.
Note there is another different feature to resize text to fit into its frame
of SDRATTR_TEXT_FITTOSIZE.
Change-Id: Icf08966c70ef79271f462da7d4b2c6e8e855d5df
diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx
index 1e92b6c..29e6325 100644
--- a/cui/source/tabpages/textattr.cxx
+++ b/cui/source/tabpages/textattr.cxx
@@ -44,7 +44,7 @@ const sal_uInt16 SvxTextAttrPage::pRanges[] =
SDRATTR_MISC_FIRST
, SDRATTR_TEXT_HORZADJUST
, SDRATTR_TEXT_WORDWRAP
- , SDRATTR_TEXT_AUTOGROWSIZE
+ , SDRATTR_TEXT_WORDWRAP
, 0
};
diff --git a/include/svx/sdasitm.hxx b/include/svx/sdasitm.hxx
index a927467..6e19e3f 100644
--- a/include/svx/sdasitm.hxx
+++ b/include/svx/sdasitm.hxx
@@ -96,10 +96,6 @@ inline SdrOnOffItem makeSdrTextWordWrapItem( bool bAuto ) {
return SdrOnOffItem( SDRATTR_TEXT_WORDWRAP, bAuto );
}
-inline SdrOnOffItem makeSdrTextAutoGrowSizeItem( bool bAuto ) {
- return SdrOnOffItem( SDRATTR_TEXT_AUTOGROWSIZE, bAuto ) ;
-}
-
// some useful inline methods
inline size_t SdrCustomShapeGeometryItem::PropertyPairHash::operator()( const SdrCustomShapeGeometryItem::PropertyPair &r1 ) const
diff --git a/include/svx/svddef.hxx b/include/svx/svddef.hxx
index 5b3e5e9..733e6b0 100644
--- a/include/svx/svddef.hxx
+++ b/include/svx/svddef.hxx
@@ -111,8 +111,7 @@
#define SDRATTR_XMLATTRIBUTES (SDRATTR_MISC_FIRST +23) /* 1120 */ /* 1120 */ /* 1103 */ /* Pool V2 */
#define SDRATTR_TEXT_USEFIXEDCELLHEIGHT (SDRATTR_MISC_FIRST +24) /* 1121 */ /* 1121 */ /* 1104 */ /* Pool V2 */
#define SDRATTR_TEXT_WORDWRAP (SDRATTR_MISC_FIRST +25) /* 1122 */ /* 1122 */ /* 1105 */ /* Pool V2 */
-#define SDRATTR_TEXT_AUTOGROWSIZE (SDRATTR_MISC_FIRST +26) /* 1123 */ /* 1123 */ /* 1106 */ /* Pool V2 */
-#define SDRATTR_TEXT_CHAINNEXTNAME (SDRATTR_MISC_FIRST + 27) /* 1124 */ /* 11124 */
+#define SDRATTR_TEXT_CHAINNEXTNAME (SDRATTR_MISC_FIRST +26) /* 1123 */ /* 1123 */ /* 1106 */ /* Pool V2 */
#define SDRATTR_MISC_LAST (SDRATTR_TEXT_CHAINNEXTNAME) /* 1125 */ /* 1125 */ /* 1108 */ /* Pool V1: 1056 */
#define SDRATTR_EDGE_FIRST (SDRATTR_MISC_LAST + 1) /* 1127 */ /* Pool V4 */
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 22e3060..2202ee2 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -231,7 +231,7 @@ SfxItemSet& SdStyleSheet::GetItemSet()
SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST,
SDRATTR_TEXT_MINFRAMEHEIGHT, SDRATTR_TEXT_CONTOURFRAME,
- SDRATTR_TEXT_WORDWRAP, SDRATTR_TEXT_AUTOGROWSIZE,
+ SDRATTR_TEXT_WORDWRAP, SDRATTR_TEXT_WORDWRAP,
SDRATTR_EDGE_FIRST, SDRATTR_EDGE_LAST,
SDRATTR_MEASURE_FIRST, SDRATTR_MEASURE_LAST,
@@ -260,7 +260,7 @@ SfxItemSet& SdStyleSheet::GetItemSet()
SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST,
SDRATTR_TEXT_MINFRAMEHEIGHT, SDRATTR_TEXT_CONTOURFRAME,
- SDRATTR_TEXT_WORDWRAP, SDRATTR_TEXT_AUTOGROWSIZE,
+ SDRATTR_TEXT_WORDWRAP, SDRATTR_TEXT_WORDWRAP,
EE_PARA_START, EE_CHAR_END,
@@ -297,7 +297,7 @@ SfxItemSet& SdStyleSheet::GetItemSet()
SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST,
SDRATTR_TEXT_MINFRAMEHEIGHT, SDRATTR_TEXT_CONTOURFRAME,
- SDRATTR_TEXT_WORDWRAP, SDRATTR_TEXT_AUTOGROWSIZE,
+ SDRATTR_TEXT_WORDWRAP, SDRATTR_TEXT_WORDWRAP,
SDRATTR_EDGE_FIRST, SDRATTR_EDGE_LAST,
SDRATTR_MEASURE_FIRST, SDRATTR_MEASURE_LAST,
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index 65b1b12..31d09dd 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -163,7 +163,6 @@ SdrItemPool::SdrItemPool(
mppLocalPoolDefaults[SDRATTR_TEXT_CHAINNEXTNAME -SDRATTR_START]=new SfxStringItem(SDRATTR_TEXT_CHAINNEXTNAME, "");
mppLocalPoolDefaults[SDRATTR_TEXT_USEFIXEDCELLHEIGHT -SDRATTR_START]=new SdrTextFixedCellHeightItem;
mppLocalPoolDefaults[SDRATTR_TEXT_WORDWRAP -SDRATTR_START]=new SdrOnOffItem(SDRATTR_TEXT_WORDWRAP, true);
- mppLocalPoolDefaults[SDRATTR_TEXT_AUTOGROWSIZE -SDRATTR_START]=new SdrOnOffItem(SDRATTR_TEXT_AUTOGROWSIZE, false);
mppLocalPoolDefaults[SDRATTR_EDGEKIND -SDRATTR_START]=new SdrEdgeKindItem;
mppLocalPoolDefaults[SDRATTR_EDGENODE1HORZDIST-SDRATTR_START]=new SdrEdgeNode1HorzDistItem(nDefEdgeDist);
mppLocalPoolDefaults[SDRATTR_EDGENODE1VERTDIST-SDRATTR_START]=new SdrEdgeNode1VertDistItem(nDefEdgeDist);
@@ -499,7 +498,6 @@ void SdrItemPool::TakeItemName(sal_uInt16 nWhich, OUString& rItemName)
case SDRATTR_TEXT_USEFIXEDCELLHEIGHT: nResId = SIP_SA_TEXT_USEFIXEDCELLHEIGHT;break;
case SDRATTR_TEXT_WORDWRAP : nResId = SIP_SA_WORDWRAP;break;
case SDRATTR_TEXT_CHAINNEXTNAME : nResId = SIP_SA_CHAINNEXTNAME;break;
- case SDRATTR_TEXT_AUTOGROWSIZE : nResId = SIP_SA_AUTOGROWSIZE;break;
case SDRATTR_EDGEKIND : nResId = SIP_SA_EDGEKIND;break;
case SDRATTR_EDGENODE1HORZDIST : nResId = SIP_SA_EDGENODE1HORZDIST;break;
commit d1df071c3fc452817746a8daa13000d2df667aba
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jun 9 09:08:08 2016 +0100
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
diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx
index 315e664..1e92b6c 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();
More information about the Libreoffice-commits
mailing list