(moved from https://github.com/flyingsaucerproject/flyingsaucer/issues#issue/5,
reported by https://github.com/jheid)
Hi.
Please modifiy
private void updateSystemSelection() {
if (this.dotInfo != this.markInfo && panel != null) {
Clipboard clip = panel.getToolkit().getSystemSelection();
if (clip != null) {
String selectedText = lastHighlightedString;
try {
clip.setContents(new StringSelection(selectedText), null);
} catch (IllegalStateException ise) {
// clipboard was unavailable
// no need to provide error feedback to user since updating
// the system selection is not a user invoked action
}
}
}
}
in org.xhtmlrenderer.swing.SelectionHighlighter to
private void updateSystemSelection() {
if (this.dotInfo != this.markInfo && panel != null)
try {
Clipboard clip = panel.getToolkit().getSystemSelection();
if (clip != null) {
String selectedText = lastHighlightedString;
try {
clip.setContents(new StringSelection(selectedText), null);
} catch (IllegalStateException ise) {
// clipboard was unavailable
// no need to provide error feedback to user since updating
// the system selection is not a user invoked action
}
}
} catch (AccessControlException t) { }
}
so you won't get a SecurityException when running XHTMLRenderer in an unsigned
applet.
Cheers,
Jörn
Original issue reported on code.google.com by pdoubl...@gmail.com on 26 Mar 2011 at 9:25
Original issue reported on code.google.com by
pdoubl...@gmail.com
on 26 Mar 2011 at 9:25