summaryrefslogtreecommitdiffstats
path: root/framework/source/layoutmanager/layoutmanager.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-06-19 22:48:52 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-06-20 11:01:54 +0100
commit347738eade7b1077067926930b8efef257d4776d (patch)
tree32643ba155a4029de7e9eecfdc9c49ef36a5d9dc /framework/source/layoutmanager/layoutmanager.cxx
parentcatch by const reference (diff)
downloadcore-347738eade7b1077067926930b8efef257d4776d.tar.gz
core-347738eade7b1077067926930b8efef257d4776d.zip
catch by const reference
Diffstat (limited to 'framework/source/layoutmanager/layoutmanager.cxx')
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx87
1 files changed, 65 insertions, 22 deletions
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index a7bc56cbd954..c92ec7ea8cf7 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -221,8 +221,12 @@ void LayoutManager::impl_clearUpMenuBar()
{
xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XMenuBar" ))) >>= xMenuBar;
}
- catch ( beans::UnknownPropertyException ) {}
- catch ( lang::WrappedTargetException ) {}
+ catch (const beans::UnknownPropertyException&)
+ {
+ }
+ catch (const lang::WrappedTargetException&)
+ {
+ }
}
VCLXMenu* pAwtMenuBar = VCLXMenu::GetImplementation( xMenuBar );
@@ -310,7 +314,9 @@ void LayoutManager::implts_reset( sal_Bool bAttached )
// Remove listener to old module ui configuration manager
xModuleCfgMgr->removeConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY ));
}
- catch ( Exception& ) {}
+ catch (const Exception&)
+ {
+ }
}
try
@@ -320,7 +326,9 @@ void LayoutManager::implts_reset( sal_Bool bAttached )
if ( xModuleCfgMgr.is() )
xModuleCfgMgr->addConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY ));
}
- catch ( Exception& ) {}
+ catch (const Exception&)
+ {
+ }
try
{
@@ -328,8 +336,12 @@ void LayoutManager::implts_reset( sal_Bool bAttached )
if ( xPersistentWindowStateSupplier.is() )
xPersistentWindowStateSupplier->getByName( aModuleIdentifier ) >>= xPersistentWindowState;
}
- catch ( NoSuchElementException& ) {}
- catch ( WrappedTargetException& ) {}
+ catch (const NoSuchElementException&)
+ {
+ }
+ catch (const WrappedTargetException&)
+ {
+ }
}
xModel = impl_getModelFromFrame( xFrame );
@@ -345,7 +357,9 @@ void LayoutManager::implts_reset( sal_Bool bAttached )
// Remove listener to old ui configuration manager
xDocCfgMgr->removeConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY ));
}
- catch ( Exception& ) {}
+ catch (const Exception&)
+ {
+ }
}
try
@@ -354,7 +368,9 @@ void LayoutManager::implts_reset( sal_Bool bAttached )
if ( xDocCfgMgr.is() )
xDocCfgMgr->addConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY ));
}
- catch ( Exception& ) {}
+ catch (const Exception&)
+ {
+ }
}
}
}
@@ -368,7 +384,9 @@ void LayoutManager::implts_reset( sal_Bool bAttached )
xModuleCfgMgr->removeConfigurationListener(
Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY ));
}
- catch ( Exception& ) {}
+ catch (const Exception&)
+ {
+ }
}
if ( xDocCfgMgr.is() )
@@ -378,7 +396,9 @@ void LayoutManager::implts_reset( sal_Bool bAttached )
xDocCfgMgr->removeConfigurationListener(
Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY ));
}
- catch ( Exception& ) {}
+ catch (const Exception&)
+ {
+ }
}
// Release references to our configuration managers as we currently don't have
@@ -636,7 +656,9 @@ sal_Bool LayoutManager::implts_readWindowStateData( const rtl::OUString& aName,
return sal_True;
}
- catch ( NoSuchElementException& ) {}
+ catch (const NoSuchElementException&)
+ {
+ }
}
return sal_False;
@@ -660,12 +682,14 @@ void LayoutManager::implts_writeWindowStateData( const rtl::OUString& aName, con
// Check persistent flag of the user interface element
xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Persistent" ))) >>= bPersistent;
}
- catch ( beans::UnknownPropertyException )
+ catch (const beans::UnknownPropertyException&)
{
// Non-configurable elements should at least store their dimension/position
bPersistent = sal_True;
}
- catch ( lang::WrappedTargetException ) {}
+ catch (const lang::WrappedTargetException&)
+ {
+ }
}
if ( bPersistent && xPersistentWindowState.is() )
@@ -714,7 +738,9 @@ void LayoutManager::implts_writeWindowStateData( const rtl::OUString& aName, con
xInsert->insertByName( aName, makeAny( aWindowState ));
}
}
- catch ( Exception& ) {}
+ catch (const Exception&)
+ {
+ }
}
// Reset flag
@@ -752,8 +778,12 @@ Reference< XUIElement > LayoutManager::implts_createElement( const rtl::OUString
{
xUIElement = m_xUIElementFactoryManager->createUIElement( aName, aPropSeq );
}
- catch ( NoSuchElementException& ) {}
- catch ( IllegalArgumentException& ) {}
+ catch (const NoSuchElementException&)
+ {
+ }
+ catch (const IllegalArgumentException&)
+ {
+ }
return xUIElement;
}
@@ -1412,8 +1442,13 @@ void LayoutManager::implts_reparentChildWindows()
{
xStatusBarWindow = Reference< awt::XWindow >( aStatusBarElement.m_xUIElement->getRealInterface(), UNO_QUERY );
}
- catch ( RuntimeException& ) { throw; }
- catch ( Exception& ) {}
+ catch (const RuntimeException&)
+ {
+ throw;
+ }
+ catch (const Exception&)
+ {
+ }
}
if ( xStatusBarWindow.is() )
@@ -1519,8 +1554,12 @@ throw (RuntimeException)
{
xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XMenuBar" ))) >>= xMenuBar;
}
- catch ( beans::UnknownPropertyException ) {}
- catch ( lang::WrappedTargetException ) {}
+ catch (const beans::UnknownPropertyException&)
+ {
+ }
+ catch (const lang::WrappedTargetException&)
+ {
+ }
}
if ( xMenuBar.is() )
@@ -2917,7 +2956,9 @@ throw( RuntimeException )
xModuleCfgMgr->removeConfigurationListener(
Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY ));
}
- catch ( Exception& ) {}
+ catch (const Exception&)
+ {
+ }
}
if ( m_xDocCfgMgr.is() )
@@ -2928,7 +2969,9 @@ throw( RuntimeException )
xDocCfgMgr->removeConfigurationListener(
Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY ));
}
- catch ( Exception& ) {}
+ catch (const Exception&)
+ {
+ }
}
m_xDocCfgMgr.clear();