summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/qa/unit/data/xlsx/colorScale.xlsxbin0 -> 7794 bytes
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx22
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
new file mode 100644
index 000000000000..33234eecad9a
--- /dev/null
+++ b/sc/qa/unit/data/xlsx/colorScale.xlsx
Binary files differ
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()
{