summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorGülşah Köse <gulsah.kose@collabora.com>2019-11-27 13:35:29 +0300
committerAndras Timar <andras.timar@collabora.com>2019-11-29 09:06:35 +0100
commita06884e5967c4ebf730772b25682cf85dd026d50 (patch)
tree2050d24ae2fe4f8bbd741ac694314003e324d8a0 /oox
parent5572f20c0f256140aaab38d3d1b3e53f8588112f (diff)
tdf#127090 Export textbox rotation attribute.
In case "rotated textbox in a custom shape" handle draw:text-rotate-angle attribute while exporting ODP to PPTX. Change-Id: I13b99da586af5e77e51a7cc93a751ab21bed7170 Reviewed-on: https://gerrit.libreoffice.org/83888 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/84023 Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/drawingml.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 9e5b3f2648f4..e3b5e80ba2e4 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -2619,7 +2619,8 @@ void DrawingML::WriteText( const Reference< XInterface >& rXIface, const OUStrin
if( !xXText.is() )
return;
- sal_Int32 nTextRotateAngle = 0;
+ double nTextRotateAngle = 0;
+ sal_Int32 nTextPreRotateAngle = 0;
#define DEFLRINS 254
#define DEFTBINS 127
@@ -2665,20 +2666,21 @@ void DrawingML::WriteText( const Reference< XInterface >& rXIface, const OUStrin
{
for ( sal_Int32 i = 0, nElems = aProps.getLength(); i < nElems; ++i )
{
- if ( aProps[ i ].Name == "TextPreRotateAngle" && ( aProps[ i ].Value >>= nTextRotateAngle ) )
+ if ( aProps[ i ].Name == "TextPreRotateAngle" && ( aProps[ i ].Value >>= nTextPreRotateAngle ) )
{
- if ( nTextRotateAngle == -90 )
+ if ( nTextPreRotateAngle == -90 )
{
sWritingMode = "vert";
bVertical = true;
}
- else if ( nTextRotateAngle == -270 )
+ else if ( nTextPreRotateAngle == -270 )
{
sWritingMode = "vert270";
bVertical = true;
}
- break;
}
+ else if( aProps[ i ].Name == "TextRotateAngle" )
+ aProps[ i ].Value >>= nTextRotateAngle;
}
}
}
@@ -2722,7 +2724,7 @@ void DrawingML::WriteText( const Reference< XInterface >& rXIface, const OUStrin
XML_anchor, sVerticalAlignment,
XML_anchorCtr, bHorizontalCenter ? "1" : nullptr,
XML_vert, sWritingMode,
- XML_rot, (nTextRotateAngle != 0) ? oox::drawingml::calcRotationValue( nTextRotateAngle * 100 ).getStr() : nullptr );
+ XML_rot, (nTextPreRotateAngle + nTextRotateAngle != 0) ? oox::drawingml::calcRotationValue( (nTextPreRotateAngle + nTextRotateAngle) * 100 ).getStr() : nullptr );
if( !presetWarp.isEmpty())
{
mpFS->singleElementNS(XML_a, XML_prstTxWarp, XML_prst, presetWarp.toUtf8());