[simplyhtml] 01/03: Imported Upstream version 0.16.13
Felix Natter
fnatter-guest at moszumanska.debian.org
Thu Dec 31 17:22:12 UTC 2015
This is an automated email from the git hooks/post-receive script.
fnatter-guest pushed a commit to branch master
in repository simplyhtml.
commit a8091dcf389684e9705f78f5267c402b60d7f318
Author: Felix Natter <fnatter at gmx.net>
Date: Thu Dec 31 18:12:34 2015 +0100
Imported Upstream version 0.16.13
---
src/build.xml | 2 +-
src/com/lightdev/app/shtm/FrmMain.java | 2 +-
src/com/lightdev/app/shtm/SHTMLEditorKit.java | 7 ++++---
src/com/lightdev/app/shtm/SHTMLEditorPane.java | 3 ++-
4 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/build.xml b/src/build.xml
index 19c4a28..7fbf205 100644
--- a/src/build.xml
+++ b/src/build.xml
@@ -1,5 +1,5 @@
<project name="SimplyHTML" default="dist" basedir=".">
- <property name="version" value="0_16_11" />
+ <property name="version" value="0_16_13" />
<property name="src" value="." />
<property name="help" value="${src}/com/lightdev/app/shtm/help" />
<property name="lib" value="../lib" />
diff --git a/src/com/lightdev/app/shtm/FrmMain.java b/src/com/lightdev/app/shtm/FrmMain.java
index cabdf0a..fd32e44 100644
--- a/src/com/lightdev/app/shtm/FrmMain.java
+++ b/src/com/lightdev/app/shtm/FrmMain.java
@@ -51,7 +51,7 @@ import javax.swing.JFrame;
*/
class FrmMain extends JFrame {
public static final String APP_NAME = "SimplyHTML";
- public static final String VERSION = "0.16.11";
+ public static final String VERSION = "0.16.13";
/** static reference to this instance of class FrmMain */
private SHTMLPanelImpl mainPane;
diff --git a/src/com/lightdev/app/shtm/SHTMLEditorKit.java b/src/com/lightdev/app/shtm/SHTMLEditorKit.java
index b73114b..8bd557c 100644
--- a/src/com/lightdev/app/shtm/SHTMLEditorKit.java
+++ b/src/com/lightdev/app/shtm/SHTMLEditorKit.java
@@ -24,6 +24,8 @@ import java.awt.Toolkit;
import java.io.IOException;
import java.io.Reader;
import java.io.Writer;
+import java.util.ArrayList;
+import java.util.Collections;
import java.util.Enumeration;
import javax.swing.text.BadLocationException;
@@ -248,9 +250,8 @@ public class SHTMLEditorKit extends HTMLEditorKit {
final Element characterElement = doc.getCharacterElement(i);
sasText = new SimpleAttributeSet(characterElement.getAttributes().copyAttributes());
final int endOffset = characterElement.getEndOffset();
- final Enumeration attribEntries1 = sasText.getAttributeNames();
- while (attribEntries1.hasMoreElements()) {
- final Object entryKey = attribEntries1.nextElement();
+ final ArrayList<?> attributeNames = Collections.list(sasText.getAttributeNames());
+ for (final Object entryKey : attributeNames) {
if (attributeName != null && entryKey.equals(attributeName) || attributeName == null
&& !entryKey.equals(StyleConstants.NameAttribute)) {
sasText.removeAttribute(entryKey);
diff --git a/src/com/lightdev/app/shtm/SHTMLEditorPane.java b/src/com/lightdev/app/shtm/SHTMLEditorPane.java
index 1c14ad4..f79a0e9 100644
--- a/src/com/lightdev/app/shtm/SHTMLEditorPane.java
+++ b/src/com/lightdev/app/shtm/SHTMLEditorPane.java
@@ -3726,6 +3726,7 @@ public class SHTMLEditorPane extends JEditorPane implements DropTargetListener,
@Override
public String getSelectedText() {
- return super.getSelectedText().replace('\u00a0', ' ');
+ final String text = super.getSelectedText();
+ return text != null ? text.replace('\u00a0', ' ') : null;
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/simplyhtml.git
More information about the pkg-java-commits
mailing list