summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2017-02-17 11:21:02 +0200
committerTor Lillqvist <tml@collabora.com>2017-02-17 15:23:07 +0200
commit7277991e78c264025b4894ae07b40fb12cd57ce6 (patch)
tree946760a2b7fb2e5e90d5fde3492c693efe735a7e /oox
parent7fbdd8b7d3741d55b229977f9e6d6213af5fa542 (diff)
tdf#90407: Export Text AutoFit to .pptx
Change-Id: I2120f13fff58d4736ab55071236e0c2f80ba2eb0
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/drawingml.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 18240721ac4b..b019f5699317 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -52,6 +52,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>
@@ -85,11 +86,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;
@@ -2176,6 +2177,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);
}