summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/ooxmlimport/data/tdf92454.docxbin0 -> 32409 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx9
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx7
3 files changed, 16 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tdf92454.docx b/sw/qa/extras/ooxmlimport/data/tdf92454.docx
new file mode 100644
index 000000000000..70426685e207
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/tdf92454.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 0f43ba9b7572..2345c5ccc7c0 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -2818,6 +2818,15 @@ DECLARE_OOXMLIMPORT_TEST(testIndents, "indents.docx")
} while (xParaEnum->hasMoreElements());
}
+DECLARE_OOXMLIMPORT_TEST(testTdf92454, "tdf92454.docx")
+{
+ // The first paragraph had a large indentation / left margin as inheritance
+ // in Word and Writer works differently, and no direct value was set to be
+ // explicit.
+ uno::Reference<beans::XPropertyState> xParagraph(getParagraph(1), uno::UNO_QUERY);
+ // This was beans::PropertyState_DEFAULT_VALUE.
+ CPPUNIT_ASSERT_EQUAL(beans::PropertyState_DIRECT_VALUE, xParagraph->getPropertyState("ParaFirstLineIndent"));
+}
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 9af39a7927da..eecbb43cfce1 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -2042,6 +2042,13 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
rContext->Insert(PROP_PARA_RIGHT_MARGIN, uno::makeAny(nParaRightMargin));
}
+
+ // Indent properties from the paragraph style have priority
+ // over the ones from the numbering styles in Word, not in
+ // Writer.
+ boost::optional<PropertyMap::Property> oProperty;
+ if (pStyleSheetProperties && (oProperty = pStyleSheetProperties->getProperty(PROP_PARA_FIRST_LINE_INDENT)))
+ rContext->Insert(PROP_PARA_FIRST_LINE_INDENT, oProperty->second);
}
if( pStyleSheetProperties && pStyleSheetProperties->GetListLevel() >= 0 )