[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - oox/source

Tor Lillqvist tml at collabora.com
Fri Feb 24 14:06:49 UTC 2017


 oox/source/export/drawingml.cxx |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

New commits:
commit 8a4f99175b09eec634a9a31e9e2a55e9c97d02ca
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri Feb 17 11:21:02 2017 +0200

    tdf#90407: Export Text AutoFit to .pptx
    
    Change-Id: I2120f13fff58d4736ab55071236e0c2f80ba2eb0
    (cherry picked from commit 7277991e78c264025b4894ae07b40fb12cd57ce6)
    Reviewed-on: https://gerrit.libreoffice.org/34371
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 1f3b593..bd4c0c1 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -51,6 +51,7 @@
 #include <com/sun/star/drawing/LineDash.hpp>
 #include <com/sun/star/drawing/LineJoint.hpp>
 #include <com/sun/star/drawing/LineStyle.hpp>
+#include <com/sun/star/drawing/TextFitToSizeType.hpp>
 #include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
 #include <com/sun/star/drawing/TextVerticalAdjust.hpp>
 #include <com/sun/star/drawing/XShape.hpp>
@@ -84,11 +85,11 @@
 #include <editeng/svxenum.hxx>
 #include <editeng/unonames.hxx>
 #include <editeng/flditem.hxx>
-#include <svx/unoapi.hxx>
+#include <svx/sdtfsitm.hxx>
 #include <svx/svdoashp.hxx>
+#include <svx/unoapi.hxx>
 #include <svx/unoshape.hxx>
 
-
 using namespace ::css;
 using namespace ::css::beans;
 using namespace ::css::drawing;
@@ -2164,6 +2165,14 @@ void DrawingML::WriteText( const Reference< XInterface >& rXIface, const OUStrin
             GET(bTextAutoGrowHeight, TextAutoGrowHeight);
             mpFS->singleElementNS(XML_a, (bTextAutoGrowHeight ? XML_spAutoFit : XML_noAutofit), FSEND);
         }
+        if (GetDocumentType() == DOCUMENT_PPTX)
+        {
+            TextFitToSizeType eFit = TextFitToSizeType_NONE;
+            if (GETA(TextFitToSize))
+                mAny >>= eFit;
+            if (eFit == TextFitToSizeType_AUTOFIT)
+                mpFS->singleElementNS(XML_a, XML_normAutofit, FSEND);
+        }
         mpFS->endElementNS((nXmlNamespace ? nXmlNamespace : XML_a), XML_bodyPr);
     }
 


More information about the Libreoffice-commits mailing list