libreoffice/text-alignment-in-shape.diff
Andras Timar 0a6b54b4d3 - bnc#875713 - LO-L3: DOCX import: picture brigtness/contrast not imported
* docx-brightness-contrast-1.diff
  * docx-brightness-contrast-2.diff

- bnc#875712 - LO-L3: DOC import: picture brigtness/contrast not imported
  * doc-brightness-contrast.diff

- bnc#870240 - LO-L3: pptx import file has text rotated on slide
  * fix-text-rotation.diff

- bnc#870234 - LO-L3: pptx file has text imported as black instead of white
  * import-gradfill-for-text-colors.diff

- bnc#870228 - LO-L3: Text inside the circle is not centered
  * text-alignment-in-shape.diff

- bnc#863021 - LO-L3: Allow setting language for slide or presentation entirely
  * set-language-in-impress.diff

- fix build on openSUSE 12.3:
  * disable-firebird-unit-test.diff

OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=154
2014-05-20 10:02:11 +00:00

59 lines
2.8 KiB
Diff

From 709f06eb261b3225cd4b56a7efb8e2d591909960 Mon Sep 17 00:00:00 2001
From: Muthu Subramanian <sumuthu@collabora.com>
Date: Wed, 26 Mar 2014 10:43:08 +0000
Subject: 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
---
diff --git a/include/oox/drawingml/textbodyproperties.hxx b/include/oox/drawingml/textbodyproperties.hxx
index 3fb0684..af68f20 100644
--- a/include/oox/drawingml/textbodyproperties.hxx
+++ b/include/oox/drawingml/textbodyproperties.hxx
@@ -34,6 +34,7 @@ struct TextBodyProperties
{
PropertyMap maPropertyMap;
OptValue< sal_Int32 > moRotation;
+ bool mbAnchorCtr;
OptValue< sal_Int32 > moVert;
boost::optional< sal_Int32 > moInsets[4];
boost::optional< sal_Int32 > moTextOffX;
diff --git a/oox/source/drawingml/textbodyproperties.cxx b/oox/source/drawingml/textbodyproperties.cxx
index 36f39d9..9e53897 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 358db9f..b580be3 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;
}
--
cgit v0.9.0.2-2-gbebe