diff options
Diffstat (limited to 'oox/source/export/drawingml.cxx')
-rw-r--r-- | oox/source/export/drawingml.cxx | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index e81c9026df9b..11d900e28794 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -2584,7 +2584,9 @@ void DrawingML::WriteText( const Reference< XInterface >& rXIface, const OUStrin } } - Sequence<drawing::EnhancedCustomShapeAdjustmentValue>aAdjustmentSeq; + Sequence<drawing::EnhancedCustomShapeAdjustmentValue> aAdjustmentSeq; + uno::Sequence<beans::PropertyValue> aTextPathSeq; + bool bScaleX(false); if (GetProperty(rXPropSet, "CustomShapeGeometry")) { @@ -2610,10 +2612,23 @@ void DrawingML::WriteText( const Reference< XInterface >& rXIface, const OUStrin } else if (aProps[i].Name == "AdjustmentValues") aProps[i].Value >>= aAdjustmentSeq; + else if (aProps[i].Name == "TextPath") + { + aProps[i].Value >>= aTextPathSeq; + for (int k = 0; k < aTextPathSeq.getLength(); k++) + { + if (aTextPathSeq[k].Name == "ScaleX") + aTextPathSeq[k].Value >>= bScaleX; + } + } } } } + bool bFromWordArt = !bScaleX + && ( presetWarp == "textArchDown" || presetWarp == "textArchUp" + || presetWarp == "textButton" || presetWarp == "textCircle"); + TextHorizontalAdjust eHorizontalAlignment( TextHorizontalAdjust_CENTER ); bool bHorizontalCenter = false; if (GetProperty(rXPropSet, "TextHorizontalAdjust")) @@ -2646,6 +2661,7 @@ void DrawingML::WriteText( const Reference< XInterface >& rXIface, const OUStrin } mpFS->startElementNS( (nXmlNamespace ? nXmlNamespace : XML_a), XML_bodyPr, XML_wrap, pWrap, + XML_fromWordArt, bFromWordArt ? "1" : nullptr, XML_lIns, (nLeft != DEFLRINS) ? OString::number(oox::drawingml::convertHmmToEmu(nLeft)).getStr() : nullptr, XML_rIns, (nRight != DEFLRINS) ? OString::number(oox::drawingml::convertHmmToEmu(nRight)).getStr() : nullptr, XML_tIns, (nTop != DEFTBINS) ? OString::number(oox::drawingml::convertHmmToEmu(nTop)).getStr() : nullptr, |