Bug:
https://bugs.freedesktop.org/show_bug.cgi?id=43398
Cause:
dmapper used to treat the presence of a w:BiDi element in a paragraph's
properties as an indicator of RTL directionality, which is incorrect. A
w:BiDi element may have a value of 0, indicating LTR.
Fix: Inspect the integral value of w:BiDi elements before switching to RTL.
Only switch if it's non-zero.
Regards,
--Muhammad
From ed209e3a36f74f7826616deb24e7000b6216af32 Mon Sep 17 00:00:00 2001
From: Muhammad Haggag <mhaggag@gmail.com>
Date: Wed, 1 Feb 2012 20:56:12 +0200
Subject: [PATCH] dmapper: Switch paragraphs to RTL based on the value of
w:BiDi.
This is a fix for 43398: FORMATTING: Documents opened in LibreOffice Writer incorrectly appear as
right justified.
Cause: dmapper used to treat the presence of a w:BiDi element in a paragraph's properties as an
indicator of RTL directionality, which is incorrect. A w:BiDi element may have a value of 0,
indicating LTR.
Fix: Inspect the integral value of w:BiDi elements before switching to RTL.
---
writerfilter/source/dmapper/DomainMapper.cxx | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx
b/writerfilter/source/dmapper/DomainMapper.cxx
index 851ded2..34c23f7 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1812,8 +1812,13 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext,
SprmType
}
break; // sprmPOutLvl
case NS_sprm::LN_PFBiDi:
- rContext->Insert(PROP_WRITING_MODE, false, uno::makeAny( text::WritingMode2::RL_TB ));
- rContext->Insert(PROP_PARA_ADJUST, false, uno::makeAny( style::ParagraphAdjust_RIGHT
));
+ {
+ if (nIntValue != 0)
+ {
+ rContext->Insert(PROP_WRITING_MODE, false, uno::makeAny( text::WritingMode2::RL_TB
));
+ rContext->Insert(PROP_PARA_ADJUST, false, uno::makeAny(
style::ParagraphAdjust_RIGHT ));
+ }
+ }
break; // sprmPFBiDi
case NS_ooxml::LN_EG_SectPrContents_bidi:
--
1.7.5.4
Context
- [Libreoffice] [PATCH] fdo#43398: FORMATTING: Documents opened in LibreOffice Writer incorrectly appear as right justified · Muhammad Haggag
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.