sc/qa/unit/data/xlsx/tdf119190.xlsx     |binary
 sc/qa/unit/subsequent_filters_test2.cxx |   19 +++++++++++++++++++
 2 files changed, 19 insertions(+)

New commits:
commit 224026a38ddc4008d1c73fa1ba95f672f03fac63
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Fri Nov 26 12:00:38 2021 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Fri Nov 26 16:09:04 2021 +0100

    tdf#119190: sc_subsequent_filters_test2: Add unittest
    
    Change-Id: I5ba98b3651470f7c86b9aca9359d563e64058552
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125874
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/qa/unit/data/xlsx/tdf119190.xlsx 
b/sc/qa/unit/data/xlsx/tdf119190.xlsx
new file mode 100644
index 000000000000..c3c86b539aca
Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf119190.xlsx differ
diff --git a/sc/qa/unit/subsequent_filters_test2.cxx 
b/sc/qa/unit/subsequent_filters_test2.cxx
index 87186e3443e8..71476a752f98 100644
--- a/sc/qa/unit/subsequent_filters_test2.cxx
+++ b/sc/qa/unit/subsequent_filters_test2.cxx
@@ -54,6 +54,7 @@
 #include <colorscale.hxx>
 #include <olinetab.hxx>
 #include <patattr.hxx>
+#include <postit.hxx>
 #include <scitems.hxx>
 #include <docsh.hxx>
 #include <editutil.hxx>
@@ -203,6 +204,7 @@ public:
     void testDrawCircleInMergeCells();
     void testDeleteCirclesInRowAndCol();
     void testTdf129940();
+    void testTdf119190();
     void testTdf139612();
     void testTdf144740();
     void testTdf139763ShapeAnchor();
@@ -310,6 +312,7 @@ public:
     CPPUNIT_TEST(testDrawCircleInMergeCells);
     CPPUNIT_TEST(testDeleteCirclesInRowAndCol);
     CPPUNIT_TEST(testTdf129940);
+    CPPUNIT_TEST(testTdf119190);
     CPPUNIT_TEST(testTdf139612);
     CPPUNIT_TEST(testTdf144740);
     CPPUNIT_TEST(testTdf139763ShapeAnchor);
@@ -2838,6 +2841,22 @@ void ScFiltersTest2::testTdf129940()
     xDocSh->DoClose();
 }
 
+void ScFiltersTest2::testTdf119190()
+{
+    ScDocShellRef xDocSh = loadDoc(u"tdf119190.", FORMAT_XLSX);
+    CPPUNIT_ASSERT_MESSAGE("Failed to load tdf119190.xlsx", xDocSh.is());
+    ScDocument& rDoc = xDocSh->GetDocument();
+
+    // Without the fix in place, this test would have failed here
+    CPPUNIT_ASSERT(rDoc.HasNote(ScAddress(2, 0, 0)));
+
+    ScPostIt* pNote = rDoc.GetNote(ScAddress(2, 0, 0));
+    CPPUNIT_ASSERT(pNote);
+    CPPUNIT_ASSERT_EQUAL(true, pNote->IsCaptionShown());
+
+    xDocSh->DoClose();
+}
+
 void ScFiltersTest2::testTdf139612()
 {
     ScDocShellRef xDocSh = loadDoc(u"tdf139612.", FORMAT_ODS);

Reply via email to