summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgt <gt@openoffice.org>2004-07-19 14:47:55 +0000
committergt <gt@openoffice.org>2004-07-19 14:47:55 +0000
commit20d67c048be37426fa5ef7db4867fda4e4d1ba79 (patch)
treec379b56f4c64615528ba0874ecb7219c48cd214a
parent0a417711a64372b2d1e2436e1408cb06368fda66 (diff)
#i20883# macro security
-rw-r--r--xmlsecurity/source/dialogs/macrosecurity.cxx44
1 files changed, 22 insertions, 22 deletions
diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx
index 6709ed5ef07d..203e780190e6 100644
--- a/xmlsecurity/source/dialogs/macrosecurity.cxx
+++ b/xmlsecurity/source/dialogs/macrosecurity.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: macrosecurity.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: gt $ $Date: 2004-07-16 10:43:31 $
+ * last change: $Author: gt $ $Date: 2004-07-19 15:47:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -215,33 +215,33 @@ IMPL_LINK( MacroSecurityTrustedSourcesTP, RemoveCertPBHdl, void*, EMTYARG )
IMPL_LINK( MacroSecurityTrustedSourcesTP, AddLocPBHdl, void*, EMTYARG )
{
- try
- {
- rtl::OUString aService( RTL_CONSTASCII_USTRINGPARAM( FOLDER_PICKER_SERVICE_NAME ) );
- uno::Reference < lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
- uno::Reference < ui::dialogs::XFolderPicker > xFolderPicker( xFactory->createInstance( aService ), uno::UNO_QUERY );
+ try
+ {
+ rtl::OUString aService( RTL_CONSTASCII_USTRINGPARAM( FOLDER_PICKER_SERVICE_NAME ) );
+ uno::Reference < lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
+ uno::Reference < ui::dialogs::XFolderPicker > xFolderPicker( xFactory->createInstance( aService ), uno::UNO_QUERY );
- short nRet = xFolderPicker->execute();
+ short nRet = xFolderPicker->execute();
- if( ui::dialogs::ExecutableDialogResults::OK != nRet )
- return 0;
+ if( ui::dialogs::ExecutableDialogResults::OK != nRet )
+ return 0;
- String aPathStr = xFolderPicker->getDirectory();
- INetURLObject aNewObj( aPathStr );
- aNewObj.removeFinalSlash();
+ String aPathStr = xFolderPicker->getDirectory();
+ INetURLObject aNewObj( aPathStr );
+ aNewObj.removeFinalSlash();
- // then the new path also an URL else system path
- String aNewPathStr = ( aNewObj.GetProtocol() != INET_PROT_NOT_VALID )? aPathStr : aNewObj.getFSysPath( INetURLObject::FSYS_DETECT );
+ // then the new path also an URL else system path
+ String aNewPathStr = ( aNewObj.GetProtocol() != INET_PROT_NOT_VALID )? aPathStr : aNewObj.getFSysPath( INetURLObject::FSYS_DETECT );
- if( maTrustFileLocLB.GetEntryPos( aNewPathStr ) == LISTBOX_ENTRY_NOTFOUND )
- {
- maTrustFileLocLB.InsertEntry( aNewPathStr );
- }
- }
- catch( uno::Exception& )
+ if( maTrustFileLocLB.GetEntryPos( aNewPathStr ) == LISTBOX_ENTRY_NOTFOUND )
{
- DBG_ERRORFILE( "MacroSecurityTrustedSourcesTP::AddLocPBHdl(): exception from folder picker" )
+ maTrustFileLocLB.InsertEntry( aNewPathStr );
}
+ }
+ catch( uno::Exception& )
+ {
+ DBG_ERRORFILE( "MacroSecurityTrustedSourcesTP::AddLocPBHdl(): exception from folder picker" )
+ }
return 0;
}