diff options
-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(); |