summaryrefslogtreecommitdiff
path: root/scripting/examples
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2004-10-22 12:49:06 +0000
committerRüdiger Timm <rt@openoffice.org>2004-10-22 12:49:06 +0000
commit594f565720f2ba28b8ea8db79c961c9aeb3190dd (patch)
tree2186a3d3b9b9230feba5fd2cd87fc62669972580 /scripting/examples
parentc5c55615c635b00ced0fa3751e4f8e1584b4e167 (diff)
INTEGRATION: CWS scriptingf6 (1.2.22); FILE MERGED
2004/09/16 14:26:45 dfoster 1.2.22.2: #i33670# Rename the context variable to XSCRIPTCONTEXT 2004/07/23 09:55:17 dfoster 1.2.22.1: #i30606# Add descriptions to code in examples.
Diffstat (limited to 'scripting/examples')
-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();