summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-08-05 21:48:24 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-08-06 09:06:01 +0200
commit600025475630c59c53a9086ba6d95124416725b3 (patch)
treedbe3495a336a1f22a1a9a5e5723771802e4da8ce /writerfilter
parent5841be069cf9891669b385f62f2e7f8d8e877981 (diff)
tdf#126309 RTF import: fix not needed para adjust swap for bidi text
Regression from commit 4ee2a882dddb395a816cd54004b634d57cfb2446 (tdf#86182 RTF import: fix handling of \rtlpar, 2015-04-17), now that we don't ignore \rtlpar, it turned out that dmapper should not do paragraph alignment left/right swapping for RTF. It seems this is needed for DOCX, but not for legacy DOC/RTF. See how SwWW8ImplReader::Read_Justify() doesn't do this, either, so this is one of those rare cases when dmapper has to know if the token stream is generated by the DOCX or the RTF tokenizers. Change-Id: Ibd52e3dc9e782e1d985418085b82b2e2628bc1dd Reviewed-on: https://gerrit.libreoffice.org/76995 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index bc5a5e5d1489..c7c57a7682ad 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1208,8 +1208,11 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext )
switch(nSprmId)
{
case NS_ooxml::LN_CT_PPrBase_jc:
- handleParaJustification(nIntValue, rContext, ExchangeLeftRight( rContext, *m_pImpl ));
+ {
+ bool bExchangeLeftRight = !IsRTFImport() && ExchangeLeftRight(rContext, *m_pImpl);
+ handleParaJustification(nIntValue, rContext, bExchangeLeftRight);
break;
+ }
case NS_ooxml::LN_CT_PPrBase_keepLines:
rContext->Insert(PROP_PARA_SPLIT, uno::makeAny(nIntValue == 0));
break;