summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-05-16 08:34:40 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-05-16 10:05:30 +0200
commitf528f9499bd91b700c549575e88fa102cfffede9 (patch)
tree3f6f1f61de123f5329cfc175ebd3bbaffac98574 /writerfilter
parent6170d7c6063da89929577702189e4e4bfe564cc7 (diff)
tdf#106953 RTF import: fix missing paragraph left margin
See commit 3915bf2dc877d5f1140798e24933db0f21386a4a (tdf#95376 DOCX import: fix incorrectly indented tab stops, 2016-01-26) for the various sources that can determine the paragraph indentation. In this case the problem was that too aggressive RTF style deduplication removed a direct indent, which then meant a fallback to the ind-from-num value, not to the ind-from-parastyle one. Change-Id: I3b47b2bbeaaedf405baef24505d23dc49bd01865 Reviewed-on: https://gerrit.libreoffice.org/37660 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/rtftok/rtfdispatchvalue.cxx2
-rw-r--r--writerfilter/source/rtftok/rtfsprm.cxx9
2 files changed, 8 insertions, 3 deletions
diff --git a/writerfilter/source/rtftok/rtfdispatchvalue.cxx b/writerfilter/source/rtftok/rtfdispatchvalue.cxx
index bba6d4d29c83..527d39da68db 100644
--- a/writerfilter/source/rtftok/rtfdispatchvalue.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchvalue.cxx
@@ -628,7 +628,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
if (m_aStates.top().eDestination == Destination::LISTOVERRIDEENTRY)
m_aStates.top().aTableAttributes.set(NS_ooxml::LN_CT_AbstractNum_nsid, pIntValue);
else
- putNestedSprm(m_aStates.top().aParagraphSprms, NS_ooxml::LN_CT_PPrBase_tabs, NS_ooxml::LN_CT_NumPr_numId, pIntValue);
+ putNestedSprm(m_aStates.top().aParagraphSprms, NS_ooxml::LN_CT_PPrBase_numPr, NS_ooxml::LN_CT_NumPr_numId, pIntValue);
}
break;
case RTF_UC:
diff --git a/writerfilter/source/rtftok/rtfsprm.cxx b/writerfilter/source/rtftok/rtfsprm.cxx
index 3f4f6659d2e8..2304fa826044 100644
--- a/writerfilter/source/rtftok/rtfsprm.cxx
+++ b/writerfilter/source/rtftok/rtfsprm.cxx
@@ -158,11 +158,16 @@ static bool isSPRMDeduplicateBlacklist(Id nId)
{
switch (nId)
{
+ // See the NS_ooxml::LN_CT_PPrBase_tabs handler in DomainMapper,
+ // deduplication is explicitly not wanted for these tokens.
case NS_ooxml::LN_CT_TabStop_val:
case NS_ooxml::LN_CT_TabStop_leader:
case NS_ooxml::LN_CT_TabStop_pos:
- // See the NS_ooxml::LN_CT_PPrBase_tabs handler in DomainMapper,
- // deduplication is explicitly not wanted for these tokens.
+ // Erasing these just because they equal to the style one is
+ // problematic, as then the used value won't be from the style, but
+ // possibly from the numbering.
+ case NS_ooxml::LN_CT_Ind_left:
+ case NS_ooxml::LN_CT_Ind_right:
return true;
default: