From 70fccdd470b11e4630f8f537b5c796c16869742d Mon Sep 17 00:00:00 2001 From: Noel Power Date: Tue, 19 Aug 2003 08:51:53 +0000 Subject: #17307# Adding Duncans changes for Runtime->Provider These changes need to be reviewed/reworked --- scripting/workben/bindings/ScriptBinding.xba | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'scripting/workben/bindings') diff --git a/scripting/workben/bindings/ScriptBinding.xba b/scripting/workben/bindings/ScriptBinding.xba index 87d44a41a58d..7f689d34f797 100644 --- a/scripting/workben/bindings/ScriptBinding.xba +++ b/scripting/workben/bindings/ScriptBinding.xba @@ -280,10 +280,10 @@ Sub initialiseNavigationComboArrays() langCount = 1 for index = 0 to ubound(svrArray) - iPos = inStr(svrArray(index), "ScriptRuntimeFor") + iPos = inStr(svrArray(index), "ScriptProviderFor") if (iPos > 0) then - lang = Mid(svrArray(index), iPos + Len("ScriptRuntimeFor") + lang = Mid(svrArray(index), iPos + Len("ScriptProviderFor") if not (lang = "Java") then 'Add to language vector @@ -812,17 +812,17 @@ end Sub Sub UpdateCfgFile ( fileName as String ) - dim FuncProvider as Object - dim Func as Object + dim ScriptProvider as Object + dim Script as Object dim args(1) dim displayDialogFlag as boolean displayDialogFlag = false args(0) = ThisComponent args(1) = displayDialogFlag - FuncProvider = createUnoService("drafts.com.sun.star.script.framework.provider.FunctionProvider") - FuncProvider.initialize( args() ) - Func = FuncProvider.getFunction("script://_$ScriptFrmwrkHelper.updateCfgFile?" _ + ScriptProvider = createUnoService("drafts.com.sun.star.script.framework.provider.MasterScriptProvider") + ScriptProvider.initialize( args() ) + Script = ScriptProvider.getScript("script://_$ScriptFrmwrkHelper.updateCfgFile?" _ + "language=Java&function=ScriptFrmwrkHelper.updateCfgFile&location=share") Dim inArgs(2) Dim outArgs() @@ -832,8 +832,7 @@ Sub UpdateCfgFile ( fileName as String ) inArgs(0) = xmlFile() inArgs(1) = fileName inArgs(2) = numberOfLines - Func.invoke( inArgs(), outIndex(), outArgs() ) - + Script.invoke( inArgs(), outIndex(), outArgs() ) End Sub sub UpdateConfig( a$ ) @@ -1034,15 +1033,15 @@ Sub PopulateLanguageCombo() End Sub Sub PopulateLocationCombo() - dim FuncProvider as Object + dim ScriptProvider as Object dim args(1) dim displayDialogFlag as boolean displayDialogFlag = false args(0) = ThisComponent args(1) = displayDialogFlag - FuncProvider = createUnoService("drafts.com.sun.star.script.framework.provider.FunctionProvider") - FuncProvider.initialize( args() ) + ScriptProvider = createUnoService("drafts.com.sun.star.script.framework.provider.MasterScriptProvider") + ScriptProvider.initialize( args() ) locCombo = bindingDialog.getControl( "LocationCombo" ) locCombo.removeItems( 0, locCombo.getItemCount() ) -- cgit