[Libreoffice-commits] core.git: Branch 'libreoffice-6-3-4' - xmloff/source

Tamás Zolnai (via logerrit) logerrit at kemper.freedesktop.org
Thu Dec 5 09:48:28 UTC 2019


 xmloff/source/draw/sdpropls.cxx |   46 +++++++++++++++++++---------------------
 1 file changed, 22 insertions(+), 24 deletions(-)

New commits:
commit 8aa778177b31beef5ec00ca995a14c8f6dca347f
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Tue Nov 26 15:23:40 2019 +0100
Commit:     Michael Stahl <michael.stahl at cib.de>
CommitDate: Thu Dec 5 10:47:18 2019 +0100

    tdf#128985: ODP: Style text directions revert to RTL on save and re-open
    
    First we need to check duplicate writing modes and then
    ignore the defult LR_TB writing mode.
    
    Change-Id: I166141abd6286fc48c095ef92751e420fb197b3e
    Reviewed-on: https://gerrit.libreoffice.org/83785
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
    Tested-by: Tamás Zolnai <tamas.zolnai at collabora.com>
    (cherry picked from commit 6f62a5c4ee2c1b7654c7fcaa618fb495e0d32f0a)
    Reviewed-on: https://gerrit.libreoffice.org/83896
    Tested-by: Jenkins
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>
    (cherry picked from commit f187550e052ac659766dc8dc4ef574714e8ac46b)
    Reviewed-on: https://gerrit.libreoffice.org/83970
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    (cherry picked from commit 5d20213462ca346ba942ce5e03a5771d499d3518)
    Reviewed-on: https://gerrit.libreoffice.org/84049
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
    Tested-by: Michael Stahl <michael.stahl at cib.de>

diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx
index dc91e301e60b..3848ef8f68e7 100644
--- a/xmloff/source/draw/sdpropls.cxx
+++ b/xmloff/source/draw/sdpropls.cxx
@@ -1366,35 +1366,13 @@ void XMLShapeExportPropertyMapper::ContextFilter(
                 }
                 break;
             case CTF_WRITINGMODE:
-                {
-                    pShapeWritingMode = property;
-                    text::WritingMode eWritingMode;
-                    if( property->maValue >>= eWritingMode )
-                    {
-                        if( text::WritingMode_LR_TB == eWritingMode )
-                        {
-                            property->mnIndex = -1;
-                            pShapeWritingMode = nullptr;
-                        }
-                    }
-                }
+                pShapeWritingMode = property;
                 break;
             case CTF_CONTROLWRITINGMODE:
                 pControlWritingMode = property;
                 break;
             case CTF_TEXTWRITINGMODE:
-                {
-                    pTextWritingMode = property;
-                    sal_Int32 eWritingMode;
-                    if (property->maValue >>= eWritingMode)
-                    {
-                        if (text::WritingMode2::LR_TB == eWritingMode)
-                        {
-                            property->mnIndex = -1;
-                            pTextWritingMode = nullptr;
-                        }
-                    }
-                }
+                pTextWritingMode = property;
                 break;
             case CTF_REPEAT_OFFSET_X:
                 pRepeatOffsetX = property;
@@ -1487,10 +1465,30 @@ void XMLShapeExportPropertyMapper::ContextFilter(
             pTextWritingMode->mnIndex = -1;
         if( pControlWritingMode )
             pControlWritingMode->mnIndex = -1;
+
+        text::WritingMode eWritingMode;
+        if( pShapeWritingMode->maValue >>= eWritingMode )
+        {
+            if( text::WritingMode_LR_TB == eWritingMode )
+            {
+                pShapeWritingMode->mnIndex = -1;
+                pShapeWritingMode = nullptr;
+            }
+        }
     }
     else if( pTextWritingMode && pControlWritingMode )
     {
         pControlWritingMode->mnIndex = -1;
+
+        sal_Int32 eWritingMode;
+        if (pTextWritingMode->maValue >>= eWritingMode)
+        {
+            if (text::WritingMode2::LR_TB == eWritingMode)
+            {
+                pTextWritingMode->mnIndex = -1;
+                pTextWritingMode = nullptr;
+            }
+        }
     }
 
     // do not export visual area for internal ole objects


More information about the Libreoffice-commits mailing list