summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2015-08-19 12:46:12 +0200
committerKatarina Behrens <Katarina.Behrens@cib.de>2015-08-19 12:41:49 +0000
commit7a57765241b8e9b57273f7548445ea57a1f44401 (patch)
tree9248471146da5892a37dd83adcb1b78e64df715b /sc
parentd21260cdb6e6fa898ed90bafb41ba4fe5dd3140c (diff)
Bugfix test for tdf#77431
Change-Id: I2120ed72c281d2078e387f7f3ae91004ad95822c Reviewed-on: https://gerrit.libreoffice.org/17855 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/data/xlsx/hidden_sheets.xlsxbin0 -> 6124 bytes
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx14
2 files changed, 14 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xlsx/hidden_sheets.xlsx b/sc/qa/unit/data/xlsx/hidden_sheets.xlsx
new file mode 100644
index 000000000000..771de7ff5643
--- /dev/null
+++ b/sc/qa/unit/data/xlsx/hidden_sheets.xlsx
Binary files differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 51b83d01806e..98c80d373bdf 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -204,6 +204,7 @@ public:
void testEmbeddedImageXLS();
void testEditEngStrikeThroughXLSX();
void testRefStringXLSX();
+ void testHiddenSheetsXLSX();
void testBnc762542();
@@ -304,6 +305,8 @@ public:
CPPUNIT_TEST(testBnc762542);
+ CPPUNIT_TEST(testHiddenSheetsXLSX);
+
CPPUNIT_TEST_SUITE_END();
private:
@@ -3138,6 +3141,17 @@ void ScFiltersTest::testBnc762542()
xDocSh->DoClose();
}
+void ScFiltersTest::testHiddenSheetsXLSX()
+{
+ ScDocShellRef xDocSh = loadDoc("hidden_sheets.", XLSX);
+ CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.Is());
+
+ ScDocument& rDoc = xDocSh->GetDocument();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("1st sheet should be hidden", false, rDoc.IsVisible(0));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("2nd sheet should be visible", true, rDoc.IsVisible(1));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("3rd sheet should be hidden", false, rDoc.IsVisible(2));
+}
+
ScFiltersTest::ScFiltersTest()
: ScBootstrapFixture( "sc/qa/unit/data" )
{