summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMuthu Subramanian <sumuthu@collabora.com>2014-03-26 16:13:08 +0530
committerAndras Timar <andras.timar@collabora.com>2014-05-11 17:30:46 +0200
commit709f06eb261b3225cd4b56a7efb8e2d591909960 (patch)
treec76fbce5406c10fd55ec56b5bfbadaf7471bd460 /oox
parent33e1344260d9ac554a11f94e24d7647efe588c9b (diff)
n#862510: anchorCtr controls the anchoring as well.
(cherry picked from commit c17eb67460293fbe72ffa8e80cd10743df493afa) Signed-off-by: Andras Timar <andras.timar@collabora.com> Conflicts: oox/source/drawingml/textbodypropertiescontext.cxx Change-Id: Ib244d89a9f7d400b3891d477314cd5f0193552e0
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/textbodyproperties.cxx4
-rw-r--r--oox/source/drawingml/textbodypropertiescontext.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/oox/source/drawingml/textbodyproperties.cxx b/oox/source/drawingml/textbodyproperties.cxx
index 36f39d93953f..9e538973201e 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 358db9f9c987..b580be35fa6c 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[ PROP_TextHorizontalAdjust ] <<=
TextHorizontalAdjust_CENTER;
}