diff --git a/sw/qa/extras/ooxmlexport/data/tdf142404_tabOverMarginC15.docx b/sw/qa/extras/ooxmlexport/data/tdf142404_tabOverMarginC15.docx new file mode 100644 index 000000000000..60af474b5c7d Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf142404_tabOverMarginC15.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx index c0bca8ebfb7b..045102438c90 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx @@ -218,6 +218,14 @@ DECLARE_OOXMLEXPORT_TEST(testTdf142404_tabSpacing, "tdf142404_tabSpacing.docx") CPPUNIT_ASSERT_EQUAL_MESSAGE("too big for one page", 2, getPages()); } +DECLARE_OOXMLEXPORT_TEST(testTdf142404_tabOverMarginC15, "tdf142404_tabOverMarginC15.docx") +{ + // TabOverMargin no longer applies to compatibilityMode 15 DOCX files. In Word 2016 this is 3pg. + // One page long if tabOverMargin is true. Two pages long if tabOverflow is true. + // Really should be 3 pages long, when tabOverflow is also false, but inadequate implementation. + CPPUNIT_ASSERT_EQUAL_MESSAGE("too big for one page", 2, getPages()); +} + DECLARE_OOXMLEXPORT_TEST(testTdf139580, "tdf139580.odt") { // Without the fix in place, this test would have crashed at export time diff --git a/writerfilter/source/dmapper/SettingsTable.cxx b/writerfilter/source/dmapper/SettingsTable.cxx index 02e0a6f8c4a1..12ec66a54152 100644 --- a/writerfilter/source/dmapper/SettingsTable.cxx +++ b/writerfilter/source/dmapper/SettingsTable.cxx @@ -758,6 +758,7 @@ void SettingsTable::ApplyProperties(uno::Reference const& x uno::Reference xTextFactory(xDoc, uno::UNO_QUERY_THROW); uno::Reference xDocumentSettings(xTextFactory->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY_THROW); xDocumentSettings->setPropertyValue("MsWordCompMinLineHeightByFly", uno::makeAny(true)); + xDocumentSettings->setPropertyValue("TabOverMargin", uno::makeAny(true)); } // Show changes value diff --git a/writerfilter/source/filter/WriterFilter.cxx b/writerfilter/source/filter/WriterFilter.cxx index 772ca5032b76..55bb89f1e21b 100644 --- a/writerfilter/source/filter/WriterFilter.cxx +++ b/writerfilter/source/filter/WriterFilter.cxx @@ -324,7 +324,6 @@ void WriterFilter::setTargetDocument(const uno::Reference& xDo xSettings->setPropertyValue("FloattableNomargins", uno::makeAny(true)); xSettings->setPropertyValue("ClippedPictures", uno::makeAny(true)); xSettings->setPropertyValue("BackgroundParaOverDrawings", uno::makeAny(true)); - xSettings->setPropertyValue("TabOverMargin", uno::makeAny(true)); xSettings->setPropertyValue("TreatSingleColumnBreakAsPageBreak", uno::makeAny(true)); xSettings->setPropertyValue("PropLineSpacingShrinksFirstLine", uno::makeAny(true)); xSettings->setPropertyValue("DoNotCaptureDrawObjsOnPage", uno::makeAny(true));