diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-06-20 17:27:27 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-06-21 10:01:17 +0200 |
commit | 5d30e9e101ae8167c33fe24ca12d8d0685f9f8fb (patch) | |
tree | 7ccd9ff7c82e91bb157b20f72717799340e21aaf /sc/qa | |
parent | 3be3fb9bafc4c2bf17ef3fe4eba0a059199abe24 (diff) |
tdf#142293, tdf#141495: sc_subsequent_filters_test2: Add unittest
Change-Id: Icca8f402a960ac9de9a4f4d2c9f8d00f5abd0d37
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136188
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/data/xlsx/tdf141495.xlsx | bin | 0 -> 4703 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_filters_test2.cxx | 26 |
2 files changed, 26 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xlsx/tdf141495.xlsx b/sc/qa/unit/data/xlsx/tdf141495.xlsx Binary files differnew file mode 100644 index 000000000000..3b065f02d167 --- /dev/null +++ b/sc/qa/unit/data/xlsx/tdf141495.xlsx diff --git a/sc/qa/unit/subsequent_filters_test2.cxx b/sc/qa/unit/subsequent_filters_test2.cxx index 05a393aa3f6b..8f747f5aff03 100644 --- a/sc/qa/unit/subsequent_filters_test2.cxx +++ b/sc/qa/unit/subsequent_filters_test2.cxx @@ -154,6 +154,7 @@ public: void testColumnWidthRowHeightXLSXML(); void testCharacterSetXLSXML(); void testTdf137091(); + void testTdf141495(); void testTdf70455(); void testTdf62268(); void testTdf137453(); @@ -268,6 +269,7 @@ public: CPPUNIT_TEST(testCharacterSetXLSXML); CPPUNIT_TEST(testCondFormatFormulaListenerXLSX); CPPUNIT_TEST(testTdf137091); + CPPUNIT_TEST(testTdf141495); CPPUNIT_TEST(testTdf70455); CPPUNIT_TEST(testTdf62268); CPPUNIT_TEST(testTdf137453); @@ -2261,6 +2263,30 @@ void ScFiltersTest2::testTdf137091() xDocSh->DoClose(); } +void ScFiltersTest2::testTdf141495() +{ + // Set the system locale to Turkish + SvtSysLocaleOptions aOptions; + OUString sLocaleConfigString = aOptions.GetLanguageTag().getBcp47(); + aOptions.SetLocaleConfigString("tr-TR"); + aOptions.Commit(); + comphelper::ScopeGuard g([&aOptions, &sLocaleConfigString] { + aOptions.SetLocaleConfigString(sLocaleConfigString); + aOptions.Commit(); + }); + + ScDocShellRef xDocSh = loadDoc(u"tdf141495.", FORMAT_XLSX); + ScDocument& rDoc = xDocSh->GetDocument(); + + xDocSh->DoHardRecalc(); + + // Without the fix in place, this test would have failed with + // - Expected: 44956 + // - Actual : #ADDIN? + CPPUNIT_ASSERT_EQUAL(OUString("44956"), rDoc.GetString(ScAddress(11, 6, 0))); + xDocSh->DoClose(); +} + void ScFiltersTest2::testTdf70455() { ScDocShellRef xDocSh = loadDoc(u"tdf70455.", FORMAT_XLSX); |