summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-08-05 21:48:24 +0200
committerXisco Faulí <xiscofauli@libreoffice.org>2019-08-06 12:47:59 +0200
commit8fad7ee194b8f049ea845bdf9654060111b4e841 (patch)
treeec589b5b15af65b3d24e503b133d10c9257396f7 /writerfilter
parent279d7059cc77061eb9f5d1abe43fe4329ee6e4f6 (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. (cherry picked from commit 600025475630c59c53a9086ba6d95124416725b3) Conflicts: sw/qa/extras/rtfexport/rtfexport4.cxx Change-Id: Ibd52e3dc9e782e1d985418085b82b2e2628bc1dd Reviewed-on: https://gerrit.libreoffice.org/77004 Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
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 195e360a671d..47bd773cec2b 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1209,8 +1209,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;