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 2009/07/26 06:34:46 UTC
DO NOT REPLY [Bug 47582] New: XSSFCellStyle.cloneStyleFrom not
replicating all the style attributes
https://issues.apache.org/bugzilla/show_bug.cgi?id=47582
Summary: XSSFCellStyle.cloneStyleFrom not replicating all the
style attributes
Product: POI
Version: 3.5-dev
Platform: PC
OS/Version: Mac OS X 10.4
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
AssignedTo: dev@poi.apache.org
ReportedBy: prescindor@gmail.com
XSSFCellStyle.cloneStyleFrom fails to reproduce the data format and the font
and possibly other style attributes.
To copy the data format, you need to get the data format string from the source
style and use an XSSFDataFormat instance to obtain a data format index valid in
the target style's workbook. Similar legerdemain is required to handle the
font. You have to ask the target style's workbook if it has a font with the
same properties as the source style's font and create a new one if it doesn't.
I didn't investigate cloneStyleFrom's performance with respect to the full
range of attributes, as I adopted a different approach to my problem, which
does not to clone styles across workbooks.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
DO NOT REPLY [Bug 47582] XSSFCellStyle.cloneStyleFrom not
replicating all the style attributes
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47582
--- Comment #1 from radek.mensik@seznam.cz 2010-09-14 04:18:01 EDT ---
If there are two workbooks then
XSSFCellStyle.cloneStyleFrom has problem with keys (of fonts...), which are
copied from one workbook to other and thus even if there the font has id 5 in
source workbook it is copied with this id to targetworkbook where is only one
font =(max id is 0). Just try to run your test
public void testCloneStyleDiffWB() { ..} for XSSF
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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
DO NOT REPLY [Bug 47582] XSSFCellStyle.cloneStyleFrom not
replicating all the style attributes
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47582
Nick Burch <ni...@alfresco.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #2 from Nick Burch <ni...@alfresco.com> 2010-09-20 16:10:53 EDT ---
Support added in r999096, along with a unit test based on the HSSF one that
shows we do copy things across
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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