diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2012-01-09 03:16:33 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2012-01-09 03:17:20 +0900 |
commit | b35c0ae4ffce43b881d66efe74a19f1bf6299331 (patch) | |
tree | 7afefa031973519717e8cb9812ade85de444df02 /writerfilter | |
parent | callcatcher: Remove unused code (diff) | |
download | core-b35c0ae4ffce43b881d66efe74a19f1bf6299331.tar.gz core-b35c0ae4ffce43b881d66efe74a19f1bf6299331.zip |
catch exception by constant reference
Diffstat (limited to 'writerfilter')
9 files changed, 22 insertions, 24 deletions
diff --git a/writerfilter/qa/cppunittests/qname/testQName.cxx b/writerfilter/qa/cppunittests/qname/testQName.cxx index 2a2b26e8bcf4..1c0e24d08739 100644 --- a/writerfilter/qa/cppunittests/qname/testQName.cxx +++ b/writerfilter/qa/cppunittests/qname/testQName.cxx @@ -103,7 +103,7 @@ public: sprintf(buf, "name%i", i++); testAdd("myns", buf); } - } catch (std::logic_error &e) + } catch (const std::logic_error &) { // only way to exit this function flag=true; diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx index 6b0442450a27..f9acfaa6165d 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx @@ -714,7 +714,7 @@ void DomainMapperTableHandler::endTable() m_xTableRange = xTable->getAnchor( ); } } - catch ( lang::IllegalArgumentException &e ) + catch ( const lang::IllegalArgumentException &e ) { #ifdef DEBUG_DMAPPER_TABLE_HANDLER fprintf( stderr, "Conversion to table error: %s\n", @@ -722,7 +722,7 @@ void DomainMapperTableHandler::endTable() dmapper_logger->chars("failed to import table!"); #endif } - catch ( uno::Exception &e ) + catch ( const uno::Exception &e ) { #ifdef DEBUG_DMAPPER_TABLE_HANDLER fprintf( stderr, "Exception during table creation: %s\n", diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 8352cddf9db9..3137be1e7dbd 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -3014,9 +3014,8 @@ void DomainMapper_Impl::CloseFieldCommand() //set the text field if there is any pContext->SetTextField( uno::Reference< text::XTextField >( xFieldInterface, uno::UNO_QUERY ) ); } - catch( uno::Exception& rEx) + catch( const uno::Exception& ) { - (void)rEx; OSL_FAIL( "Exception in CloseFieldCommand()" ); } pContext->SetCommandCompleted(); diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index 52c22dfa92fb..8aa0cb17da1a 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -910,7 +910,7 @@ void GraphicImport::lcl_attribute(Id nName, Value & val) uno::makeAny( aSize.Width ) ); } } - catch( const beans::UnknownPropertyException ) + catch( const beans::UnknownPropertyException & ) { // It isn't a graphic image } diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index 6b824b26cd86..a187379a32d6 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -911,9 +911,8 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable ) } } } - catch( uno::Exception& rEx) + catch( const uno::Exception& ) { - (void)rEx; OSL_FAIL( "Styles could not be imported completely"); } } diff --git a/writerfilter/source/doctok/WW8DocumentImpl.cxx b/writerfilter/source/doctok/WW8DocumentImpl.cxx index 407ea2dfcf4d..b5e15edb90b6 100644 --- a/writerfilter/source/doctok/WW8DocumentImpl.cxx +++ b/writerfilter/source/doctok/WW8DocumentImpl.cxx @@ -191,7 +191,7 @@ mbInSection(false), mbInParagraphGroup(false), mbInCharacterGroup(false) mpDataStream = getSubStream(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("Data"))); } - catch (ExceptionNotFound) + catch (const ExceptionNotFound &) { } @@ -200,7 +200,7 @@ mbInSection(false), mbInParagraphGroup(false), mbInCharacterGroup(false) mpCompObjStream = getSubStream(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("\1CompObj"))); } - catch (ExceptionNotFound) + catch (const ExceptionNotFound &) { } @@ -635,13 +635,13 @@ void WW8DocumentImpl::parseBinTableCpAndFcs(WW8BinTable & rTable, mCpAndFcs.insert(aCpAndFc); } - catch (ExceptionNotFound &e) + catch (const ExceptionNotFound &e) { clog << e.getText() << endl; } } } - catch (ExceptionNotFound &e) + catch (const ExceptionNotFound &e) { clog << e.getText() << endl; } @@ -838,7 +838,7 @@ writerfilter::Reference<Properties>::Pointer_t WW8DocumentImpl::getProperties pResult = pFKP->getProperties(rCpAndFc.getFc()); } - catch (ExceptionOutOfBounds) + catch (const ExceptionOutOfBounds &) { } } @@ -978,7 +978,7 @@ writerfilter::Reference<Table>::Pointer_t WW8DocumentImpl::getListTable() const pResult = writerfilter::Reference<Table>::Pointer_t(pList); } - catch (ExceptionOutOfBounds) { + catch (const ExceptionOutOfBounds &) { } } @@ -1002,7 +1002,7 @@ writerfilter::Reference<Table>::Pointer_t WW8DocumentImpl::getLFOTable() const pResult = writerfilter::Reference<Table>::Pointer_t(pLFOs); } - catch (Exception &e) + catch (const Exception &e) { clog << e.getText() << endl; } @@ -1619,7 +1619,7 @@ void WW8DocumentImpl::resolve(Stream & rStream) if (pStyleSheet.get() != NULL) rStream.table(NS_rtf::LN_STYLESHEET, pStyleSheet); } - catch (Exception &e) + catch (const Exception &e) { clog << e.getText() << endl; } @@ -2067,7 +2067,7 @@ BookmarkHelper::getBookmark(const CpAndFc & rCpAndFc) pResult = writerfilter::Reference<Properties>::Pointer_t (new Bookmark(getBKF(rCpAndFc), aName)); } - catch (ExceptionNotFound &e) + catch (const ExceptionNotFound &e) { clog << e.getText() << endl; } diff --git a/writerfilter/source/resourcemodel/TagLogger.cxx b/writerfilter/source/resourcemodel/TagLogger.cxx index 7ee16fe22367..f71971ecfcc4 100644 --- a/writerfilter/source/resourcemodel/TagLogger.cxx +++ b/writerfilter/source/resourcemodel/TagLogger.cxx @@ -139,7 +139,7 @@ namespace writerfilter { attribute( "value", rPropSet->getPropertyValue( sName ) ); } - catch (uno::Exception) + catch (const uno::Exception &) { startElement( "exception" ); diff --git a/writerfilter/source/resourcemodel/resourcemodel.cxx b/writerfilter/source/resourcemodel/resourcemodel.cxx index bd230ad09f06..727296b21ead 100644 --- a/writerfilter/source/resourcemodel/resourcemodel.cxx +++ b/writerfilter/source/resourcemodel/resourcemodel.cxx @@ -383,7 +383,7 @@ void WW8StreamHandler::table(Id name, writerfilter::Reference<Table>::Pointer_t { ref->resolve(aHandler); } - catch (Exception &e) + catch (const Exception &e) { output.addItem("<exception>" + e.getText() + "</exception>"); } @@ -442,7 +442,7 @@ void WW8PropertiesHandler::attribute(Id name, Value & val) { pProps->resolve(*this); } - catch (ExceptionOutOfBounds) + catch (const ExceptionOutOfBounds &) { } @@ -459,7 +459,7 @@ void WW8PropertiesHandler::attribute(Id name, Value & val) pStream->resolve(aHandler); } - catch (ExceptionOutOfBounds) + catch (const ExceptionOutOfBounds &) { } } @@ -474,7 +474,7 @@ void WW8PropertiesHandler::attribute(Id name, Value & val) pBinObj->resolve(aHandler); } - catch (ExceptionOutOfBounds) + catch (const ExceptionOutOfBounds &) { } } @@ -539,7 +539,7 @@ void WW8TableHandler::entry(int /*pos*/, { ref->resolve(aHandler); } - catch (Exception &e) + catch (const Exception &e) { output.addItem("<exception>" + e.getText() + "</exception>"); output.addItem("</tableentry>"); diff --git a/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx b/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx index 55f66b551a75..c1b67e84dae0 100644 --- a/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx +++ b/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx @@ -231,7 +231,7 @@ sal_Int32 SAL_CALL AnalyzeService::run xInputStream->closeInput(); } - catch (Exception &e) + catch (const Exception &e) { fprintf(stdout, "<exception>%s</exception>\n", e.getText().c_str()); |