tdf#142404 DOCX c15: TabOverMargin no longer true in 2013+
When compatibilityMode is 15, TabOverMargin no longer seems to apply. This is a dramatic visual change in docx that I didn't find any documentation about, but the visual change is obvious enough proof. LibreOffice started saving DOCX as c15 mode in 7.0. [P.S. related TabOverflow also seems to be false with c15, but it acts differently than what LO's tabOverflow code does. That was discussed in a different patch and seems to be a dead end, so I'm ignoring that aspect. Way too many complications and effects on LO native mode.] Change-Id: I5a0a6d695d6825444cf6a362a81803f306e6c6e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116337 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
This commit is contained in:
committed by
Miklos Vajna
parent
de68b6ecaa
commit
29bd00f762
BIN
sw/qa/extras/ooxmlexport/data/tdf142404_tabOverMarginC15.docx
Normal file
BIN
sw/qa/extras/ooxmlexport/data/tdf142404_tabOverMarginC15.docx
Normal file
Binary file not shown.
@@ -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
|
||||
|
@@ -758,6 +758,7 @@ void SettingsTable::ApplyProperties(uno::Reference<text::XTextDocument> const& x
|
||||
uno::Reference<lang::XMultiServiceFactory> xTextFactory(xDoc, uno::UNO_QUERY_THROW);
|
||||
uno::Reference<beans::XPropertySet> 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
|
||||
|
@@ -324,7 +324,6 @@ void WriterFilter::setTargetDocument(const uno::Reference<lang::XComponent>& 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));
|
||||
|
Reference in New Issue
Block a user