Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8139215

RTFEditorKit does not save alignment

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8u60
    • Fix Version/s: 9
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b114
    • CPU:
      x86
    • OS:
      generic

      Description

      FULL PRODUCT VERSION :
      Microsoft Windows [Version 6.3.9600]
      (c) 2013 Microsoft Corporation. All rights reserved.

      C:\Users\Owner>java -version
      java version "1.8.0_60"
      Java(TM) SE Runtime Environment (build 1.8.0_60-b26)
      Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

      C:\Users\Owner>

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.3.9600]
      (c) 2013 Microsoft Corporation. All rights reserved.

      C:\Users\Owner>ver

      Microsoft Windows [Version 6.3.9600]

      C:\Users\Owner>

      A DESCRIPTION OF THE PROBLEM :
      When saving a formatted text document using the RTFEditorKit the alignment will be completely removed even if no changes were made to the underlying document. This is a known bug but I have a fix for the issue. Following the advice of this Google group posting I managed to fix the issue in my own program:
      https://groups.google.com/forum/#!topic/comp.lang.java.gui/ZeDb64epi9w

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Create an RTFEditorKit and load a rich text file with varying alignment and then save the document.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      I would expect the RTFEditorKit to save the alignment.
      ACTUAL -
      The RTFEditorKit removes the alignment and does not save it at all.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      Please see my patched version of the module on GitHub:
      https://github.com/IsmAvatar/LateralGM/tree/master/javax/swing/text/rtf

      SUPPORT :
      YES

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ssadetsky Semyon Sadetsky (Inactive)
              Reporter:
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: