sw/qa/extras/ooxmlexport/data/tdf95374.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 8 ++++++++ writerfilter/source/dmapper/DomainMapper.cxx | 5 +++++ 3 files changed, 13 insertions(+)
New commits: commit 21c29a756c5d01cada2a09dd6d55fdc482807bb4 Author: László Németh <nem...@numbertext.org> AuthorDate: Tue Nov 12 13:33:46 2019 +0100 Commit: László Németh <nem...@numbertext.org> CommitDate: Wed Nov 13 12:12:39 2019 +0100 tdf#95374 DOCX import: reset left indentation at disabled numbering Paragraphs with disabled numbering using non-existent numId=0 haven't got inherited left indentation in MSO. Keeping them resulted unnecessary indentation, moreover, missing (non-visible) text in narrow table cells. Change-Id: I46003031d36f578b0b260dea74d7d45e75905261 Reviewed-on: https://gerrit.libreoffice.org/82509 Tested-by: Jenkins Reviewed-by: László Németh <nem...@numbertext.org> diff --git a/sw/qa/extras/ooxmlexport/data/tdf95374.docx b/sw/qa/extras/ooxmlexport/data/tdf95374.docx new file mode 100644 index 000000000000..49599953a11a Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf95374.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx index 807dd7b79708..72e2104d935a 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx @@ -929,6 +929,14 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf124604, "tdf124604.docx") assertXPath(pXmlDoc, "/w:document/w:body/w:p[7]/w:pPr/w:ind", "start", "0"); } +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf95374, "tdf95374.docx") +{ + xmlDocPtr pXmlDoc = parseExport("word/document.xml"); + // Numbering disabled by non-existent numId=0, disabling also inheritance of indentation of parent styles + assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:ind", "hanging", "0"); + assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:ind", "start", "1136"); +} + DECLARE_OOXMLEXPORT_TEST(testTdf118691, "tdf118691.docx") { uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY); diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 6de16cdcb1a6..58a9654e9bfc 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -1295,7 +1295,12 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext ) } else { + // eg. disabled numbering using non-existent numId "0" rContext->Insert( PROP_NUMBERING_STYLE_NAME, uno::makeAny( OUString() ) ); + // disable inheritance of indentation of parent styles + rContext->Insert( PROP_PARA_LEFT_MARGIN, uno::makeAny( sal_Int32(0) ), /*bOverwrite=*/false); + rContext->Insert( PROP_PARA_FIRST_LINE_INDENT, + uno::makeAny( sal_Int32(0) ), /*bOverwrite=*/false); } } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits