diff options
author | Muhammad Haggag <mhaggag@gmail.com> | 2012-02-01 20:56:12 +0200 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2012-02-02 11:57:49 +0000 |
commit | d8cb61f5f32247a8bbaf89fb910c015b6107f051 (patch) | |
tree | a17efb2807882c9a4998d8c3ef644dfc039ea81b | |
parent | 244899285bfc515cca0a323f4aecf06b00342848 (diff) |
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.
-rw-r--r-- | 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 851ded28f019..34c23f71957d 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: |