summaryrefslogtreecommitdiff
path: root/scripting/source/provider/ActiveMSPList.cxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2008-11-20 14:05:36 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2008-11-20 14:05:36 +0000
commit1c20d7b53d202a3400358b4248eb3c8ee49c8013 (patch)
treeb1e5dac1f1051ca9c0323ba4c3e0ba3017922a6c /scripting/source/provider/ActiveMSPList.cxx
parent2849810d867485f44d1c6017157d65707a799330 (diff)
CWS-TOOLING: integrate CWS ab64_DEV300
Diffstat (limited to 'scripting/source/provider/ActiveMSPList.cxx')
-rw-r--r--scripting/source/provider/ActiveMSPList.cxx19
1 files changed, 13 insertions, 6 deletions
diff --git a/scripting/source/provider/ActiveMSPList.cxx b/scripting/source/provider/ActiveMSPList.cxx
index 4751cd4c929c..7aa295952522 100644
--- a/scripting/source/provider/ActiveMSPList.cxx
+++ b/scripting/source/provider/ActiveMSPList.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: ActiveMSPList.cxx,v $
- * $Revision: 1.16 $
+ * $Revision: 1.16.16.1 $
*
* This file is part of OpenOffice.org.
*
@@ -97,12 +97,19 @@ ActiveMSPList::getMSPFromAnyContext( const Any& aContext )
Reference< document::XScriptInvocationContext > xScriptContext( aContext, UNO_QUERY );
if ( xScriptContext.is() )
{
- // the component supports executing scripts embedded in a - possibly foreign document.
- // Check whether this other document its the component itself.
- if ( !xModel.is() || ( xModel != xScriptContext->getScriptContainer() ) )
+ try
+ {
+ // the component supports executing scripts embedded in a - possibly foreign document.
+ // Check whether this other document its the component itself.
+ if ( !xModel.is() || ( xModel != xScriptContext->getScriptContainer() ) )
+ {
+ msp = getMSPFromInvocationContext( xScriptContext );
+ return msp;
+ }
+ }
+ catch( const lang::IllegalArgumentException& )
{
- msp = getMSPFromInvocationContext( xScriptContext );
- return msp;
+ xModel.set( Reference< frame::XModel >() );
}
}