summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorAndreas Heinisch <andreas.heinisch@yahoo.de>2019-05-21 11:14:04 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-05-21 12:39:43 +0200
commitd7f1ca82198e1cc73fe4bb38f3034c6dc110af83 (patch)
tree0cf9fa88d83043066f1167b6de63357ff48eee94 /scripting
parentbbe1ede0fada499fd49b60bdc7964e311b331454 (diff)
tdf#97635 Added unindentation using shift-tab (mimicked eclipse behavior)
Restored java 6 compatibility Change-Id: I550920457874b9261bdde07040aad8f7b67773d8 Reviewed-on: https://gerrit.libreoffice.org/72671 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'scripting')
-rw-r--r--scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java4
1 files changed, 2 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 cc1e22ee21e7..b2a4dd61c243 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
@@ -63,7 +63,7 @@ public class PlainSourceView extends JScrollPane implements
UndoManager undoManager;
private List<UnsavedChangesListener> unsavedListener = new ArrayList<UnsavedChangesListener>();
- private static final Pattern tabPattern = Pattern.compile("^ *(?<tab>\\t)");
+ private static final Pattern tabPattern = Pattern.compile("^ *(\\t)");
public PlainSourceView(ScriptSourceModel model) {
this.model = model;
@@ -186,7 +186,7 @@ public class PlainSourceView extends JScrollPane implements
Matcher matcher = tabPattern.matcher(ta.getText(startOffset, endOffset - startOffset));
if (matcher.find()) {
- ta.replaceRange(null, startOffset + matcher.start("tab"), startOffset + matcher.end("tab"));
+ ta.replaceRange(null, startOffset + matcher.start(1), startOffset + matcher.end(1));
}
} catch (BadLocationException e) {
// could not find correct location of the tab