File bsc1155846.patch of Package libreoffice

From fe9545f05a5d5ad871564a24a395d9893fe00da4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=BCl=C5=9Fah=20K=C3=B6se?= <gulsah.kose@collabora.com>
Date: Fri, 22 Nov 2019 14:05:24 +0300
Subject: [PATCH] tdf#128952 Set the position of shape for 180 deg.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

If the rotation value is 180, 540, 900... degree with mirror
pShape->GetRotateAngle() returns 0. In that control 0 means
no rotation but that is not true. For that cases (180, 540, 900)
after the angle conversition GetRotateAngle() returns 0. We should
recalculate the position for 0 too.

Change-Id: I14e981235b2d6cd8382d4c9e151bccd2e73a3fd9
Reviewed-on: https://gerrit.libreoffice.org/83468
Tested-by: Jenkins
Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
(cherry picked from commit aca2e4d270f472b2cbdb9084a55f1855529ea705)
Reviewed-on: https://gerrit.libreoffice.org/83536
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
---
 oox/source/export/drawingml.cxx     |   2 +-
 sd/qa/unit/data/pptx/tdf128952.pptx | Bin 0 -> 25578 bytes
 sd/qa/unit/export-tests-ooxml1.cxx  |  17 +++++++++++++++++
 3 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 sd/qa/unit/data/pptx/tdf128952.pptx

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 7962c41f6406..9ac4fd744963 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1576,7 +1576,7 @@ void DrawingML::WriteShapeTransformation( const Reference< XShape >& rXShape, sa
     {
         SdrObject* pShape = GetSdrObjectFromXShape( rXShape );
         nRotation = pShape ? pShape->GetRotateAngle() : 0;
-        if ( nRotation != 0 && GetDocumentType() != DOCUMENT_DOCX )
+        if ( GetDocumentType() != DOCUMENT_DOCX )
         {
             int faccos=bFlipV ? -1 : 1;
             int facsin=bFlipH ? -1 : 1;