summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java b/scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java
index 945b3bc00a91..89ef8c9c38b6 100644
--- a/scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java
+++ b/scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java
@@ -30,6 +30,7 @@ import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
+import javax.swing.text.BadLocationException;
public class PlainSourceView extends JScrollPane implements
ScriptSourceView, DocumentListener {
@@ -71,7 +72,7 @@ public class PlainSourceView extends JScrollPane implements
int line = ta.getLineStartOffset(model.getCurrentPosition());
Rectangle rect = ta.modelToView(line);
ta.scrollRectToVisible(rect);
- } catch (Exception e) {
+ } catch (BadLocationException e) {
// couldn't scroll to line, do nothing
}
@@ -238,4 +239,4 @@ class GlyphGutter extends JComponent {
g.setColor(Color.black);
g.drawPolygon(arrow);
}
-} \ No newline at end of file
+}