From 594f565720f2ba28b8ea8db79c961c9aeb3190dd Mon Sep 17 00:00:00 2001 From: RĂ¼diger Timm Date: Fri, 22 Oct 2004 12:49:06 +0000 Subject: 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. --- scripting/examples/beanshell/Highlight/ButtonPressHandler.bsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripting/examples') 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(); -- cgit