diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-03-23 08:33:22 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-03-23 08:38:18 +0100 |
commit | 73e74680d8c0cbf8baf869cc8bbc58dae432a0ef (patch) | |
tree | c897f3bdbc8027989dfb7bf29de727069f264268 | |
parent | 9513e13686f011b008764b3c5f184be47b9f4f5f (diff) |
add ODS test for above/below cond format rules
Change-Id: I6ce6292a490ef39c111aa7f4c0a5ada0d45c16bc
-rw-r--r-- | sc/qa/unit/data/ods/new_cond_format_test.ods | bin | 0 -> 13124 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_export-test.cxx | 16 | ||||
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 18 |
3 files changed, 34 insertions, 0 deletions
diff --git a/sc/qa/unit/data/ods/new_cond_format_test.ods b/sc/qa/unit/data/ods/new_cond_format_test.ods Binary files differnew file mode 100644 index 000000000000..9418c43b6076 --- /dev/null +++ b/sc/qa/unit/data/ods/new_cond_format_test.ods diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index c73ba31f36e2..bf0ab4a8598f 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -45,6 +45,7 @@ public: void test(); void testPasswordExport(); + void testConditionalFormatExportODS(); void testConditionalFormatExportXLSX(); void testColorScaleExportODS(); void testColorScaleExportXLSX(); @@ -57,6 +58,7 @@ public: #if !defined(MACOSX) && !defined(DRAGONFLY) CPPUNIT_TEST(testPasswordExport); #endif + CPPUNIT_TEST(testConditionalFormatExportODS); CPPUNIT_TEST(testConditionalFormatExportXLSX); CPPUNIT_TEST(testColorScaleExportODS); CPPUNIT_TEST(testColorScaleExportXLSX); @@ -150,6 +152,20 @@ void ScExportTest::testPasswordExport() CPPUNIT_ASSERT_DOUBLES_EQUAL(aVal, 1.0, 1e-8); } +void ScExportTest::testConditionalFormatExportODS() +{ + ScDocShellRef xShell = loadDoc("new_cond_format_test.", ODS); + CPPUNIT_ASSERT(xShell.Is()); + + ScDocShellRef xDocSh = saveAndReload(&(*xShell), ODS); + CPPUNIT_ASSERT(xDocSh.Is()); + ScDocument* pDoc = xDocSh->GetDocument(); + OUString aCSVFile("new_cond_format_test."); + OUString aCSVPath; + createCSVPath( aCSVFile, aCSVPath ); + testCondFile(aCSVPath, pDoc, 0); +} + void ScExportTest::testConditionalFormatExportXLSX() { ScDocShellRef xShell = loadDoc("new_cond_format_test.", XLSX); diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index bdb09fdbd19b..187a81a205e0 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -127,6 +127,7 @@ public: void testDataBarXLSX(); void testColorScaleODS(); void testColorScaleXLSX(); + void testNewCondFormatODS(); void testNewCondFormatXLSX(); //change this test file only in excel and not in calc @@ -189,6 +190,7 @@ public: CPPUNIT_TEST(testDataBarXLSX); CPPUNIT_TEST(testColorScaleODS); CPPUNIT_TEST(testColorScaleXLSX); + CPPUNIT_TEST(testNewCondFormatODS); CPPUNIT_TEST(testNewCondFormatXLSX); CPPUNIT_TEST(testNumberFormatHTML); @@ -1774,6 +1776,22 @@ void ScFiltersTest::testColorScaleXLSX() testColorScale3Entry_Impl(pDoc); } +void ScFiltersTest::testNewCondFormatODS() +{ + ScDocShellRef xDocSh = ScBootstrapFixture::loadDoc( "new_cond_format_test.", ODS ); + + CPPUNIT_ASSERT_MESSAGE("Failed to load new_cond_format_test.xlsx", xDocSh.Is()); + + ScDocument* pDoc = xDocSh->GetDocument(); + + OUString aCSVFile("new_cond_format_test."); + OUString aCSVPath; + createCSVPath( aCSVFile, aCSVPath ); + testCondFile(aCSVPath, pDoc, 0); + + xDocSh->DoClose(); +} + void ScFiltersTest::testNewCondFormatXLSX() { ScDocShellRef xDocSh = ScBootstrapFixture::loadDoc( "new_cond_format_test.", XLSX ); |