summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2011-12-11 18:51:50 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2011-12-12 10:05:25 +0900
commit75b835c8cd2953c5bc0f23df300ee553f94eb28d (patch)
tree753bf89fdc56cd3df9842adc7962b0965090cf44 /forms
parentf00172b81c8bab0b1c62cbca1bc14b83deed8806 (diff)
catch exception by constant reference
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/CheckBox.cxx2
-rw-r--r--forms/source/component/ComboBox.cxx4
-rw-r--r--forms/source/component/Currency.cxx4
-rw-r--r--forms/source/component/Date.cxx4
-rw-r--r--forms/source/component/FormComponent.cxx4
-rw-r--r--forms/source/component/FormattedField.cxx8
-rw-r--r--forms/source/component/ImageControl.cxx2
-rw-r--r--forms/source/component/ListBox.cxx4
-rw-r--r--forms/source/component/Numeric.cxx2
-rw-r--r--forms/source/component/RadioButton.cxx2
-rw-r--r--forms/source/component/Time.cxx4
-rw-r--r--forms/source/misc/InterfaceContainer.cxx7
-rw-r--r--forms/source/runtime/formoperations.cxx2
-rw-r--r--forms/source/xforms/propertysetbase.cxx2
-rw-r--r--forms/source/xforms/submission/replace.cxx2
-rw-r--r--forms/source/xforms/submission/submission_get.cxx4
-rw-r--r--forms/source/xforms/submission/submission_post.cxx4
-rw-r--r--forms/source/xforms/submission/submission_put.cxx2
-rw-r--r--forms/source/xforms/xpathlib/xpathlib.cxx4
19 files changed, 33 insertions, 34 deletions
diff --git a/forms/source/component/CheckBox.cxx b/forms/source/component/CheckBox.cxx
index 989a4cbd9870..b0dd35f947d4 100644
--- a/forms/source/component/CheckBox.cxx
+++ b/forms/source/component/CheckBox.cxx
@@ -258,7 +258,7 @@ sal_Bool OCheckBoxModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
OSL_FAIL("OCheckBoxModel::commitControlValueToDbColumn: invalid value !");
}
}
- catch(Exception&)
+ catch(const Exception&)
{
OSL_FAIL("OCheckBoxModel::commitControlValueToDbColumn: could not commit !");
}
diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx
index eadf1a8fc3f9..6224c5b6f831 100644
--- a/forms/source/component/ComboBox.cxx
+++ b/forms/source/component/ComboBox.cxx
@@ -598,7 +598,7 @@ void OComboBoxModel::loadData( bool _bForce )
xListCursor.reset( m_aListRowSet.execute() );
}
}
- catch(SQLException& eSQL)
+ catch(const SQLException& eSQL)
{
onError(eSQL, FRM_RES_STRING(RID_BASELISTBOX_ERROR_FILLLIST));
return;
@@ -670,7 +670,7 @@ void OComboBoxModel::loadData( bool _bForce )
break;
}
}
- catch(SQLException& eSQL)
+ catch(const SQLException& eSQL)
{
onError(eSQL, FRM_RES_STRING(RID_BASELISTBOX_ERROR_FILLLIST));
return;
diff --git a/forms/source/component/Currency.cxx b/forms/source/component/Currency.cxx
index 6589564e9a09..180c98556abe 100644
--- a/forms/source/component/Currency.cxx
+++ b/forms/source/component/Currency.cxx
@@ -133,7 +133,7 @@ void OCurrencyModel::implConstruct()
m_xAggregateSet->setPropertyValue(PROPERTY_CURRSYM_POSITION, makeAny(bPrependCurrencySymbol));
}
}
- catch(Exception&)
+ catch(const Exception&)
{
OSL_FAIL( "OCurrencyModel::implConstruct: caught an exception while initializing the aggregate!" );
}
@@ -224,7 +224,7 @@ sal_Bool OCurrencyModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
{
m_xColumnUpdate->updateDouble( getDouble( aControlValue ) );
}
- catch(Exception&)
+ catch(const Exception&)
{
return sal_False;
}
diff --git a/forms/source/component/Date.cxx b/forms/source/component/Date.cxx
index 5230c738a718..bdbaefa2148a 100644
--- a/forms/source/component/Date.cxx
+++ b/forms/source/component/Date.cxx
@@ -236,7 +236,7 @@ void ODateModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm )
xField->getPropertyValue(PROPERTY_FIELDTYPE) >>= nFieldType;
m_bDateTimeField = (nFieldType == DataType::TIMESTAMP);
}
- catch(Exception&)
+ catch(const Exception&)
{
}
}
@@ -273,7 +273,7 @@ sal_Bool ODateModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
m_xColumnUpdate->updateTimestamp( aDateTime );
}
}
- catch(Exception&)
+ catch(const Exception&)
{
return sal_False;
}
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index 86effb27a13c..3c3e13b00c9e 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -2068,7 +2068,7 @@ sal_Bool SAL_CALL OBoundControlModel::commit() throw(RuntimeException)
if ( m_xColumnUpdate.is() )
bSuccess = commitControlValueToDbColumn( sal_False );
}
- catch(Exception&)
+ catch(const Exception&)
{
bSuccess = sal_False;
}
@@ -2527,7 +2527,7 @@ void OBoundControlModel::reset() throw (RuntimeException)
bIsNull = m_xColumn->wasNull();
}
- catch(Exception&)
+ catch(const Exception&)
{
OSL_FAIL("OBoundControlModel::reset: this should have succeeded in all cases!");
}
diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx
index 392c24aa82a1..5a572cb1041d 100644
--- a/forms/source/component/FormattedField.cxx
+++ b/forms/source/component/FormattedField.cxx
@@ -589,7 +589,7 @@ void OFormattedModel::_propertyChanged( const com::sun::star::beans::PropertyCha
calculateExternalValueType();
}
}
- catch(Exception&)
+ catch(const Exception&)
{
}
}
@@ -888,7 +888,7 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
Any aEffectiveValue;
if (m_xAggregateSet.is())
{
- try { aEffectiveValue = m_xAggregateSet->getPropertyValue(PROPERTY_EFFECTIVE_VALUE); } catch(Exception&) { }
+ try { aEffectiveValue = m_xAggregateSet->getPropertyValue(PROPERTY_EFFECTIVE_VALUE); } catch(const Exception&) { }
}
{
@@ -987,7 +987,7 @@ void OFormattedModel::read(const Reference<XObjectInputStream>& _rxInStream) thr
{
m_xAggregateSet->setPropertyValue(PROPERTY_EFFECTIVE_VALUE, aEffectiveValue);
}
- catch(Exception&)
+ catch(const Exception&)
{
}
}
@@ -1049,7 +1049,7 @@ sal_Bool OFormattedModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
m_xColumnUpdate->updateString( getString( aControlValue ) );
}
}
- catch(Exception&)
+ catch(const Exception&)
{
return sal_False;
}
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index 94ffd29b540c..611527690671 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -871,7 +871,7 @@ bool OImageControlControl::implInsertGraphics()
return true;
}
}
- catch(Exception&)
+ catch(const Exception&)
{
OSL_FAIL("OImageControlControl::implInsertGraphics: caught an exception while attempting to execute the FilePicker!");
}
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index d982e50576fd..c0b00a1bd49b 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -796,7 +796,7 @@ namespace frm
xListCursor.reset( m_aListRowSet.execute() );
}
}
- catch(SQLException& eSQL)
+ catch(const SQLException& eSQL)
{
onError(eSQL, FRM_RES_STRING(RID_BASELISTBOX_ERROR_FILLLIST));
return;
@@ -902,7 +902,7 @@ namespace frm
break;
}
}
- catch(SQLException& eSQL)
+ catch(const SQLException& eSQL)
{
onError(eSQL, FRM_RES_STRING(RID_BASELISTBOX_ERROR_FILLLIST));
return;
diff --git a/forms/source/component/Numeric.cxx b/forms/source/component/Numeric.cxx
index d96a2a8907aa..7fa0bf8e17f9 100644
--- a/forms/source/component/Numeric.cxx
+++ b/forms/source/component/Numeric.cxx
@@ -178,7 +178,7 @@ sal_Bool ONumericModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
{
m_xColumnUpdate->updateDouble( getDouble( aControlValue ) );
}
- catch(Exception&)
+ catch(const Exception&)
{
return sal_False;
}
diff --git a/forms/source/component/RadioButton.cxx b/forms/source/component/RadioButton.cxx
index 1862168e8348..77c0ee6a1c05 100644
--- a/forms/source/component/RadioButton.cxx
+++ b/forms/source/component/RadioButton.cxx
@@ -421,7 +421,7 @@ sal_Bool ORadioButtonModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
if ( nValue == 1 )
xField->setPropertyValue( PROPERTY_VALUE, makeAny( getReferenceValue() ) );
}
- catch(Exception&)
+ catch(const Exception&)
{
OSL_FAIL("ORadioButtonModel::commitControlValueToDbColumn: could not commit !");
}
diff --git a/forms/source/component/Time.cxx b/forms/source/component/Time.cxx
index 400fac803dd5..11865d422f0b 100644
--- a/forms/source/component/Time.cxx
+++ b/forms/source/component/Time.cxx
@@ -233,7 +233,7 @@ void OTimeModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm )
xField->getPropertyValue(PROPERTY_FIELDTYPE) >>= nFieldType;
m_bDateTimeField = (nFieldType == DataType::TIMESTAMP);
}
- catch(Exception&)
+ catch(const Exception&)
{
}
}
@@ -271,7 +271,7 @@ sal_Bool OTimeModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
m_xColumnUpdate->updateTimestamp(aDateTime);
}
}
- catch(Exception&)
+ catch(const Exception&)
{
return sal_False;
}
diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx
index 5015e8f620a0..0459c3014d54 100644
--- a/forms/source/misc/InterfaceContainer.cxx
+++ b/forms/source/misc/InterfaceContainer.cxx
@@ -541,7 +541,7 @@ namespace
xObjProps->setPropertyValue( PROPERTY_NAME, makeAny( FRM_RES_STRING( RID_STR_CONTROL_SUBSTITUTED_NAME ) ) );
xObjProps->setPropertyValue( PROPERTY_TAG, makeAny( FRM_RES_STRING( RID_STR_CONTROL_SUBSTITUTED_EPXPLAIN ) ) );
}
- catch(Exception&)
+ catch(const Exception&)
{
}
}
@@ -576,9 +576,8 @@ void SAL_CALL OInterfaceContainer::read( const Reference< XObjectInputStream >&
{
xObj = _rxInStream->readObject();
}
- catch(WrongFormatException& e)
+ catch(const WrongFormatException&)
{
- (void)e; // make compiler happy
// the object could not be read
// create a object (so the readEvents below will assign the events to the right controls)
xObj = lcl_createPlaceHolder( m_xServiceFactory );
@@ -586,7 +585,7 @@ void SAL_CALL OInterfaceContainer::read( const Reference< XObjectInputStream >&
// couldn't handle it
throw;
}
- catch(Exception&)
+ catch(const Exception&)
{
// unsere Map leeren
while (!m_aItems.empty())
diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx
index 6259944b149b..aa0297a62cf3 100644
--- a/forms/source/runtime/formoperations.cxx
+++ b/forms/source/runtime/formoperations.cxx
@@ -979,7 +979,7 @@ namespace frm
m_xParser->setOrder( sNewValue );
}
}
- catch( Exception& )
+ catch( const Exception& )
{
OSL_FAIL( "FormOperations::propertyChange: caught an exception while updating the parser!" );
}
diff --git a/forms/source/xforms/propertysetbase.cxx b/forms/source/xforms/propertysetbase.cxx
index 64c53bc5583d..8d6dc0843e6b 100644
--- a/forms/source/xforms/propertysetbase.cxx
+++ b/forms/source/xforms/propertysetbase.cxx
@@ -121,7 +121,7 @@ void PropertySetBase::notifyAndCachePropertyValue( sal_Int32 nHandle )
// insert into the cache
aPos = m_aCache.insert( PropertyValueCache::value_type( nHandle, aEmptyValue ) ).first;
}
- catch( Exception& )
+ catch( const Exception& )
{
OSL_FAIL( "PropertySetBase::notifyAndCachePropertyValue: this is not expected to fail!" );
}
diff --git a/forms/source/xforms/submission/replace.cxx b/forms/source/xforms/submission/replace.cxx
index db81d3e3ecfe..015a5ead9247 100644
--- a/forms/source/xforms/submission/replace.cxx
+++ b/forms/source/xforms/submission/replace.cxx
@@ -107,7 +107,7 @@ CSubmission::SubmissionResult CSubmission::replace(const ::rtl::OUString& aRepla
// do nothing \o/
return CSubmission::SUCCESS;
}
- } catch (Exception& e) {
+ } catch (const Exception& e) {
::rtl::OString aMsg("Exception during replace:\n");
aMsg += OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8);
OSL_FAIL(aMsg.getStr());
diff --git a/forms/source/xforms/submission/submission_get.cxx b/forms/source/xforms/submission/submission_get.cxx
index 9c7782880992..5dc9194bec66 100644
--- a/forms/source/xforms/submission/submission_get.cxx
+++ b/forms/source/xforms/submission/submission_get.cxx
@@ -103,10 +103,10 @@ CSubmission::SubmissionResult CSubmissionGet::submit(const CSS::uno::Reference<
// get reply
try {
m_aResultStream = aContent.openStream();
- } catch (Exception&) {
+ } catch (const Exception&) {
OSL_FAIL("Cannot open reply stream from content");
}
- } catch (Exception&)
+ } catch (const Exception&)
{
// XXX
OSL_FAIL("Exception during UCB operatration.");
diff --git a/forms/source/xforms/submission/submission_post.cxx b/forms/source/xforms/submission/submission_post.cxx
index 8ad6924788ba..ca72e41272c1 100644
--- a/forms/source/xforms/submission/submission_post.cxx
+++ b/forms/source/xforms/submission/submission_post.cxx
@@ -77,10 +77,10 @@ CSubmission::SubmissionResult CSubmissionPost::submit(const CSS::uno::Reference<
try {
m_aResultStream = aSink->getInputStream();
- } catch (Exception&) {
+ } catch (const Exception&) {
OSL_FAIL("Cannot open reply stream from content");
}
- } catch (Exception&)
+ } catch (const Exception&)
{
OSL_FAIL("Exception during UCB operatration.");
return UNKNOWN_ERROR;
diff --git a/forms/source/xforms/submission/submission_put.cxx b/forms/source/xforms/submission/submission_put.cxx
index 9d30ef318a9e..8536a43d6403 100644
--- a/forms/source/xforms/submission/submission_put.cxx
+++ b/forms/source/xforms/submission/submission_put.cxx
@@ -66,7 +66,7 @@ CSubmission::SubmissionResult CSubmissionPut::submit(const CSS::uno::Reference<
// no content as a result of put...
- } catch (Exception&)
+ } catch (const Exception&)
{
// XXX
OSL_FAIL("Exception during UCB operatration.");
diff --git a/forms/source/xforms/xpathlib/xpathlib.cxx b/forms/source/xforms/xpathlib/xpathlib.cxx
index 5168fd7cd705..71759dfa3d89 100644
--- a/forms/source/xforms/xpathlib/xpathlib.cxx
+++ b/forms/source/xforms/xpathlib/xpathlib.cxx
@@ -528,7 +528,7 @@ void xforms_instanceFuction(xmlXPathParserContextPtr ctxt, int nargs)
xmlNodePtr pNode = reinterpret_cast< xmlNodePtr >( aTunnel->getSomething(Sequence< sal_Int8 >()) );
xmlXPathObjectPtr pObject = xmlXPathNewNodeSet(pNode);
xmlXPathReturnNodeSet(ctxt, pObject->nodesetval);
- } catch (RuntimeException&)
+ } catch (const RuntimeException&)
{
xmlXPathReturnEmptyNodeSet(ctxt);
}
@@ -556,7 +556,7 @@ void xforms_currentFunction(xmlXPathParserContextPtr ctxt, int nargs)
xmlXPathObjectPtr pObject = xmlXPathNewNodeSet(pNode);
xmlXPathReturnNodeSet(ctxt, pObject->nodesetval);
}
- catch (RuntimeException&)
+ catch (const RuntimeException&)
{
xmlXPathReturnEmptyNodeSet(ctxt);
}