summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-11-22 09:06:06 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-11-22 12:46:43 +0000
commited7c80d3353bd21d9c278a209adb4e62669b3978 (patch)
tree68a8c518415b139a44f7ea9efc2e605ecabe859f
parent3679b7651737eba53c3779126246e4f0292570eb (diff)
these can be const
-rw-r--r--sw/source/ui/app/docsh.cxx2
-rwxr-xr-xsw/source/ui/app/docsh2.cxx8
-rw-r--r--sw/source/ui/app/docst.cxx2
-rw-r--r--sw/source/ui/dbui/mailmergechildwindow.cxx5
-rwxr-xr-xsw/source/ui/dochdl/swdtflvr.cxx18
-rw-r--r--sw/source/ui/envelp/labelexp.cxx6
-rw-r--r--sw/source/ui/envelp/mailmrge.cxx4
-rw-r--r--sw/source/ui/fldui/xfldui.cxx10
-rw-r--r--sw/source/ui/index/cntex.cxx4
-rw-r--r--sw/source/ui/lingu/olmenu.cxx4
-rw-r--r--sw/source/ui/misc/glossary.cxx5
-rw-r--r--sw/source/ui/misc/glshell.cxx5
-rw-r--r--sw/source/ui/shells/annotsh.cxx4
-rw-r--r--sw/source/ui/shells/drawsh.cxx2
-rw-r--r--sw/source/ui/shells/drwtxtex.cxx2
-rw-r--r--sw/source/ui/shells/drwtxtsh.cxx2
-rw-r--r--sw/source/ui/shells/frmsh.cxx2
-rw-r--r--sw/source/ui/shells/textsh.cxx4
-rw-r--r--sw/source/ui/shells/textsh1.cxx2
-rw-r--r--sw/source/ui/table/chartins.cxx2
-rw-r--r--sw/source/ui/uiview/swcli.cxx4
-rw-r--r--sw/source/ui/uiview/view2.cxx4
-rw-r--r--sw/source/ui/uiview/viewling.cxx6
-rw-r--r--sw/source/ui/uno/dlelstnr.cxx2
-rw-r--r--sw/source/ui/uno/swdetect.cxx10
-rw-r--r--sw/source/ui/uno/unomailmerge.cxx18
-rw-r--r--sw/source/ui/utlui/swrenamexnameddlg.cxx2
-rw-r--r--sw/source/ui/utlui/unotools.cxx2
-rw-r--r--sw/source/ui/vba/vbadocumentproperties.cxx2
-rw-r--r--sw/source/ui/vba/vbaheaderfooterhelper.cxx4
-rw-r--r--sw/source/ui/vba/vbarange.cxx2
-rw-r--r--sw/source/ui/vba/vbarangehelper.cxx8
-rw-r--r--sw/source/ui/vba/wordvbahelper.cxx2
-rw-r--r--sw/source/ui/wrtsh/wrtsh1.cxx13
34 files changed, 91 insertions, 81 deletions
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index d7ee0192ef45..d37194697ad0 100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -669,7 +669,7 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium )
if ( xSet.is() )
xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")), uno::makeAny( ::rtl::OUString( SotExchange::GetFormatMimeType( nSaveClipId ) ) ) );
}
- catch ( uno::Exception& )
+ catch (const uno::Exception&)
{
}
}
diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx
index a0481d19c069..71827e6f860d 100755
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
@@ -835,7 +835,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
{
xFltMgr->setCurrentFilter( pOwnFlt->GetUIName() );
}
- catch( const uno::Exception& )
+ catch (const uno::Exception&)
{
bError = true;
}
@@ -1250,7 +1250,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
{
xFltMgr->setCurrentFilter( pFlt->GetUIName() ) ;
}
- catch( const uno::Exception& )
+ catch (const uno::Exception&)
{
bError = true;
}
@@ -1310,7 +1310,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
xCtrlAcc->setLabel( ExtendedFilePickerElementIds::LISTBOX_TEMPLATE,
String(SW_RES( STR_FDLG_TEMPLATE_NAME )));
}
- catch(Exception& )
+ catch (const Exception&)
{
OSL_FAIL("control acces failed");
}
@@ -1730,7 +1730,7 @@ sal_uLong SwDocShell::LoadStylesFromFile( const String& rURL,
xProps->getPropertyValue( aMediaTypePropName );
bImport = true;
}
- catch( const uno::Exception& )
+ catch (const uno::Exception&)
{
bImport = false;
}
diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx
index 8455a400945c..0ac3b7e8fdf2 100644
--- a/sw/source/ui/app/docst.cxx
+++ b/sw/source/ui/app/docst.cxx
@@ -326,7 +326,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
if ( aUIName.getLength() )
rReq.AppendItem( SfxStringItem( SID_STYLE_APPLY, aUIName ) );
}
- catch( uno::Exception& )
+ catch (const uno::Exception&)
{
}
}
diff --git a/sw/source/ui/dbui/mailmergechildwindow.cxx b/sw/source/ui/dbui/mailmergechildwindow.cxx
index 089ccbff6666..436ceff2c0b5 100644
--- a/sw/source/ui/dbui/mailmergechildwindow.cxx
+++ b/sw/source/ui/dbui/mailmergechildwindow.cxx
@@ -247,9 +247,8 @@ void SwMailDispatcherListener_Impl::DeleteAttachments( uno::Reference< mail::XMa
SWUnoHelper::UCB_DeleteFile( sURL );
}
}
- catch( const uno::Exception& rEx )
+ catch (const uno::Exception&)
{
- (void)rEx;
}
}
}
@@ -396,7 +395,7 @@ SwSendMailDialog::~SwSendMailDialog()
xMessage = m_pImpl->xMailDispatcher->dequeueMailMessage();
}
}
- catch(const uno::Exception&)
+ catch (const uno::Exception&)
{
}
}
diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx
index 42229494864d..1212d9c14c8b 100755
--- a/sw/source/ui/dochdl/swdtflvr.cxx
+++ b/sw/source/ui/dochdl/swdtflvr.cxx
@@ -674,8 +674,9 @@ sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& xStream,
xWorkStore = uno::Reference < embed::XStorage >();
xStream->Commit();
}
- catch ( uno::Exception& )
- {}
+ catch (const uno::Exception&)
+ {
+ }
bRet = ( xStream->GetError() == ERRCODE_NONE );
}
@@ -1698,14 +1699,14 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
xComp->dispose();
xStore = 0;
}
- catch ( uno::Exception& )
+ catch (const uno::Exception&)
{
}
break;
}
}
- catch ( uno::Exception& )
+ catch (const uno::Exception&)
{
// it wasn't a storage, but maybe it's a useful stream
}
@@ -1764,8 +1765,9 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
// for example whether the object should be an iconified one
xObj = aInfo.Object;
}
- catch( uno::Exception& )
- {}
+ catch (const uno::Exception&)
+ {
+ }
}
}
}
@@ -1823,7 +1825,7 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
{
aSz = xObj->getVisualAreaSize( aObjDesc.mnViewAspect );
}
- catch( embed::NoVisualAreaSizeException& )
+ catch (const embed::NoVisualAreaSizeException&)
{
// in this case the provided size is used
}
@@ -1844,7 +1846,7 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
{
xObj->getVisualAreaSize( aObjDesc.mnViewAspect );
}
- catch( uno::Exception& )
+ catch (const uno::Exception&)
{
}
}
diff --git a/sw/source/ui/envelp/labelexp.cxx b/sw/source/ui/envelp/labelexp.cxx
index 5e8bef108bb9..81246687a8c5 100644
--- a/sw/source/ui/envelp/labelexp.cxx
+++ b/sw/source/ui/envelp/labelexp.cxx
@@ -94,7 +94,7 @@ void SwVisitingCardPage::InitFrameControl()
aAutoTextGroupLB.SetEntryData(nEntry, new String(sGroup));
}
}
- catch(Exception&)
+ catch (const Exception&)
{
}
}
@@ -117,7 +117,7 @@ void SwVisitingCardPage::InitFrameControl()
SetUserData( aBlockNames.getLength(), aTitles.getConstArray(),
aBlockNames.getConstArray() );
}
- catch( uno::RuntimeException& )
+ catch (const uno::RuntimeException&)
{
// we'll be her if path settings were wrong
}
@@ -258,7 +258,7 @@ void SwLabDlg::UpdateFieldInformation(uno::Reference< frame::XModel > & xModel,
}
}
}
- catch( uno::RuntimeException&)
+ catch (const uno::RuntimeException&)
{
//
}
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx
index 90ee8072086e..6b774ce2ce81 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -292,7 +292,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
xFrame->initialize( VCLUnoHelper::GetInterface ( pBeamerWin ) );
}
}
- catch (Exception&)
+ catch (const Exception&)
{
xFrame.clear();
}
@@ -464,7 +464,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
}
aFilterLB.SelectEntryPos( nODT );
}
- catch( const uno::Exception& )
+ catch (const uno::Exception&)
{
}
}
diff --git a/sw/source/ui/fldui/xfldui.cxx b/sw/source/ui/fldui/xfldui.cxx
index 14b193eeb5df..c35dfe6c85ae 100644
--- a/sw/source/ui/fldui/xfldui.cxx
+++ b/sw/source/ui/fldui/xfldui.cxx
@@ -97,7 +97,9 @@ sal_Bool SwFldMgr::IsDBNumeric( const String& rDBName, const String& rTblQryName
aTable >>= xPropSet;
xColsSupplier = Reference<XColumnsSupplier>(xPropSet, UNO_QUERY);
}
- catch(Exception&){}
+ catch (const Exception&)
+ {
+ }
}
}
else
@@ -114,7 +116,9 @@ sal_Bool SwFldMgr::IsDBNumeric( const String& rDBName, const String& rTblQryName
aQuery >>= xPropSet;
xColsSupplier = Reference<XColumnsSupplier>(xPropSet, UNO_QUERY);
}
- catch(Exception&){}
+ catch (const Exception&)
+ {
+ }
}
}
@@ -125,7 +129,7 @@ sal_Bool SwFldMgr::IsDBNumeric( const String& rDBName, const String& rTblQryName
{
xCols = xColsSupplier->getColumns();
}
- catch(Exception& )
+ catch (const Exception&)
{
OSL_FAIL("Exception in getColumns()");
}
diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx
index b5c595b31d5e..760316c387f4 100644
--- a/sw/source/ui/index/cntex.cxx
+++ b/sw/source/ui/index/cntex.cxx
@@ -176,7 +176,7 @@ IMPL_LINK( SwMultiTOXTabDialog, CreateExample_Hdl, void*, EMPTYARG )
}
CreateOrUpdateExample(eCurrentTOXType.eType);
}
- catch(Exception&)
+ catch (const Exception&)
{
OSL_FAIL("::CreateExample() - exception caught");
}
@@ -470,7 +470,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample(
pxIndexSectionsArr[nTOXIndex]->xDocumentIndex->update();
}
- catch(Exception&)
+ catch (const Exception&)
{
OSL_FAIL("::CreateExample() - exception caught");
}
diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx
index 7133237583c1..6d8599eab662 100644
--- a/sw/source/ui/lingu/olmenu.cxx
+++ b/sw/source/ui/lingu/olmenu.cxx
@@ -373,7 +373,7 @@ OUString RetrieveLabelFromCommand( const OUString& aCmdURL )
aLabel = aStr;
}
}
- catch ( uno::Exception& )
+ catch (const uno::Exception&)
{
}
}
@@ -853,7 +853,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId )
xSystemShellExecute->execute( sExplanationLink, rtl::OUString(),
com::sun::star::system::SystemShellExecuteFlags::DEFAULTS );
}
- catch ( uno::Exception& )
+ catch (const uno::Exception&)
{
uno::Any exc( ::cppu::getCaughtException() );
rtl::OUString msg( ::comphelper::anyToString( exc ) );
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 683c3bbee8b4..5e33c257d585 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -687,8 +687,9 @@ IMPL_LINK( SwGlossaryDlg, BibHdl, Button *, EMPTYARG )
bIsWritable = !*(sal_Bool*)aAny.getValue();
}
}
- catch(Exception&)
- {}
+ catch (const Exception&)
+ {
+ }
if(bIsWritable)
break;
}
diff --git a/sw/source/ui/misc/glshell.cxx b/sw/source/ui/misc/glshell.cxx
index 7323737033b7..2dad9aa4b169 100644
--- a/sw/source/ui/misc/glshell.cxx
+++ b/sw/source/ui/misc/glshell.cxx
@@ -272,8 +272,9 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rS
uno::Reference< frame::XTitle > xTitle( xDocSh->GetModel(), uno::UNO_QUERY_THROW );
xTitle->setTitle( aDocTitle );
}
- catch( uno::Exception& )
- {}
+ catch (const uno::Exception&)
+ {
+ }
xDocSh->GetDoc()->GetIDocumentUndoRedo().DoUndo( bDoesUndo );
xDocSh->GetDoc()->ResetModified();
diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx
index 6aada30c4655..58537427fbaa 100644
--- a/sw/source/ui/shells/annotsh.cxx
+++ b/sw/source/ui/shells/annotsh.cxx
@@ -404,7 +404,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
xDialog->execute();
}
}
- catch( uno::Exception& )
+ catch (const uno::Exception&)
{
}
rReq.Ignore ();
@@ -1178,7 +1178,7 @@ void SwAnnotationShell::ExecLingu(SfxRequest &rReq)
xProp->getPropertyValue( C2U("IsUseCharacterVariants") ) >>= bUseVariants;
xProp->getPropertyValue( C2U("IsTranslateCommonTerms") ) >>= bCommonTerms;
}
- catch( Exception& )
+ catch (const Exception&)
{
}
}
diff --git a/sw/source/ui/shells/drawsh.cxx b/sw/source/ui/shells/drawsh.cxx
index 56e0a42515e7..99c9ab25fa7b 100644
--- a/sw/source/ui/shells/drawsh.cxx
+++ b/sw/source/ui/shells/drawsh.cxx
@@ -225,7 +225,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
xDialog->execute();
}
}
- catch( uno::Exception& )
+ catch (const uno::Exception&)
{
}
rReq.Ignore ();
diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx
index dcbdd6f5f5d2..a73a2f91615e 100644
--- a/sw/source/ui/shells/drwtxtex.cxx
+++ b/sw/source/ui/shells/drwtxtex.cxx
@@ -339,7 +339,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
xDialog->execute();
}
}
- catch( uno::Exception& )
+ catch (const uno::Exception&)
{
}
rReq.Ignore ();
diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx
index 399c3271ff4c..b9328acdab06 100644
--- a/sw/source/ui/shells/drwtxtsh.cxx
+++ b/sw/source/ui/shells/drwtxtsh.cxx
@@ -371,7 +371,7 @@ void SwDrawTextShell::ExecDrawLingu(SfxRequest &rReq)
xProp->getPropertyValue( C2U("IsUseCharacterVariants") ) >>= bUseVariants;
xProp->getPropertyValue( C2U("IsTranslateCommonTerms") ) >>= bCommonTerms;
}
- catch( Exception& )
+ catch (const Exception&)
{
}
}
diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx
index 12efea78a63d..362812e279ec 100644
--- a/sw/source/ui/shells/frmsh.cxx
+++ b/sw/source/ui/shells/frmsh.cxx
@@ -412,7 +412,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
xDialog->execute();
}
}
- catch( uno::Exception& )
+ catch (const uno::Exception&)
{
}
rReq.Ignore ();
diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx
index f379a6118d38..2f83f7b3fb98 100644
--- a/sw/source/ui/shells/textsh.cxx
+++ b/sw/source/ui/shells/textsh.cxx
@@ -317,7 +317,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginCommands")), uno::makeAny( aSeq ) );
}
}
- catch ( uno::Exception& )
+ catch (const uno::Exception&)
{
}
}
@@ -388,7 +388,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
uno::makeAny( sal_Int32( aMargin.Height() ) ) );
}
}
- catch ( uno::Exception& )
+ catch (const uno::Exception&)
{
}
}
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index aeda86e135e7..1d77ed5c09ce 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -1260,7 +1260,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
xDialog->execute();
}
}
- catch( uno::Exception& )
+ catch (const uno::Exception&)
{
}
rReq.Ignore ();
diff --git a/sw/source/ui/table/chartins.cxx b/sw/source/ui/table/chartins.cxx
index ba251cd045b9..44833d24aeb0 100644
--- a/sw/source/ui/table/chartins.cxx
+++ b/sw/source/ui/table/chartins.cxx
@@ -240,7 +240,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings )
}
}
}
- catch( uno::Exception& )
+ catch (const uno::Exception&)
{
OSL_FAIL("Chart wizard couldn't be positioned automatically\n" );
}
diff --git a/sw/source/ui/uiview/swcli.cxx b/sw/source/ui/uiview/swcli.cxx
index 7fc94e550c7d..2e2c6c04ddf2 100644
--- a/sw/source/ui/uiview/swcli.cxx
+++ b/sw/source/ui/uiview/swcli.cxx
@@ -130,11 +130,11 @@ void SwOleClient::ViewChanged()
{
aSz = GetObject()->getVisualAreaSize( GetAspect() );
}
- catch( embed::NoVisualAreaSizeException& )
+ catch (const embed::NoVisualAreaSizeException&)
{
// Nothing will be done
}
- catch( uno::Exception& )
+ catch (const uno::Exception&)
{
// this is an error
OSL_FAIL( "Something goes wrong on requesting object size!\n" );
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index e986f69b7059..2b3ace2b4f1e 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -318,7 +318,7 @@ sal_Bool SwView::InsertGraphicDlg( SfxRequest& rReq )
xCtrlAcc->setValue( ExtendedFilePickerElementIds::LISTBOX_IMAGE_TEMPLATE,
ListboxControlActions::SET_SELECT_ITEM, aSelectPos );
}
- catch(Exception& )
+ catch (const Exception&)
{
OSL_FAIL("control acces failed");
}
@@ -360,7 +360,7 @@ sal_Bool SwView::InsertGraphicDlg( SfxRequest& rReq )
aTemplateValue >>= sTmpl;
rReq.AppendItem( SfxStringItem( FN_PARAM_2, sTmpl) );
}
- catch(Exception& )
+ catch (const Exception&)
{
OSL_FAIL("control access failed");
}
diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx
index c537a3ae43fb..77eca57e7d57 100644
--- a/sw/source/ui/uiview/viewling.cxx
+++ b/sw/source/ui/uiview/viewling.cxx
@@ -171,7 +171,7 @@ void SwView::ExecLingu(SfxRequest &rReq)
xProp->getPropertyValue( C2U("IsUseCharacterVariants") ) >>= bUseVariants;
xProp->getPropertyValue( C2U("IsTranslateCommonTerms") ) >>= bCommonTerms;
}
- catch( Exception& )
+ catch (const Exception&)
{
}
}
@@ -654,7 +654,7 @@ IMPL_STATIC_LINK_NOINSTANCE( AsyncExecute, ExecuteHdl_Impl, ExecuteInfo*, pExecu
// elements if a component gets detached from its frame!
pExecuteInfo->xDispatch->dispatch( pExecuteInfo->aTargetURL, pExecuteInfo->aArgs );
}
- catch ( Exception& )
+ catch (const Exception&)
{
}
@@ -790,7 +790,7 @@ sal_Bool SwView::ExecSpellPopup(const Point& rPt)
Application::PostUserEvent( STATIC_LINK(0, AsyncExecute , ExecuteHdl_Impl), pExecuteInfo );
}
}
- catch (Exception &)
+ catch (const Exception&)
{
}
}
diff --git a/sw/source/ui/uno/dlelstnr.cxx b/sw/source/ui/uno/dlelstnr.cxx
index 374abaa693fa..ce9d963e7932 100644
--- a/sw/source/ui/uno/dlelstnr.cxx
+++ b/sw/source/ui/uno/dlelstnr.cxx
@@ -83,7 +83,7 @@ SwLinguServiceEventListener::SwLinguServiceEventListener()
xBC->addLinguServiceEventListener( (XLinguServiceEventListener *) this );
}
}
- catch (uno::Exception &)
+ catch (const uno::Exception&)
{
OSL_FAIL("exception caught in SwLinguServiceEventListener c-tor" );
}
diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx
index c95900fb928b..c9dabe8a44a4 100644
--- a/sw/source/ui/uno/swdetect.cxx
+++ b/sw/source/ui/uno/swdetect.cxx
@@ -224,7 +224,9 @@ SwFilterDetect::~SwFilterDetect()
ucbhelper::CONTINUATION_APPROVE ) );
xInteraction->handle( xRequest );
}
- catch ( Exception & ) {};
+ catch (const Exception&)
+ {
+ }
}
}
else
@@ -247,7 +249,7 @@ SwFilterDetect::~SwFilterDetect()
aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pPreFilter ? pPreFilter->IsOwnTemplateFormat() : sal_False, &aFilterName );
}
- catch( lang::WrappedTargetException& aWrap )
+ catch (const lang::WrappedTargetException& aWrap)
{
packages::zip::ZipIOException aZipException;
@@ -297,11 +299,11 @@ SwFilterDetect::~SwFilterDetect()
}
}
}
- catch( uno::RuntimeException& )
+ catch (const uno::RuntimeException&)
{
throw;
}
- catch( uno::Exception& )
+ catch (const uno::Exception&)
{
aTypeName.Erase();
aPreselectedFilterName.Erase();
diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx
index 1a1b5b0ef4b5..0b0fc022b11f 100644
--- a/sw/source/ui/uno/unomailmerge.cxx
+++ b/sw/source/ui/uno/unomailmerge.cxx
@@ -134,13 +134,13 @@ static CloseResult CloseModelAndDocSh(
//! I.e. now that object is responsible for closing the model and doc shell.
xClose->close( sal_True );
}
- catch (util::CloseVetoException &)
+ catch (const util::CloseVetoException&)
{
//! here we have the problem that the temporary file that is
//! currently being printed will never be deleted. :-(
eResult = eVetoed;
}
- catch ( const uno::RuntimeException& )
+ catch (const uno::RuntimeException&)
{
eResult = eFailed;
}
@@ -170,7 +170,7 @@ static sal_Bool LoadFromURL_impl(
xTmpModel = Reference < XModel >( xDesktop->loadComponentFromURL(
rURL, C2U("_blank"), 0, aArgs ), UNO_QUERY );
}
- catch( Exception & )
+ catch (const Exception&)
{
return sal_False;
}
@@ -260,7 +260,7 @@ namespace
OSL_FAIL("DelayedFileDeletion::DelayedFileDeletion: model is no component!" );
}
}
- catch( const Exception& )
+ catch (const Exception&)
{
OSL_FAIL("DelayedFileDeletion::DelayedFileDeletion: could not register as event listener at the model!" );
}
@@ -281,7 +281,7 @@ namespace
m_xDocument->close( bDeliverOwnership );
bSuccess = sal_True;
}
- catch( const util::CloseVetoException& )
+ catch (const util::CloseVetoException&)
{
// somebody vetoed -> next try
if ( m_nPendingDeleteAttempts )
@@ -293,7 +293,7 @@ namespace
else
bSuccess = sal_True; // can't do anything here ...
}
- catch( const Exception& )
+ catch (const Exception&)
{
OSL_FAIL("DelayedFileDeletion::OnTryDeleteFile: caught a strange exception!" );
bSuccess = sal_True;
@@ -317,7 +317,7 @@ namespace
{
m_xDocument->removeCloseListener( this );
}
- catch( const Exception & )
+ catch (const Exception&)
{
OSL_FAIL("DelayedFileDeletion::implTakeOwnership: could not revoke the listener!" );
}
@@ -599,7 +599,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
if ( bEverythingsFine )
bValid = sal_True;
}
- catch( const Exception& )
+ catch (const Exception&)
{
bValid = sal_False;
}
@@ -805,7 +805,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
xStorable->storeAsURL( aTmpFileName, Sequence< PropertyValue >() );
bStoredAsTemporary = sal_True;
}
- catch( const Exception& )
+ catch (const Exception&)
{
}
}
diff --git a/sw/source/ui/utlui/swrenamexnameddlg.cxx b/sw/source/ui/utlui/swrenamexnameddlg.cxx
index 143f3ca94789..e21739868644 100644
--- a/sw/source/ui/utlui/swrenamexnameddlg.cxx
+++ b/sw/source/ui/utlui/swrenamexnameddlg.cxx
@@ -103,7 +103,7 @@ IMPL_LINK(SwRenameXNamedDlg, OkHdl, OKButton*, EMPTYARG)
{
xNamed->setName(aNewNameED.GetText());
}
- catch(uno::RuntimeException&)
+ catch (const uno::RuntimeException&)
{
OSL_FAIL("name wasn't changed");
}
diff --git a/sw/source/ui/utlui/unotools.cxx b/sw/source/ui/utlui/unotools.cxx
index cbefd877ee42..feaf45f75c2f 100644
--- a/sw/source/ui/utlui/unotools.cxx
+++ b/sw/source/ui/utlui/unotools.cxx
@@ -206,7 +206,7 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer )
if ( xLayoutManager.is() )
xLayoutManager->setVisible( sal_False );
}
- catch ( uno::Exception& )
+ catch (const uno::Exception&)
{
}
}
diff --git a/sw/source/ui/vba/vbadocumentproperties.cxx b/sw/source/ui/vba/vbadocumentproperties.cxx
index 963fca41fb7d..c0f12b3c7a96 100644
--- a/sw/source/ui/vba/vbadocumentproperties.cxx
+++ b/sw/source/ui/vba/vbadocumentproperties.cxx
@@ -138,7 +138,7 @@ public:
// the model ( and addtionally these also update the statics object )
return mxModelProps->getPropertyValue( rPropName );
}
- catch( uno::Exception& )
+ catch (const uno::Exception&)
{
OSL_TRACE("Got exception");
}
diff --git a/sw/source/ui/vba/vbaheaderfooterhelper.cxx b/sw/source/ui/vba/vbaheaderfooterhelper.cxx
index c1d04f6369a9..2f7ee3f20959 100644
--- a/sw/source/ui/vba/vbaheaderfooterhelper.cxx
+++ b/sw/source/ui/vba/vbaheaderfooterhelper.cxx
@@ -87,7 +87,7 @@ sal_Bool HeaderFooterHelper::isHeader( const uno::Reference< frame::XModel >& xM
if( xTRC->compareRegionStarts( xTR1, xTR2 ) == 0 )
return sal_True;
}
- catch( lang::IllegalArgumentException& )
+ catch (const lang::IllegalArgumentException&)
{
return sal_False;
}
@@ -153,7 +153,7 @@ sal_Bool HeaderFooterHelper::isFooter( const uno::Reference< frame::XModel >& xM
if( xTRC->compareRegionStarts( xTR1, xTR2 ) == 0 )
return sal_True;
}
- catch( lang::IllegalArgumentException& )
+ catch (const lang::IllegalArgumentException&)
{
return sal_False;
}
diff --git a/sw/source/ui/vba/vbarange.cxx b/sw/source/ui/vba/vbarange.cxx
index f58f7ab89be3..0f514004f375 100644
--- a/sw/source/ui/vba/vbarange.cxx
+++ b/sw/source/ui/vba/vbarange.cxx
@@ -147,7 +147,7 @@ SwVbaRange::setText( const rtl::OUString& rText ) throw ( uno::RuntimeException
sName = xNamed->getName();
}
}
- catch( uno::Exception& )
+ catch (const uno::Exception&)
{
// do nothing
}
diff --git a/sw/source/ui/vba/vbarangehelper.cxx b/sw/source/ui/vba/vbarangehelper.cxx
index 8e4d1f348e02..871ed4ce42e0 100644
--- a/sw/source/ui/vba/vbarangehelper.cxx
+++ b/sw/source/ui/vba/vbarangehelper.cxx
@@ -108,7 +108,7 @@ uno::Reference< text::XTextCursor > SwVbaRangeHelper::initCursor( const uno::Ref
xTextCursor = rText->createTextCursorByRange( rTextRange );
bGotTextCursor = sal_True;
}
- catch (uno::Exception& e)
+ catch (const uno::Exception& e)
{
DebugHelper::exception(e);
}
@@ -121,7 +121,7 @@ uno::Reference< text::XTextCursor > SwVbaRangeHelper::initCursor( const uno::Ref
xTextCursor = xText->createTextCursor();
bGotTextCursor = sal_True;
}
- catch( uno::Exception& e )
+ catch (const uno::Exception& e)
{
DebugHelper::exception(e);
}
@@ -134,7 +134,7 @@ uno::Reference< text::XTextCursor > SwVbaRangeHelper::initCursor( const uno::Ref
xTextCursor = rText->createTextCursor();
bGotTextCursor = sal_True;
}
- catch( uno::Exception& e )
+ catch (const uno::Exception& e)
{
DebugHelper::exception(e);
}
@@ -188,7 +188,7 @@ uno::Reference< text::XTextContent > SwVbaRangeHelper::findBookmarkByPosition( c
if( xCompare->compareRegionStarts( xTextRange, xBkAnchor->getStart() ) == 0 )
return xBookmark;
}
- catch( uno::Exception& )
+ catch (const uno::Exception&)
{
continue;
}
diff --git a/sw/source/ui/vba/wordvbahelper.cxx b/sw/source/ui/vba/wordvbahelper.cxx
index fa1f5092c88d..6981c1d79e36 100644
--- a/sw/source/ui/vba/wordvbahelper.cxx
+++ b/sw/source/ui/vba/wordvbahelper.cxx
@@ -155,7 +155,7 @@ uno::Reference< text::XText > getCurrentXText( const uno::Reference< frame::XMod
{
xText.set( xTextRange->getText(), uno::UNO_QUERY );
}
- catch( uno::RuntimeException& )
+ catch (const uno::RuntimeException&)
{
//catch exception "no text selection"
}
diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx
index 07a926dc2dd6..409500b399bb 100644
--- a/sw/source/ui/wrtsh/wrtsh1.cxx
+++ b/sw/source/ui/wrtsh/wrtsh1.cxx
@@ -517,7 +517,7 @@ sal_Bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyF
xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Formula")), uno::makeAny( ::rtl::OUString( aMathData ) ) );
bActivate = sal_False;
}
- catch ( uno::Exception& )
+ catch (const uno::Exception&)
{
}
}
@@ -648,8 +648,9 @@ void SwWrtShell::MoveObjectIfActive( svt::EmbeddedObjectRef& xObj, const Point&
}
}
}
- catch( uno::Exception& )
- {}
+ catch (const uno::Exception&)
+ {
+ }
}
@@ -728,7 +729,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
bLinkingChart = ( xChartDocument.is() && !xChartDocument->hasInternalDataProvider() );
}
}
- catch ( uno::Exception& )
+ catch (const uno::Exception&)
{
// TODO/LATER: handle the error
return;
@@ -759,12 +760,12 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
{
aSize = xObj->getVisualAreaSize( nAspect );
}
- catch( embed::NoVisualAreaSizeException& )
+ catch (const embed::NoVisualAreaSizeException&)
{
OSL_FAIL("Can't get visual area size!\n" );
// the scaling will not be done
}
- catch( uno::Exception& )
+ catch (const uno::Exception&)
{
// TODO/LATER: handle the error
OSL_FAIL("Can't get visual area size!\n" );