summaryrefslogtreecommitdiff
path: root/sc/qa/unit/subsequent_export-test.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/qa/unit/subsequent_export-test.cxx')
-rw-r--r--sc/qa/unit/subsequent_export-test.cxx30
1 files changed, 30 insertions, 0 deletions
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 844020d71461..fe7e9636c06c 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -78,6 +78,7 @@ public:
void testPasswordExport();
void testConditionalFormatExportXLSX();
void testMiscRowHeightExport();
+ void testNamedRangeBugfdo62729();
CPPUNIT_TEST_SUITE(ScExportTest);
CPPUNIT_TEST(test);
@@ -86,6 +87,7 @@ public:
#endif
CPPUNIT_TEST(testConditionalFormatExportXLSX);
CPPUNIT_TEST(testMiscRowHeightExport);
+ CPPUNIT_TEST(testNamedRangeBugfdo62729);
CPPUNIT_TEST_SUITE_END();
private:
@@ -371,6 +373,34 @@ void ScExportTest::testMiscRowHeightExport()
}
}
+
+void ScExportTest::testNamedRangeBugfdo62729()
+{
+ ScDocShellRef xShell = loadDocument("fdo62729.", ODS);
+ CPPUNIT_ASSERT(xShell.Is());
+ ScDocument* pDoc = xShell->GetDocument();
+ CPPUNIT_ASSERT(pDoc);
+
+ ScRangeName* pNames = pDoc->GetRangeName();
+ //should be just a single named range
+ CPPUNIT_ASSERT(pNames->size() == 1 );
+ pDoc->DeleteTab(0);
+ //should be still a single named range
+ CPPUNIT_ASSERT(pNames->size() == 1 );
+ ScDocShellRef xDocSh = saveAndReload(xShell, ODS);
+ xShell->DoClose();
+
+ CPPUNIT_ASSERT(xDocSh.Is());
+ pDoc = xDocSh->GetDocument();
+ CPPUNIT_ASSERT(pDoc);
+
+ pNames = pDoc->GetRangeName();
+ //after reload should still have a named range
+ CPPUNIT_ASSERT(pNames->size() == 1 );
+
+ xDocSh->DoClose();
+}
+
ScExportTest::ScExportTest()
: m_aBaseString(RTL_CONSTASCII_USTRINGPARAM("/sc/qa/unit/data"))
{