diff options
author | Muthu Subramanian <sumuthu@collabora.com> | 2014-03-26 16:13:08 +0530 |
---|---|---|
committer | Muthu Subramanian <sumuthu@collabora.com> | 2014-03-27 13:27:28 +0530 |
commit | c17eb67460293fbe72ffa8e80cd10743df493afa (patch) | |
tree | a7761a4611be25abda25d05e52f028fb269a5a0b /oox | |
parent | e3e12b1d1e36e1a0d4fc4c6423b584d677693897 (diff) |
n#862510: anchorCtr controls the anchoring as well.
Change-Id: Ib244d89a9f7d400b3891d477314cd5f0193552e0
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/textbodyproperties.cxx | 4 | ||||
-rw-r--r-- | oox/source/drawingml/textbodypropertiescontext.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/oox/source/drawingml/textbodyproperties.cxx b/oox/source/drawingml/textbodyproperties.cxx index fadeb93154a1..73fb9fbc62e5 100644 --- a/oox/source/drawingml/textbodyproperties.cxx +++ b/oox/source/drawingml/textbodyproperties.cxx @@ -80,8 +80,8 @@ void TextBodyProperties::pushRotationAdjustments( sal_Int32 nRotation ) // Hack for n#760986 // TODO: Preferred method would be to have a textbox on top // of the shape and the place it according to the (off,ext) - if( nOff == 0 && moTextOffX ) nVal = *moTextOffX; - if( nOff == 1 && moTextOffY ) nVal = *moTextOffY; + if( nOff == 0 && moTextOffX && mbAnchorCtr ) nVal = *moTextOffX; + if( nOff == 1 && moTextOffY && mbAnchorCtr ) nVal = *moTextOffY; if( nVal < 0 ) nVal = 0; if( moInsets[i] ) diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx index 1d707d7c9277..a26c75c9a98d 100644 --- a/oox/source/drawingml/textbodypropertiescontext.cxx +++ b/oox/source/drawingml/textbodypropertiescontext.cxx @@ -56,9 +56,9 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler2Helper& rPa mrTextBodyProp.moInsets[i] = GetCoordinate( sValue ); } - bool bAnchorCenter = rAttribs.getBool( XML_anchorCtr, false ); + mrTextBodyProp.mbAnchorCtr = rAttribs.getBool( XML_anchorCtr, false ); if( rAttribs.hasAttribute( XML_anchorCtr ) ) { - if( bAnchorCenter ) + if( mrTextBodyProp.mbAnchorCtr ) mrTextBodyProp.maPropertyMap.setProperty( PROP_TextHorizontalAdjust, TextHorizontalAdjust_CENTER); } |