[Libreoffice-commits] .: 7 commits - dtrans/source svl/source svtools/source toolkit/source ucbhelper/source unotools/source vcl/source vcl/unx
Caolán McNamara
caolan at kemper.freedesktop.org
Mon Jun 20 03:12:36 PDT 2011
dtrans/source/generic/clipboardmanager.cxx | 3
dtrans/source/test/test_dtrans.cxx | 4
svl/source/misc/strmadpt.cxx | 44 +++++---
svtools/source/config/optionsdrawinglayer.cxx | 9 -
toolkit/source/layout/core/root.cxx | 6 -
ucbhelper/source/provider/propertyvalueset.cxx | 12 +-
unotools/source/config/fontcfg.cxx | 40 +++----
unotools/source/ucbhelper/ucblockbytes.cxx | 68 ++++++------
vcl/source/app/svdata.cxx | 17 ---
vcl/source/gdi/print3.cxx | 4
vcl/source/window/dndlcon.cxx | 30 +----
vcl/source/window/window.cxx | 12 --
vcl/unx/gtk/a11y/atkutil.cxx | 136 ++++++++++++-------------
13 files changed, 197 insertions(+), 188 deletions(-)
New commits:
commit 0d17a52983d88b1031151b9d8207adb8c04d728d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Jun 18 00:55:38 2011 +0100
catch by const reference
diff --git a/unotools/source/config/fontcfg.cxx b/unotools/source/config/fontcfg.cxx
index 809c5ba..ba56773 100644
--- a/unotools/source/config/fontcfg.cxx
+++ b/unotools/source/config/fontcfg.cxx
@@ -165,7 +165,7 @@ DefaultFontConfiguration::DefaultFontConfiguration()
}
}
}
- catch( Exception& )
+ catch (const Exception&)
{
// configuration is awry
m_xConfigProvider.clear();
@@ -173,7 +173,7 @@ DefaultFontConfiguration::DefaultFontConfiguration()
}
}
}
- catch( WrappedTargetException& )
+ catch (const WrappedTargetException&)
{
}
#if OSL_DEBUG_LEVEL > 1
@@ -214,10 +214,10 @@ OUString DefaultFontConfiguration::tryLocale( const Locale& rLocale, const OUStr
it->second.xAccess = xNode;
}
}
- catch( NoSuchElementException )
+ catch (const NoSuchElementException&)
{
}
- catch( WrappedTargetException )
+ catch (const WrappedTargetException&)
{
}
}
@@ -231,10 +231,10 @@ OUString DefaultFontConfiguration::tryLocale( const Locale& rLocale, const OUStr
aAny >>= aRet;
}
}
- catch( NoSuchElementException& )
+ catch (const NoSuchElementException&)
{
}
- catch( WrappedTargetException& )
+ catch (const WrappedTargetException&)
{
}
}
@@ -451,7 +451,7 @@ FontSubstConfiguration::FontSubstConfiguration() :
}
}
}
- catch( Exception& )
+ catch (const Exception&)
{
// configuration is awry
m_xConfigProvider.clear();
@@ -459,7 +459,7 @@ FontSubstConfiguration::FontSubstConfiguration() :
}
}
}
- catch( WrappedTargetException& )
+ catch (const WrappedTargetException&)
{
}
#if OSL_DEBUG_LEVEL > 1
@@ -994,10 +994,10 @@ void FontSubstConfiguration::fillSubstVector( const com::sun::star::uno::Referen
}
}
}
- catch( NoSuchElementException )
+ catch (const NoSuchElementException&)
{
}
- catch( WrappedTargetException )
+ catch (const WrappedTargetException&)
{
}
}
@@ -1025,10 +1025,10 @@ FontWeight FontSubstConfiguration::getSubstWeight( const com::sun::star::uno::Re
#endif
}
}
- catch( NoSuchElementException )
+ catch (const NoSuchElementException&)
{
}
- catch( WrappedTargetException )
+ catch (const WrappedTargetException&)
{
}
return (FontWeight)( weight >= 0 ? pWeightNames[weight].nEnum : WEIGHT_DONTKNOW );
@@ -1057,10 +1057,10 @@ FontWidth FontSubstConfiguration::getSubstWidth( const com::sun::star::uno::Refe
#endif
}
}
- catch( NoSuchElementException )
+ catch (const NoSuchElementException&)
{
}
- catch( WrappedTargetException )
+ catch (const WrappedTargetException&)
{
}
return (FontWidth)( width >= 0 ? pWidthNames[width].nEnum : WIDTH_DONTKNOW );
@@ -1092,10 +1092,10 @@ unsigned long FontSubstConfiguration::getSubstType( const com::sun::star::uno::R
}
}
}
- catch( NoSuchElementException )
+ catch (const NoSuchElementException&)
{
}
- catch( WrappedTargetException )
+ catch (const WrappedTargetException&)
{
}
@@ -1117,10 +1117,10 @@ void FontSubstConfiguration::readLocaleSubst( const com::sun::star::lang::Locale
Any aAny = m_xConfigAccess->getByName( it->second.aConfigLocaleString );
aAny >>= xNode;
}
- catch( NoSuchElementException )
+ catch (const NoSuchElementException&)
{
}
- catch( WrappedTargetException )
+ catch (const WrappedTargetException&)
{
}
if( xNode.is() )
@@ -1147,10 +1147,10 @@ void FontSubstConfiguration::readLocaleSubst( const com::sun::star::lang::Locale
Any aAny = xNode->getByName( pFontNames[i] );
aAny >>= xFont;
}
- catch( NoSuchElementException )
+ catch (const NoSuchElementException&)
{
}
- catch( WrappedTargetException )
+ catch (const WrappedTargetException&)
{
}
if( ! xFont.is() )
diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx
index a2d60d7..20a22f3 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -696,7 +696,7 @@ Moderator::Result Moderator::getResult(const sal_uInt32 milliSec)
// reset
m_aResultType = NORESULT;
}
- catch(const salhelper::ConditionWaiter::timedout&)
+ catch (const salhelper::ConditionWaiter::timedout&)
{
ret.type = TIMEDOUT;
}
@@ -849,24 +849,24 @@ void SAL_CALL Moderator::run()
aResult = m_aContent.executeCommand(m_aArg.Name,m_aArg.Argument);
aResultType = RESULT;
}
- catch ( CommandAbortedException )
+ catch (const CommandAbortedException&)
{
aResultType = COMMANDABORTED;
}
- catch ( CommandFailedException )
+ catch (const CommandFailedException&)
{
aResultType = COMMANDFAILED;
}
- catch ( InteractiveIOException& r )
+ catch (const InteractiveIOException& r)
{
nIOErrorCode = r.Code;
aResultType = INTERACTIVEIO;
}
- catch ( UnsupportedDataSinkException& )
+ catch (const UnsupportedDataSinkException )
{
aResultType = UNSUPPORTED;
}
- catch ( Exception )
+ catch (const Exception&)
{
aResultType = GENERAL;
}
@@ -950,10 +950,13 @@ static sal_Bool UCBOpenContentSync(
bool bResultAchieved(false);
Moderator* pMod = 0;
- try {
+ try
+ {
pMod = new Moderator(xContent,xInteract,xProgress,rArg);
pMod->create();
- } catch(const ContentCreationException&) {
+ }
+ catch (const ContentCreationException&)
+ {
bResultAchieved = bException = true;
xLockBytes->SetError( ERRCODE_IO_GENERAL );
}
@@ -1180,17 +1183,17 @@ static sal_Bool _UCBOpenContentSync(
{
aResult = aContent.executeCommand( rArg.Name, rArg.Argument );
}
- catch ( CommandAbortedException )
+ catch (const CommandAbortedException&)
{
bAborted = true;
xLockBytes->SetError( ERRCODE_ABORT );
}
- catch ( CommandFailedException )
+ catch (const CommandFailedException&)
{
bAborted = true;
xLockBytes->SetError( ERRCODE_ABORT );
}
- catch ( InteractiveIOException& r )
+ catch (const InteractiveIOException& r)
{
bException = true;
if ( r.Code == IOErrorCode_ACCESS_DENIED || r.Code == IOErrorCode_LOCKING_VIOLATION )
@@ -1202,12 +1205,12 @@ static sal_Bool _UCBOpenContentSync(
else
xLockBytes->SetError( ERRCODE_IO_GENERAL );
}
- catch ( UnsupportedDataSinkException& )
+ catch (const UnsupportedDataSinkException&)
{
bException = true;
xLockBytes->SetError( ERRCODE_IO_NOTSUPPORTED );
}
- catch ( Exception )
+ catch (const Exception&)
{
bException = true;
xLockBytes->SetError( ERRCODE_IO_GENERAL );
@@ -1262,10 +1265,12 @@ UcbLockBytes::~UcbLockBytes()
{
m_xInputStream->closeInput();
}
- catch ( RuntimeException const & )
- {}
- catch ( IOException const & )
- {}
+ catch (const RuntimeException&)
+ {
+ }
+ catch (const IOException&)
+ {
+ }
}
}
@@ -1275,10 +1280,12 @@ UcbLockBytes::~UcbLockBytes()
{
m_xOutputStream->closeOutput();
}
- catch ( RuntimeException const & )
- {}
- catch ( IOException const & )
- {}
+ catch (const RuntimeException&)
+ {
+ }
+ catch (const IOException&)
+ {
+ }
}
}
@@ -1352,8 +1359,9 @@ sal_Bool UcbLockBytes::setInputStream_Impl( const Reference<XInputStream> &rxInp
bRet = m_xInputStream.is();
}
- catch( Exception& )
- {}
+ catch (const Exception&)
+ {
+ }
if ( m_bStreamValid && m_xInputStream.is() )
m_aInitialized.set();
@@ -1420,11 +1428,11 @@ ErrCode UcbLockBytes::ReadAt ( sal_uLong nPos, void *pBuffer, sal_uLong nCount,
{
xSeekable->seek( nPos );
}
- catch ( IOException )
+ catch (const IOException&)
{
return ERRCODE_IO_CANTSEEK;
}
- catch (com::sun::star::lang::IllegalArgumentException)
+ catch (const com::sun::star::lang::IllegalArgumentException&)
{
return ERRCODE_IO_CANTSEEK;
}
@@ -1444,7 +1452,7 @@ ErrCode UcbLockBytes::ReadAt ( sal_uLong nPos, void *pBuffer, sal_uLong nCount,
nSize = xStream->readBytes( aData, sal_Int32(nCount) );
}
- catch (IOException)
+ catch (const IOException&)
{
return ERRCODE_IO_CANTREAD;
}
@@ -1474,7 +1482,7 @@ ErrCode UcbLockBytes::WriteAt ( sal_uLong nPos, const void *pBuffer, sal_uLong n
{
xSeekable->seek( nPos );
}
- catch ( IOException )
+ catch (const IOException&)
{
return ERRCODE_IO_CANTSEEK;
}
@@ -1487,7 +1495,7 @@ ErrCode UcbLockBytes::WriteAt ( sal_uLong nPos, const void *pBuffer, sal_uLong n
if ( pWritten )
*pWritten = nCount;
}
- catch ( Exception )
+ catch (const Exception&)
{
return ERRCODE_IO_CANTWRITE;
}
@@ -1506,7 +1514,7 @@ ErrCode UcbLockBytes::Flush() const
{
xOutputStream->flush();
}
- catch( Exception )
+ catch (const Exception&)
{
return ERRCODE_IO_CANTWRITE;
}
@@ -1577,7 +1585,7 @@ ErrCode UcbLockBytes::Stat( SvLockBytesStat *pStat, SvLockBytesStatFlag) const
{
pStat->nSize = sal_uLong(xSeekable->getLength());
}
- catch (IOException)
+ catch (const IOException&)
{
return ERRCODE_IO_CANTTELL;
}
commit 29c069f33edc13163533da9b77d749afbeeeb343
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Jun 18 00:49:02 2011 +0100
catch by const reference
diff --git a/dtrans/source/generic/clipboardmanager.cxx b/dtrans/source/generic/clipboardmanager.cxx
index a8d14d4..ef928e7 100644
--- a/dtrans/source/generic/clipboardmanager.cxx
+++ b/dtrans/source/generic/clipboardmanager.cxx
@@ -219,8 +219,7 @@ void SAL_CALL ClipboardManager::dispose()
xComponent->removeEventListener(static_cast < XEventListener * > (this));
xComponent->dispose();
}
-
- catch(Exception e)
+ catch (const Exception&)
{
// exceptions can be safely ignored here.
}
diff --git a/dtrans/source/test/test_dtrans.cxx b/dtrans/source/test/test_dtrans.cxx
index 02ed79e..4b1976f 100644
--- a/dtrans/source/test/test_dtrans.cxx
+++ b/dtrans/source/test/test_dtrans.cxx
@@ -465,13 +465,13 @@ int SAL_CALL main( int argc, const char* argv[] )
xClipboardManager->getClipboard( OUString(RTL_CONSTASCII_USTRINGPARAM("generic")) );
TRACE( "FAILED\n" );
}
- catch( NoSuchElementException e )
+ catch (const NoSuchElementException&)
{
TRACE( "passed\n" );
}
}
- catch ( Exception aException )
+ catch (const Exception&)
{
ENSURE( sal_False, "*** ERROR *** exception caught." );
}
commit 244c5e2f146669ffc09b8aea3ac6aa9f26a078d6
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Jun 18 00:47:37 2011 +0100
handle truncated stream
diff --git a/toolkit/source/layout/core/root.cxx b/toolkit/source/layout/core/root.cxx
index 2342de7..16379e4 100644
--- a/toolkit/source/layout/core/root.cxx
+++ b/toolkit/source/layout/core/root.cxx
@@ -71,7 +71,7 @@ LayoutRoot::~LayoutRoot()
m_refCount++; // inhibit multiple destruction
dispose();
}
- catch( uno::Exception& )
+ catch (const uno::Exception&)
{
}
}
@@ -186,7 +186,7 @@ void SAL_CALL LayoutRoot::initialize( const uno::Sequence< uno::Any >& aArgument
{
xParser->parseStream( source );
}
- catch ( xml::sax::SAXParseException& e )
+ catch (const xml::sax::SAXParseException& e)
{
OUString c(RTL_CONSTASCII_USTRINGPARAM(":"));
error( aXMLName
@@ -361,7 +361,7 @@ bool LayoutWidget::addChild( LayoutWidget *pChild )
{
mxContainer->addChild( pChild->mxWidget );
}
- catch( awt::MaxChildrenException ex )
+ catch (const awt::MaxChildrenException&)
{
return false;
}
commit d288dcea8044b6f8bd3c21a0ff96acbc235d1019
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Jun 18 00:07:43 2011 +0100
catch by const reference
diff --git a/svl/source/misc/strmadpt.cxx b/svl/source/misc/strmadpt.cxx
index 4cbfff4..4b90d12 100644
--- a/svl/source/misc/strmadpt.cxx
+++ b/svl/source/misc/strmadpt.cxx
@@ -178,7 +178,7 @@ ErrCode SvOutputStreamOpenLockBytes::Flush() const
{
m_xOutputStream->flush();
}
- catch (io::IOException)
+ catch (const io::IOException&)
{
return ERRCODE_IO_CANTWRITE;
}
@@ -223,7 +223,7 @@ ErrCode SvOutputStreamOpenLockBytes::FillAppend(void const * pBuffer,
writeBytes(uno::Sequence< sal_Int8 >(
static_cast< sal_Int8 const * >(pBuffer), nCount));
}
- catch (io::IOException)
+ catch (const io::IOException&)
{
return ERRCODE_IO_CANTWRITE;
}
@@ -252,11 +252,15 @@ sal_uLong SvOutputStreamOpenLockBytes::Seek(sal_uLong)
void SvOutputStreamOpenLockBytes::Terminate()
{
if (m_xOutputStream.is())
+ {
try
{
m_xOutputStream->closeOutput();
}
- catch (io::IOException) {}
+ catch (const io::IOException&)
+ {
+ }
+ }
}
//============================================================================
@@ -492,7 +496,7 @@ sal_uLong SvInputStream::GetData(void * pData, sal_uLong nSize)
{
m_xSeekable->seek(m_nSeekedFrom);
}
- catch (io::IOException)
+ catch (const io::IOException&)
{
SetError(ERRCODE_IO_CANTREAD);
return 0;
@@ -513,7 +517,7 @@ sal_uLong SvInputStream::GetData(void * pData, sal_uLong nSize)
{
nCount = m_xStream->readBytes(aBuffer, nRemain);
}
- catch (io::IOException)
+ catch (const io::IOException&)
{
SetError(ERRCODE_IO_CANTREAD);
return nRead;
@@ -550,7 +554,7 @@ sal_uLong SvInputStream::GetData(void * pData, sal_uLong nSize)
{
nCount = m_xStream->readBytes(aBuffer, nRemain);
}
- catch (io::IOException)
+ catch (const io::IOException&)
{
SetError(ERRCODE_IO_CANTREAD);
break;
@@ -604,7 +608,9 @@ sal_uLong SvInputStream::SeekPos(sal_uLong nPos)
return sal_uLong(nLength);
}
}
- catch (io::IOException) {}
+ catch (const io::IOException&)
+ {
+ }
else
return Tell(); //@@@
}
@@ -617,13 +623,17 @@ sal_uLong SvInputStream::SeekPos(sal_uLong nPos)
return nPos;
}
else if (m_xSeekable.is())
+ {
try
{
m_xSeekable->seek(nPos);
m_nSeekedFrom = STREAM_SEEK_TO_END;
return nPos;
}
- catch (io::IOException) {}
+ catch (const io::IOException&)
+ {
+ }
+ }
else if (m_pPipe->setReadPosition(nPos) == SvDataPipe_Impl::SEEK_OK)
{
m_nSeekedFrom = STREAM_SEEK_TO_END;
@@ -658,11 +668,15 @@ SvInputStream::SvInputStream(
SvInputStream::~SvInputStream()
{
if (m_xStream.is())
+ {
try
{
m_xStream->closeInput();
}
- catch (io::IOException) {}
+ catch (const io::IOException&)
+ {
+ }
+ }
delete m_pPipe;
}
@@ -727,7 +741,7 @@ sal_uLong SvOutputStream::PutData(void const * pData, sal_uLong nSize)
+ nWritten,
nRemain));
}
- catch (io::IOException)
+ catch (const io::IOException&)
{
SetError(ERRCODE_IO_CANTWRITE);
break;
@@ -758,7 +772,9 @@ void SvOutputStream::FlushData()
{
m_xStream->flush();
}
- catch (io::IOException) {}
+ catch (const io::IOException&)
+ {
+ }
}
//============================================================================
@@ -781,11 +797,15 @@ SvOutputStream::SvOutputStream(uno::Reference< io::XOutputStream > const &
SvOutputStream::~SvOutputStream()
{
if (m_xStream.is())
+ {
try
{
m_xStream->closeOutput();
}
- catch (io::IOException) {}
+ catch (const io::IOException&)
+ {
+ }
+ }
}
//============================================================================
commit 6de42bf152d1510dd3999a8cf0a6b554666aef93
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Jun 18 00:01:50 2011 +0100
catch by const reference
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index 02543f8..4f326a7 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -410,8 +410,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
return bSuccess;
}
-
- catch(::com::sun::star::java::JavaNotConfiguredException e)
+ catch (const ::com::sun::star::java::JavaNotConfiguredException&)
{
ResMgr *pResMgr = ImplGetResMgr();
if( bErrorMessage && bAllowCancel && pResMgr )
@@ -435,8 +434,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
return false;
}
-
- catch(::com::sun::star::java::JavaVMCreationFailureException e)
+ catch (const ::com::sun::star::java::JavaVMCreationFailureException&)
{
ResMgr *pResMgr = ImplGetResMgr();
if( bErrorMessage && bAllowCancel && pResMgr )
@@ -460,8 +458,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
return false;
}
-
- catch(::com::sun::star::java::MissingJavaRuntimeException e)
+ catch (const ::com::sun::star::java::MissingJavaRuntimeException&)
{
ResMgr *pResMgr = ImplGetResMgr();
if( bErrorMessage && bAllowCancel && pResMgr )
@@ -485,8 +482,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
return false;
}
-
- catch(::com::sun::star::java::JavaDisabledException e)
+ catch (const ::com::sun::star::java::JavaDisabledException&)
{
ResMgr *pResMgr = ImplGetResMgr();
if( bErrorMessage && bAllowCancel && pResMgr )
@@ -510,9 +506,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
return false;
}
-
-
- catch(::com::sun::star::uno::RuntimeException e)
+ catch (const ::com::sun::star::uno::RuntimeException& e)
{
ResMgr *pResMgr = ImplGetResMgr();
if( bErrorMessage && pResMgr )
@@ -564,7 +558,6 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
return false;
}
-
catch (...)
{
return false;
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index c0c8743..f0bf248 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -250,7 +250,7 @@ static rtl::OUString queryFile( Printer* pPrinter )
// add arbitrary files
xFilterMgr->appendFilter( String( VclResId( SV_STDTEXT_ALLFILETYPES ) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.*" ) ) );
}
- catch( lang::IllegalArgumentException )
+ catch (const lang::IllegalArgumentException&)
{
DBG_ERRORFILE( "caught IllegalArgumentException when registering filter\n" );
}
@@ -460,7 +460,7 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr
makeAny( sal_True ) );
}
}
- catch( std::bad_alloc& )
+ catch (const std::bad_alloc&)
{
}
}
diff --git a/vcl/source/window/dndlcon.cxx b/vcl/source/window/dndlcon.cxx
index 108dc3e..eb0b81a 100644
--- a/vcl/source/window/dndlcon.cxx
+++ b/vcl/source/window/dndlcon.cxx
@@ -193,8 +193,7 @@ sal_uInt32 DNDListenerContainer::fireDropEvent( const Reference< XDropTargetDrop
nRet++;
}
}
-
- catch( RuntimeException )
+ catch (const RuntimeException&)
{
pContainer->removeInterface( xElement );
}
@@ -209,8 +208,7 @@ sal_uInt32 DNDListenerContainer::fireDropEvent( const Reference< XDropTargetDrop
{
context->rejectDrop();
}
-
- catch( RuntimeException exc )
+ catch (const RuntimeException&)
{
}
}
@@ -253,8 +251,7 @@ sal_uInt32 DNDListenerContainer::fireDragExitEvent()
nRet++;
}
}
-
- catch( RuntimeException )
+ catch (const RuntimeException&)
{
pContainer->removeInterface( xElement );
}
@@ -305,8 +302,7 @@ sal_uInt32 DNDListenerContainer::fireDragOverEvent( const Reference< XDropTarget
nRet++;
}
}
-
- catch( RuntimeException )
+ catch (const RuntimeException&)
{
pContainer->removeInterface( xElement );
}
@@ -321,8 +317,7 @@ sal_uInt32 DNDListenerContainer::fireDragOverEvent( const Reference< XDropTarget
{
context->rejectDrag();
}
-
- catch( RuntimeException exc )
+ catch (const RuntimeException&)
{
}
}
@@ -373,8 +368,7 @@ sal_uInt32 DNDListenerContainer::fireDragEnterEvent( const Reference< XDropTarge
nRet++;
}
}
-
- catch( RuntimeException )
+ catch (const RuntimeException&)
{
pContainer->removeInterface( xElement );
}
@@ -389,8 +383,7 @@ sal_uInt32 DNDListenerContainer::fireDragEnterEvent( const Reference< XDropTarge
{
context->rejectDrag();
}
-
- catch( RuntimeException exc )
+ catch (const RuntimeException&)
{
}
}
@@ -440,8 +433,7 @@ sal_uInt32 DNDListenerContainer::fireDropActionChangedEvent( const Reference< XD
nRet++;
}
}
-
- catch( RuntimeException )
+ catch (const RuntimeException&)
{
pContainer->removeInterface( xElement );
}
@@ -456,8 +448,7 @@ sal_uInt32 DNDListenerContainer::fireDropActionChangedEvent( const Reference< XD
{
context->rejectDrag();
}
-
- catch( RuntimeException exc )
+ catch (const RuntimeException&)
{
}
}
@@ -502,8 +493,7 @@ sal_uInt32 DNDListenerContainer::fireDragGestureEvent( sal_Int8 dragAction, sal_
nRet++;
}
}
-
- catch( RuntimeException )
+ catch (const RuntimeException&)
{
pContainer->removeInterface( xElement );
}
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index a694cfe..bc9b070 100755
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -4340,8 +4340,7 @@ Window::~Window()
if( xComponent.is() )
xComponent->dispose();
}
-
- catch ( Exception )
+ catch (const Exception&)
{
// can be safely ignored here.
}
@@ -8378,8 +8377,7 @@ uno::Reference< XDropTarget > Window::GetDropTarget()
mpWindowImpl->mpFrameData->mbInternalDragGestureRecognizer = sal_True;
}
-
- catch( RuntimeException )
+ catch (const RuntimeException&)
{
// release all instances
mpWindowImpl->mpFrameData->mxDropTarget.clear();
@@ -8452,7 +8450,7 @@ uno::Reference< XDragSource > Window::GetDragSource()
}
// createInstance can throw any exception
- catch( Exception )
+ catch (const Exception&)
{
// release all instances
mpWindowImpl->mpFrameData->mxDropTarget.clear();
@@ -8532,7 +8530,7 @@ uno::Reference< XClipboard > Window::GetClipboard()
}
// createInstance can throw any exception
- catch( Exception )
+ catch (const Exception&)
{
// release all instances
mpWindowImpl->mpFrameData->mxClipboard.clear();
@@ -8584,7 +8582,7 @@ uno::Reference< XClipboard > Window::GetPrimarySelection()
}
// createInstance can throw any exception
- catch( Exception )
+ catch (const Exception&)
{
// release all instances
mpWindowImpl->mpFrameData->mxSelection.clear();
diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx
index b50fb5a..3f741ff 100644
--- a/vcl/unx/gtk/a11y/atkutil.cxx
+++ b/vcl/unx/gtk/a11y/atkutil.cxx
@@ -224,7 +224,7 @@ void DocumentFocusListener::notifyEvent( const accessibility::AccessibleEventObj
if( accessibility::AccessibleStateType::FOCUSED == nState )
atk_wrapper_focus_tracker_notify_when_idle( getAccessible(aEvent) );
}
- catch(const lang::IndexOutOfBoundsException &e)
+ catch (const lang::IndexOutOfBoundsException&)
{
g_warning("Focused object has invalid index in parent");
}
@@ -559,7 +559,7 @@ static void handle_get_focus(::VclWindowEvent const * pEvent)
{
aDocumentFocusListener->attachRecursive(xAccessible, xContext, xStateSet);
}
- catch( const uno::Exception &e )
+ catch (const uno::Exception&)
{
g_warning( "Exception caught processing focus events" );
}
@@ -593,7 +593,7 @@ static void handle_menu_highlighted(::VclMenuEvent const * pEvent)
}
}
}
- catch( const uno::Exception& e )
+ catch (const uno::Exception&)
{
g_warning( "Exception caught processing menu highlight events" );
}
@@ -603,74 +603,76 @@ static void handle_menu_highlighted(::VclMenuEvent const * pEvent)
long WindowEventHandler(void *, ::VclSimpleEvent const * pEvent)
{
- try {
- switch (pEvent->GetId())
+ try
{
- case VCLEVENT_WINDOW_SHOW:
- break;
- case VCLEVENT_WINDOW_HIDE:
- break;
- case VCLEVENT_WINDOW_CLOSE:
- break;
- case VCLEVENT_WINDOW_GETFOCUS:
- handle_get_focus(static_cast< ::VclWindowEvent const * >(pEvent));
- break;
- case VCLEVENT_WINDOW_LOSEFOCUS:
- break;
- case VCLEVENT_WINDOW_MINIMIZE:
- break;
- case VCLEVENT_WINDOW_NORMALIZE:
- break;
- case VCLEVENT_WINDOW_KEYINPUT:
- case VCLEVENT_WINDOW_KEYUP:
- case VCLEVENT_WINDOW_COMMAND:
- case VCLEVENT_WINDOW_MOUSEMOVE:
- break;
-
- case VCLEVENT_MENU_HIGHLIGHT:
- if (const VclMenuEvent* pMenuEvent = dynamic_cast<const VclMenuEvent*>(pEvent))
- {
- handle_menu_highlighted(pMenuEvent);
- }
- else if (const VclAccessibleEvent* pAccEvent = dynamic_cast<const VclAccessibleEvent*>(pEvent))
+ switch (pEvent->GetId())
{
- uno::Reference< accessibility::XAccessible > xAccessible = pAccEvent->GetAccessible();
- if (xAccessible.is())
- atk_wrapper_focus_tracker_notify_when_idle(xAccessible);
+ case VCLEVENT_WINDOW_SHOW:
+ break;
+ case VCLEVENT_WINDOW_HIDE:
+ break;
+ case VCLEVENT_WINDOW_CLOSE:
+ break;
+ case VCLEVENT_WINDOW_GETFOCUS:
+ handle_get_focus(static_cast< ::VclWindowEvent const * >(pEvent));
+ break;
+ case VCLEVENT_WINDOW_LOSEFOCUS:
+ break;
+ case VCLEVENT_WINDOW_MINIMIZE:
+ break;
+ case VCLEVENT_WINDOW_NORMALIZE:
+ break;
+ case VCLEVENT_WINDOW_KEYINPUT:
+ case VCLEVENT_WINDOW_KEYUP:
+ case VCLEVENT_WINDOW_COMMAND:
+ case VCLEVENT_WINDOW_MOUSEMOVE:
+ break;
+
+ case VCLEVENT_MENU_HIGHLIGHT:
+ if (const VclMenuEvent* pMenuEvent = dynamic_cast<const VclMenuEvent*>(pEvent))
+ {
+ handle_menu_highlighted(pMenuEvent);
+ }
+ else if (const VclAccessibleEvent* pAccEvent = dynamic_cast<const VclAccessibleEvent*>(pEvent))
+ {
+ uno::Reference< accessibility::XAccessible > xAccessible = pAccEvent->GetAccessible();
+ if (xAccessible.is())
+ atk_wrapper_focus_tracker_notify_when_idle(xAccessible);
+ }
+ break;
+
+ case VCLEVENT_TOOLBOX_HIGHLIGHT:
+ handle_toolbox_highlight(static_cast< ::VclWindowEvent const * >(pEvent)->GetWindow());
+ break;
+
+ case VCLEVENT_TOOLBOX_BUTTONSTATECHANGED:
+ handle_toolbox_buttonchange(static_cast< ::VclWindowEvent const * >(pEvent));
+ break;
+
+ case VCLEVENT_OBJECT_DYING:
+ g_aWindowList.erase( static_cast< ::VclWindowEvent const * >(pEvent)->GetWindow() );
+ // fallthrough intentional !
+ case VCLEVENT_TOOLBOX_HIGHLIGHTOFF:
+ handle_toolbox_highlightoff(static_cast< ::VclWindowEvent const * >(pEvent)->GetWindow());
+ break;
+
+ case VCLEVENT_TABPAGE_ACTIVATE:
+ handle_tabpage_activated(static_cast< ::VclWindowEvent const * >(pEvent)->GetWindow());
+ break;
+
+ case VCLEVENT_COMBOBOX_SETTEXT:
+ // This looks quite strange to me. Stumbled over this when fixing #i104290#.
+ // This kicked in when leaving the combobox in the toolbar, after that the events worked.
+ // I guess this was a try to work around missing combobox events, which didn't do the full job, and shouldn't be necessary anymore.
+ // Fix for #i104290# was done in toolkit/source/awt/vclxaccessiblecomponent, FOCUSED state for compound controls in general.
+ // create_wrapper_for_children(static_cast< ::VclWindowEvent const * >(pEvent)->GetWindow());
+ break;
+
+ default:
+ break;
}
- break;
-
- case VCLEVENT_TOOLBOX_HIGHLIGHT:
- handle_toolbox_highlight(static_cast< ::VclWindowEvent const * >(pEvent)->GetWindow());
- break;
-
- case VCLEVENT_TOOLBOX_BUTTONSTATECHANGED:
- handle_toolbox_buttonchange(static_cast< ::VclWindowEvent const * >(pEvent));
- break;
-
- case VCLEVENT_OBJECT_DYING:
- g_aWindowList.erase( static_cast< ::VclWindowEvent const * >(pEvent)->GetWindow() );
- // fallthrough intentional !
- case VCLEVENT_TOOLBOX_HIGHLIGHTOFF:
- handle_toolbox_highlightoff(static_cast< ::VclWindowEvent const * >(pEvent)->GetWindow());
- break;
-
- case VCLEVENT_TABPAGE_ACTIVATE:
- handle_tabpage_activated(static_cast< ::VclWindowEvent const * >(pEvent)->GetWindow());
- break;
-
- case VCLEVENT_COMBOBOX_SETTEXT:
- // This looks quite strange to me. Stumbled over this when fixing #i104290#.
- // This kicked in when leaving the combobox in the toolbar, after that the events worked.
- // I guess this was a try to work around missing combobox events, which didn't do the full job, and shouldn't be necessary anymore.
- // Fix for #i104290# was done in toolkit/source/awt/vclxaccessiblecomponent, FOCUSED state for compound controls in general.
- // create_wrapper_for_children(static_cast< ::VclWindowEvent const * >(pEvent)->GetWindow());
- break;
-
- default:
- break;
}
- } catch(lang::IndexOutOfBoundsException)
+ catch (const lang::IndexOutOfBoundsException&)
{
g_warning("Focused object has invalid index in parent");
}
commit 2adf5e388bf966fdf4dd5d027ec16fcbd3172060
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jun 17 23:52:59 2011 +0100
catch by const reference
diff --git a/ucbhelper/source/provider/propertyvalueset.cxx b/ucbhelper/source/provider/propertyvalueset.cxx
index cedc6d3..2c61acb 100644
--- a/ucbhelper/source/provider/propertyvalueset.cxx
+++ b/ucbhelper/source/provider/propertyvalueset.cxx
@@ -221,10 +221,10 @@ class PropertyValues : public PropertyValuesVector {};
m_bWasNull = sal_False; \
} \
} \
- catch ( IllegalArgumentException ) \
+ catch (const IllegalArgumentException&) \
{ \
} \
- catch ( CannotConvertException ) \
+ catch (const CannotConvertException&) \
{ \
} \
} \
@@ -881,10 +881,10 @@ void PropertyValueSet::appendPropertySet(
if ( aValue.hasValue() )
appendObject( rProp, aValue );
}
- catch ( UnknownPropertyException )
+ catch (const UnknownPropertyException&)
{
}
- catch ( WrappedTargetException )
+ catch (const WrappedTargetException&)
{
}
}
@@ -909,10 +909,10 @@ sal_Bool PropertyValueSet::appendPropertySetValue(
return sal_True;
}
}
- catch ( UnknownPropertyException )
+ catch (const UnknownPropertyException&)
{
}
- catch ( WrappedTargetException )
+ catch (const WrappedTargetException&)
{
}
}
commit 04137b013b430bb354e8f44cb029891c7d4dab96
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jun 17 21:39:12 2011 +0100
silence unhelpful assert
diff --git a/svtools/source/config/optionsdrawinglayer.cxx b/svtools/source/config/optionsdrawinglayer.cxx
index 3709166..30851e1 100644
--- a/svtools/source/config/optionsdrawinglayer.cxx
+++ b/svtools/source/config/optionsdrawinglayer.cxx
@@ -388,13 +388,12 @@ SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl() :
DBG_ASSERT( !(seqNames.getLength()!=seqValues.getLength()), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nI miss some values of configuration keys!\n" );
- // Copy values from list in right order to ouer internal member.
+ // Copy values from list in right order to our internal member.
sal_Int32 nPropertyCount = seqValues.getLength();
- sal_Int32 nProperty = 0;
-
- for( nProperty=0; nProperty<nPropertyCount; ++nProperty )
+ for(sal_Int32 nProperty=0; nProperty<nPropertyCount; ++nProperty )
{
- DBG_ASSERT( !(seqValues[nProperty].hasValue()==sal_False), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nInvalid property value for property detected!\n" );
+ if (seqValues[nProperty].hasValue()==sal_False)
+ continue;
switch( nProperty )
{
More information about the Libreoffice-commits
mailing list