diff options
author | Eike Rathke <erack@redhat.com> | 2014-04-25 18:10:43 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2014-04-25 18:13:28 +0100 |
commit | 1652b8a552bb37524d6b5c8d65f77d28b3930ba6 (patch) | |
tree | faf6c128dc8b6507e4fba592b47aeb8fd4398bba /sc/qa/unit/subsequent_export-test.cxx | |
parent | 25c2a96661f097629760ac79c4bd8ab0601f673e (diff) |
added .xlsx .xls .ods export/reimport tests for new spreadsheet functions
Change-Id: I71baaf27a16e60eb11f80f61664fc09dcf047cf1
Diffstat (limited to 'sc/qa/unit/subsequent_export-test.cxx')
-rw-r--r-- | sc/qa/unit/subsequent_export-test.cxx | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index 228a16100484..43052d076fff 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -97,6 +97,11 @@ public: void testSharedFormulaExportXLSX(); void testSharedFormulaStringResultExportXLSX(); + void testFunctionsExcel2010( sal_uLong nFormatType ); + void testFunctionsExcel2010XLSX(); + void testFunctionsExcel2010XLS(); + void testFunctionsExcel2010ODS(); + CPPUNIT_TEST_SUITE(ScExportTest); CPPUNIT_TEST(test); #if !defined(MACOSX) && !defined(DRAGONFLY) @@ -126,6 +131,9 @@ public: CPPUNIT_TEST(testSharedFormulaExportXLS); CPPUNIT_TEST(testSharedFormulaExportXLSX); CPPUNIT_TEST(testSharedFormulaStringResultExportXLSX); + CPPUNIT_TEST(testFunctionsExcel2010XLSX); + CPPUNIT_TEST(testFunctionsExcel2010XLS); + CPPUNIT_TEST(testFunctionsExcel2010ODS); CPPUNIT_TEST_SUITE_END(); @@ -1406,6 +1414,36 @@ void ScExportTest::testSharedFormulaStringResultExportXLSX() xDocSh2->DoClose(); } +void ScExportTest::testFunctionsExcel2010( sal_uLong nFormatType ) +{ + ScDocShellRef xShell = loadDoc("functions-excel-2010.", XLSX); + CPPUNIT_ASSERT_MESSAGE("Failed to load the document.", xShell.Is()); + + ScDocShellRef xDocSh = saveAndReload(xShell, nFormatType); + ScDocument* pDoc = xDocSh->GetDocument(); + CPPUNIT_ASSERT(pDoc); + pDoc->CalcAll(); // perform hard re-calculation. + + testFunctionsExcel2010_Impl(pDoc); + + xDocSh->DoClose(); +} + +void ScExportTest::testFunctionsExcel2010XLSX() +{ + testFunctionsExcel2010(XLSX); +} + +void ScExportTest::testFunctionsExcel2010XLS() +{ + testFunctionsExcel2010(XLS); +} + +void ScExportTest::testFunctionsExcel2010ODS() +{ + testFunctionsExcel2010(ODS); +} + ScExportTest::ScExportTest() : ScBootstrapFixture("/sc/qa/unit/data") { |