diff options
Diffstat (limited to 'scripting')
17 files changed, 62 insertions, 22 deletions
diff --git a/scripting/examples/python/Capitalise.py b/scripting/examples/python/Capitalise.py index 67facb2bc136..2e5a34b1e431 100644 --- a/scripting/examples/python/Capitalise.py +++ b/scripting/examples/python/Capitalise.py @@ -77,6 +77,6 @@ def capitalisePython( ): i+= 1 -# lists the scripts, that shall be visible inside OOo. Can be omited, if -# all functions shall be visible, however here getNewString shall be surpressed +# lists the scripts, that shall be visible inside OOo. Can be omitted, if +# all functions shall be visible, however here getNewString shall be suppressed g_exportedScripts = capitalisePython, diff --git a/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java b/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java index 4b3488224804..f973c451fc31 100644 --- a/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java +++ b/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java @@ -191,7 +191,7 @@ public class ParcelBrowseNode extends PropertySet com.sun.star.reflection.InvocationTargetException { LogUtils.DEBUG("ParcelBrowseNode invoke for " + aFunctionName ); - // Initialise the out paramters - not used but prevents error in + // Initialise the out parameters - not used but prevents error in // UNO bridge aOutParamIndex[0] = new short[0]; aOutParam[0] = new Object[0]; diff --git a/scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java b/scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java index a7394640ad80..fc8e39d4dd5d 100644 --- a/scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java +++ b/scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java @@ -179,7 +179,7 @@ public class ProviderBrowseNode extends PropertySet com.sun.star.script.CannotConvertException, com.sun.star.reflection.InvocationTargetException { - // Initialise the out paramters - not used but prevents error in + // Initialise the out parameters - not used but prevents error in // UNO bridge aOutParamIndex[0] = new short[0]; aOutParam[0] = new Object[0]; diff --git a/scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java b/scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java index c8f7704f681a..26f490ff44a2 100644 --- a/scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java +++ b/scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java @@ -173,7 +173,7 @@ public class ScriptBrowseNode extends PropertySet com.sun.star.script.CannotConvertException, com.sun.star.reflection.InvocationTargetException { - // Initialise the out paramters - not used but prevents error in + // Initialise the out parameters - not used but prevents error in // UNO bridge aOutParamIndex[0] = new short[0]; aOutParam[0] = new Object[0]; diff --git a/scripting/java/com/sun/star/script/framework/container/UnoPkgContainer.java b/scripting/java/com/sun/star/script/framework/container/UnoPkgContainer.java index fb0be61ae461..4fd275a3a2b1 100644 --- a/scripting/java/com/sun/star/script/framework/container/UnoPkgContainer.java +++ b/scripting/java/com/sun/star/script/framework/container/UnoPkgContainer.java @@ -289,7 +289,7 @@ public class UnoPkgContainer extends ParcelContainer } else { - LogUtils.DEBUG("In writeUnoPackageDB() CANT Truncate...." ); + LogUtils.DEBUG("In writeUnoPackageDB() CAN'T Truncate...." ); } os = new XOutputStreamWrapper( xos ); dp.write( os ); diff --git a/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java b/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java index f8e3912f83b3..8a410b94ce67 100644 --- a/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java +++ b/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java @@ -352,7 +352,7 @@ public abstract class ScriptProvider // TODO need to encapsulate this better, // Some factory concept for creating/accessing Editor - // How this is passed down or how it is accessable by BrowseNode + // How this is passed down or how it is accessible by BrowseNode // implementations needs thinking about // This method is used to determine whether the ScriptProvider // has a ScriptEditor diff --git a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java index 4dee4d21f281..5daeb671f643 100644 --- a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java +++ b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java @@ -169,7 +169,7 @@ public class ScriptEditorForBeanShell /** - * Indicates the line where error occured + * Indicates the line where error occurred * */ public void indicateErrorLine( int lineNum ) diff --git a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java index de597ae7d10f..08900111bea8 100644 --- a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java +++ b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java @@ -184,7 +184,7 @@ class ScriptImpl implements XScript throws ScriptFrameworkErrorException, InvocationTargetException { - // Initialise the out paramters - not used at the moment + // Initialise the out parameters - not used at the moment aOutParamIndex[0] = new short[0]; aOutParam[0] = new Object[0]; diff --git a/scripting/java/com/sun/star/script/framework/provider/java/ScriptProviderForJava.java b/scripting/java/com/sun/star/script/framework/provider/java/ScriptProviderForJava.java index bad84288a759..94b47c1e1ebc 100644 --- a/scripting/java/com/sun/star/script/framework/provider/java/ScriptProviderForJava.java +++ b/scripting/java/com/sun/star/script/framework/provider/java/ScriptProviderForJava.java @@ -186,7 +186,7 @@ class ScriptImpl implements XScript { LogUtils.DEBUG( "** ScriptProviderForJava::invoke: Starting..." ); - // Initialise the out paramters - not used at the moment + // Initialise the out parameters - not used at the moment aOutParamIndex[0] = new short[0]; aOutParam[0] = new Object[0]; diff --git a/scripting/java/com/sun/star/script/framework/provider/java/StrictResolver.java b/scripting/java/com/sun/star/script/framework/provider/java/StrictResolver.java index 4e8104b88590..b31f73ce059f 100644 --- a/scripting/java/com/sun/star/script/framework/provider/java/StrictResolver.java +++ b/scripting/java/com/sun/star/script/framework/provider/java/StrictResolver.java @@ -70,12 +70,12 @@ public class StrictResolver implements Resolver } catch ( ClassNotFoundException e ) { - throw new NoSuchMethodException( "StrictResolver.getProxy: Cant find method: " + throw new NoSuchMethodException( "StrictResolver.getProxy: Can't find method: " + sd.getMethodName() + ":" + e.getMessage() ); } catch ( NoSuchMethodException e ) { - throw new NoSuchMethodException( "StrictResolver.getProxy: Cant find method: " + throw new NoSuchMethodException( "StrictResolver.getProxy: Can't find method: " + sd.getMethodName() + ":" + e.getMessage() ); } @@ -91,12 +91,12 @@ public class StrictResolver implements Resolver } catch ( InstantiationException ie ) { - throw new NoSuchMethodException( "getScriptProxy: Cant instantiate: " + + throw new NoSuchMethodException( "getScriptProxy: Can't instantiate: " + c.getName() ); } catch ( IllegalAccessException iae ) { - throw new NoSuchMethodException( "getScriptProxy: Cant access: " + throw new NoSuchMethodException( "getScriptProxy: Can't access: " + c.getName() ); } sp.setTargetObject( o ); diff --git a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java index 0bbdbc89acc5..aba030a08adf 100644 --- a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java +++ b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java @@ -240,7 +240,7 @@ public class ScriptEditorForJavaScript implements ScriptEditor } /** - * Indicates the line where error occured + * Indicates the line where error occurred * */ public void indicateErrorLine( int lineNum ) diff --git a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java index 1027c9e085dd..4e3320425820 100644 --- a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java +++ b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java @@ -182,7 +182,7 @@ class ScriptImpl implements XScript throws ScriptFrameworkErrorException, InvocationTargetException { - // Initialise the out paramters - not used at the moment + // Initialise the out parameters - not used at the moment aOutParamIndex[0] = new short[0]; aOutParam[0] = new Object[0]; diff --git a/scripting/java/org/openoffice/netbeans/modules/office/filesystem/OpenOfficeDocFileSystem.java b/scripting/java/org/openoffice/netbeans/modules/office/filesystem/OpenOfficeDocFileSystem.java index 4b0f121cd3c2..ba398030764e 100644 --- a/scripting/java/org/openoffice/netbeans/modules/office/filesystem/OpenOfficeDocFileSystem.java +++ b/scripting/java/org/openoffice/netbeans/modules/office/filesystem/OpenOfficeDocFileSystem.java @@ -234,7 +234,7 @@ System.out.println(" exception: " + ioe.getMessage()); */ public void prepareEnvironment(FileSystem.Environment environment) { - // BUG: the compiller cannot access files withing the OpenOffice document. + // BUG: the compiller cannot access files within the OpenOffice document. //environment.addClassPath(docFile.toString()); } diff --git a/scripting/source/protocolhandler/scripthandler.cxx b/scripting/source/protocolhandler/scripthandler.cxx index bd3542e3ff88..12ee3267453e 100644 --- a/scripting/source/protocolhandler/scripthandler.cxx +++ b/scripting/source/protocolhandler/scripthandler.cxx @@ -170,10 +170,31 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification( OSL_ENSURE( xDocumentScripts.is(), "ScriptProtocolHandler::dispatchWithNotification: can't do the security check!" ); if ( !xDocumentScripts.is() || !xDocumentScripts->getAllowMacroExecution() ) + { + if ( xListener.is() ) + { + ::com::sun::star::frame::DispatchResultEvent aEvent( + static_cast< ::cppu::OWeakObject* >( this ), + ::com::sun::star::frame::DispatchResultState::FAILURE, + invokeResult ); + try + { + xListener->dispatchFinished( aEvent ) ; + } + catch(RuntimeException & e) + { + OSL_TRACE( + "ScriptProtocolHandler::dispatchWithNotification: caught RuntimeException" + "while dispatchFinished with failture of the execution %s", + ::rtl::OUStringToOString( e.Message, + RTL_TEXTENCODING_ASCII_US ).pData->buffer ); + } + } return; + } } - // Creates a ScriptProvider ( if one is not created allready ) + // Creates a ScriptProvider ( if one is not created already ) createScriptProvider(); Reference< provider::XScript > xFunc = @@ -345,6 +366,25 @@ ScriptProtocolHandler::getScriptInvocation() if ( !m_xScriptInvocation.set( xController->getModel(), UNO_QUERY ) ) m_xScriptInvocation.set( xController, UNO_QUERY ); } + else + { + Reference< XFrame > xFrame( m_xFrame.get(), UNO_QUERY ); + if ( xFrame.is() ) + { + SfxFrame* pFrame = NULL; + for ( pFrame = SfxFrame::GetFirst(); pFrame; pFrame = SfxFrame::GetNext( *pFrame ) ) + { + if ( pFrame->GetFrameInterface() == xFrame ) + break; + } + SfxObjectShell* pDocShell = pFrame ? pFrame->GetCurrentDocument() : SfxObjectShell::Current(); + if ( pDocShell ) + { + Reference< XModel > xModel( pDocShell->GetModel() ); + m_xScriptInvocation.set( xModel, UNO_QUERY ); + } + } + } } return m_xScriptInvocation.is(); } diff --git a/scripting/source/pyprov/officehelper.py b/scripting/source/pyprov/officehelper.py index 0e915a6b792b..6151dab1882d 100644 --- a/scripting/source/pyprov/officehelper.py +++ b/scripting/source/pyprov/officehelper.py @@ -56,7 +56,7 @@ def bootstrap(): random.seed() sPipeName = "uno" + str(random.random())[2:] - # Start the office proces, don't check for exit status since an exception is caught anyway if the office terminates unexpectedly. + # Start the office process, don't check for exit status since an exception is caught anyway if the office terminates unexpectedly. cmdArray = (sOffice, "-nologo", "-nodefault", "".join(["-accept=pipe,name=", sPipeName, ";urp;"])) os.spawnv(os.P_NOWAIT, sOffice, cmdArray) diff --git a/scripting/workben/bindings/ScriptBinding.xba b/scripting/workben/bindings/ScriptBinding.xba index ba6d4ebdf0b2..50e60f9e19cb 100644 --- a/scripting/workben/bindings/ScriptBinding.xba +++ b/scripting/workben/bindings/ScriptBinding.xba @@ -972,7 +972,7 @@ sub AddNewKeyBinding( scriptName as string, shift as boolean, control as boolean ' Calculate from the key the offset into key group array we need to point to KeyGroupIndex = getKeyGroupIndex( key, keyTypeOffset ) - ' if key is allready allocated to a script then just reallocate + ' if key is already allocated to a script then just reallocate if ( keyAllocationMap( offsetIntoArrayOfArrays, KeyGroupIndex ).Value > 1 ) then keyAllocationMap( offsetIntoArrayOfArrays, KeyGroupIndex ).Name = scriptName @@ -1676,7 +1676,7 @@ sub LangLocComboListener() end if endif - ' extra dialog dependant processing + ' extra dialog dependent processing if dialogName = "Menu" then ' will set New button to false if no text in LableBox MenuLabelBoxListener() diff --git a/scripting/workben/ifc/scripting/SecurityDialogUtil.java b/scripting/workben/ifc/scripting/SecurityDialogUtil.java index 7be7bb9f0677..ff0f002ce72d 100644 --- a/scripting/workben/ifc/scripting/SecurityDialogUtil.java +++ b/scripting/workben/ifc/scripting/SecurityDialogUtil.java @@ -60,7 +60,7 @@ public SecurityDialogUtil(XMultiServiceFactory xMSF, String btnName, boolean che } /** - * Returns the error message that occured while + * Returns the error message that occurred while * accessing and pressing the button. * @return Error message. */ |