diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-03-03 13:41:45 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2013-03-03 17:14:15 +0100 |
commit | ecf00403376d13355fcf6fb7cd36b3500f19fc69 (patch) | |
tree | 96d76c3d9e9514a6f08e51c1fe3ddcdcb6a1060d /scripting/source | |
parent | 29c8b9a7c9a4d62b7df2e70b71beec488aae5722 (diff) |
loplugin: improve indentation
Change-Id: If0ddaa8fd7cfaf4df8589422cb50ce37f1be2ad1
Diffstat (limited to 'scripting/source')
-rw-r--r-- | scripting/source/basprov/basscript.cxx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/scripting/source/basprov/basscript.cxx b/scripting/source/basprov/basscript.cxx index 98624b06593a..0d04732e4b09 100644 --- a/scripting/source/basprov/basscript.cxx +++ b/scripting/source/basprov/basscript.cxx @@ -225,11 +225,11 @@ namespace basprov // call method SbxVariableRef xReturn = new SbxVariable; ErrCode nErr = SbxERR_OK; - { - // if it's a document-based script, temporarily reset ThisComponent to the script invocation context - Any aOldThisComponent; - if ( m_documentBasicManager && m_xDocumentScriptContext.is() ) - aOldThisComponent = m_documentBasicManager->SetGlobalUNOConstant( "ThisComponent", makeAny( m_xDocumentScriptContext ) ); + + // if it's a document-based script, temporarily reset ThisComponent to the script invocation context + Any aOldThisComponent; + if ( m_documentBasicManager && m_xDocumentScriptContext.is() ) + aOldThisComponent = m_documentBasicManager->SetGlobalUNOConstant( "ThisComponent", makeAny( m_xDocumentScriptContext ) ); if ( m_caller.getLength() && m_caller[ 0 ].hasValue() ) { @@ -239,9 +239,10 @@ namespace basprov } else nErr = m_xMethod->Call( xReturn ); - if ( m_documentBasicManager && m_xDocumentScriptContext.is() ) - m_documentBasicManager->SetGlobalUNOConstant( "ThisComponent", aOldThisComponent ); - } + + if ( m_documentBasicManager && m_xDocumentScriptContext.is() ) + m_documentBasicManager->SetGlobalUNOConstant( "ThisComponent", aOldThisComponent ); + if ( nErr != SbxERR_OK ) { // TODO: throw InvocationTargetException ? |