diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-09-23 20:06:18 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-09-23 20:07:48 +0200 |
commit | 0222ce3cc6bdf4f6927139347ef5506a869eb977 (patch) | |
tree | d1770258784eab37a9e794611d10aac3b2bc90c1 /sc | |
parent | cb3ab592fd462bdd877178c6f0f0b7638938f0ce (diff) |
add color scale import test for xlsx
Change-Id: I8877d285be21ea4cd010cb532de593b3f5ab5975
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/data/xlsx/colorScale.xlsx | bin | 0 -> 7794 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 22 |
2 files changed, 22 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xlsx/colorScale.xlsx b/sc/qa/unit/data/xlsx/colorScale.xlsx Binary files differnew file mode 100644 index 000000000000..33234eecad9a --- /dev/null +++ b/sc/qa/unit/data/xlsx/colorScale.xlsx diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 6a2267a46fd5..867034518424 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -142,6 +142,7 @@ public: void testDataValidityODS(); void testColorScaleODS(); + void testColorScaleXLSX(); void testDataBarODS(); void testNewCondFormat(); @@ -194,6 +195,7 @@ public: CPPUNIT_TEST(testControlImport); CPPUNIT_TEST(testColorScaleODS); + CPPUNIT_TEST(testColorScaleXLSX); CPPUNIT_TEST(testDataBarODS); CPPUNIT_TEST(testNewCondFormat); @@ -1568,6 +1570,26 @@ void ScFiltersTest::testColorScaleODS() testColorScale_Impl(pDoc, aBuffer.makeStringAndClear()); } +void ScFiltersTest::testColorScaleXLSX() +{ + const rtl::OUString aFileNameBase(RTL_CONSTASCII_USTRINGPARAM("colorScale.")); + rtl::OUString aFileExtension(aFileFormats[XLSX].pName, strlen(aFileFormats[XLSX].pName), RTL_TEXTENCODING_UTF8 ); + rtl::OUString aFilterName(aFileFormats[XLSX].pFilterName, strlen(aFileFormats[XLSX].pFilterName), RTL_TEXTENCODING_UTF8) ; + rtl::OUString aFileName; + createFileURL(aFileNameBase, aFileExtension, aFileName); + rtl::OUString aFilterType(aFileFormats[XLSX].pTypeName, strlen(aFileFormats[XLSX].pTypeName), RTL_TEXTENCODING_UTF8); + std::cout << aFileFormats[XLSX].pName << " Test" << std::endl; + ScDocShellRef xDocSh = load (aFilterName, aFileName, rtl::OUString(), aFilterType, aFileFormats[XLSX].nFormatType); + + CPPUNIT_ASSERT_MESSAGE("Failed to load colorScale.xlsx", xDocSh.Is()); + + ScDocument* pDoc = xDocSh->GetDocument(); + + rtl::OUStringBuffer aBuffer(getSrcRootPath()); + aBuffer.append(m_aBaseString).append(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/reference/"))); + testColorScale_Impl(pDoc, aBuffer.makeStringAndClear()); +} + void ScFiltersTest::testDataBarODS() { |