diff options
author | Attila Szűcs <szucs.attila3@nisz.hu> | 2021-07-14 16:24:01 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2021-07-27 10:32:10 +0200 |
commit | 446771fe3e91eb7d154e86b9c6a614374110e9ca (patch) | |
tree | 3cdfb4e2ac2c0c207951f45e29c2ae689a39ca11 /sw | |
parent | b0e4775c8d629a343d30d2d1562e53717bd50c76 (diff) |
tdf#142693 DOCX import: fix zeroing huge page sizes
which bigger than 2^15 twips (> ~57.8 cm).
Regression from commit 4d1621136c464b462a598571ecdcfe2ae119d8c7
"Fix ignoring large twips values like MSO does (cp#1000087)".
Note: Writer could export page size up to 600 cm × 600 cm,
and now it can import it back as well. It can even import
page sizes in kilometers, and display that, but there will
be other issues about its display. MS Word couldn't save
page size over 2^15, but can import, and display them till
up to 2^16 (that is about 116 cm).
Co-authored-by: Tibor Nagy (NISZ)
Change-Id: Icc1bd708d53036768a7be94cb1ebe18c1c4c8487
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118940
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
(cherry picked from commit d5d9795968771651c57c661d95b6992c3c778eca)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119441
Tested-by: Jenkins
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf142693_hugePaperSizeImport.docx | bin | 0 -> 4371 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport13.cxx | 7 |
2 files changed, 7 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf142693_hugePaperSizeImport.docx b/sw/qa/extras/ooxmlexport/data/tdf142693_hugePaperSizeImport.docx Binary files differnew file mode 100644 index 000000000000..6ec35a7684d7 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf142693_hugePaperSizeImport.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx index 0c7c1984f421..3e7b38f8df75 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx @@ -1226,6 +1226,13 @@ DECLARE_OOXMLEXPORT_TEST(testTdf127741, "tdf127741.docx") CPPUNIT_ASSERT(visitedStyleName.equalsIgnoreAsciiCase("Visited Internet Link")); } +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf142693_hugePaperSizeImport, "tdf142693_hugePaperSizeImport.docx") +{ + xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"); + assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:pgSz", "w", "90369"); + assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:pgSz", "h", "104372"); +} + DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf127925, "tdf127925.odt") { CPPUNIT_ASSERT_EQUAL(1, getPages()); |