summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorSzabolcs Toth <toth.szabolcs@nisz.hu>2021-06-14 10:32:56 +0200
committerLászló Németh <nemeth@numbertext.org>2021-06-21 16:41:18 +0200
commitb25c9bd18cfa544578ac87020b2b41d881e73e7f (patch)
tree4265c03872574f29057cb23b4521a13ccbd55c4e /oox
parent9a28c7c61575fd2425eb6b55229df77850dfac48 (diff)
tdf#137000: clean-up "XML shape export: fix upright"
See commit ff5ca4e5fc6a9fb24b0eb6eb629210b024473f67 "tdf#137000 XLSX shape export: fix upright". Change-Id: Ie050da66f1eef4fc325b2acfd0a97d299c268153 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117135 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 20d2c2fe481eb66f518c554f8588ec87e0ee125a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117561 Tested-by: Jenkins
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/drawingml.cxx10
1 files changed, 2 insertions, 8 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 5f42dc18cd75..0372ae804b13 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -3127,13 +3127,7 @@ void DrawingML::WriteText(const Reference<XInterface>& rXIface, bool bBodyPr, bo
std::optional<OUString> sHorzOverflow;
std::optional<OUString> sVertOverflow;
- sal_Int32 nShapeRotateAngle = 0;
- if (GetProperty(rXPropSet, "RotateAngle"))
- nShapeRotateAngle = rXPropSet->getPropertyValue("RotateAngle").get<sal_Int32>() / 300;
- Reference< XPropertySet > xTextSet(xXText, UNO_QUERY);
- sal_Int32 nShapeTextRotateAngle = 0;
- if (GetProperty(xTextSet, "RotateAngle"))
- nShapeTextRotateAngle = rXPropSet->getPropertyValue("RotateAngle").get<sal_Int32>() / 300;
+ sal_Int32 nShapeRotateAngle = rXPropSet->getPropertyValue("RotateAngle").get<sal_Int32>() / 300;
sal_Int16 nCols = 0;
sal_Int32 nColSpacing = -1;
if (GetProperty(rXPropSet, "TextColumns"))
@@ -3193,7 +3187,7 @@ void DrawingML::WriteText(const Reference<XInterface>& rXIface, bool bBodyPr, bo
// Keep upright and make the preRotateAngle 0, it is an attribute
// of textBodyPr and must be 0 when upright is true, otherwise
// bad rotation happens in MSO.
- if (nShapeRotateAngle == nOldShapeRotation && nShapeTextRotateAngle == nOldTextRotation)
+ if (nShapeRotateAngle == nOldShapeRotation && nShapeRotateAngle == nOldTextRotation)
nTextPreRotateAngle = 0;
// So we rotated the shape, in this case lose upright and do
// as LO normally does.