tdf#125099: sc_subsequent_filters_test: Add unittest

Change-Id: Ie63b0c9c6d2228fc9a4a9b1e084df2ada0a1f951
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102233
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
diff --git a/sc/qa/unit/data/ods/tdf125099.ods b/sc/qa/unit/data/ods/tdf125099.ods
new file mode 100644
index 0000000..538fa39
--- /dev/null
+++ b/sc/qa/unit/data/ods/tdf125099.ods
Binary files differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index bbedc4b..7ca0f5f 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -231,6 +231,7 @@ public:
    void testTdf98844();
    void testTdf100458();
    void testTdf118561();
    void testTdf125099();
    void testTdf134455();
    void testTdf119533();
    void testTdf127982();
@@ -398,6 +399,7 @@ public:
    CPPUNIT_TEST(testTdf98844);
    CPPUNIT_TEST(testTdf100458);
    CPPUNIT_TEST(testTdf118561);
    CPPUNIT_TEST(testTdf125099);
    CPPUNIT_TEST(testTdf134455);
    CPPUNIT_TEST(testTdf119533);
    CPPUNIT_TEST(testTdf127982);
@@ -3845,6 +3847,27 @@ void ScFiltersTest::testTdf118561()
    xDocSh->DoClose();
}

void ScFiltersTest::testTdf125099()
{
    ScDocShellRef xDocSh = loadDoc("tdf125099.", FORMAT_ODS);
    CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
    ScDocument& rDoc = xDocSh->GetDocument();

    CPPUNIT_ASSERT_EQUAL(OUString("03:53:46"), rDoc.GetString(ScAddress(0,0,0)));
    CPPUNIT_ASSERT_EQUAL(OUString("03:23:59"), rDoc.GetString(ScAddress(0,1,0)));

    xDocSh->DoHardRecalc();

    CPPUNIT_ASSERT_EQUAL(OUString("03:53:46"), rDoc.GetString(ScAddress(0,0,0)));

    // Without the fix in place, this would have failed with
    // - Expected: 03:24:00
    // - Actual  : 03:23:59
    CPPUNIT_ASSERT_EQUAL(OUString("03:24:00"), rDoc.GetString(ScAddress(0,1,0)));

    xDocSh->DoClose();
}

void ScFiltersTest::testTdf134455()
{
    ScDocShellRef xDocSh = loadDoc("tdf134455.", FORMAT_XLSX);