diff options
author | Regényi Balázs <regenyi.balazs@nisz.hu> | 2020-09-22 17:12:59 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-09-29 12:26:25 +0200 |
commit | 79737c8b0d84d4967c5f1c41b740a8a52db8b551 (patch) | |
tree | 4bd2a23eab371f5a7977408d6ebaf7ae25a7bc61 /sc | |
parent | 61291a63c0f9a57064300e7afc8222b4ae4e155a (diff) |
tdf#91251 XLSX textbox export: fix missing overflow properties
by grab-bagging them.
Co-authored-by: Szabolcs Toth
Change-Id: I242bf33e1272d913805c90a2ef902be8633618fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103182
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/data/xlsx/tdf91251_missingOverflowRoundtrip.xlsx | bin | 0 -> 9605 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_export-test.cxx | 21 |
2 files changed, 21 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xlsx/tdf91251_missingOverflowRoundtrip.xlsx b/sc/qa/unit/data/xlsx/tdf91251_missingOverflowRoundtrip.xlsx Binary files differnew file mode 100644 index 000000000000..656ea5628c8c --- /dev/null +++ b/sc/qa/unit/data/xlsx/tdf91251_missingOverflowRoundtrip.xlsx diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index e0543656631c..a5e935dfb740 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -269,6 +269,7 @@ public: void testTdf135828_Shape_Rect(); void testTdf123353(); void testTdf133688_precedents(); + void testTdf91251_missingOverflowRoundtrip(); CPPUNIT_TEST_SUITE(ScExportTest); CPPUNIT_TEST(test); @@ -432,6 +433,7 @@ public: CPPUNIT_TEST(testTdf135828_Shape_Rect); CPPUNIT_TEST(testTdf123353); CPPUNIT_TEST(testTdf133688_precedents); + CPPUNIT_TEST(testTdf91251_missingOverflowRoundtrip); CPPUNIT_TEST_SUITE_END(); @@ -5462,6 +5464,25 @@ void ScExportTest::testTdf133688_precedents() assertXPath(pDrawing, "/xdr:wsDr/xdr:twoCellAnchor[1]", 0); } +void ScExportTest::testTdf91251_missingOverflowRoundtrip() +{ + // tdf#91251 check whether textBox overflow property (horzOverflow and vertOverflow) is + // getting preserved after roundtrip + ScDocShellRef xShell = loadDoc("tdf91251_missingOverflowRoundtrip.", FORMAT_XLSX); + CPPUNIT_ASSERT(xShell.is()); + + ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX); + CPPUNIT_ASSERT(xDocSh.is()); + + std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xDocSh), FORMAT_XLSX); + + xmlDocUniquePtr pDrawing = XPathHelper::parseExport(pXPathFile, m_xSFactory, "xl/drawings/drawing1.xml"); + CPPUNIT_ASSERT(pDrawing); + + assertXPath(pDrawing, "/xdr:wsDr/xdr:twoCellAnchor/xdr:sp/xdr:txBody/a:bodyPr", "horzOverflow", "clip"); + assertXPath(pDrawing, "/xdr:wsDr/xdr:twoCellAnchor/xdr:sp/xdr:txBody/a:bodyPr", "horzOverflow", "clip"); +} + CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest); CPPUNIT_PLUGIN_IMPLEMENT(); |