[ 
https://issues.apache.org/jira/browse/ODFTOOLKIT-326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Florian Hopf updated ODFTOOLKIT-326:
------------------------------------

    Attachment: testcase-fix-ODFTOOLKIT-326-2.patch

Hi Rob,
thanks for trying to apply the patch. That's really weird, I am sure that these 
Tests have been running successfully but after looking into it they are 
definitively wrong. It's not really related to the fix but I've been trying to 
document the background color feature a bit with the test. Attached is a new 
patch. The logic is: When setting the color to null, the Color is null on the 
TableStyleProperties. When calling getColor on the cell or on the StyleHandler 
directly the color defaults to WHITE. If a new row is appended the cells 
inherit the style of the cell. I hope this is the way how it is supposed to 
work.

Regards
Florian
                
> NPE when setting default background in TextCellProperties
> ---------------------------------------------------------
>
>                 Key: ODFTOOLKIT-326
>                 URL: https://issues.apache.org/jira/browse/ODFTOOLKIT-326
>             Project: ODF Toolkit
>          Issue Type: Bug
>          Components: simple api
>    Affects Versions: 0.8.8
>            Reporter: Pavel Jisl
>         Attachments: testcase-fix-ODFTOOLKIT-326-2.patch, 
> testcase-fix-ODFTOOLKIT-326.patch
>
>
> I need to set default cell background. I use method setBackgroundColor(Color 
> aColor) in TableCellProperties.
> It is said in javadoc, that " If the parameter <code>aColor</code> is null, 
> the background color definition will be removed.", but it throws 
> NullPointerException, because it removes background definition, but instead 
> of exit method it tries to set toString() value of null:
>               if (aColor == null)
>                       
> mElement.removeAttribute(FoBackgroundColorAttribute.ATTRIBUTE_NAME.getQName());
>               mElement.setFoBackgroundColorAttribute(aColor.toString());

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to