summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2009-11-05 12:18:02 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2009-11-05 12:18:02 +0100
commita1b3bf8427d5535ca98106809b6fd90010d828e3 (patch)
treef368a4c7b3a57e6b7f3172989d28dd91ae200bef /scripting
parentbe4e334c516d3d5ceb4971dfe3225a23ee3fc462 (diff)
during #i100764#: added diagnostics (assertions)
Diffstat (limited to 'scripting')
-rw-r--r--scripting/source/dlgprov/dlgevtatt.cxx88
1 files changed, 35 insertions, 53 deletions
diff --git a/scripting/source/dlgprov/dlgevtatt.cxx b/scripting/source/dlgprov/dlgevtatt.cxx
index 6a6b6dbbbb4a..097525bd372e 100644
--- a/scripting/source/dlgprov/dlgevtatt.cxx
+++ b/scripting/source/dlgprov/dlgevtatt.cxx
@@ -32,14 +32,13 @@
#include "precompiled_scripting.hxx"
#include "dlgevtatt.hxx"
-#ifndef SCRIPTING_DLGPROV_HXX
#include "dlgprov.hxx"
-#endif
+
#include <sfx2/sfx.hrc>
#include <sfx2/app.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
+#include <tools/diagnose_ex.h>
+
#include <com/sun/star/awt/XControl.hpp>
#include <com/sun/star/awt/XDialogEventHandler.hpp>
#include <com/sun/star/awt/XContainerWindowEventHandler.hpp>
@@ -53,6 +52,7 @@
#include <com/sun/star/reflection/XIdlMethod.hpp>
#include <com/sun/star/beans/MethodConcept.hpp>
#include <com/sun/star/beans/XMaterialHolder.hpp>
+
#ifdef FAKE_VBA_EVENT_SUPPORT
#include <ooo/vba/XVBAToOOEventDescGen.hpp>
#endif
@@ -134,7 +134,10 @@ namespace dlgprov
{
xProps->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name") ) ) >>= msDialogCodeName;
}
- catch ( Exception& ) {}
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
}
}
@@ -149,7 +152,10 @@ namespace dlgprov
{
mxListener->firing( aScriptEventCopy );
}
- catch( Exception& ) {}
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
}
}
#endif
@@ -248,17 +254,9 @@ namespace dlgprov
if ( xListener_.is() )
bSuccess = true;
}
- catch ( IllegalArgumentException& )
- {
- }
- catch ( IntrospectionException& )
- {
- }
- catch ( CannotCreateAdapterException& )
- {
- }
- catch ( ServiceNotRegisteredException& )
+ catch ( const Exception& )
{
+ DBG_UNHANDLED_EXCEPTION();
}
try
@@ -271,17 +269,9 @@ namespace dlgprov
aDesc.AddListenerParam, aDesc.EventMethod );
}
}
- catch( IllegalArgumentException& )
- {
- }
- catch( IntrospectionException& )
- {
- }
- catch( CannotCreateAdapterException& )
- {
- }
- catch( ServiceNotRegisteredException& )
+ catch ( const Exception& )
{
+ DBG_UNHANDLED_EXCEPTION();
}
}
}
@@ -495,15 +485,9 @@ namespace dlgprov
}
}
}
- catch ( RuntimeException& e )
- {
- OSL_TRACE( "DialogScriptListenerImpl::firing_impl: caught RuntimeException reason %s",
- ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
- }
- catch ( Exception& e )
+ catch ( const Exception& )
{
- OSL_TRACE( "DialogScriptListenerImpl::firing_impl: caught Exception reason %s",
- ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
+ DBG_UNHANDLED_EXCEPTION();
}
}
@@ -512,21 +496,21 @@ namespace dlgprov
::rtl::OUString sScriptURL;
::rtl::OUString sScriptCode( aScriptEvent.ScriptCode );
- if ( aScriptEvent.ScriptType.compareToAscii( "StarBasic" ) == 0 )
- {
- // StarBasic script: convert ScriptCode to scriptURL
- sal_Int32 nIndex = sScriptCode.indexOf( ':' );
- if ( nIndex >= 0 && nIndex < sScriptCode.getLength() )
+ if ( aScriptEvent.ScriptType.compareToAscii( "StarBasic" ) == 0 )
{
- sScriptURL = ::rtl::OUString::createFromAscii( "vnd.sun.star.script:" );
- sScriptURL += sScriptCode.copy( nIndex + 1 );
- sScriptURL += ::rtl::OUString::createFromAscii( "?language=Basic&location=" );
- sScriptURL += sScriptCode.copy( 0, nIndex );
+ // StarBasic script: convert ScriptCode to scriptURL
+ sal_Int32 nIndex = sScriptCode.indexOf( ':' );
+ if ( nIndex >= 0 && nIndex < sScriptCode.getLength() )
+ {
+ sScriptURL = ::rtl::OUString::createFromAscii( "vnd.sun.star.script:" );
+ sScriptURL += sScriptCode.copy( nIndex + 1 );
+ sScriptURL += ::rtl::OUString::createFromAscii( "?language=Basic&location=" );
+ sScriptURL += sScriptCode.copy( 0, nIndex );
+ }
+ ScriptEvent aSFScriptEvent( aScriptEvent );
+ aSFScriptEvent.ScriptCode = sScriptURL;
+ DialogSFScriptListenerImpl::firing_impl( aSFScriptEvent, pRet );
}
- ScriptEvent aSFScriptEvent( aScriptEvent );
- aSFScriptEvent.ScriptCode = sScriptURL;
- DialogSFScriptListenerImpl::firing_impl( aSFScriptEvent, pRet );
- }
}
void DialogUnoScriptListenerImpl::firing_impl( const ScriptEvent& aScriptEvent, Any* pRet )
@@ -603,12 +587,10 @@ namespace dlgprov
bHandled = true;
}
}
- catch( com::sun::star::lang::IllegalArgumentException& )
- {}
- catch( com::sun::star::lang::NoSuchMethodException& )
- {}
- catch( com::sun::star::reflection::InvocationTargetException& )
- {}
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
}
if( bHandled )