summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2022-10-12 17:45:13 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2022-10-12 18:53:28 +0200
commit369c7d2dc4b941d5b7699b03a3cfc03ad0e3b430 (patch)
tree1e5f65c93d4e9b8acfa33ac3a5f3161f5eb44d9c /sc
parent55477bf4fd3baa99f8b5d5686091d7613a1022c3 (diff)
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 <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/data/xlsx/tdf60673.xlsxbin0 -> 13249 bytes
-rw-r--r--sc/qa/unit/subsequent_filters_test2.cxx26
2 files changed, 26 insertions, 0 deletions
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
--- /dev/null
+++ b/sc/qa/unit/data/xlsx/tdf60673.xlsx
Binary files 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);