jdk/src/share/classes/javax/swing/text/rtf/RTFReader.java
changeset 10419 12c063b39232
parent 5506 202f599c92aa
child 22567 5816a47fa4dd
equal deleted inserted replaced
10418:1d57022fdb6e 10419:12c063b39232
   526         warning("Unknown RTF character set \"" + name + "\"");
   526         warning("Unknown RTF character set \"" + name + "\"");
   527         if (!name.equals("ansi")) {
   527         if (!name.equals("ansi")) {
   528             try {
   528             try {
   529                 translationTable = (char[])getCharacterSet("ansi");
   529                 translationTable = (char[])getCharacterSet("ansi");
   530             } catch (IOException e) {
   530             } catch (IOException e) {
   531                 throw new InternalError("RTFReader: Unable to find character set resources (" + e + ")");
   531                 throw new InternalError("RTFReader: Unable to find character set resources (" + e + ")", e);
   532             }
   532             }
   533         }
   533         }
   534     }
   534     }
   535 
   535 
   536     setTargetAttribute(Constants.RTFCharacterSet, name);
   536     setTargetAttribute(Constants.RTFCharacterSet, name);
  1612                                 text,
  1612                                 text,
  1613                                 currentTextAttributes());
  1613                                 currentTextAttributes());
  1614         } catch (BadLocationException ble) {
  1614         } catch (BadLocationException ble) {
  1615             /* This shouldn't be able to happen, of course */
  1615             /* This shouldn't be able to happen, of course */
  1616             /* TODO is InternalError the correct error to throw? */
  1616             /* TODO is InternalError the correct error to throw? */
  1617             throw new InternalError(ble.getMessage());
  1617             throw new InternalError(ble.getMessage(), ble);
  1618         }
  1618         }
  1619     }
  1619     }
  1620 
  1620 
  1621     public void finishParagraph(AttributeSet pgfAttributes,
  1621     public void finishParagraph(AttributeSet pgfAttributes,
  1622                                 AttributeSet chrAttributes)
  1622                                 AttributeSet chrAttributes)
  1626             target.insertString(pgfEndPosition, "\n", chrAttributes);
  1626             target.insertString(pgfEndPosition, "\n", chrAttributes);
  1627             target.setParagraphAttributes(pgfEndPosition, 1, pgfAttributes, true);
  1627             target.setParagraphAttributes(pgfEndPosition, 1, pgfAttributes, true);
  1628         } catch (BadLocationException ble) {
  1628         } catch (BadLocationException ble) {
  1629             /* This shouldn't be able to happen, of course */
  1629             /* This shouldn't be able to happen, of course */
  1630             /* TODO is InternalError the correct error to throw? */
  1630             /* TODO is InternalError the correct error to throw? */
  1631             throw new InternalError(ble.getMessage());
  1631             throw new InternalError(ble.getMessage(), ble);
  1632         }
  1632         }
  1633     }
  1633     }
  1634 
  1634 
  1635     public void endSection()
  1635     public void endSection()
  1636     {
  1636     {