diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-02-15 11:38:15 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-02-15 12:53:47 +0100 |
commit | 7b24b2f2a346bf65c9c997926ecddd1dc5aa05d5 (patch) | |
tree | 5428e6fa3f9267bbde294deb1d04bd16c2429ad3 /sc/qa | |
parent | 7c00544d672f0fc0f08c12f5fd9cd53fdbe96733 (diff) |
tdf#134553: sc_jumbosheets: Add unittest
Change-Id: I43a401376b5ef8215fafb117d90535772440ebad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129960
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/data/xlsx/tdf134553.xlsx | bin | 0 -> 13437 bytes | |||
-rw-r--r-- | sc/qa/unit/jumbosheets-test.cxx | 21 |
2 files changed, 21 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xlsx/tdf134553.xlsx b/sc/qa/unit/data/xlsx/tdf134553.xlsx Binary files differnew file mode 100644 index 000000000000..c78c8332a10a --- /dev/null +++ b/sc/qa/unit/data/xlsx/tdf134553.xlsx diff --git a/sc/qa/unit/jumbosheets-test.cxx b/sc/qa/unit/jumbosheets-test.cxx index 4ca4eeaf1ed6..7583e220153d 100644 --- a/sc/qa/unit/jumbosheets-test.cxx +++ b/sc/qa/unit/jumbosheets-test.cxx @@ -15,6 +15,7 @@ #include <vcl/keycodes.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/propertyvalue.hxx> +#include <svx/svdoole2.hxx> #include <test/xmltesttools.hxx> #include <defaultsoptions.hxx> @@ -47,6 +48,7 @@ public: void testRoundtripColumn2000Xlsx(); void testRoundtripColumnRange(); void testRoundtripNamedRanges(); + void testTdf134553(); void testTdf134392(); void testTdf133033(); void testTdf109061(); @@ -57,6 +59,7 @@ public: CPPUNIT_TEST(testRoundtripColumn2000Xlsx); CPPUNIT_TEST(testRoundtripColumnRange); CPPUNIT_TEST(testRoundtripNamedRanges); + CPPUNIT_TEST(testTdf134553); CPPUNIT_TEST(testTdf134392); CPPUNIT_TEST(testTdf133033); CPPUNIT_TEST(testTdf109061); @@ -233,6 +236,24 @@ void ScJumboSheetsTest::testRoundtripNamedRanges() xDocSh3->DoClose(); } +void ScJumboSheetsTest::testTdf134553() +{ + ScDocShellRef xDocSh = loadDoc(u"tdf134553.", FORMAT_XLSX); + CPPUNIT_ASSERT(xDocSh.is()); + + ScDocument& rDoc = xDocSh->GetDocument(); + + const SdrOle2Obj* pOleObj = getSingleChartObject(rDoc, 0); + + // Without the fix in place, this test would have failed here + CPPUNIT_ASSERT(pOleObj); + + CPPUNIT_ASSERT_EQUAL(tools::Long(12741), pOleObj->GetLogicRect().getWidth()); + CPPUNIT_ASSERT_EQUAL(tools::Long(7620), pOleObj->GetLogicRect().getHeight()); + + xDocSh->DoClose(); +} + void ScJumboSheetsTest::testTdf134392() { // Without the fix in place, the file would have crashed |