summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/ooxmlimport/data/tdf95376.docxbin0 -> 25375 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx9
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx8
3 files changed, 17 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tdf95376.docx b/sw/qa/extras/ooxmlimport/data/tdf95376.docx
new file mode 100644
index 000000000000..9bd2d05b2e7a
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/tdf95376.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 384bc3e24f7f..c280b5487048 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -2815,6 +2815,15 @@ DECLARE_OOXMLIMPORT_TEST(testTdf92454, "tdf92454.docx")
CPPUNIT_ASSERT_EQUAL(beans::PropertyState_DIRECT_VALUE, xParagraph->getPropertyState("ParaFirstLineIndent"));
}
+DECLARE_OOXMLIMPORT_TEST(testTdf95376, "tdf95376.docx")
+{
+ uno::Reference<beans::XPropertyState> xParagraph(getParagraph(2), uno::UNO_QUERY);
+ // This was beans::PropertyState_DIRECT_VALUE: indentation-from-numbering
+ // did not have priority over indentation-from-paragraph-style, due to a
+ // filter workaround that's not correct here.
+ CPPUNIT_ASSERT_EQUAL(beans::PropertyState_DEFAULT_VALUE, xParagraph->getPropertyState("ParaFirstLineIndent"));
+}
+
DECLARE_OOXMLIMPORT_TEST(testTdf92124, "tdf92124.docx")
{
// Get the second paragraph's numbering style's 1st level's suffix.
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 76db49760142..9a3ae425f27d 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1196,6 +1196,14 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
rContext->Insert( PROP_NUMBERING_RULES, aRules );
// erase numbering from pStyle if already set
rContext->Erase(PROP_NUMBERING_STYLE_NAME);
+
+ // Indentation can came from:
+ // 1) Paragraph style's numbering's indentation: the current non-style numId has priority over it.
+ // 2) Numbering's indentation: Writer handles that natively, so it should not be set on rContext.
+ // 3) Paragraph style's indentation: ditto.
+ // 4) Direct paragraph formatting: that will came later.
+ // So no situation where keeping indentation at this point would make sense -> erase.
+ rContext->Erase(PROP_PARA_FIRST_LINE_INDENT);
}
}
else