summaryrefslogtreecommitdiff
path: root/scripting/examples/beanshell/Highlight/ButtonPressHandler.bsh
diff options
context:
space:
mode:
Diffstat (limited to 'scripting/examples/beanshell/Highlight/ButtonPressHandler.bsh')
-rw-r--r--scripting/examples/beanshell/Highlight/ButtonPressHandler.bsh5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripting/examples/beanshell/Highlight/ButtonPressHandler.bsh b/scripting/examples/beanshell/Highlight/ButtonPressHandler.bsh
index acfe56e2a65f..363e12bb82b0 100644
--- a/scripting/examples/beanshell/Highlight/ButtonPressHandler.bsh
+++ b/scripting/examples/beanshell/Highlight/ButtonPressHandler.bsh
@@ -1,3 +1,6 @@
+// this code is bound to the events generated by the buttons in the dialog
+// it will close the dialog or find and highlight the text entered in the
+// dialog (depending on the button pressed)
import com.sun.star.uno.*;
import com.sun.star.awt.*;
import com.sun.star.lang.*;
@@ -48,7 +51,7 @@ else
int red = cRed.getRGB();
XReplaceable replaceable = (XReplaceable)
- UnoRuntime.queryInterface(XReplaceable.class, context.getDocument());
+ UnoRuntime.queryInterface(XReplaceable.class, XSCRIPTCONTEXT.getDocument());
XReplaceDescriptor descriptor =
(XReplaceDescriptor) replaceable.createReplaceDescriptor();