ICEpdf
  1. ICEpdf
  2. PDF-244

Black and #000000 colours are not correctly parsed in org.icepdf.core.views.* system properties.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.1
    • Fix Version/s: 4.2
    • Component/s: Viewer RI
    • Labels:
      None
    • Environment:
      any

      Description

      Our simple colour parsing code can't take a zero or black value when setting colour values for various RI colours.

                  String color = Defs.sysProperty(
                          "org.icepdf.core.views.background.color", "#808080");
                  int colorValue = ColorUtil.convertColor(color);
                  backgroundColor =
                          new Color(colorValue > 0 ? colorValue :
                                  Integer.parseInt("808080", 16));

      colorValue > 0 should likely be re-factored.

        Activity

        Patrick Corless created issue -
        Patrick Corless made changes -
        Field Original Value New Value
        Salesforce Case []
        Fix Version/s 4.2 [ 10243 ]
        Patrick Corless made changes -
        Salesforce Case []
        Assignee Priority P1
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24052 Tue Mar 01 11:55:27 MST 2011 patrick.corless PDF-244 fixed minor issue where zero colours could not be set via the system proeperty org.icepdf.core.views.background.color.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/views/DocumentViewControllerImpl.java
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/views/AbstractDocumentView.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24053 Tue Mar 01 11:58:31 MST 2011 patrick.corless PDF-244 touched up other use of ColorUtil.convertColor() where we won't use a zero valued colour
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/views/swing/AnnotationComponentImpl.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/views/common/TextSelectionPageHandler.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/views/swing/ResizableBorder.java
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/views/PageViewDecorator.java
        Hide
        Patrick Corless added a comment -

        Pretty simple issue where we would ignore the white hex value or name and apply the default colour #808080.

        Show
        Patrick Corless added a comment - Pretty simple issue where we would ignore the white hex value or name and apply the default colour #808080.
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Patrick Corless
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: