diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2004-10-22 12:49:06 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2004-10-22 12:49:06 +0000 |
commit | 4fc2fced15eb57da2fdfce1b8bac91deff395945 (patch) | |
tree | 3f6e49e4fb427782e17074629fa0b6c14cad45b2 /scripting/examples | |
parent | bbed95dbad8b0032cc1f4af3a3a347a2cea20dc3 (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.bsh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripting/examples/beanshell/Highlight/ButtonPressHandler.bsh b/scripting/examples/beanshell/Highlight/ButtonPressHandler.bsh index acfe56e2a6..363e12bb82 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(); |