summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-03-14 09:38:44 +0100
committerAndras Timar <andras.timar@collabora.com>2017-03-17 11:58:43 +0100
commit6ed2efbb59400df46f14f3729e5e7189aa4a8833 (patch)
tree9b91648aa3da878cba45fa3a88dd8a1a55af8c27 /writerfilter
parente3632cc981208fbfbd7c56ebf7b49164f881a580 (diff)
tdf#105729 RTF import: \ltrpar should not override \qc from style
This is similar to commit 92fd894ea18672cba4cf961bdc4c0bc98f168102 (tdf#94435 RTF import: \ltrpar should not override \qc, 2015-10-05), except that here the \qc is inherited from the style, it's not a direct formatting. The problematic code was added in commit 2638faa2e834c2da4c195224fd88d32c29b3d0cc (writerfilter08ooo330: applied patch for writerfilter08, 2010-07-28), and it's not really clear to me what is its purpose, given that the DOC import equivalent in SwWW8ImplReader::Read_ParaBiDi() doesn't set the paragraph alignment. Fix the situation by not touching the paragraph alignment for the RTF case at least. (cherry picked from commit 2cc5f18d10cf6ef1349d9518e6f67977f7c5d9bf) Change-Id: I2baa2c8c8012d972740da7cf3f710117812859b3 Reviewed-on: https://gerrit.libreoffice.org/35190 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> (cherry picked from commit b5c4e120540053d0cb737720503cb7038f12d5bd)
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index fe7b9a97b0b4..79a12523f999 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1445,12 +1445,14 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext )
if (nIntValue != 0)
{
rContext->Insert(PROP_WRITING_MODE, uno::makeAny( text::WritingMode2::RL_TB ));
- rContext->Insert(PROP_PARA_ADJUST, uno::makeAny( style::ParagraphAdjust_RIGHT ), /*bOverwrite=*/false);
+ if (!IsRTFImport())
+ rContext->Insert(PROP_PARA_ADJUST, uno::makeAny( style::ParagraphAdjust_RIGHT ), /*bOverwrite=*/false);
}
else
{
rContext->Insert(PROP_WRITING_MODE, uno::makeAny( text::WritingMode2::LR_TB ));
- rContext->Insert(PROP_PARA_ADJUST, uno::makeAny( style::ParagraphAdjust_LEFT ), /*bOverwrite=*/false);
+ if (!IsRTFImport())
+ rContext->Insert(PROP_PARA_ADJUST, uno::makeAny( style::ParagraphAdjust_LEFT ), /*bOverwrite=*/false);
}
}