sc/qa/unit/data/xlsx/tdf134553.xlsx |binary
 sc/qa/unit/jumbosheets-test.cxx     |   21 +++++++++++++++++++++
 2 files changed, 21 insertions(+)

New commits:
commit 7b24b2f2a346bf65c9c997926ecddd1dc5aa05d5
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Tue Feb 15 11:38:15 2022 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Tue Feb 15 12:53:47 2022 +0100

    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 <xiscofa...@libreoffice.org>

diff --git a/sc/qa/unit/data/xlsx/tdf134553.xlsx 
b/sc/qa/unit/data/xlsx/tdf134553.xlsx
new file mode 100644
index 000000000000..c78c8332a10a
Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf134553.xlsx differ
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

Reply via email to