diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-09-27 18:36:52 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-09-27 18:38:42 +0200 |
commit | 7cf444454c0c27e2f6d764164ea880b87163f45a (patch) | |
tree | 83cb7fe14bf68de72f5ecbe710fb078d9e7cd79b /sc | |
parent | 7e7f6b0a056b51a425934f63745ae5c9fed2e51f (diff) |
add test for tdf#101843
Change-Id: I90bd5e8042e3157286774c97d2ea3c109da2b658
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/subsequent_export-test.cxx | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index ac1f035b0b94..0b78c565ad61 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -174,6 +174,8 @@ public: void testEscapeCharInNumberFormatXLSX(); void testNatNumInNumberFormatXLSX(); + void testHiddenRepeatedRowsODS(); + CPPUNIT_TEST_SUITE(ScExportTest); CPPUNIT_TEST(test); CPPUNIT_TEST(testPasswordExport); @@ -255,6 +257,8 @@ public: CPPUNIT_TEST(testEscapeCharInNumberFormatXLSX); CPPUNIT_TEST(testNatNumInNumberFormatXLSX); + CPPUNIT_TEST(testHiddenRepeatedRowsODS); + CPPUNIT_TEST_SUITE_END(); private: @@ -3655,6 +3659,26 @@ void ScExportTest::testNatNumInNumberFormatXLSX() xDocSh->DoClose(); } +void ScExportTest::testHiddenRepeatedRowsODS() +{ + ScDocShellRef xDocSh = loadDoc("empty.", FORMAT_ODS); + CPPUNIT_ASSERT( xDocSh.Is() ); + + { + ScDocument& rDoc = xDocSh->GetDocument(); + rDoc.SetRowHidden(0, 20, 0, true); + } + + xDocSh = saveAndReload( &(*xDocSh), FORMAT_ODS); // Convert [NatNum5] to [DBNum2] in Chinese + ScDocument& rDoc = xDocSh->GetDocument(); + SCROW nFirstRow = 0; + SCROW nLastRow = 0; + bool bHidden = rDoc.RowHidden(0, 0, &nFirstRow, &nLastRow); + CPPUNIT_ASSERT(bHidden); + CPPUNIT_ASSERT_EQUAL((SCROW)0, nFirstRow); + CPPUNIT_ASSERT_EQUAL((SCROW)20, nLastRow); +} + CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest); CPPUNIT_PLUGIN_IMPLEMENT(); |