"f79646", // Accent6\r
"0000ff", // Hlink\r
"800080" // FolHlink\r
- };\r
+ };\r
\r
@Test\r
public void testThemesTableColors() throws Exception {\r
Map<String,XSSFWorkbook> workbooks = new LinkedHashMap<String, XSSFWorkbook>();\r
workbooks.put(testFileSimple, simple);\r
workbooks.put("Re-Saved_" + testFileSimple, simpleRS);\r
- // TODO Fix these to work!\r
-// workbooks.put(testFileComplex, complex);\r
-// workbooks.put("Re-Saved_" + testFileComplex, complexRS);\r
+ workbooks.put(testFileComplex, complex);\r
+ workbooks.put("Re-Saved_" + testFileComplex, complexRS);\r
\r
// Sanity check\r
assertEquals(rgbExpected.length, rgbExpected.length);\r
XSSFCell cell = row.getCell(0);\r
assertNotNull(\r
"Missing cell " + ref + " in " + whatWorkbook, cell);\r
- \r
- ThemeElement themeElem = ThemeElement.byId(rn-startRN);\r
+\r
+ int expectedThemeIdx = rn-startRN;\r
+ ThemeElement themeElem = ThemeElement.byId(expectedThemeIdx);\r
assertEquals(\r
"Wrong theme at " + ref + " in " + whatWorkbook,\r
themeElem.name.toLowerCase(), cell.getStringCellValue());\r
// Check the RGB part (no tint)\r
assertEquals(\r
"Wrong theme colour " + themeElem.name + " on " + whatWorkbook,\r
- rgbExpected[rn], Hex.encodeHexString(color.getRGB()));\r
- // Check the Theme ID\r
- int expectedThemeIdx = rn - startRN;\r
+ rgbExpected[expectedThemeIdx], Hex.encodeHexString(color.getRGB()));\r
long themeIdx = font.getCTFont().getColorArray(0).getTheme();\r
assertEquals(\r
"Wrong theme index " + expectedThemeIdx + " on " + whatWorkbook,\r