diff options
author | Szabolcs Toth <toth.szabolcs@nisz.hu> | 2020-11-06 10:44:17 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-11-10 11:08:39 +0100 |
commit | 9dd43f97b0d8223b571573d1fe5d899fc38d89ba (patch) | |
tree | 781ab543ae3f917a5b2906da2b005681a12bd9f6 /sc/qa | |
parent | 34a83f1949b7bcd22765e0405a37343d86a40dea (diff) |
tdf#136721 XLSX: add missing A6 paper format
Unrecognized A6 paper format was converted to the
default A4/Letter previously, see Paper Format
in Format->Page...
Co-authored-by: Balázs Regényi
Change-Id: If2ea0c4137177aa8be66cb11d4732b14cbc14455
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105392
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/data/xlsx/tdf136721_letter_sized_paper.xlsx | bin | 0 -> 15723 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_export-test.cxx | 18 |
2 files changed, 16 insertions, 2 deletions
diff --git a/sc/qa/unit/data/xlsx/tdf136721_letter_sized_paper.xlsx b/sc/qa/unit/data/xlsx/tdf136721_letter_sized_paper.xlsx Binary files differnew file mode 100644 index 000000000000..3027a9c0f142 --- /dev/null +++ b/sc/qa/unit/data/xlsx/tdf136721_letter_sized_paper.xlsx diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index b5e382bc0ecf..f9e6e1f3ebb5 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -272,6 +272,7 @@ public: void testTdf76047_externalLink(); void testTdf129969(); void testTdf84874(); + void testTdf136721_paper_size(); CPPUNIT_TEST_SUITE(ScExportTest); CPPUNIT_TEST(test); @@ -442,6 +443,7 @@ public: CPPUNIT_TEST(testTdf76047_externalLink); CPPUNIT_TEST(testTdf129969); CPPUNIT_TEST(testTdf84874); + CPPUNIT_TEST(testTdf136721_paper_size); CPPUNIT_TEST_SUITE_END(); @@ -5566,7 +5568,7 @@ void ScExportTest::testTdf84874() const ScValidationData* pData = rDoc.GetValidationEntry(1); OUString aTitle, aText; - pData->GetInput( aTitle, aText ); + pData->GetInput(aTitle, aText); sal_uInt32 nPromptTitleLen = aTitle.getLength(); sal_uInt32 nPromptTextLen = aText.getLength(); @@ -5574,7 +5576,7 @@ void ScExportTest::testTdf84874() CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(255), nPromptTextLen); ScValidErrorStyle eErrStyle = SC_VALERR_STOP; - pData->GetErrMsg( aTitle, aText, eErrStyle ); + pData->GetErrMsg(aTitle, aText, eErrStyle); sal_uInt32 nErrorTitleLen = aTitle.getLength(); sal_uInt32 nErrorTextLen = aText.getLength(); @@ -5584,6 +5586,18 @@ void ScExportTest::testTdf84874() xDocSh->DoClose(); } +void ScExportTest::testTdf136721_paper_size() +{ + ScDocShellRef xShell = loadDoc("tdf136721_letter_sized_paper.", FORMAT_XLSX); + CPPUNIT_ASSERT(xShell.is()); + + std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xShell), FORMAT_XLSX); + xmlDocUniquePtr pDoc = XPathHelper::parseExport(pXPathFile, m_xSFactory, "xl/worksheets/sheet1.xml"); + CPPUNIT_ASSERT(pDoc); + + assertXPath(pDoc, "/x:worksheet/x:pageSetup", "paperSize", "70"); +} + CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest); CPPUNIT_PLUGIN_IMPLEMENT(); |