Kaydet (Commit) 218ec3b0 authored tarafından Caolán McNamara's avatar Caolán McNamara

catch consistently by const reference

Change-Id: I206cbf5453fd6b32f3ee6725d29260a8c49a68bd
üst 0daa9202
...@@ -107,7 +107,7 @@ sal_Bool lcl_IsUsingEnhancedFields( const uno::Reference< lang::XMultiServiceFac ...@@ -107,7 +107,7 @@ sal_Bool lcl_IsUsingEnhancedFields( const uno::Reference< lang::XMultiServiceFac
::comphelper::ConfigurationHelper::readRelativeKey( xCfgAccess, rtl::OUString( "Filter/Microsoft/Import" ), rtl::OUString( "ImportWWFieldsAsEnhancedFields" ) ) >>= bResult; ::comphelper::ConfigurationHelper::readRelativeKey( xCfgAccess, rtl::OUString( "Filter/Microsoft/Import" ), rtl::OUString( "ImportWWFieldsAsEnhancedFields" ) ) >>= bResult;
} }
catch( uno::Exception& ) catch( const uno::Exception& )
{ {
} }
return bResult; return bResult;
...@@ -289,9 +289,8 @@ void DomainMapper_Impl::RemoveLastParagraph( ) ...@@ -289,9 +289,8 @@ void DomainMapper_Impl::RemoveLastParagraph( )
xCursor->goLeft( 1, true ); xCursor->goLeft( 1, true );
xCursor->setString(::rtl::OUString()); xCursor->setString(::rtl::OUString());
} }
catch( const uno::Exception& rEx) catch( const uno::Exception& )
{ {
(void)rEx;
} }
} }
...@@ -661,9 +660,8 @@ void lcl_MoveBorderPropertiesToFrame(uno::Sequence<beans::PropertyValue>& rFrame ...@@ -661,9 +660,8 @@ void lcl_MoveBorderPropertiesToFrame(uno::Sequence<beans::PropertyValue>& rFrame
rFrameProperties.realloc(nStart); rFrameProperties.realloc(nStart);
} }
catch( const uno::Exception& rEx ) catch( const uno::Exception& rEx )
{ {
(void)rEx; }
}
} }
...@@ -925,9 +923,8 @@ void DomainMapper_Impl::CheckUnregisteredFrameConversion( ) ...@@ -925,9 +923,8 @@ void DomainMapper_Impl::CheckUnregisteredFrameConversion( )
rAppendContext.pLastParagraphProperties->GetEndingRange(), rAppendContext.pLastParagraphProperties->GetEndingRange(),
aFrameProperties ); aFrameProperties );
} }
catch( const uno::Exception& rEx ) catch( const uno::Exception& )
{ {
(void)rEx;
} }
} }
} }
...@@ -1068,15 +1065,12 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap ) ...@@ -1068,15 +1065,12 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap )
if( !bKeepLastParagraphProperties ) if( !bKeepLastParagraphProperties )
rAppendContext.pLastParagraphProperties = pToBeSavedProperties; rAppendContext.pLastParagraphProperties = pToBeSavedProperties;
} }
catch(const lang::IllegalArgumentException& rIllegal) catch(const lang::IllegalArgumentException&)
{ {
(void)rIllegal;
OSL_FAIL( "IllegalArgumentException in DomainMapper_Impl::finishParagraph" ); OSL_FAIL( "IllegalArgumentException in DomainMapper_Impl::finishParagraph" );
} }
catch(const uno::Exception& rEx) catch(const uno::Exception&)
{ {
(void)rEx;
//OSL_ENSURE( false, "ArgumentException in DomainMapper_Impl::finishParagraph" );
} }
} }
...@@ -1125,14 +1119,12 @@ void DomainMapper_Impl::appendTextPortion( const ::rtl::OUString& rString, Prope ...@@ -1125,14 +1119,12 @@ void DomainMapper_Impl::appendTextPortion( const ::rtl::OUString& rString, Prope
//getTableManager( ).handle(xTextRange); //getTableManager( ).handle(xTextRange);
} }
catch(const lang::IllegalArgumentException& rEx) catch(const lang::IllegalArgumentException&)
{ {
(void)rEx;
OSL_FAIL( "IllegalArgumentException in DomainMapper_Impl::appendTextPortion" ); OSL_FAIL( "IllegalArgumentException in DomainMapper_Impl::appendTextPortion" );
} }
catch(const uno::Exception& rEx) catch(const uno::Exception&)
{ {
(void)rEx;
OSL_FAIL( "Exception in DomainMapper_Impl::appendTextPortion" ); OSL_FAIL( "Exception in DomainMapper_Impl::appendTextPortion" );
} }
} }
...@@ -1152,10 +1144,10 @@ void DomainMapper_Impl::appendTextContent( ...@@ -1152,10 +1144,10 @@ void DomainMapper_Impl::appendTextContent(
{ {
xTextAppendAndConvert->appendTextContent( xContent, xPropertyValues ); xTextAppendAndConvert->appendTextContent( xContent, xPropertyValues );
} }
catch(const lang::IllegalArgumentException& ) catch(const lang::IllegalArgumentException&)
{ {
} }
catch(const uno::Exception& ) catch(const uno::Exception&)
{ {
} }
} }
...@@ -1198,9 +1190,8 @@ void DomainMapper_Impl::appendOLE( const ::rtl::OUString& rStreamName, OLEHandle ...@@ -1198,9 +1190,8 @@ void DomainMapper_Impl::appendOLE( const ::rtl::OUString& rStreamName, OLEHandle
appendTextContent( xOLE, uno::Sequence< beans::PropertyValue >() ); appendTextContent( xOLE, uno::Sequence< beans::PropertyValue >() );
} }
catch( const uno::Exception& rEx ) catch( const uno::Exception& )
{ {
(void)rEx;
OSL_FAIL( "Exception in creation of OLE object" ); OSL_FAIL( "Exception in creation of OLE object" );
} }
...@@ -1235,9 +1226,8 @@ void DomainMapper_Impl::appendStarMath( const Value& val ) ...@@ -1235,9 +1226,8 @@ void DomainMapper_Impl::appendStarMath( const Value& val )
uno::makeAny( text::TextContentAnchorType_AS_CHARACTER ) ); uno::makeAny( text::TextContentAnchorType_AS_CHARACTER ) );
appendTextContent( xStarMath, uno::Sequence< beans::PropertyValue >() ); appendTextContent( xStarMath, uno::Sequence< beans::PropertyValue >() );
} }
catch( const uno::Exception& rEx ) catch( const uno::Exception& )
{ {
(void)rEx;
OSL_FAIL( "Exception in creation of StarMath object" ); OSL_FAIL( "Exception in creation of StarMath object" );
} }
} }
...@@ -1266,7 +1256,7 @@ uno::Reference< beans::XPropertySet > DomainMapper_Impl::appendTextSectionAfter( ...@@ -1266,7 +1256,7 @@ uno::Reference< beans::XPropertySet > DomainMapper_Impl::appendTextSectionAfter(
xSection->attach( uno::Reference< text::XTextRange >( xCursor, uno::UNO_QUERY_THROW) ); xSection->attach( uno::Reference< text::XTextRange >( xCursor, uno::UNO_QUERY_THROW) );
xRet = uno::Reference< beans::XPropertySet > (xSection, uno::UNO_QUERY ); xRet = uno::Reference< beans::XPropertySet > (xSection, uno::UNO_QUERY );
} }
catch(const uno::Exception& ) catch(const uno::Exception&)
{ {
} }
...@@ -1308,7 +1298,7 @@ void DomainMapper_Impl::PushPageHeader(SectionPropertyMap::PageType eType) ...@@ -1308,7 +1298,7 @@ void DomainMapper_Impl::PushPageHeader(SectionPropertyMap::PageType eType)
xPageStyle->getPropertyValue(rPropNameSupplier.GetName( bLeft ? PROP_HEADER_TEXT_LEFT : PROP_HEADER_TEXT) ) >>= xHeaderText; xPageStyle->getPropertyValue(rPropNameSupplier.GetName( bLeft ? PROP_HEADER_TEXT_LEFT : PROP_HEADER_TEXT) ) >>= xHeaderText;
m_aTextAppendStack.push( uno::Reference< text::XTextAppend >( xHeaderText, uno::UNO_QUERY_THROW)); m_aTextAppendStack.push( uno::Reference< text::XTextAppend >( xHeaderText, uno::UNO_QUERY_THROW));
} }
catch( uno::Exception& ) catch( const uno::Exception& )
{ {
} }
} }
...@@ -1346,7 +1336,7 @@ void DomainMapper_Impl::PushPageFooter(SectionPropertyMap::PageType eType) ...@@ -1346,7 +1336,7 @@ void DomainMapper_Impl::PushPageFooter(SectionPropertyMap::PageType eType)
xPageStyle->getPropertyValue(rPropNameSupplier.GetName( bLeft ? PROP_FOOTER_TEXT_LEFT : PROP_FOOTER_TEXT) ) >>= xFooterText; xPageStyle->getPropertyValue(rPropNameSupplier.GetName( bLeft ? PROP_FOOTER_TEXT_LEFT : PROP_FOOTER_TEXT) ) >>= xFooterText;
m_aTextAppendStack.push(uno::Reference< text::XTextAppend >( xFooterText, uno::UNO_QUERY_THROW )); m_aTextAppendStack.push(uno::Reference< text::XTextAppend >( xFooterText, uno::UNO_QUERY_THROW ));
} }
catch( uno::Exception& ) catch( const uno::Exception& )
{ {
} }
} }
...@@ -1403,7 +1393,7 @@ void DomainMapper_Impl::PushFootOrEndnote( bool bIsFootnote ) ...@@ -1403,7 +1393,7 @@ void DomainMapper_Impl::PushFootOrEndnote( bool bIsFootnote )
// Redlines for the footnote anchor // Redlines for the footnote anchor
CheckRedline( xFootnote->getAnchor( ) ); CheckRedline( xFootnote->getAnchor( ) );
} }
catch( uno::Exception& ) catch( const uno::Exception& )
{ {
OSL_FAIL( "exception in PushFootOrEndnote" ); OSL_FAIL( "exception in PushFootOrEndnote" );
} }
...@@ -1439,9 +1429,8 @@ void DomainMapper_Impl::CreateRedline( uno::Reference< text::XTextRange > xRange ...@@ -1439,9 +1429,8 @@ void DomainMapper_Impl::CreateRedline( uno::Reference< text::XTextRange > xRange
xRedline->makeRedline( sType, aRedlineProperties ); xRedline->makeRedline( sType, aRedlineProperties );
} }
catch( const uno::Exception & rEx ) catch( const uno::Exception & )
{ {
( void ) rEx;
OSL_FAIL( "Exception in makeRedline" ); OSL_FAIL( "Exception in makeRedline" );
} }
} }
...@@ -1500,7 +1489,7 @@ void DomainMapper_Impl::PushAnnotation() ...@@ -1500,7 +1489,7 @@ void DomainMapper_Impl::PushAnnotation()
m_xAnnotationField->getPropertyValue(::rtl::OUString( "TextRange")) >>= xAnnotationText; m_xAnnotationField->getPropertyValue(::rtl::OUString( "TextRange")) >>= xAnnotationText;
m_aTextAppendStack.push(uno::Reference< text::XTextAppend >( xAnnotationText, uno::UNO_QUERY_THROW )); m_aTextAppendStack.push(uno::Reference< text::XTextAppend >( xAnnotationText, uno::UNO_QUERY_THROW ));
} }
catch( uno::Exception& ) catch( const uno::Exception& )
{ {
OSL_FAIL( "exception in PushAnnotation" ); OSL_FAIL( "exception in PushAnnotation" );
} }
...@@ -1626,7 +1615,7 @@ void DomainMapper_Impl::PopShapeContext() ...@@ -1626,7 +1615,7 @@ void DomainMapper_Impl::PopShapeContext()
{ {
appendTextContent( xObj, uno::Sequence< beans::PropertyValue >() ); appendTextContent( xObj, uno::Sequence< beans::PropertyValue >() );
} }
catch ( uno::RuntimeException& ) catch ( const uno::RuntimeException& )
{ {
// this is normal: the shape is already attached // this is normal: the shape is already attached
} }
...@@ -1644,7 +1633,7 @@ void DomainMapper_Impl::PopShapeContext() ...@@ -1644,7 +1633,7 @@ void DomainMapper_Impl::PopShapeContext()
xDrawPage->remove( xShape ); xDrawPage->remove( xShape );
} }
} }
catch( uno::Exception& ) catch( const uno::Exception& )
{ {
} }
} }
...@@ -3149,7 +3138,7 @@ void DomainMapper_Impl::SetFieldResult( ::rtl::OUString& rResult ) ...@@ -3149,7 +3138,7 @@ void DomainMapper_Impl::SetFieldResult( ::rtl::OUString& rResult )
} }
} }
} }
catch( uno::Exception& ) catch( const uno::Exception& )
{ {
} }
...@@ -3260,11 +3249,11 @@ void DomainMapper_Impl::PopFieldContext() ...@@ -3260,11 +3249,11 @@ void DomainMapper_Impl::PopFieldContext()
} }
} }
} }
catch(const lang::IllegalArgumentException& ) catch(const lang::IllegalArgumentException&)
{ {
OSL_FAIL( "IllegalArgumentException in PopFieldContext()" ); OSL_FAIL( "IllegalArgumentException in PopFieldContext()" );
} }
catch(const uno::Exception& ) catch(const uno::Exception&)
{ {
OSL_FAIL( "exception in PopFieldContext()" ); OSL_FAIL( "exception in PopFieldContext()" );
} }
...@@ -3629,7 +3618,7 @@ void DomainMapper_Impl::ApplySettingsTable() ...@@ -3629,7 +3618,7 @@ void DomainMapper_Impl::ApplySettingsTable()
xViewDataSupplier->setViewData(xIndexAccess); xViewDataSupplier->setViewData(xIndexAccess);
} }
} }
catch(const uno::Exception& ) catch(const uno::Exception&)
{ {
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment