Kaydet (Commit) ead1db7d authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Write test to ensure that we export sheet tab color settings correctly.

Previously, we would incorrectly export a sheet tab without any color set
as a tab with white color.

Change-Id: I97e59a0d8e2fba6db64149f53acfe4331a5ce2ba
üst 5eaa0e76
......@@ -1757,6 +1757,24 @@ void ScExportTest::testSharedFormulaExportXLSX()
{
bool checkContent( ScDocument& rDoc )
{
SCTAB nTabCount = rDoc.GetTableCount();
if (nTabCount != 2)
{
cerr << "Document should have exactly 2 sheets. " << nTabCount << " found." << endl;
return false;
}
// Make sure the sheet tab colors are not set.
for (SCROW i = 0; i <= 1; ++i)
{
Color aTabBgColor = rDoc.GetTabBgColor(i);
if (aTabBgColor != Color(COL_AUTO))
{
cerr << "The tab color of Sheet " << (i+1) << " should not be explicitly set." << endl;
return false;
}
}
// B2:B7 should show 1,2,3,4,5,6.
double fExpected = 1.0;
for (SCROW i = 1; i <= 6; ++i, ++fExpected)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment