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

New commits:
commit b25c9bd18cfa544578ac87020b2b41d881e73e7f
Author:     Szabolcs Toth <toth.szabo...@nisz.hu>
AuthorDate: Mon Jun 14 10:32:56 2021 +0200
Commit:     László Németh <nem...@numbertext.org>
CommitDate: Mon Jun 21 16:41:18 2021 +0200

    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 <nem...@numbertext.org>
    Reviewed-by: László Németh <nem...@numbertext.org>
    (cherry picked from commit 20d2c2fe481eb66f518c554f8588ec87e0ee125a)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117561
    Tested-by: Jenkins

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.
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to