Kaydet (Commit) 15ecb4b9 authored tarafından Vladimir Glazounov's avatar Vladimir Glazounov

INTEGRATION: CWS scriptingf9 (1.9.66); FILE MERGED

2004/11/11 11:54:06 toconnor 1.9.66.1: #i36703# getScript call needs to be in a try catch block
üst e0878e8d
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: scriptdlg.cxx,v $ * $RCSfile: scriptdlg.cxx,v $
* *
* $Revision: 1.9 $ * $Revision: 1.10 $
* *
* last change: $Author: rt $ $Date: 2004-10-22 14:37:36 $ * last change: $Author: vg $ $Date: 2004-12-23 11:53:15 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -139,7 +139,7 @@ SFTreeListBox::SFTreeListBox( Window* pParent, const ResId& rRes ) : ...@@ -139,7 +139,7 @@ SFTreeListBox::SFTreeListBox( Window* pParent, const ResId& rRes ) :
WB_HASLINES | WB_HASLINESATROOT ); WB_HASLINES | WB_HASLINESATROOT );
SetNodeDefaultImages(); SetNodeDefaultImages();
nMode = 0xFF; // Alles nMode = 0xFF; // Alles
} }
SFTreeListBox::~SFTreeListBox() SFTreeListBox::~SFTreeListBox()
...@@ -685,15 +685,15 @@ InputDialog::~InputDialog() ...@@ -685,15 +685,15 @@ InputDialog::~InputDialog()
// ScriptOrgDialog ------------------------------------------------------------ // ScriptOrgDialog ------------------------------------------------------------
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
SvxScriptOrgDialog::SvxScriptOrgDialog( Window* pParent, ::rtl::OUString language ) SvxScriptOrgDialog::SvxScriptOrgDialog( Window* pParent, ::rtl::OUString language )
: SfxModalDialog( pParent, SVX_RES( RID_DLG_SCRIPTORGANIZER ) ), : SfxModalDialog( pParent, SVX_RES( RID_DLG_SCRIPTORGANIZER ) ),
aScriptsTxt( this, ResId( SF_TXT_SCRIPTS ) ), aScriptsTxt( this, ResId( SF_TXT_SCRIPTS ) ),
aScriptsBox( this, ResId( SF_CTRL_SCRIPTSBOX ) ), aScriptsBox( this, ResId( SF_CTRL_SCRIPTSBOX ) ),
aRunButton( this, ResId( SF_PB_RUN ) ), aRunButton( this, ResId( SF_PB_RUN ) ),
aCloseButton( this, ResId( SF_PB_CLOSE ) ), aCloseButton( this, ResId( SF_PB_CLOSE ) ),
aCreateButton( this, ResId( SF_PB_CREATE ) ), aCreateButton( this, ResId( SF_PB_CREATE ) ),
aEditButton( this, ResId( SF_PB_EDIT ) ), aEditButton( this, ResId( SF_PB_EDIT ) ),
aRenameButton(this, ResId( SF_PB_RENAME ) ), aRenameButton(this, ResId( SF_PB_RENAME ) ),
aDelButton( this, ResId( SF_PB_DEL ) ), aDelButton( this, ResId( SF_PB_DEL ) ),
aHelpButton( this, ResId( SF_PB_HELP ) ), aHelpButton( this, ResId( SF_PB_HELP ) ),
m_sLanguage( language ), m_sLanguage( language ),
m_delErrStr( ResId( RID_SVXSTR_DELFAILED ) ), m_delErrStr( ResId( RID_SVXSTR_DELFAILED ) ),
...@@ -963,38 +963,36 @@ IMPL_LINK( SvxScriptOrgDialog, ButtonHdl, Button *, pButton ) ...@@ -963,38 +963,36 @@ IMPL_LINK( SvxScriptOrgDialog, ButtonHdl, Button *, pButton )
if ( mspNode.is() ) if ( mspNode.is() )
{ {
Reference< provider::XScript > xScript( try
mspNode->getScript( scriptURL ), UNO_QUERY );
if ( xScript.is() )
{ {
Reference< provider::XScript > xScript(
mspNode->getScript( scriptURL ), UNO_QUERY_THROW );
const Sequence< Any > args(0); const Sequence< Any > args(0);
Any aRet; Any aRet;
Sequence< sal_Int16 > outIndex; Sequence< sal_Int16 > outIndex;
Sequence< Any > outArgs( 0 ); Sequence< Any > outArgs( 0 );
try aRet = xScript->invoke( args, outIndex, outArgs );
{ }
aRet = xScript->invoke( args, outIndex, outArgs ); catch ( reflection::InvocationTargetException& ite )
} {
catch ( reflection::InvocationTargetException& ite ) ::com::sun::star::uno::Any a = makeAny(ite);
{ ShowErrorDialog(a);
::com::sun::star::uno::Any a = makeAny(ite); }
ShowErrorDialog(a); catch ( provider::ScriptFrameworkErrorException& ite )
} {
catch ( provider::ScriptFrameworkErrorException& ite ) ::com::sun::star::uno::Any a = makeAny(ite);
{ ShowErrorDialog(a);
::com::sun::star::uno::Any a = makeAny(ite); }
ShowErrorDialog(a); catch ( RuntimeException& re )
} {
catch ( RuntimeException& re ) ::com::sun::star::uno::Any a = makeAny(re);
{ ShowErrorDialog(a);
::com::sun::star::uno::Any a = makeAny(re); }
ShowErrorDialog(a); catch ( Exception& e )
} {
catch ( Exception& e ) ::com::sun::star::uno::Any a = makeAny(e);
{ ShowErrorDialog(a);
::com::sun::star::uno::Any a = makeAny(e);
ShowErrorDialog(a);
}
} }
} }
StoreCurrentSelection(); StoreCurrentSelection();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment