[Libreoffice-commits] core.git: sw/source

Faisal M. Al-Otaibi fmalotaibi at kacst.edu.sa
Sat Dec 7 23:08:32 PST 2013


 sw/source/filter/ww8/wrtw8nds.cxx |   15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

New commits:
commit 4add062a1b1feb11f9b14d3a0593a8f9b27f2404
Author: Faisal M. Al-Otaibi <fmalotaibi at kacst.edu.sa>
Date:   Sun Dec 8 09:59:11 2013 +0300

    docx: fdo#44029 export the right alignment when locale are RTL.
    
    Change-Id: I771eb0d0a90816f0c4cbd66cfcb755f67455bb9b

diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 9fd7336..faae557 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -25,6 +25,7 @@
 #include <functional>
 #include <iostream>
 
+#include <i18nlangtag/mslangid.hxx>
 #include <hintids.hxx>
 #include <comphelper/string.hxx>
 #include <tools/urlobj.hxx>
@@ -1291,11 +1292,21 @@ short MSWordExportBase::GetDefaultFrameDirection( ) const
             nDir = pDoc->GetTextDirection( aPos );
         }
         else if ( pOutFmtNode->ISA( SwTxtFmtColl ) )
-            nDir = FRMDIR_HORI_LEFT_TOP;    //what else can we do :-(
+        {
+            if ( MsLangId::isRightToLeft( static_cast<LanguageType>(GetAppLanguage())) )
+                nDir = FRMDIR_HORI_RIGHT_TOP;
+            else
+                nDir = FRMDIR_HORI_LEFT_TOP;    //what else can we do :-(
+        }
     }
 
     if ( nDir == FRMDIR_ENVIRONMENT )
-        nDir = FRMDIR_HORI_LEFT_TOP;        //Set something
+    {
+        if( MsLangId::isRightToLeft( static_cast<LanguageType>(GetAppLanguage())) )
+            nDir = FRMDIR_HORI_RIGHT_TOP;
+        else
+            nDir = FRMDIR_HORI_LEFT_TOP;        //Set something
+    }
 
     return nDir;
 }


More information about the Libreoffice-commits mailing list