sw/source/filter/ww8/docxattributeoutput.cxx |   25 +++++++++++--------------
 1 file changed, 11 insertions(+), 14 deletions(-)

New commits:
commit cafed2e65e86d813822d2c650fa057f1a1f81c06
Author:     Patrick Jaap <patrick.j...@tu-dresden.de>
AuthorDate: Wed Apr 3 14:58:05 2019 +0200
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Thu Apr 11 10:15:29 2019 +0200

    Fix in convertToOOXMLHoriOrient: values of VertOrient were taken
    
    Change-Id: I47093292aeed5c0579dd4b365561ee86935632e4
    Reviewed-on: https://gerrit.libreoffice.org/70197
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>
    (cherry picked from commit 2111f607973166ebc39414ba6d2019832bcfe4da)
    Reviewed-on: https://gerrit.libreoffice.org/70513
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 7d6a618b554f..aab60d8cec1c 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -512,24 +512,21 @@ static OString convertToOOXMLVertOrient(sal_Int16 nOrient)
     }
 }
 
-static OString convertToOOXMLHoriOrient(sal_Int16 nOrient)
+static OString convertToOOXMLHoriOrient(sal_Int16 nOrient, bool bIsPosToggle)
 {
     switch( nOrient )
     {
-        case text::VertOrientation::NONE:
+        case text::HoriOrientation::NONE:
             return OString();
-        case text::VertOrientation::CENTER:
-        case text::VertOrientation::LINE_CENTER:
-            return OString( "center" );
-        case text::VertOrientation::BOTTOM:
-            return OString( "bottom" );
-        case text::VertOrientation::LINE_BOTTOM:
-            return OString( "outside" );
-        case text::VertOrientation::TOP:
-            return OString( "top" );
-        case text::VertOrientation::LINE_TOP:
+        case text::HoriOrientation::LEFT:
+            return OString( bIsPosToggle ? "inside" : "left" );
+        case text::HoriOrientation::RIGHT:
+            return OString( bIsPosToggle ? "outside" : "right" );
+        case text::HoriOrientation::CENTER:
+        // fall-through indended
+        case text::HoriOrientation::FULL:
         default:
-            return OString( "inside" );
+            return OString( "center" );
     }
 }
 
@@ -8407,7 +8404,7 @@ void DocxAttributeOutput::FormatVertOrientation( const 
SwFormatVertOrient& rFlyV
 
 void DocxAttributeOutput::FormatHorizOrientation( const SwFormatHoriOrient& 
rFlyHori )
 {
-    OString sAlign   = convertToOOXMLHoriOrient( rFlyHori.GetHoriOrient() );
+    OString sAlign   = convertToOOXMLHoriOrient( rFlyHori.GetHoriOrient(), 
rFlyHori.IsPosToggle() );
     OString sHAnchor = convertToOOXMLHoriOrientRel( 
rFlyHori.GetRelationOrient() );
 
     if (m_rExport.SdrExporter().getTextFrameSyntax())
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to