summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-08-18 15:15:03 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-08-18 15:18:34 -0400
commitead1db7d4907ff70d412701f08b9c74481cef0bc (patch)
tree0f739302228df44f3487ebd447a66c1f2a66f0b5
parent5eaa0e76fb59ed7699c12b84a6d9c052fec3c128 (diff)
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
-rw-r--r--sc/qa/unit/subsequent_export-test.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 466ca6780bdf..8d9a67a97712 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -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)