Uploaded image for project: 'ODF Toolkit'
  1. ODF Toolkit
  2. ODFTOOLKIT-326

NPE when setting default background in TextCellProperties

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.5-incubating
    • 0.6-incubating
    • simple api
    • None

    Description

      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());

      Attachments

        1. testcase-fix-ODFTOOLKIT-326.patch
          4 kB
          Florian Hopf
        2. testcase-fix-ODFTOOLKIT-326-2.patch
          5 kB
          Florian Hopf

        Activity

          People

            Unassigned Unassigned
            xpj Pavel Jisl
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: