Related: tdf#151107 make "sloppy" paper fit up to 1.25pt

This reverts commit 0b6d45056ab6e1c47b4ed62eedaad02249439444.

Change-Id: Ifbc0e286be4ab3dffd0d66228fd1abe2dfc0fde0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140445
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara
2022-09-22 16:05:44 +01:00
parent 10d1e6ff6b
commit 40a428fde0
3 changed files with 8 additions and 4 deletions

View File

@@ -165,7 +165,11 @@ const PageDesc aDinTab[] =
const size_t nTabSize = SAL_N_ELEMENTS(aDinTab);
#define MAXSLOPPY 21
// tdf#151107 make this not just large enough for rounding errors on our side
// but also large enough to match where the ppd side rounded up to the next
// point. Seen with C5/C6/C65 envelopes which can be found over 1 point away
// from the values in aDinTab
#define MAXSLOPPY PT2MM100(1.25)
void PaperInfo::doSloppyFit(bool bAlsoTryRotated)
{

View File

@@ -676,9 +676,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132149_pgBreak)
assertXPath(pDump, "//page[2]/infos/prtBounds", "left", "2268"); //Left page style
assertXPath(pDump, "//page[1]/infos/bounds", "width", "8391"); //landscape
assertXPath(pDump, "//page[2]/infos/bounds", "width", "5953"); //portrait
assertXPath(pDump, "//page[2]/infos/bounds", "width", "5940"); //portrait
// This two-line 3rd page ought not to exist. DID YOU FIX ME? The real page 3 should be "8391" landscape.
assertXPath(pDump, "//page[3]/infos/bounds", "width", "5953");
assertXPath(pDump, "//page[3]/infos/bounds", "width", "5940");
// This really ought to be on odd page 3, but now it is on odd page 5.
assertXPath(pDump, "//page[5]/infos/bounds", "width", "8391");
assertXPath(pDump, "//page[5]/infos/prtBounds", "right", "6122"); //Left page style

View File

@@ -322,7 +322,7 @@ DECLARE_OOXMLEXPORT_TEST(testCalendar3, "calendar3.docx")
// Both Word and LO display it as landscape, so ensure that it round-trips with landscape dimensions.
uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Page Width (mm) ", sal_Int32(148), getProperty<sal_Int32>(xPageStyle, "Width") / 100);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Page Height (mm)", sal_Int32(105), getProperty<sal_Int32>(xPageStyle, "Height") / 100);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Page Height (mm)", sal_Int32(104), getProperty<sal_Int32>(xPageStyle, "Height") / 100);
}
DECLARE_OOXMLEXPORT_TEST(testCalendar4, "calendar4.docx")