summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-09-19 09:17:25 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-09-19 16:18:54 +0200
commitc72a1a74b5b1064fc9cdf9994b11fce26d866e26 (patch)
treeebf199f2a5518452cdbc7354a6d04cd513911aed /writerfilter
parentf00ca5f26492a56378da0c7e54003419d8c7dd05 (diff)
Related: tdf#112211 DOCX import: fix handling of missing first ind in <w:lvl>
Usually a DOCX numbering definition has multiple levels, each level containing a <w:ind ... w:hanging="..."/> element. When this is missing, we should default to the Word default, not to the Writer one. This makes the DOCX version of tdf#106953 imported correctly, in preparation of dropping the original fix that helped RTF only. [ The DOC version of the bugdoc is still not imported correctly. ] Change-Id: Ib7fc1de55316a73188c023665a585ac7056341f7 Reviewed-on: https://gerrit.libreoffice.org/42447 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/NumberingManager.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 5da02b0004d4..2fe06c4d9508 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -304,6 +304,9 @@ uno::Sequence< beans::PropertyValue > ListLevel::GetLevelProperties( )
boost::optional<PropertyMap::Property> aProp = getProperty(rReadId);
if (aProp)
aNumberingProperties.emplace_back( getPropertyName(aProp->first), 0, aProp->second, beans::PropertyState_DIRECT_VALUE );
+ else if (rReadId == PROP_FIRST_LINE_INDENT)
+ // Writer default is -360 twips, Word default seems to be 0.
+ aNumberingProperties.emplace_back("FirstLineIndent", 0, uno::makeAny(static_cast<sal_Int32>(0)), beans::PropertyState_DIRECT_VALUE);
}
boost::optional<PropertyMap::Property> aPropFont = getProperty(PROP_CHAR_FONT_NAME);