Skip to content
Snippets Groups Projects
Commit d5f636ca authored by Piotr Gawron's avatar Piotr Gawron
Browse files

improved color parsing

parent 23b515f9
No related branches found
No related tags found
1 merge request!1Appointments dev
......@@ -155,10 +155,21 @@ public class PrcSubjectsParser extends SubjectParser {
@Override
protected boolean parseResigned(Row row) {
try {
IndexedColors color = IndexedColors.fromInt(row.getSheet().getWorkbook().getFontAt(row.getCell(0).getCellStyle().getFontIndex()).getColor());
int colorId = row.getSheet().getWorkbook().getFontAt(row.getCell(0).getCellStyle().getFontIndex()).getColor();
//special case for black
if (colorId == 32767) {
return false;
}
IndexedColors color = IndexedColors.fromInt(colorId);
switch (color) {
case RED:
return true;
case SEA_GREEN:
return false;
case PINK:
return false;
case PLUM:
return false;
case BLUE:
return false;
case BLACK:
......
#Set root logger 's level and its appender to an appender called CONSOLE which is defined below.
log4j.rootLogger=fatal, CONSOLE
log4j.rootLogger=debug, CONSOLE
#Set the behavior of the CONSOLE appender
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
......
......@@ -9,6 +9,7 @@ import org.junit.runners.Suite.SuiteClasses;
CellParserTest.class, //
LihControlMappingParserTest.class, //
LihControlParserTest.class, //
PrcControlParserTest.class, //
PrcFlyingParserTest.class, //
PrcSubjectsParserTest.class, //
RedcapParserTest.class, //
......
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment