summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFaisal M. Al-Otaibi <fmalotaibi@kacst.edu.sa>2013-12-08 09:59:11 +0300
committerFaisal M. Al-Otaibi <fmalotaibi@kacst.edu.sa>2013-12-08 10:07:26 +0300
commit4add062a1b1feb11f9b14d3a0593a8f9b27f2404 (patch)
tree8f002af403883a6c019ca89b67b64e1c7e16870b
parentc6fe5c6f371328cb6cf61d68f016a04f8b635a48 (diff)
docx: fdo#44029 export the right alignment when locale are RTL.
Change-Id: I771eb0d0a90816f0c4cbd66cfcb755f67455bb9b
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 9fd7336c762b..faae5573d4df 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;
}