summaryrefslogtreecommitdiff
path: root/sc/qa/unit/subsequent_filters-test.cxx
diff options
context:
space:
mode:
authorDaniel Bankston <daniel.e.bankston@gmail.com>2012-07-06 20:55:47 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-07-11 20:37:40 -0400
commit5e92e0282691d54b7919e71041d6a9a09a495ec0 (patch)
tree86ce0b5bfac9fd376279f605c7371f4cb84a20e2 /sc/qa/unit/subsequent_filters-test.cxx
parent04658a793d9d68ef910db746f7b88ac61ee43c1b (diff)
Add test for import of cached formula results (without hard-recalc)
Change-Id: I7e73465d152332661f48e4dcd9ae28135821df68
Diffstat (limited to 'sc/qa/unit/subsequent_filters-test.cxx')
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx27
1 files changed, 27 insertions, 0 deletions
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 7063046fcd9e..ad89fd83ce29 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -108,6 +108,7 @@ public:
void testRangeNameXLSX();
void testHardRecalcODS();
void testFunctionsODS();
+ void testCachedFormulaResultsODS();
void testDatabaseRangesODS();
void testDatabaseRangesXLS();
void testDatabaseRangesXLSX();
@@ -142,6 +143,7 @@ public:
CPPUNIT_TEST(testRangeNameXLSX);
CPPUNIT_TEST(testHardRecalcODS);
CPPUNIT_TEST(testFunctionsODS);
+ CPPUNIT_TEST(testCachedFormulaResultsODS);
CPPUNIT_TEST(testDatabaseRangesODS);
CPPUNIT_TEST(testDatabaseRangesXLS);
CPPUNIT_TEST(testDatabaseRangesXLSX);
@@ -359,6 +361,31 @@ void ScFiltersTest::testFunctionsODS()
xDocSh->DoClose();
}
+void ScFiltersTest::testCachedFormulaResultsODS()
+{
+ const rtl::OUString aFileNameBase(RTL_CONSTASCII_USTRINGPARAM("functions."));
+ ScDocShellRef xDocSh = loadDoc( aFileNameBase, ODS );
+
+ CPPUNIT_ASSERT_MESSAGE("Failed to load functions.*", xDocSh.Is());
+ ScDocument* pDoc = xDocSh->GetDocument();
+ rtl::OUString aCSVFileName;
+
+ //test cached formula results of logical functions
+ createCSVPath(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("logical-functions.")), aCSVFileName);
+ testFile(aCSVFileName, pDoc, 0);
+ //test cached formula results of spreadsheet functions
+ createCSVPath(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("spreadsheet-functions.")), aCSVFileName);
+ testFile(aCSVFileName, pDoc, 1);
+ //test cached formula results of mathematical functions
+ createCSVPath(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("mathematical-functions.")), aCSVFileName);
+ testFile(aCSVFileName, pDoc, 2, PureString);
+ //test cached formula results of informations functions
+ createCSVPath(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("information-functions.")), aCSVFileName);
+ testFile(aCSVFileName, pDoc, 3);
+
+ xDocSh->DoClose();
+}
+
namespace {
void testDBRanges_Impl(ScDocument* pDoc, sal_Int32 nFormat)