You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2014/05/20 14:54:04 UTC

[Bug 56548] New: XSSFCellStyle.getFillBackgroundColor should return 65 (not 64) when a fillBackgroundColor has not been explicitly set

https://issues.apache.org/bugzilla/show_bug.cgi?id=56548

            Bug ID: 56548
           Summary: XSSFCellStyle.getFillBackgroundColor should return 65
                    (not 64) when a fillBackgroundColor has not been
                    explicitly set
           Product: POI
           Version: 3.10
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: dev@poi.apache.org
          Reporter: jerry.williamson@e2open.com

If a new CellStyle is created and the fillBackgroundColor and
fillForegroundColor are set using the values from the column's default style,
then both the foreground and background colors are set to 64 which is intended
to represent AUTOMATIC. Microsoft's documentation, though, indicates that 64 is
the system foreground color and 65 is the system background color.

http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.indexedcolors%28v=office.14%29.aspx

In excel, everything looks fine until you edit the cell at which point, the
cell becomes a black box (black foreground and background) while the cell is
being edited.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 56548] XSSFCellStyle.getFillBackgroundColor should return 65 (not 64) when a fillBackgroundColor has not been explicitly set

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56548

Jerry Williamson <je...@e2open.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 56548] XSSFCellStyle.getFillBackgroundColor should return 65 (not 64) when a fillBackgroundColor has not been explicitly set

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56548

--- Comment #4 from Jerry Williamson <je...@e2open.com> ---
Created attachment 31640
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31640&action=edit
sample file produced by the test.


editing the first cell causes black box while editing
editing second cell which has background color set to 65 is fine

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 56548] XSSFCellStyle.getFillBackgroundColor should return 65 (not 64) when a fillBackgroundColor has not been explicitly set

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56548

--- Comment #6 from Jerry Williamson <je...@e2open.com> ---
Created attachment 31642
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31642&action=edit
second sample.xlsx

I believe I inadvertently saved the previous sample.xlsx in excel.
Excel removed the <bgColor indexed="65"/> element from the styles.xml when it
saved.

This attachment is what is actually produced by the test

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 56548] XSSFCellStyle.getFillBackgroundColor should return 65 (not 64) when a fillBackgroundColor has not been explicitly set

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56548

--- Comment #3 from Jerry Williamson <je...@e2open.com> ---
Created attachment 31639
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31639&action=edit
Test case

test case that produces an xlsx file that demonstrates the problem.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 56548] XSSFCellStyle.getFillBackgroundColor should return 65 (not 64) when a fillBackgroundColor has not been explicitly set

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56548

Nick Burch <ap...@gagravarr.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO
                 OS|                            |All

--- Comment #1 from Nick Burch <ap...@gagravarr.org> ---
Any chance you could use Excel to create a simple test file, which shows the 64
for the foreground but the 65 for the background? That could then be used
towards a unit test for the problem

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 56548] XSSFCellStyle.getFillBackgroundColor should return 65 (not 64) when a fillBackgroundColor has not been explicitly set

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56548

--- Comment #2 from Jerry Williamson <je...@e2open.com> ---
Not sure I can force a 65 from Excel directly. It appears to just leave the
element unspecified which internally defaults. I can, though, create a test
where an Excel file is created with both values and hopefully demonstrate the
problem. I'll attach a couple of tests shortly

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 56548] XSSFCellStyle.getFillBackgroundColor should return 65 (not 64) when a fillBackgroundColor has not been explicitly set

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56548

--- Comment #5 from Jerry Williamson <je...@e2open.com> ---
Added a testcase and a sample file that demonstrates the problem.
The test produces an XLSX file that has 2 cells. 
The first cell has a cell style whose fillBackground is set from the column
style (which is 64).
The second cell has a fillBackground explicitly set to 65.

If you open the spreadsheet in Excel and edit the first cell, you'll see that
the cell turns to a black box while editing.

I'm using Excel 2013 on Windows 7 (in case it matters)

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org