summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2012-01-06 00:03:58 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2012-01-06 00:22:51 +0900
commit5493951893ea90b330d5280bc171a60ff46fa396 (patch)
tree97dee1e30575dc05959acaa2cec6da9b791022d7 /svx
parent1bae43a3d75d9be75b027dab2eff12695ad4f353 (diff)
catch exception by constant reference
Diffstat (limited to 'svx')
-rw-r--r--svx/source/accessibility/AccessibleShape.cxx6
-rw-r--r--svx/source/accessibility/DescriptionGenerator.cxx10
-rw-r--r--svx/source/fmcomp/gridctrl.cxx3
-rw-r--r--svx/source/svdraw/svdoashp.cxx2
-rw-r--r--svx/source/svdraw/svdoole2.cxx24
-rw-r--r--svx/source/table/tablecontroller.cxx15
-rw-r--r--svx/source/unodraw/unopage.cxx2
-rw-r--r--svx/source/unodraw/unoshcol.cxx2
-rw-r--r--svx/workben/msview/xmlconfig.cxx4
9 files changed, 26 insertions, 42 deletions
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx
index 7761d0faa0e4..4523f474103c 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -661,7 +661,7 @@ sal_Int32 SAL_CALL AccessibleShape::getForeground (void)
aColor >>= nColor;
}
}
- catch (::com::sun::star::beans::UnknownPropertyException)
+ catch (const ::com::sun::star::beans::UnknownPropertyException &)
{
// Ignore exception and return default color.
}
@@ -687,7 +687,7 @@ sal_Int32 SAL_CALL AccessibleShape::getBackground (void)
aColor >>= nColor;
}
}
- catch (::com::sun::star::beans::UnknownPropertyException)
+ catch (const ::com::sun::star::beans::UnknownPropertyException &)
{
// Ignore exception and return default color.
}
@@ -1008,7 +1008,7 @@ void AccessibleShape::ViewForwarderChanged (ChangeType aChangeType,
nIndex += 1;
}
}
- catch (beans::UnknownPropertyException)
+ catch (const beans::UnknownPropertyException &)
{
// We throw our own exception that is a bit more informative.
throw uno::RuntimeException (::rtl::OUString (
diff --git a/svx/source/accessibility/DescriptionGenerator.cxx b/svx/source/accessibility/DescriptionGenerator.cxx
index 76ce38076b87..2c967f8c313d 100644
--- a/svx/source/accessibility/DescriptionGenerator.cxx
+++ b/svx/source/accessibility/DescriptionGenerator.cxx
@@ -130,7 +130,7 @@ void DescriptionGenerator::Initialize (::rtl::OUString sPrefix)
msDescription.append (
OUString(RTL_CONSTASCII_USTRINGPARAM("<no style>")) );
}
- catch (::com::sun::star::beans::UnknownPropertyException)
+ catch (const ::com::sun::star::beans::UnknownPropertyException &)
{
msDescription.append (
OUString(RTL_CONSTASCII_USTRINGPARAM("<unknown>")) );
@@ -291,7 +291,7 @@ void DescriptionGenerator::AddColor (const OUString& sPropertyName,
msDescription.append (lookUpColorName(nValue));
}
- catch (::com::sun::star::beans::UnknownPropertyException)
+ catch (const ::com::sun::star::beans::UnknownPropertyException &)
{
msDescription.append (
OUString(RTL_CONSTASCII_USTRINGPARAM("<unknown>")) );
@@ -317,7 +317,7 @@ void DescriptionGenerator::AddInteger (const OUString& sPropertyName,
msDescription.append (nValue);
}
}
- catch (::com::sun::star::beans::UnknownPropertyException)
+ catch (const ::com::sun::star::beans::UnknownPropertyException &)
{
msDescription.append (
OUString(RTL_CONSTASCII_USTRINGPARAM("<unknown>")) );
@@ -353,7 +353,7 @@ void DescriptionGenerator::AddString (const OUString& sPropertyName,
msDescription.append (sValue);
}
}
- catch (::com::sun::star::beans::UnknownPropertyException)
+ catch (const ::com::sun::star::beans::UnknownPropertyException &)
{
msDescription.append (
OUString(RTL_CONSTASCII_USTRINGPARAM("<unknown>")) );
@@ -440,7 +440,7 @@ void DescriptionGenerator::AddFillStyle (const OUString& sPropertyName,
}
}
}
- catch (::com::sun::star::beans::UnknownPropertyException)
+ catch (const ::com::sun::star::beans::UnknownPropertyException &)
{
msDescription.append (
OUString(RTL_CONSTASCII_USTRINGPARAM("<unknown>")) );
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index b03f921e415b..646bf9bba795 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -3323,9 +3323,8 @@ sal_Bool DbGridControl::SaveRow()
xUpdateCursor->updateRow();
bSuccess = sal_True;
}
- catch(SQLException& e)
+ catch(SQLException&)
{
- (void)e; // make compiler happy
EndCursorAction();
m_bUpdating = sal_False;
return sal_False;
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 33a0c4708c2c..5599ab3564e5 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -578,7 +578,7 @@ basegfx::B2DPolyPolygon SdrObjCustomShape::GetLineGeometry( const SdrObjCustomSh
aRetval = basegfx::tools::adaptiveSubdivideByAngle(aRetval);
}
}
- catch ( const com::sun::star::lang::IllegalArgumentException )
+ catch ( const com::sun::star::lang::IllegalArgumentException & )
{
}
}
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index db0322d0717e..904d590607f4 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -919,9 +919,8 @@ sal_Bool SdrOle2Obj::UpdateLinkURL_Impl()
if ( nCurState != embed::EmbedStates::LOADED )
xObjRef->changeState( nCurState );
}
- catch( ::com::sun::star::uno::Exception& e )
+ catch( ::com::sun::star::uno::Exception& )
{
- (void)e;
OSL_FAIL(
(OString("SdrOle2Obj::UpdateLinkURL_Impl(), "
"exception caught: ") +
@@ -962,9 +961,8 @@ void SdrOle2Obj::BreakFileLink_Impl()
DisconnectFileLink_Impl();
mpImpl->maLinkURL = String();
}
- catch( ::com::sun::star::uno::Exception& e )
+ catch( ::com::sun::star::uno::Exception& )
{
- (void)e;
OSL_FAIL(
(OString("SdrOle2Obj::BreakFileLink_Impl(), "
"exception caught: ") +
@@ -1014,9 +1012,8 @@ void SdrOle2Obj::CheckFileLink_Impl()
}
}
}
- catch( ::com::sun::star::uno::Exception& e )
+ catch( ::com::sun::star::uno::Exception& )
{
- (void)e;
OSL_FAIL(
(OString("SdrOle2Obj::CheckFileLink_Impl(), "
"exception caught: ") +
@@ -1099,9 +1096,8 @@ void SdrOle2Obj::Connect_Impl()
}
}
- catch( ::com::sun::star::uno::Exception& e )
+ catch( ::com::sun::star::uno::Exception& )
{
- (void)e;
OSL_FAIL(
(OString("SdrOle2Obj::Connect_Impl(), "
"exception caught: ") +
@@ -1187,9 +1183,8 @@ void SdrOle2Obj::RemoveListeners_Impl()
}
}
}
- catch( ::com::sun::star::uno::Exception& e )
+ catch( ::com::sun::star::uno::Exception& )
{
- (void)e;
OSL_FAIL(
(OString("SdrOle2Obj::RemoveListeners_Impl(), "
"exception caught: ") +
@@ -1270,9 +1265,8 @@ void SdrOle2Obj::Disconnect_Impl()
GetSdrGlobalData().GetOLEObjCache().RemoveObj(this);
}
}
- catch( ::com::sun::star::uno::Exception& e )
+ catch( ::com::sun::star::uno::Exception& )
{
- (void)e;
OSL_FAIL(
(OString("SdrOle2Obj::Disconnect_Impl(), "
"exception caught: ") +
@@ -1328,9 +1322,8 @@ void SdrOle2Obj::SetModel(SdrModel* pNewModel)
}
DBG_ASSERT( aTmp.getLength(), "Copying embedded object failed!" );
}
- catch( ::com::sun::star::uno::Exception& e )
+ catch( ::com::sun::star::uno::Exception& )
{
- (void)e;
OSL_FAIL(
(OString("SdrOle2Obj::SetModel(), "
"exception caught: ") +
@@ -1886,9 +1879,8 @@ sal_Bool SdrOle2Obj::Unload( const uno::Reference< embed::XEmbeddedObject >& xOb
xObj->changeState( embed::EmbedStates::LOADED );
bResult = sal_True;
}
- catch( ::com::sun::star::uno::Exception& e )
+ catch( ::com::sun::star::uno::Exception& )
{
- (void)e;
OSL_FAIL(
(OString("SdrOle2Obj::Unload=(), "
"exception caught: ") +
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index a7e32f89d85a..6b17f79a6ded 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -609,9 +609,8 @@ void SvxTableController::onInsert( sal_uInt16 nSId, const SfxItemSet* pArgs )
StartSelection( aStart );
UpdateSelection( aEnd );
}
- catch( Exception& e )
+ catch( Exception& )
{
- (void)e;
OSL_FAIL("svx::SvxTableController::onInsert(), exception caught!");
}
}
@@ -900,9 +899,8 @@ void SvxTableController::SetTableStyle( const SfxItemSet* pArgs )
}
}
}
- catch( Exception& e )
+ catch( Exception& )
{
- (void)e;
OSL_FAIL( "svx::SvxTableController::SetTableStyle(), exception caught!" );
}
}
@@ -911,9 +909,8 @@ void SvxTableController::SetTableStyle( const SfxItemSet* pArgs )
pModel->EndUndo();
}
}
- catch( Exception& e )
+ catch( Exception& )
{
- (void)e;
OSL_FAIL( "svx::SvxTableController::SetTableStyle(), exception caught!" );
}
}
@@ -1637,9 +1634,8 @@ void SvxTableController::checkCell( CellPos& rPos )
if( rPos.mnRow >= mxTable->getRowCount() )
rPos.mnRow = mxTable->getRowCount()-1;
}
- catch( Exception& e )
+ catch( Exception& )
{
- (void)e;
OSL_FAIL("sdr::table::SvxTableController::checkCell(), exception caught!" );
}
}
@@ -1656,9 +1652,8 @@ void SvxTableController::findMergeOrigin( CellPos& rPos )
::findMergeOrigin( mxTable, rPos.mnCol, rPos.mnRow, rPos.mnCol, rPos.mnRow );
}
}
- catch( Exception& e )
+ catch( Exception& )
{
- (void)e;
OSL_FAIL("sdr::table::SvxTableController::findMergeOrigin(), exception caught!" );
}
}
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index 65c09b0a523a..6366a49b712f 100644
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -221,7 +221,7 @@ void SvxDrawPage::dispose()
// notify subclasses to do their dispose
disposing();
}
- catch(::com::sun::star::uno::Exception& e)
+ catch(const ::com::sun::star::uno::Exception& e)
{
// catch exception and throw again but signal that
// the object was disposed. Dispose should be called
diff --git a/svx/source/unodraw/unoshcol.cxx b/svx/source/unodraw/unoshcol.cxx
index 8262333d7a4e..868688765e38 100644
--- a/svx/source/unodraw/unoshcol.cxx
+++ b/svx/source/unodraw/unoshcol.cxx
@@ -137,7 +137,7 @@ void SvxShapeCollection::dispose()
// notify subclasses to do their dispose
disposing();
}
- catch(::com::sun::star::uno::Exception& e)
+ catch(const ::com::sun::star::uno::Exception& e)
{
// catch exception and throw again but signal that
// the object was disposed. Dispose should be called
diff --git a/svx/workben/msview/xmlconfig.cxx b/svx/workben/msview/xmlconfig.cxx
index 3504265c134c..a1553718328d 100644
--- a/svx/workben/msview/xmlconfig.cxx
+++ b/svx/workben/msview/xmlconfig.cxx
@@ -339,7 +339,7 @@ void load_config( const OUString& rPath )
// finally, parser the stream
xParser->parseStream( aParserInput );
}
- catch( Exception& r )
+ catch( Exception& )
{
OSL_FAIL(
(rtl::OString("load_config(), "
@@ -347,8 +347,6 @@ void load_config( const OUString& rPath )
rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 )).getStr() );
-
- (void)r;
}
}