diff options
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/tdf93919.docx | bin | 0 -> 15336 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 6 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 5 |
3 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tdf93919.docx b/sw/qa/extras/ooxmlimport/data/tdf93919.docx Binary files differnew file mode 100644 index 000000000000..c7454690c844 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/tdf93919.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index b85af749d8b3..20e793889db1 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -2846,6 +2846,12 @@ DECLARE_OOXMLIMPORT_TEST(testTdf90153, "tdf90153.docx") CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER, getProperty<text::TextContentAnchorType>(getShape(1), "AnchorType")); } +DECLARE_OOXMLIMPORT_TEST(testTdf93919, "tdf93919.docx") +{ + // This was 0, left margin was not inherited from the list style. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1270), getProperty<sal_Int32>(getParagraph(1), "ParaLeftMargin")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index bf9eb21caf40..cab16efb7f97 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -480,6 +480,11 @@ void DomainMapper::lcl_attribute(Id nName, Value & val) sal_Int32 nValue = ConversionHelper::convertTwipToMM100( nIntValue ); m_pImpl->GetTopContext()->Insert( PROP_PARA_FIRST_LINE_INDENT, uno::makeAny( - nValue )); + + // See above, need to inherit left margin from list style when first is set. + sal_Int32 nParaLeftMargin = m_pImpl->getCurrentNumberingProperty("IndentAt"); + if (nParaLeftMargin != 0) + m_pImpl->GetTopContext()->Insert(PROP_PARA_LEFT_MARGIN, uno::makeAny(nParaLeftMargin), /*bOverwrite=*/false); } break; case NS_ooxml::LN_CT_Ind_firstLine: |