[Libreoffice-commits] .: writerfilter/source
Noel Power
noelp at kemper.freedesktop.org
Thu Feb 2 03:56:56 PST 2012
writerfilter/source/dmapper/DomainMapper.cxx | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
New commits:
commit d8cb61f5f32247a8bbaf89fb910c015b6107f051
Author: Muhammad Haggag <mhaggag at gmail.com>
Date: Wed Feb 1 20:56:12 2012 +0200
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.
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:
More information about the Libreoffice-commits
mailing list