summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2019-01-25 19:23:38 +0300
committerJustin Luth <justin_luth@sil.org>2019-03-09 16:37:35 +0100
commit08e78bc7705042d896f0d7c1eddff81d14c35d56 (patch)
tree00d0ce0728fd2de7deb4f3386659c8be27eff5f2 /sw
parentf66a83c95c21b4311918a64bb85016857b49f4d4 (diff)
tdf#98620 filter\ww8 export: spam bidi=LTR also
If the AppLanguage is RTL, then it is likely that paragraph styles inheriting from the environment will export as RTL. So, if the paragraph is LTR (from a page style for example), then it needs to be specified in order to override the paragraph style. So, this is not just for RTL, even if it is a default value. Exactly what the paragraph style will become is complicated, and not necessarily the same across the different formats. Thus it is safest to just spam the bidi attributes across any questionable paragraphs. A followup commit will similarly spam Justify in these situations, and again the difference between doc and docx suggests it is better to spam more, rather than less. Change-Id: Id184a983675b147f051821e828583a4bf98b3211 Reviewed-on: https://gerrit.libreoffice.org/66922 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 9559ef9d0400..b73fe1754c1f 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -2749,14 +2749,16 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode )
rNode.GetSwAttrSet().GetItem(RES_FRAMEDIR);
if (
(!pItem || pItem->GetValue() == SvxFrameDirection::Environment) &&
- rTextColl.GetFrameDir().GetValue() == SvxFrameDirection::Environment &&
- aAttrIter.IsParaRTL()
+ rTextColl.GetFrameDir().GetValue() == SvxFrameDirection::Environment
)
{
if ( !pTmpSet )
pTmpSet = new SfxItemSet(rNode.GetSwAttrSet());
- pTmpSet->Put(SvxFrameDirectionItem(SvxFrameDirection::Horizontal_RL_TB, RES_FRAMEDIR));
+ if ( bParaRTL )
+ pTmpSet->Put(SvxFrameDirectionItem(SvxFrameDirection::Horizontal_RL_TB, RES_FRAMEDIR));
+ else
+ pTmpSet->Put(SvxFrameDirectionItem(SvxFrameDirection::Horizontal_LR_TB, RES_FRAMEDIR));
}
// move code for handling of numbered,
// but not counted paragraphs to this place. Otherwise, the paragraph