summaryrefslogtreecommitdiff
path: root/sw/source/ui/dbui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-07-26 23:49:42 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-07-27 09:23:46 +0100
commit476c2c340d0ee8bfea3d59ea869975107fe05891 (patch)
tree157f08d239c621b0c924f883073853a94d0eecdb /sw/source/ui/dbui
parent6f976916e2ae5dd83838a7f5de273944eb61e7f2 (diff)
catch by const reference
Diffstat (limited to 'sw/source/ui/dbui')
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx8
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx16
-rw-r--r--sw/source/ui/dbui/dbtree.cxx14
-rw-r--r--sw/source/ui/dbui/maildispatcher.cxx4
-rw-r--r--sw/source/ui/dbui/mailmergehelper.cxx4
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx6
-rw-r--r--sw/source/ui/dbui/mmconfigitem.cxx10
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.cxx2
-rw-r--r--sw/source/ui/dbui/mmoutputpage.cxx14
9 files changed, 40 insertions, 38 deletions
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index 95d6c9bb2184..042ac6ba643e 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -263,7 +263,7 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent) :
SWUnoHelper::UCB_IsFile( pUserData->sURL ) && //#i97577#
!SWUnoHelper::UCB_IsReadOnlyFileName( pUserData->sURL );
}
- catch(const uno::Exception& )
+ catch (const uno::Exception&)
{
bEnableOK = sal_False;
}
@@ -345,7 +345,7 @@ IMPL_LINK(SwAddressListDialog, FilterHdl_Impl, PushButton*, EMPTYARG)
}
::comphelper::disposeComponent(xRowSet);
}
- catch(Exception& )
+ catch (const Exception&)
{
OSL_FAIL("exception caught in SwAddressListDialog::FilterHdl_Impl");
}
@@ -448,7 +448,7 @@ IMPL_LINK(SwAddressListDialog, CreateHdl_Impl, PushButton*, pButton)
m_aCreateListPB.Enable(sal_False);
}
- catch(Exception& )
+ catch (const Exception&)
{
}
}
@@ -645,7 +645,7 @@ void SwAddressListDialog::DetectTablesAndQueries(
m_aFilterPB.Enable( pUserData->xConnection.is() && sCommand.Len() );
m_aTablePB.Enable( pUserData->nTableAndQueryCount > 1 );
}
- catch(Exception& )
+ catch (const Exception&)
{
OSL_FAIL("exception caught in SwAddressListDialog::DetectTablesAndQueries");
m_aOK.Enable( sal_False );
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index f50805fabf99..b479d1b7e8bd 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -352,7 +352,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView,
}
pNew->nDBNumFmt = nKey;
}
- catch(const Exception& )
+ catch (const Exception&)
{
OSL_FAIL("illegal number format key");
}
@@ -1097,7 +1097,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
else if(!i)
bBreak = !xResultSet->first();
}
- catch(const Exception& )
+ catch (const Exception&)
{
bBreak = sal_True;
}
@@ -1177,14 +1177,12 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
}
}
}
- catch(Exception&
-#if OSL_DEBUG_LEVEL > 1
- aExcept
-#endif
- )
+ catch (const Exception& rExcept)
{
#if OSL_DEBUG_LEVEL > 1
- OSL_FAIL(ByteString(String(aExcept.Message), gsl_getSystemTextEncoding()).GetBuffer());
+ OSL_FAIL(ByteString(String(rExcept.Message), gsl_getSystemTextEncoding()).GetBuffer());
+#else
+ (void)rExcept;
#endif
}
}
@@ -1299,7 +1297,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
else if(!i)
bBreak = !xResultSet->first();
}
- catch(Exception&)
+ catch (const Exception&)
{
bBreak = sal_True;
}
diff --git a/sw/source/ui/dbui/dbtree.cxx b/sw/source/ui/dbui/dbtree.cxx
index 4af7627b3a6b..ec7294ec1933 100644
--- a/sw/source/ui/dbui/dbtree.cxx
+++ b/sw/source/ui/dbui/dbtree.cxx
@@ -314,8 +314,9 @@ void SwDBTreeList::RequestingChilds(SvLBoxEntry* pParent)
aTable >>= xPropSet;
xColsSupplier = Reference<XColumnsSupplier>(xPropSet, UNO_QUERY);
}
- catch(Exception&)
- {}
+ catch (const Exception&)
+ {
+ }
}
}
else
@@ -332,8 +333,9 @@ void SwDBTreeList::RequestingChilds(SvLBoxEntry* pParent)
aQuery >>= xPropSet;
xColsSupplier = Reference<XColumnsSupplier>(xPropSet, UNO_QUERY);
}
- catch(Exception&)
- {}
+ catch (const Exception&)
+ {
+ }
}
}
@@ -353,7 +355,7 @@ void SwDBTreeList::RequestingChilds(SvLBoxEntry* pParent)
}
}
}
- catch(const Exception&)
+ catch (const Exception&)
{
}
}
@@ -403,7 +405,7 @@ void SwDBTreeList::RequestingChilds(SvLBoxEntry* pParent)
}
}
}
- catch(const Exception&)
+ catch (const Exception&)
{
}
}
diff --git a/sw/source/ui/dbui/maildispatcher.cxx b/sw/source/ui/dbui/maildispatcher.cxx
index ef073f6ebabf..02744b489802 100644
--- a/sw/source/ui/dbui/maildispatcher.cxx
+++ b/sw/source/ui/dbui/maildispatcher.cxx
@@ -232,12 +232,12 @@ void MailDispatcher::sendMailMessageNotifyListener(uno::Reference<mail::XMailMes
MailDispatcherListenerContainer_t listeners_cloned(cloneListener());
std::for_each(listeners_cloned.begin(), listeners_cloned.end(), MailDeliveryNotifier(this, message));
}
- catch (mail::MailException& ex)
+ catch (const mail::MailException& ex)
{
MailDispatcherListenerContainer_t listeners_cloned(cloneListener());
std::for_each(listeners_cloned.begin(), listeners_cloned.end(), MailDeliveryErrorNotifier(this, message, ex.Message));
}
- catch (uno::RuntimeException& ex)
+ catch (const uno::RuntimeException& ex)
{
MailDispatcherListenerContainer_t listeners_cloned(cloneListener());
std::for_each(listeners_cloned.begin(), listeners_cloned.end(), MailDeliveryErrorNotifier(this, message, ex.Message));
diff --git a/sw/source/ui/dbui/mailmergehelper.cxx b/sw/source/ui/dbui/mailmergehelper.cxx
index f0988d0b6a9b..83d4e8d38d35 100644
--- a/sw/source/ui/dbui/mailmergehelper.cxx
+++ b/sw/source/ui/dbui/mailmergehelper.cxx
@@ -173,7 +173,7 @@ uno::Reference< mail::XSmtpService > ConnectToSmtpServer(
xSmtpServer->connect(xConnectionContext, xAuthenticator);
rxInMailService = uno::Reference< mail::XMailService >( xSmtpServer, uno::UNO_QUERY );
}
- catch(uno::Exception& )
+ catch (const uno::Exception&)
{
OSL_FAIL("exception caught");
}
@@ -539,7 +539,7 @@ String SwAddressPreview::FillData(
aItem.sText = sReplace;
}
}
- catch( sdbc::SQLException& )
+ catch (const sdbc::SQLException&)
{
OSL_FAIL("SQLException caught");
}
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 821500a3df17..88c12a3f71fd 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -1057,13 +1057,15 @@ SwAssignFieldsControl::SwAssignFieldsControl(
uno::Reference< XColumn > xColumn;
aCol >>= xColumn;
if(xColumn.is())
+ {
try
{
pNewPreview->SetText(xColumn->getString());
}
- catch(SQLException& )
+ catch (const SQLException&)
{
}
+ }
}
if(!i)
{
@@ -1198,7 +1200,7 @@ IMPL_LINK(SwAssignFieldsControl, MatchHdl_Impl, ListBox*, pBox)
{
sPreview = xColumn->getString();
}
- catch( sdbc::SQLException& )
+ catch (const sdbc::SQLException&)
{
}
}
diff --git a/sw/source/ui/dbui/mmconfigitem.cxx b/sw/source/ui/dbui/mmconfigitem.cxx
index 12195d0e5687..2c1589ede157 100644
--- a/sw/source/ui/dbui/mmconfigitem.cxx
+++ b/sw/source/ui/dbui/mmconfigitem.cxx
@@ -928,7 +928,7 @@ Reference< XResultSet> SwMailMergeConfigItem::GetResultSet() const
xRowProperties->setPropertyValue(C2U("ApplyFilter"), makeAny(m_pImpl->sFilter.getLength()>0));
xRowProperties->setPropertyValue(C2U("Filter"), makeAny(m_pImpl->sFilter));
}
- catch(Exception&)
+ catch (const Exception&)
{
OSL_FAIL("exception caught in xResultSet->SetFilter()");
}
@@ -938,7 +938,7 @@ Reference< XResultSet> SwMailMergeConfigItem::GetResultSet() const
m_pImpl->nResultSetCursorPos = 1;
}
}
- catch(Exception& )
+ catch (const Exception&)
{
OSL_FAIL("exception caught in: SwMailMergeConfigItem::GetResultSet() ");
}
@@ -976,7 +976,7 @@ void SwMailMergeConfigItem::SetFilter(::rtl::OUString& rFilter)
uno::Reference<XRowSet> xRowSet( m_pImpl->xResultSet, UNO_QUERY_THROW );
xRowSet->execute();
}
- catch(Exception&)
+ catch (const Exception&)
{
OSL_FAIL("exception caught in SwMailMergeConfigItem::SetFilter()");
}
@@ -1011,7 +1011,7 @@ sal_Int32 SwMailMergeConfigItem::MoveResultSet(sal_Int32 nTarget)
m_pImpl->nResultSetCursorPos = m_pImpl->xResultSet->getRow();
}
}
- catch(Exception&)
+ catch (const Exception&)
{
}
}
@@ -1031,7 +1031,7 @@ bool SwMailMergeConfigItem::IsResultSetFirstLast(bool& bIsFirst, bool& bIsLast)
bIsLast = m_pImpl->xResultSet->isLast();
bRet = true;
}
- catch(Exception&)
+ catch (const Exception&)
{
}
}
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx
index 6c8ea5282962..dbf9f2b7926c 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -208,7 +208,7 @@ void SwMailMergeGreetingsPage::UpdatePreview()
}
}
}
- catch( sdbc::SQLException& )
+ catch (const sdbc::SQLException&)
{
OSL_FAIL("SQLException caught");
}
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index 374e68f37dce..41b4dc5554c7 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -693,11 +693,11 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton)
{
xStore->storeToURL( sPath, aValues );
}
- catch( task::ErrorCodeIOException& aErrorEx )
+ catch (const task::ErrorCodeIOException& rErrorEx)
{
- nErrorCode = (sal_uInt32)aErrorEx.ErrCode;
+ nErrorCode = (sal_uInt32)rErrorEx.ErrCode;
}
- catch( Exception& )
+ catch (const Exception&)
{
nErrorCode = ERRCODE_IO_GENERAL;
}
@@ -745,11 +745,11 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton)
{
xStore->storeToURL( sTargetTempURL, aValues );
}
- catch( task::ErrorCodeIOException& aErrorEx )
+ catch (const task::ErrorCodeIOException& rErrorEx)
{
- nErrorCode = (sal_uInt32)aErrorEx.ErrCode;
+ nErrorCode = (sal_uInt32)rErrorEx.ErrCode;
}
- catch( Exception& )
+ catch (const Exception&)
{
nErrorCode = ERRCODE_IO_GENERAL;
}
@@ -824,7 +824,7 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton)
uno::Reference< frame::XStorable > xTempStore( xTempDocShell->GetModel(), uno::UNO_QUERY);
xTempStore->storeToURL( sOutPath, aValues );
}
- catch( const uno::Exception& )
+ catch (const uno::Exception&)
{
bFailed = true;
}