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 2015/03/27 16:01:35 UTC

[Bug 57768] New: CellStyle.cloneStyleFrom(...) does not copying background colors and borders

https://bz.apache.org/bugzilla/show_bug.cgi?id=57768

            Bug ID: 57768
           Summary: CellStyle.cloneStyleFrom(...) does not copying
                    background colors and borders
           Product: POI
           Version: 3.11-FINAL
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: dev@poi.apache.org
          Reporter: mshlayen@smart-solution.com

Created attachment 32615
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=32615&action=edit
Java code, excel template file, screenshots

Method cloneStyleFrom(CellStyle cellStyle) does not copy all styles. For
example: background color, borders.
If trying to copy background color after calling this method, getting
Exception:
java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
    at java.util.ArrayList.RangeCheck(ArrayList.java:547)
    at java.util.ArrayList.get(ArrayList.java:322)
    at org.apache.poi.xssf.model.StylesTable.getFillAt(StylesTable.java:269)
    at
org.apache.poi.xssf.usermodel.XSSFCellStyle.getCTFill(XSSFCellStyle.java:1081)
    at
org.apache.poi.xssf.usermodel.XSSFCellStyle.setFillPattern(XSSFCellStyle.java:1133)
    at
org.apache.poi.xssf.usermodel.XSSFCellStyle.setFillPattern(XSSFCellStyle.java:1154)
    at TestCopyFileExcel.copyCellStyle(TestCopyFileExcel.java:133)
...

See attachment for details.

-- 
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 57768] CellStyle.cloneStyleFrom(...) does not copying background colors and borders

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

Michael <ms...@smart-solution.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mshlayen@smart-solution.com
                 OS|                            |All

-- 
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 57768] CellStyle.cloneStyleFrom(...) does not copying background colors and borders

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

--- Comment #4 from Michael <ms...@smart-solution.com> ---
Do you know (any idea) when the next stable build (v. 3.12) could be released?
Thanks.

-- 
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 57768] CellStyle.cloneStyleFrom(...) does not copying background colors and borders

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

Michael <ms...@smart-solution.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Michael <ms...@smart-solution.com> ---
In the version 3.12

-- 
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 57768] CellStyle.cloneStyleFrom(...) does not copying background colors and borders

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

Dominik Stadler <do...@gmx.at> changed:

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

--- Comment #1 from Dominik Stadler <do...@gmx.at> ---
There have been a few fixes in that area lately which should make this work as
expected. Please try a recent nightly build from
https://builds.apache.org/job/POI/lastSuccessfulBuild/artifact/ and let us know
if it works!

-- 
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 57768] CellStyle.cloneStyleFrom(...) does not copying background colors and borders

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

chinafool <54...@qq.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P1
            Version|3.11-FINAL                  |3.12-dev

--- Comment #5 from chinafool <54...@qq.com> ---
I want to know if the last version has solved this problem,cause my program has
met this problem,too.
When I use the "clonecellstylefrom()" function,the color of the font/background
leave white.
Do you really change it in v3.12?
Looking forward to your reply.
                               from a china user

-- 
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 57768] CellStyle.cloneStyleFrom(...) does not copying background colors and borders

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

--- Comment #2 from Michael <ms...@smart-solution.com> ---
Created attachment 32616
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=32616&action=edit
Java code

-- 
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 57768] CellStyle.cloneStyleFrom(...) does not copying background colors and borders

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

Michael <ms...@smart-solution.com> changed:

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

--- Comment #3 from Michael <ms...@smart-solution.com> ---
With latest build (poi-3.12-beta2-20150326):

- Copying background colors for cells and rows, but doesn't - for columns;
- When opening resulting excel file in MS-Excel getting same errors (see
screenshots in the initial attachment);
- Does not copy borders;
- If trying to copy borders manually after calling this method (cloneStyleFrom)
receive exception:
java.lang.IndexOutOfBoundsException: Index: 10, Size: 2
    at java.util.ArrayList.RangeCheck(ArrayList.java:547)
    at java.util.ArrayList.get(ArrayList.java:322)
    at org.apache.poi.xssf.model.StylesTable.getBorderAt(StylesTable.java:255)
    at
org.apache.poi.xssf.usermodel.XSSFCellStyle.getCTBorder(XSSFCellStyle.java:1109)
    at
org.apache.poi.xssf.usermodel.XSSFCellStyle.setBorderBottom(XSSFCellStyle.java:801)
    at
org.apache.poi.xssf.usermodel.XSSFCellStyle.setBorderBottom(XSSFCellStyle.java:819)
    at TestCopyFileExcel.copyCellStyle(TestCopyFileExcel.java:134)
...

-- 
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