sc/qa/unit/data/xlsx/tdf60673.xlsx |binary sc/qa/unit/subsequent_filters_test2.cxx | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+)
New commits: commit 369c7d2dc4b941d5b7699b03a3cfc03ad0e3b430 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Wed Oct 12 17:45:13 2022 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Wed Oct 12 18:53:28 2022 +0200 tdf#60673: sc_subsequent_filters_test2: Add unittest Change-Id: Ia36507483e5dc325431b17e9374882ae8102bfb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141263 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sc/qa/unit/data/xlsx/tdf60673.xlsx b/sc/qa/unit/data/xlsx/tdf60673.xlsx new file mode 100644 index 000000000000..adfc45f14388 Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf60673.xlsx differ diff --git a/sc/qa/unit/subsequent_filters_test2.cxx b/sc/qa/unit/subsequent_filters_test2.cxx index 37f177d48297..8c77721cc790 100644 --- a/sc/qa/unit/subsequent_filters_test2.cxx +++ b/sc/qa/unit/subsequent_filters_test2.cxx @@ -136,6 +136,7 @@ public: void testCondFormatXLSB(); void testPageScalingXLSX(); void testActiveXCheckboxXLSX(); + void testTdf60673(); void testtdf120301_xmlSpaceParsingXLSX(); void testUnicodeFileNameGnumeric(); void testCondFormatFormulaListenerXLSX(); @@ -252,6 +253,7 @@ public: CPPUNIT_TEST(testCondFormatXLSB); CPPUNIT_TEST(testPageScalingXLSX); CPPUNIT_TEST(testActiveXCheckboxXLSX); + CPPUNIT_TEST(testTdf60673); CPPUNIT_TEST(testtdf120301_xmlSpaceParsingXLSX); CPPUNIT_TEST(testUnicodeFileNameGnumeric); CPPUNIT_TEST(testMergedCellsXLSXML); @@ -2183,6 +2185,30 @@ void ScFiltersTest2::testActiveXCheckboxXLSX() xDocSh->DoClose(); } +void ScFiltersTest2::testTdf60673() +{ + ScDocShellRef xDocSh = loadDoc(u"tdf60673.", FORMAT_XLSX); + uno::Reference<frame::XModel> xModel = xDocSh->GetModel(); + uno::Reference<sheet::XSpreadsheetDocument> xDoc(xModel, UNO_QUERY_THROW); + uno::Reference<container::XIndexAccess> xIA(xDoc->getSheets(), UNO_QUERY_THROW); + uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xIA->getByIndex(0), + UNO_QUERY_THROW); + uno::Reference<container::XIndexAccess> xIA_DrawPage(xDrawPageSupplier->getDrawPage(), + UNO_QUERY_THROW); + uno::Reference<drawing::XControlShape> xControlShape(xIA_DrawPage->getByIndex(0), + UNO_QUERY_THROW); + + uno::Reference<beans::XPropertySet> xPropertySet(xControlShape->getControl(), uno::UNO_QUERY); + + OUString sLabel; + xPropertySet->getPropertyValue("Label") >>= sLabel; + + // Without the fix in place, this test would have failed with + // - Expected: PL: ĄŚŻŹĆŃŁÓĘ + // - Actual : PL: + CPPUNIT_ASSERT_EQUAL(OUString(u"PL: ĄŚŻŹĆŃŁÓĘ"), sLabel); +} + void ScFiltersTest2::testtdf120301_xmlSpaceParsingXLSX() { ScDocShellRef xDocSh = loadDoc(u"tdf120301_xmlSpaceParsing.", FORMAT_XLSX);