summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2011-08-24 11:22:56 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2011-08-24 11:30:17 +0900
commite1a1091d0ae61ba46c6d063a92db0b7d1ce65942 (patch)
tree5cd7f5ba6ad9fc1e859263332b4f96167ac927ce /basic
parent8dfa38c418125ad880e9d4b2a968f0f1778d6de4 (diff)
catch ignored exceptions by const reference
Diffstat (limited to 'basic')
-rw-r--r--basic/source/basmgr/vbahelper.cxx16
-rw-r--r--basic/source/classes/eventatt.cxx4
-rw-r--r--basic/source/classes/sb.cxx8
-rw-r--r--basic/source/classes/sbunoobj.cxx10
-rw-r--r--basic/source/classes/sbxmod.cxx24
-rw-r--r--basic/source/runtime/comenumwrapper.cxx4
-rw-r--r--basic/source/runtime/iosys.cxx12
-rw-r--r--basic/source/runtime/methods.cxx28
-rw-r--r--basic/source/runtime/methods1.cxx2
-rw-r--r--basic/source/runtime/runtime.cxx2
-rw-r--r--basic/source/runtime/step2.cxx2
-rw-r--r--basic/source/uno/dlgcont.cxx10
-rw-r--r--basic/source/uno/namecont.cxx80
-rw-r--r--basic/source/uno/scriptcont.cxx40
14 files changed, 121 insertions, 121 deletions
diff --git a/basic/source/basmgr/vbahelper.cxx b/basic/source/basmgr/vbahelper.cxx
index 0e9338b52c5e..555e1162580b 100644
--- a/basic/source/basmgr/vbahelper.cxx
+++ b/basic/source/basmgr/vbahelper.cxx
@@ -60,7 +60,7 @@ uno::Reference< frame::XModuleManager > lclCreateModuleManager()
uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
xModuleManager.set( xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ModuleManager" ) ) ), uno::UNO_QUERY );
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
}
return xModuleManager;
@@ -99,7 +99,7 @@ DocumentsEnumeration::DocumentsEnumeration( const uno::Reference< frame::XModel
maModels.push_back( xCurrModel );
}
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
}
maModelIt = maModels.begin();
@@ -130,7 +130,7 @@ void lclLockControllers( const uno::Reference< frame::XModel >& rxModel, sal_Boo
else
rxModel->unlockControllers();
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
}
}
@@ -156,12 +156,12 @@ void lclEnableContainerWindows( const uno::Reference< frame::XModel >& rxModel,
uno::Reference< awt::XWindow > xWindow( xFrame->getContainerWindow(), uno::UNO_SET_THROW );
xWindow->setEnable( bEnableWindows );
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
}
}
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
}
}
@@ -182,7 +182,7 @@ void lclIterateDocuments( ModifyDocumentFunc pModifyDocumentFunc, const uno::Ref
uno::Reference< frame::XModel > xCurrModel( xDocumentsEnum->nextElement(), uno::UNO_QUERY_THROW );
pModifyDocumentFunc( xCurrModel, bModificator );
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
}
}
@@ -235,7 +235,7 @@ void registerCurrentDirectory( const uno::Reference< frame::XModel >& rxModel, c
if( aIdentifier.getLength() > 0 )
rPool.maCurrDirs[ aIdentifier ] = rPath;
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
}
}
@@ -254,7 +254,7 @@ void registerCurrentDirectory( const uno::Reference< frame::XModel >& rxModel, c
::rtl::OUString aIdentifier = xModuleManager->identify( rxModel );
aPath = rPool.maCurrDirs[ aIdentifier ];
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
}
return aPath;
diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx
index ceb4ea9230ab..d93a12ab2044 100644
--- a/basic/source/classes/eventatt.cxx
+++ b/basic/source/classes/eventatt.cxx
@@ -507,7 +507,7 @@ void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrit
xDlgModPropSet->setPropertyValue( aTitlePropName, makeAny( ::rtl::OUString() ) );
}
}
- catch( UnknownPropertyException& )
+ catch(const UnknownPropertyException& )
{}
}
@@ -577,7 +577,7 @@ void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrit
// illegal to open 2 dialogs ( they ARE modal ) when this happens, sometimes
// create dialog fails. So, in this case let's not throw, just leave basic
// detect the unset object.
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
}
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index c21e2ca1dc7f..d2a534164892 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -131,7 +131,7 @@ void DocBasicItem::startListening()
Reference< util::XCloseBroadcaster > xCloseBC( aThisComp, UNO_QUERY );
mbDisposed = !xCloseBC.is();
if( xCloseBC.is() )
- try { xCloseBC->addCloseListener( this ); } catch( uno::Exception& ) {}
+ try { xCloseBC->addCloseListener( this ); } catch(const uno::Exception& ) {}
}
void DocBasicItem::stopListening()
@@ -142,7 +142,7 @@ void DocBasicItem::stopListening()
mrDocBasic.GetUNOConstant( "ThisComponent", aThisComp );
Reference< util::XCloseBroadcaster > xCloseBC( aThisComp, UNO_QUERY );
if( xCloseBC.is() )
- try { xCloseBC->removeCloseListener( this ); } catch( uno::Exception& ) {}
+ try { xCloseBC->removeCloseListener( this ); } catch(const uno::Exception& ) {}
}
void SAL_CALL DocBasicItem::queryClosing( const lang::EventObject& /*rSource*/, sal_Bool /*bGetsOwnership*/ ) throw (util::CloseVetoException, uno::RuntimeException)
@@ -231,7 +231,7 @@ SbxObject* StarBASIC::getVBAGlobals( )
{
xDocFac->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAGlobals" ) ) );
}
- catch( Exception& )
+ catch(const Exception& )
{
// Ignore
}
@@ -444,7 +444,7 @@ SbxObject* SbiFactory::CreateObject( const String& rClass )
Reference< XInterface > xInterface( xFactory->createInstance( aServiceName ), UNO_SET_THROW );
return new SbUnoObject( aServiceName, uno::makeAny( xInterface ) );
}
- catch( Exception& )
+ catch(const Exception& )
{}
}
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index e655050e3606..c8ccefa3cfff 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -1230,7 +1230,7 @@ static Any implRekMultiDimArrayToSequence( SbxDimArray* pArray,
StarBASIC::Error( ERRCODE_BASIC_EXCEPTION,
implGetExceptionMsg( ::cppu::getCaughtException() ) );
}
- catch (IndexOutOfBoundsException&)
+ catch (const IndexOutOfBoundsException&)
{
StarBASIC::Error( SbERR_OUT_OF_RANGE );
}
@@ -1440,7 +1440,7 @@ Any sbxToUnoValue( SbxVariable* pVar, const Type& rType, Property* pUnoProperty
StarBASIC::Error( ERRCODE_BASIC_EXCEPTION,
implGetExceptionMsg( ::cppu::getCaughtException() ) );
}
- catch (IndexOutOfBoundsException&)
+ catch (const IndexOutOfBoundsException&)
{
StarBASIC::Error( SbERR_OUT_OF_RANGE );
}
@@ -3313,8 +3313,8 @@ getTypeDescriptorEnumeration( const ::rtl::OUString& sSearchRoot,
xEnum = xTypeEnumAccess->createTypeDescriptionEnumeration(
sSearchRoot, types, depth );
}
- catch( NoSuchTypeNameException& /*nstne*/ ) {}
- catch( InvalidTypeNameException& /*nstne*/ ) {}
+ catch(const NoSuchTypeNameException& /*nstne*/ ) {}
+ catch(const InvalidTypeNameException& /*nstne*/ ) {}
}
return xEnum;
}
@@ -4701,7 +4701,7 @@ void disposeComVariablesForBasic( StarBASIC* pBasic )
Reference< XComponent > xComponent( (*itCRV).get(), UNO_QUERY_THROW );
xComponent->dispose();
}
- catch( Exception& )
+ catch(const Exception& )
{}
}
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 446d24639e74..2fd6fbf0fc7e 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -182,7 +182,7 @@ DocObjectWrapper::DocObjectWrapper( SbModule* pVar ) : m_pMod( pVar ), mName( pV
Reference< XProxyFactory > xProxyFac( xMFac->createInstanceWithContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.reflection.ProxyFactory" ) ), xCtx ), UNO_QUERY_THROW );
m_xAggProxy = xProxyFac->createProxy( xIf );
}
- catch( Exception& )
+ catch(const Exception& )
{
OSL_FAIL( "DocObjectWrapper::DocObjectWrapper: Caught exception!" );
}
@@ -469,7 +469,7 @@ uno::Reference< vba::XVBACompatibility > getVBACompatibility( const uno::Referen
uno::Reference< beans::XPropertySet > xModelProps( rxModel, uno::UNO_QUERY_THROW );
xVBACompat.set( xModelProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BasicLibraries" ) ) ), uno::UNO_QUERY );
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
}
return xVBACompat;
@@ -1137,7 +1137,7 @@ sal_uInt16 SbModule::Run( SbMethod* pMeth )
xVBACompat.set( getVBACompatibility( xModel ), uno::UNO_SET_THROW );
xVBACompat->broadcastVBAScriptEvent( script::vba::VBAScriptEventId::SCRIPT_STARTED, GetName() );
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
}
}
@@ -1281,7 +1281,7 @@ sal_uInt16 SbModule::Run( SbMethod* pMeth )
{
xVBACompat->broadcastVBAScriptEvent( script::vba::VBAScriptEventId::SCRIPT_STOPPED, GetName() );
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
}
// VBA always ensures screenupdating is enabled after completing
@@ -2304,12 +2304,12 @@ public:
{
uno::Reference< awt::XTopWindow >( mxComponent, uno::UNO_QUERY_THROW )->addTopWindowListener( this );
}
- catch( uno::Exception& ) {}
+ catch(const uno::Exception& ) {}
try
{
uno::Reference< awt::XWindow >( mxComponent, uno::UNO_QUERY_THROW )->addWindowListener( this );
}
- catch( uno::Exception& ) {}
+ catch(const uno::Exception& ) {}
}
if ( mxModel.is() )
@@ -2318,7 +2318,7 @@ public:
{
uno::Reference< document::XEventBroadcaster >( mxModel, uno::UNO_QUERY_THROW )->addEventListener( this );
}
- catch( uno::Exception& ) {}
+ catch(const uno::Exception& ) {}
}
}
@@ -2338,12 +2338,12 @@ public:
{
uno::Reference< awt::XTopWindow >( mxComponent, uno::UNO_QUERY_THROW )->removeTopWindowListener( this );
}
- catch( uno::Exception& ) {}
+ catch(const uno::Exception& ) {}
try
{
uno::Reference< awt::XWindow >( mxComponent, uno::UNO_QUERY_THROW )->removeWindowListener( this );
}
- catch( uno::Exception& ) {}
+ catch(const uno::Exception& ) {}
}
mxComponent.clear();
@@ -2353,7 +2353,7 @@ public:
{
uno::Reference< document::XEventBroadcaster >( mxModel, uno::UNO_QUERY_THROW )->removeEventListener( this );
}
- catch( uno::Exception& ) {}
+ catch(const uno::Exception& ) {}
}
mxModel.clear();
}
@@ -2718,7 +2718,7 @@ void SbUserFormModule::InitObject()
uno::Reference< script::vba::XVBACompatibility > xVBAMode( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BasicLibraries") ) ), uno::UNO_QUERY_THROW );
sProjectName = xVBAMode->getProjectName();
}
- catch( Exception& /*e*/) {}
+ catch(const Exception& ) {}
sDialogUrl = sDialogUrl.concat( sProjectName ).concat( rtl::OUString( '.') ).concat( GetName() ).concat( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("?location=document") ) );
@@ -2757,7 +2757,7 @@ void SbUserFormModule::InitObject()
triggerInitializeEvent();
}
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
}
diff --git a/basic/source/runtime/comenumwrapper.cxx b/basic/source/runtime/comenumwrapper.cxx
index ba3def41838f..45e3a5f45376 100644
--- a/basic/source/runtime/comenumwrapper.cxx
+++ b/basic/source/runtime/comenumwrapper.cxx
@@ -45,7 +45,7 @@ using namespace ::com::sun::star;
&& nLength > m_nCurInd );
}
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{}
return bResult;
@@ -72,7 +72,7 @@ uno::Any SAL_CALL ComEnumerationWrapper::nextElement()
aNamedParam );
}
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{}
throw container::NoSuchElementException();
diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx
index 6801c5db644f..77654904e017 100644
--- a/basic/source/runtime/iosys.cxx
+++ b/basic/source/runtime/iosys.cxx
@@ -450,7 +450,7 @@ UCBStream::~UCBStream()
xIS_->closeInput();
}
}
- catch( Exception & )
+ catch(const Exception & )
{
SetError( ERRCODE_IO_GENERAL );
}
@@ -478,7 +478,7 @@ sal_uIntPtr UCBStream::GetData( void* pData, sal_uIntPtr nSize )
else
SetError( ERRCODE_IO_GENERAL );
}
- catch( Exception & )
+ catch(const Exception & )
{
SetError( ERRCODE_IO_GENERAL );
}
@@ -505,7 +505,7 @@ sal_uIntPtr UCBStream::PutData( const void* pData, sal_uIntPtr nSize )
else
SetError( ERRCODE_IO_GENERAL );
}
- catch( Exception & )
+ catch(const Exception & )
{
SetError( ERRCODE_IO_GENERAL );
}
@@ -527,7 +527,7 @@ sal_uIntPtr UCBStream::SeekPos( sal_uIntPtr nPos )
else
SetError( ERRCODE_IO_GENERAL );
}
- catch( Exception & )
+ catch(const Exception & )
{
SetError( ERRCODE_IO_GENERAL );
}
@@ -546,7 +546,7 @@ void UCBStream::FlushData()
else
SetError( ERRCODE_IO_GENERAL );
}
- catch( Exception & )
+ catch(const Exception & )
{
SetError( ERRCODE_IO_GENERAL );
}
@@ -610,7 +610,7 @@ SbError SbiStream::Open
}
}
- catch( Exception & )
+ catch(const Exception & )
{
nError = ERRCODE_IO_GENERAL;
}
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 175d7a9eecf8..562b2891afa9 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -529,7 +529,7 @@ void implStepRenameUCB( const String& aSource, const String& aDest )
else
xSFI->move( aSourceFullPath, aDestFullPath );
}
- catch( Exception & )
+ catch(const Exception & )
{
StarBASIC::Error( SbERR_FILE_NOT_FOUND );
}
@@ -565,7 +565,7 @@ RTLFUNC(FileCopy)
{
xSFI->copy( getFullPath( aSource ), getFullPath( aDest ) );
}
- catch( Exception & )
+ catch(const Exception & )
{
StarBASIC::Error( SbERR_PATH_NOT_FOUND );
}
@@ -609,7 +609,7 @@ RTLFUNC(Kill)
{
xSFI->kill( aFullPath );
}
- catch( Exception & )
+ catch(const Exception & )
{
StarBASIC::Error( ERRCODE_IO_GENERAL );
}
@@ -673,7 +673,7 @@ RTLFUNC(MkDir)
xSFI->createFolder( getFullPath( aPath ) );
}
- catch( Exception & )
+ catch(const Exception & )
{
StarBASIC::Error( ERRCODE_IO_GENERAL );
}
@@ -782,7 +782,7 @@ RTLFUNC(RmDir)
xSFI->kill( getFullPath( aPath ) );
}
- catch( Exception & )
+ catch(const Exception & )
{
StarBASIC::Error( ERRCODE_IO_GENERAL );
}
@@ -843,7 +843,7 @@ RTLFUNC(FileLen)
{
nLen = xSFI->getSize( getFullPath( aStr ) );
}
- catch( Exception & )
+ catch(const Exception & )
{
StarBASIC::Error( ERRCODE_IO_GENERAL );
}
@@ -2592,7 +2592,7 @@ RTLFUNC(Dir)
{
sal_Bool bExists = sal_False;
try { bExists = xSFI->exists( aFileURLStr ); }
- catch( Exception & ) {}
+ catch(const Exception & ) {}
String aNameOnlyStr;
if( bExists )
@@ -2646,7 +2646,7 @@ RTLFUNC(Dir)
}
}
}
- catch( Exception & )
+ catch(const Exception & )
{
}
}
@@ -2865,7 +2865,7 @@ RTLFUNC(GetAttr)
String aPath = getFullPath( rPar.Get(1)->GetString() );
sal_Bool bExists = sal_False;
try { bExists = xSFI->exists( aPath ); }
- catch( Exception & ) {}
+ catch(const Exception & ) {}
if( !bExists )
{
StarBASIC::Error( SbERR_FILE_NOT_FOUND );
@@ -2882,7 +2882,7 @@ RTLFUNC(GetAttr)
if( bDirectory )
nFlags |= 0x0010; // ATTR_DIRECTORY
}
- catch( Exception & )
+ catch(const Exception & )
{
StarBASIC::Error( ERRCODE_IO_GENERAL );
}
@@ -2934,7 +2934,7 @@ RTLFUNC(FileDateTime)
aTime = Time( aUnoDT.Hours, aUnoDT.Minutes, aUnoDT.Seconds, aUnoDT.HundredthSeconds );
aDate = Date( aUnoDT.Day, aUnoDT.Month, aUnoDT.Year );
}
- catch( Exception & )
+ catch(const Exception & )
{
StarBASIC::Error( ERRCODE_IO_GENERAL );
}
@@ -3514,7 +3514,7 @@ String getObjectTypeName( SbxVariable* pVar )
{
xInv->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("$GetTypeName") ) ) >>= sRet;
}
- catch( Exception& )
+ catch(const Exception& )
{
}
}
@@ -4269,7 +4269,7 @@ RTLFUNC(SetAttr)
sal_Bool bHidden = (nFlags & 0x0002) != 0; // ATTR_HIDDEN
xSFI->setHidden( aStr, bHidden );
}
- catch( Exception & )
+ catch(const Exception & )
{
StarBASIC::Error( ERRCODE_IO_GENERAL );
}
@@ -4335,7 +4335,7 @@ RTLFUNC(FileExists)
{
bExists = xSFI->exists( aStr );
}
- catch( Exception & )
+ catch(const Exception & )
{
StarBASIC::Error( ERRCODE_IO_GENERAL );
}
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index 56b22cd69a5e..20191cbdcf00 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -2618,7 +2618,7 @@ void CallFunctionAccessFunction( const Sequence< Any >& aArgs, const rtl::OUStri
unoToSbxValue( pRet, aRet );
}
- catch( Exception& )
+ catch(const Exception& )
{
StarBASIC::Error( SbERR_BAD_ARGUMENT );
}
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index ba03bdac939e..b7bcfe38057d 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -1179,7 +1179,7 @@ void SbiRuntime::PushForEach()
p->xEnumeration = new ComEnumerationWrapper( xInvocation );
p->eForType = FOR_EACH_XENUMERATION;
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{}
}
diff --git a/basic/source/runtime/step2.cxx b/basic/source/runtime/step2.cxx
index e9ed8b533b40..89c369a95adf 100644
--- a/basic/source/runtime/step2.cxx
+++ b/basic/source/runtime/step2.cxx
@@ -558,7 +558,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem )
if( eType == TypeClass_INTERFACE )
xRet = *(Reference< XInterface >*)aAny2.getValue();
}
- catch (IndexOutOfBoundsException&)
+ catch (const IndexOutOfBoundsException&)
{
// Bei Exception erstmal immer von Konvertierungs-Problem ausgehen
StarBASIC::Error( SbERR_OUT_OF_RANGE );
diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx
index 6378a9532823..7df1dd0e2727 100644
--- a/basic/source/uno/dlgcont.cxx
+++ b/basic/source/uno/dlgcont.cxx
@@ -247,7 +247,7 @@ void SfxDialogLibraryContainer::storeLibrariesToStorage( const uno::Reference< e
mbOasis2OOoFormat = sal_True;
}
}
- catch ( Exception& )
+ catch (const Exception& )
{
// if we cannot get the version then the
// Oasis2OOoTransformer will not be used
@@ -354,7 +354,7 @@ Any SAL_CALL SfxDialogLibraryContainer::importLibraryElement
{
xInput = mxSFI->openFileRead( aFile );
}
- catch( Exception& )
+ catch(const Exception& )
//catch( Exception& e )
{
// TODO:
@@ -378,7 +378,7 @@ Any SAL_CALL SfxDialogLibraryContainer::importLibraryElement
xParser->setDocumentHandler( ::xmlscript::importDialogModel( xDialogModel, xContext, mxOwnerDocument ) );
xParser->parseStream( source );
}
- catch( Exception& )
+ catch(const Exception& )
{
OSL_FAIL( "Parsing error\n" );
SfxErrorContext aEc( ERRCTX_SFX_LOADBASIC, aFile );
@@ -450,7 +450,7 @@ Reference< ::com::sun::star::resource::XStringResourcePersistence >
aArgs[0] <<= xLibraryStor;
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
// TODO: Error handling?
return xRet;
@@ -529,7 +529,7 @@ void SfxDialogLibraryContainer::onNewRootStorage()
if( xStringResourceWithStorage.is() )
xStringResourceWithStorage->setStorage( xLibraryStor );
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
// TODO: Error handling?
}
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index f4823c7fc735..d14ca988babc 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -656,7 +656,7 @@ sal_Bool SfxLibraryContainer::init_Impl(
{
xStorage = ::comphelper::OStorageHelper::GetStorageFromURL( aInitFileName, embed::ElementModes::READ );
}
- catch ( uno::Exception& )
+ catch (const uno::Exception& )
{
// TODO: error handling
}
@@ -713,7 +713,7 @@ sal_Bool SfxLibraryContainer::init_Impl(
{
xStream = xLibrariesStor->openStreamElement( aFileName, embed::ElementModes::READ );
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{}
if( !xStream.is() )
@@ -728,7 +728,7 @@ sal_Bool SfxLibraryContainer::init_Impl(
{
xStream = xLibrariesStor->openStreamElement( aFileName, embed::ElementModes::READ );
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{}
if( !xStream.is() )
@@ -744,7 +744,7 @@ sal_Bool SfxLibraryContainer::init_Impl(
if ( xStream.is() )
xInput = xStream->getInputStream();
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
// TODO: error handling?
}
@@ -771,7 +771,7 @@ sal_Bool SfxLibraryContainer::init_Impl(
{
xInput = mxSFI->openFileRead( aFileName );
}
- catch( Exception& )
+ catch(const Exception& )
{
xInput.clear();
if( nPass == 0 )
@@ -795,7 +795,7 @@ sal_Bool SfxLibraryContainer::init_Impl(
xInput = mxSFI->openFileRead( aFileName );
mbOldInfoFormat = true;
}
- catch( Exception& )
+ catch(const Exception& )
{
xInput.clear();
SfxErrorContext aEc( ERRCTX_SFX_LOADBASIC, aFileName );
@@ -914,7 +914,7 @@ sal_Bool SfxLibraryContainer::init_Impl(
xLibraryStor = xLibrariesStor->openStorageElement( rLib.aName,
embed::ElementModes::READ );
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
#if OSL_DEBUG_LEVEL > 0
Any aError( ::cppu::getCaughtException() );
@@ -982,7 +982,7 @@ sal_Bool SfxLibraryContainer::init_Impl(
{
implScanExtensions();
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
// TODO: error handling?
OSL_FAIL( "Cannot access extensions!" );
@@ -1087,14 +1087,14 @@ sal_Bool SfxLibraryContainer::init_Impl(
{
mxSFI->move( aPrevFolder, aFolderUserBasic );
}
- catch( Exception& )
+ catch(const Exception& )
{
// Move back user/basic folder
try
{
mxSFI->kill( aFolderUserBasic );
}
- catch( Exception& )
+ catch(const Exception& )
{}
mxSFI->move( aFolderTmp, aFolderUserBasic );
throw;
@@ -1192,7 +1192,7 @@ sal_Bool SfxLibraryContainer::init_Impl(
mxSFI->kill( aPrevFolder );
}
}
- catch( Exception& )
+ catch(const Exception& )
{
bCleanUp = true;
}
@@ -1218,7 +1218,7 @@ sal_Bool SfxLibraryContainer::init_Impl(
bSaved = true;
}
}
- catch( Exception& )
+ catch(const Exception& )
{}
try
{
@@ -1228,7 +1228,7 @@ sal_Bool SfxLibraryContainer::init_Impl(
else
mxSFI->kill( aPrevFolder_2 );
}
- catch( Exception& )
+ catch(const Exception& )
{}
}
}
@@ -1369,7 +1369,7 @@ OUString SfxLibraryContainer::createAppLibraryFolder
{
mxSFI->createFolder( aLibDirPath );
}
- catch( Exception& )
+ catch(const Exception& )
{}
}
@@ -1445,7 +1445,7 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib,
writeLibraryElement( xLib, aElementName, xOutput );
}
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
OSL_FAIL( "Problem during storing of library!\n" );
// TODO: error handling?
@@ -1514,7 +1514,7 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib,
writeLibraryElement( xLib, aElementName, xOutput );
xOutput->closeOutput();
}
- catch( Exception& )
+ catch(const Exception& )
{
if( bExport )
throw;
@@ -1525,7 +1525,7 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib,
}
}
}
- catch( Exception& )
+ catch(const Exception& )
{
if( bExport )
throw;
@@ -1586,7 +1586,7 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib,
xOut = xInfoStream->getOutputStream();
}
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
OSL_FAIL( "Problem during storing of library index file!\n" );
// TODO: error handling?
@@ -1625,7 +1625,7 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib,
xSFI->kill( aLibInfoPath );
xOut = xSFI->openFileWrite( aLibInfoPath );
}
- catch( Exception& )
+ catch(const Exception& )
{
if( bExport )
throw;
@@ -1680,7 +1680,7 @@ sal_Bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
xStorage->openStreamElement( aLibInfoPath, embed::ElementModes::READ );
xInput = xInfoStream->getInputStream();
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{}
}
else
@@ -1700,7 +1700,7 @@ sal_Bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
{
xInput = mxSFI->openFileRead( aLibInfoPath );
}
- catch( Exception& )
+ catch(const Exception& )
{
xInput.clear();
if( !GbMigrationSuppressErrors )
@@ -1725,7 +1725,7 @@ sal_Bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
xParser->setDocumentHandler( ::xmlscript::importLibrary( rLib ) );
xParser->parseStream( source );
}
- catch( Exception& )
+ catch(const Exception& )
{
OSL_FAIL( "Parsing error\n" );
SfxErrorContext aEc( ERRCTX_SFX_LOADBASIC, aLibInfoPath );
@@ -1911,7 +1911,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
rLib.aName,
embed::ElementModes::READWRITE );
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
#if OSL_DEBUG_LEVEL > 0
Any aError( ::cppu::getCaughtException() );
@@ -1944,7 +1944,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
uno::Reference< embed::XTransactedObject > xTransact( xLibraryStor, uno::UNO_QUERY_THROW );
xTransact->commit();
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
DBG_UNHANDLED_EXCEPTION();
// TODO: error handling
@@ -2054,7 +2054,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
xOut = xInfoStream->getOutputStream();
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
sal_uIntPtr nErrorCode = ERRCODE_IO_GENERAL;
ErrorHandler::HandleError( nErrorCode );
@@ -2074,7 +2074,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
mxSFI->kill( aLibInfoPath );
xOut = mxSFI->openFileWrite( aLibInfoPath );
}
- catch( Exception& )
+ catch(const Exception& )
{
xOut.clear();
SfxErrorContext aEc( ERRCTX_SFX_SAVEDOC, aLibInfoPath );
@@ -2105,7 +2105,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
xTransact->commit();
}
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
OSL_FAIL( "Problem during storing of libraries!\n" );
sal_uIntPtr nErrorCode = ERRCODE_IO_GENERAL;
@@ -2261,7 +2261,7 @@ void SAL_CALL SfxLibraryContainer::removeLibrary( const OUString& Name )
if( mxSFI->exists( aLibInfoPath ) )
mxSFI->kill( aLibInfoPath );
}
- catch( Exception& ) {}
+ catch(const Exception& ) {}
// Delete folder if empty
INetURLObject aInetObj( String(maLibraryPath).GetToken(1) );
@@ -2279,7 +2279,7 @@ void SAL_CALL SfxLibraryContainer::removeLibrary( const OUString& Name )
mxSFI->kill( aLibDirPath );
}
}
- catch( Exception& )
+ catch(const Exception& )
{
}
}
@@ -2332,7 +2332,7 @@ void SAL_CALL SfxLibraryContainer::loadLibrary( const OUString& Name )
if ( !xLibrariesStor.is() )
throw uno::RuntimeException();
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
#if OSL_DEBUG_LEVEL > 0
Any aError( ::cppu::getCaughtException() );
@@ -2366,7 +2366,7 @@ void SAL_CALL SfxLibraryContainer::loadLibrary( const OUString& Name )
try {
xElementStream = xLibraryStor->openStreamElement( aFile, embed::ElementModes::READ );
- } catch( uno::Exception& )
+ } catch(const uno::Exception& )
{}
if( !xElementStream.is() )
@@ -2377,7 +2377,7 @@ void SAL_CALL SfxLibraryContainer::loadLibrary( const OUString& Name )
aFile += maLibElementFileExtension;
try {
xElementStream = xLibraryStor->openStreamElement( aFile, embed::ElementModes::READ );
- } catch( uno::Exception& )
+ } catch(const uno::Exception& )
{}
}
@@ -2536,7 +2536,7 @@ void SAL_CALL SfxLibraryContainer::renameLibrary( const OUString& Name, const OU
mxSFI->kill( pImplLib->maLibInfoFileURL );
mxSFI->move( aLibInfoFileURL, pImplLib->maLibInfoFileURL );
}
- catch( Exception& )
+ catch(const Exception& )
{
}
@@ -2565,7 +2565,7 @@ void SAL_CALL SfxLibraryContainer::renameLibrary( const OUString& Name, const OU
mxSFI->kill( aDestElementPath );
mxSFI->move( aElementPath, aDestElementPath );
}
- catch( Exception& )
+ catch(const Exception& )
{
}
}
@@ -2583,7 +2583,7 @@ void SAL_CALL SfxLibraryContainer::renameLibrary( const OUString& Name, const OU
pImplLib->implSetModified( sal_True );
}
}
- catch( Exception& )
+ catch(const Exception& )
{
// Restore old library
maNameContainer.insertByName( Name, aLibAny ) ;
@@ -2865,7 +2865,7 @@ void SAL_CALL SfxLibraryContainer::setVBACompatibilityMode( ::sal_Bool _vbacompa
Reference< XMultiServiceFactory > xFactory( xModel, UNO_QUERY_THROW );
xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAGlobals" ) ) );
}
- catch( Exception& )
+ catch(const Exception& )
{
}
}
@@ -3119,7 +3119,7 @@ void SfxLibrary::impl_removeWithoutChecks( const ::rtl::OUString& _rElementName
if( mxSFI->exists( aFile ) )
mxSFI->kill( aFile );
}
- catch( Exception& )
+ catch(const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -3452,7 +3452,7 @@ Reference< deployment::XPackage > ScriptExtensionIterator::implGetNextUserScript
(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("user")),
Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() );
}
- catch( com::sun::star::uno::DeploymentException& )
+ catch(const com::sun::star::uno::DeploymentException& )
{
// Special Office installations may not contain deployment code
m_eState = END_REACHED;
@@ -3506,7 +3506,7 @@ Reference< deployment::XPackage > ScriptExtensionIterator::implGetNextSharedScri
(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("shared")),
Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() );
}
- catch( com::sun::star::uno::DeploymentException& )
+ catch(const com::sun::star::uno::DeploymentException& )
{
// Special Office installations may not contain deployment code
return xScriptPackage;
@@ -3559,7 +3559,7 @@ Reference< deployment::XPackage > ScriptExtensionIterator::implGetNextBundledScr
(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("bundled")),
Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() );
}
- catch( com::sun::star::uno::DeploymentException& )
+ catch(const com::sun::star::uno::DeploymentException& )
{
// Special Office installations may not contain deployment code
return xScriptPackage;
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx
index 6f6785082c3c..44a26c852a7d 100644
--- a/basic/source/uno/scriptcont.cxx
+++ b/basic/source/uno/scriptcont.cxx
@@ -108,7 +108,7 @@ void SfxScriptLibraryContainer::setLibraryPassword
pImplLib->maPassword = rPassword;
}
}
- catch( NoSuchElementException& ) {}
+ catch(const NoSuchElementException& ) {}
}
String SfxScriptLibraryContainer::getLibraryPassword( const String& rLibraryName )
@@ -129,7 +129,7 @@ void SfxScriptLibraryContainer::clearLibraryPassword( const String& rLibraryName
pImplLib->mbPasswordProtected = sal_False;
pImplLib->maPassword = OUString();
}
- catch( NoSuchElementException& ) {}
+ catch(const NoSuchElementException& ) {}
}
sal_Bool SfxScriptLibraryContainer::hasLibraryPassword( const String& rLibraryName )
@@ -274,7 +274,7 @@ Any SAL_CALL SfxScriptLibraryContainer::importLibraryElement
{
xInput = mxSFI->openFileRead( aFile );
}
- catch( Exception& )
+ catch(const Exception& )
//catch( Exception& e )
{
// TODO:
@@ -297,7 +297,7 @@ Any SAL_CALL SfxScriptLibraryContainer::importLibraryElement
xParser->setDocumentHandler( ::xmlscript::importScriptModule( aMod ) );
xParser->parseStream( source );
}
- catch( Exception& )
+ catch(const Exception& )
{
SfxErrorContext aEc( ERRCTX_SFX_LOADBASIC, aFile );
sal_uIntPtr nErrorCode = ERRCODE_IO_GENERAL;
@@ -324,7 +324,7 @@ Any SAL_CALL SfxScriptLibraryContainer::importLibraryElement
Reference< XMultiServiceFactory > xFactory( xModel, UNO_QUERY_THROW );
xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAGlobals" ) ) );
}
- catch( Exception& )
+ catch(const Exception& )
{
}
@@ -358,7 +358,7 @@ Any SAL_CALL SfxScriptLibraryContainer::importLibraryElement
Reference< XMultiServiceFactory> xSF( xModel, UNO_QUERY_THROW );
mxCodeNameAccess.set( xSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAObjectModuleObjectProvider" ) ) ), UNO_QUERY );
}
- catch( Exception& ) {}
+ catch(const Exception& ) {}
if( mxCodeNameAccess.is() )
{
@@ -366,7 +366,7 @@ Any SAL_CALL SfxScriptLibraryContainer::importLibraryElement
{
aModInfo.ModuleObject.set( mxCodeNameAccess->getByName( aElementName), uno::UNO_QUERY );
}
- catch(uno::Exception&)
+ catch(const uno::Exception&)
{
OSL_TRACE("Failed to get documument object for %s", rtl::OUStringToOString( aElementName, RTL_TEXTENCODING_UTF8 ).getStr() );
}
@@ -570,7 +570,7 @@ void SAL_CALL SfxScriptLibraryContainer::changeLibraryPassword( const OUString&
mxSFI->kill( aElementPath );
}
}
- catch( Exception& ) {}
+ catch(const Exception& ) {}
}
}
@@ -665,7 +665,7 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib,
xOut->writeBytes( aBinSeq );
xOut->closeOutput();
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
// TODO: handle error
}
@@ -707,7 +707,7 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib,
Reference< XNameContainer > xLib( pLib );
writeLibraryElement( xLib, aElementName, xOutput );
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
OSL_FAIL( "Problem on storing of password library!\n" );
// TODO: error handling
@@ -821,7 +821,7 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib,
throw uno::RuntimeException();
xEncr->setEncryptionPassword( pLib->maPassword );
}
- catch( ::com::sun::star::packages::WrongPasswordException& )
+ catch(const ::com::sun::star::packages::WrongPasswordException& )
{
xSourceStream = xElementRootStorage->openEncryptedStreamElement(
aSourceStreamName,
@@ -849,14 +849,14 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib,
xTransact->commit();
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
// TODO: handle error
}
}
}
- catch( Exception& )
+ catch(const Exception& )
{
}
}
@@ -924,7 +924,7 @@ sal_Bool SfxScriptLibraryContainer::implLoadPasswordLibrary
if ( !xLibraryStor.is() )
throw uno::RuntimeException();
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
OSL_FAIL( "### couldn't open sub storage for library\n" );
return sal_False;
@@ -968,7 +968,7 @@ sal_Bool SfxScriptLibraryContainer::implLoadPasswordLibrary
delete pStream;
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
// TODO: error handling
}
@@ -1011,7 +1011,7 @@ sal_Bool SfxScriptLibraryContainer::implLoadPasswordLibrary
}
}
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
bRet = sal_False;
}
@@ -1039,7 +1039,7 @@ sal_Bool SfxScriptLibraryContainer::implLoadPasswordLibrary
xElementRootStorage = ::comphelper::OStorageHelper::GetStorageFromURL(
aElementPath,
embed::ElementModes::READ );
- } catch( uno::Exception& )
+ } catch(const uno::Exception& )
{
// TODO: error handling
}
@@ -1077,7 +1077,7 @@ sal_Bool SfxScriptLibraryContainer::implLoadPasswordLibrary
delete pStream;
}
- catch( uno::Exception& )
+ catch(const uno::Exception& )
{
// TODO: error handling
}
@@ -1118,7 +1118,7 @@ sal_Bool SfxScriptLibraryContainer::implLoadPasswordLibrary
}
}
}
- catch ( uno::Exception& )
+ catch (const uno::Exception& )
{
bRet = sal_False;
}
@@ -1127,7 +1127,7 @@ sal_Bool SfxScriptLibraryContainer::implLoadPasswordLibrary
}
}
- catch( Exception& )
+ catch(const Exception& )
{
// TODO
//throw e;