add color scale import test for xlsx

Change-Id: I8877d285be21ea4cd010cb532de593b3f5ab5975
This commit is contained in:
Markus Mohrhard 2012-09-23 20:06:18 +02:00
parent cb3ab592fd
commit 0222ce3cc6
2 changed files with 22 additions and 0 deletions

Binary file not shown.

View file

@ -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()
{