From 8cc98837d30d818fe3a2e4063798c7451044eb9c Mon Sep 17 00:00:00 2001 From: Takeshi Abe Date: Sun, 25 Dec 2011 15:08:11 +0900 Subject: catch exception by constant reference --- sd/source/core/CustomAnimationCloner.cxx | 9 +-- sd/source/core/CustomAnimationEffect.cxx | 69 ++++++++-------------- sd/source/core/TransitionPreset.cxx | 3 +- sd/source/core/sdpage.cxx | 5 +- sd/source/core/stlsheet.cxx | 2 +- sd/source/core/undoanim.cxx | 9 +-- sd/source/filter/eppt/pptexanimations.cxx | 6 +- sd/source/filter/html/htmlex.cxx | 6 +- sd/source/filter/ppt/pptinanimations.cxx | 6 +- sd/source/ui/animations/CustomAnimationDialog.cxx | 3 +- sd/source/ui/animations/CustomAnimationList.cxx | 7 +-- sd/source/ui/animations/CustomAnimationPane.cxx | 17 +++--- sd/source/ui/annotations/annotationmanager.cxx | 3 +- sd/source/ui/dlg/dlgass.cxx | 9 +-- .../ConfigurationControllerResourceManager.cxx | 2 +- sd/source/ui/func/fusel.cxx | 3 +- sd/source/ui/slideshow/slideshowimpl.cxx | 60 +++++++------------ .../ui/slidesorter/cache/SlsCacheConfiguration.cxx | 9 +-- .../ui/slidesorter/cache/SlsQueueProcessor.cxx | 6 +- .../controller/SlideSorterController.cxx | 3 +- .../ui/slidesorter/shell/SlideSorterViewShell.cxx | 3 +- sd/source/ui/table/TableDesignPane.cxx | 3 +- sd/source/ui/tools/ConfigurationAccess.cxx | 2 +- sd/source/ui/unoidl/sddetect.cxx | 2 +- sd/source/ui/view/drviews1.cxx | 3 +- 25 files changed, 87 insertions(+), 163 deletions(-) (limited to 'sd/source') diff --git a/sd/source/core/CustomAnimationCloner.cxx b/sd/source/core/CustomAnimationCloner.cxx index d3fc64383b81..08a7ebc84d59 100644 --- a/sd/source/core/CustomAnimationCloner.cxx +++ b/sd/source/core/CustomAnimationCloner.cxx @@ -135,9 +135,8 @@ namespace sd return xCloneNode; } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL( (OString("sd::CustomAnimationClonerImpl::Clone(), " "exception caught: ") + @@ -220,9 +219,8 @@ namespace sd xNode->setUserData( aUserData ); } } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL( (OString("sd::CustomAnimationClonerImpl::transformNode(), " "exception caught: ") + @@ -295,9 +293,8 @@ namespace sd return makeAny( aEvent ); } } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL( (OString("sd::CustomAnimationClonerImpl::transformValue(), " "exception caught: ") + diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index 47b47d126c11..b3baaa3da2be 100644 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -375,9 +375,8 @@ sal_Int32 CustomAnimationEffect::getNumberOfSubitems( const Any& aTarget, sal_In } } } - catch( Exception& e ) + catch( Exception& ) { - (void)e; nSubItems = 0; OSL_FAIL( "sd::CustomAnimationEffect::getNumberOfSubitems(), exception cought!" ); } @@ -1112,9 +1111,8 @@ void CustomAnimationEffect::setIterateType( sal_Int16 nIterateType ) checkForText(); } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL( "sd::CustomAnimationEffect::setIterateType(), Exception cought!" ); } } @@ -1158,9 +1156,8 @@ void CustomAnimationEffect::setIterateInterval( double fIterateInterval ) } } } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL("sd::CustomAnimationEffect::getPath(), exception cought!" ); } @@ -1187,9 +1184,8 @@ void CustomAnimationEffect::setPath( const ::rtl::OUString& rPath ) } } } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL("sd::CustomAnimationEffect::setPath(), exception cought!" ); } } @@ -1237,9 +1233,8 @@ Any CustomAnimationEffect::getProperty( sal_Int32 nNodeType, const OUString& rAt } } } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL("sd::CustomAnimationEffect::getProperty(), exception cought!" ); } @@ -1315,9 +1310,8 @@ bool CustomAnimationEffect::setProperty( sal_Int32 nNodeType, const OUString& rA } } } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL("sd::CustomAnimationEffect::setProperty(), exception cought!" ); } @@ -1374,9 +1368,8 @@ Any CustomAnimationEffect::getColor( sal_Int32 nIndex ) } } } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL("sd::CustomAnimationEffect::getColor(), exception cought!" ); } @@ -1430,9 +1423,8 @@ void CustomAnimationEffect::setColor( sal_Int32 nIndex, const Any& rColor ) } } } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL("sd::CustomAnimationEffect::setColor(), exception cought!" ); } } @@ -1477,9 +1469,8 @@ Any CustomAnimationEffect::getTransformationProperty( sal_Int32 nTransformType, } } } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL("sd::CustomAnimationEffect::getTransformationProperty(), exception cought!" ); } @@ -1551,9 +1542,8 @@ bool CustomAnimationEffect::setTransformationProperty( sal_Int32 nTransformType, } } } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL("sd::CustomAnimationEffect::setTransformationProperty(), exception cought!" ); } @@ -1574,9 +1564,8 @@ void CustomAnimationEffect::createAudio( const ::com::sun::star::uno::Any& rSour xAudio->setVolume( fVolume ); setAudio( xAudio ); } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL("sd::CustomAnimationEffect::createAudio(), exception cought!" ); } } @@ -1598,9 +1587,8 @@ static Reference< XCommand > findCommandNode( const Reference< XAnimationNode >& xCommand.set( xNode, UNO_QUERY_THROW ); } } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL("sd::findCommandNode(), exception caught!" ); } @@ -1631,9 +1619,8 @@ void CustomAnimationEffect::removeAudio() xContainer->removeChild( xChild ); } } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL("sd::CustomAnimationEffect::removeAudio(), exception caught!" ); } @@ -1652,9 +1639,8 @@ void CustomAnimationEffect::setAudio( const Reference< ::com::sun::star::animati if( xContainer.is() && xChild.is() ) xContainer->appendChild( xChild ); } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL("sd::CustomAnimationEffect::setAudio(), exception caught!" ); } } @@ -1679,9 +1665,8 @@ void CustomAnimationEffect::setStopAudio() mnCommand = EffectCommands::STOPAUDIO; } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL("sd::CustomAnimationEffect::setStopAudio(), exception caught!" ); } } @@ -1959,9 +1944,8 @@ void EffectSequenceHelper::replace( const CustomAnimationEffectPtr& pEffect, con rebuild(); } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL( "sd::EffectSequenceHelper::replace(), exception cought!" ); } } @@ -2116,9 +2100,8 @@ void EffectSequenceHelper::implRebuild() mxSequenceRoot->setDuration( makeAny((double)0.0) ); } } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL( "sd::EffectSequenceHelper::rebuild(), exception cought!" ); } } @@ -2284,9 +2267,8 @@ void stl_process_after_effect_node_func(AfterEffectNode& rNode) } } } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL( "ppt::stl_process_after_effect_node_func::operator(), exception cought!" ); } } @@ -2736,9 +2718,8 @@ void EffectSequenceHelper::createTextGroupParagraphEffects( CustomAnimationTextG } notify_listeners(); } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL("sd::EffectSequenceHelper::createTextGroup(), exception cought!" ); } } @@ -3131,9 +3112,8 @@ void EffectSequenceHelper::createEffects( const Reference< XAnimationNode >& xNo } } } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL( "sd::EffectSequenceHelper::createEffects(), exception cought!" ); } } @@ -3193,9 +3173,8 @@ void EffectSequenceHelper::processAfterEffect( const Reference< XAnimationNode > } } } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL( "sd::EffectSequenceHelper::processAfterEffect(), exception cought!" ); } } @@ -3356,9 +3335,8 @@ void MainSequence::createMainSequence() if( xNotifier.is() ) xNotifier->addChangesListener( mxChangesListener ); } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL( "sd::MainSequence::create(), exception cought!" ); return; } @@ -3766,9 +3744,8 @@ InteractiveSequence::InteractiveSequence( const Reference< XTimeContainer >& xSe } } } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL( "sd::InteractiveSequence::InteractiveSequence(), exception cought!" ); return; } diff --git a/sd/source/core/TransitionPreset.cxx b/sd/source/core/TransitionPreset.cxx index d1ffd96d86f3..e8bfab4030b7 100644 --- a/sd/source/core/TransitionPreset.cxx +++ b/sd/source/core/TransitionPreset.cxx @@ -215,9 +215,8 @@ bool TransitionPreset::importTransitionPresetList( TransitionPresetList& rList ) return bRet; } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL( "sd::TransitionPreset::importResources(), Exception cought!" ); } diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 1fd344dc9a6f..904561378d45 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -2683,10 +2683,9 @@ SdPage* SdPage::getImplementation( const ::com::sun::star::uno::Reference< ::com return static_cast< SdPage* >( pUnoPage->GetSdrPage() ); } } - catch( ::com::sun::star::uno::Exception& e ) + catch( ::com::sun::star::uno::Exception& ) { - (void)e; - OSL_FAIL("sd::SdPage::getImplementation(), exception cathced!" ); + OSL_FAIL("sd::SdPage::getImplementation(), exception caught!" ); } return 0; diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx index 521c7f60fc16..6f0825770da2 100644 --- a/sd/source/core/stlsheet.cxx +++ b/sd/source/core/stlsheet.cxx @@ -822,7 +822,7 @@ void SAL_CALL SdStyleSheet::dispose( ) throw (RuntimeException) { throw; } - catch (Exception & exc) + catch (const Exception & exc) { throw RuntimeException( OUString( RTL_CONSTASCII_USTRINGPARAM( diff --git a/sd/source/core/undoanim.cxx b/sd/source/core/undoanim.cxx index 8b6b17e2ce64..79f6ede05ab3 100644 --- a/sd/source/core/undoanim.cxx +++ b/sd/source/core/undoanim.cxx @@ -66,9 +66,8 @@ UndoAnimation::UndoAnimation( SdDrawDocument* pDoc, SdPage* pThePage ) if( pThePage->mxAnimationNode.is() ) mpImpl->mxOldNode = ::sd::Clone( pThePage->getAnimationNode() ); } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL("sd::UndoAnimation::UndoAnimation(), exception caught!"); } } @@ -95,9 +94,8 @@ void UndoAnimation::Undo() mpImpl->mpPage->setAnimationNode( xOldNode ); } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL("sd::UndoAnimation::Undo(), exception caught!"); } } @@ -111,9 +109,8 @@ void UndoAnimation::Redo() xNewNode = ::sd::Clone( mpImpl->mxNewNode ); mpImpl->mpPage->setAnimationNode( xNewNode ); } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL("sd::UndoAnimation::Redo(), exception caught!"); } } diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx index 3017c1f7192b..ac8f14da3471 100644 --- a/sd/source/filter/eppt/pptexanimations.cxx +++ b/sd/source/filter/eppt/pptexanimations.cxx @@ -413,9 +413,8 @@ void AnimationExporter::processAfterEffectNodes( const Reference< XAnimationNode } } } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL( "(@CL)AnimationExporter::processAfterEffectNodes(), exception cought!" ); } } @@ -767,9 +766,8 @@ Reference< XAnimationNode > AnimationExporter::createAfterEffectNodeClone( const return xCloneNode; } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL("(@CL)sd::ppt::AnimationExporter::createAfterEffectNodeClone(), could not create clone!" ); } return xNode; diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index 152ad770f154..41a53630a892 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -3114,9 +3114,8 @@ bool HtmlExport::checkFileExists( Reference< ::com::sun::star::ucb::XSimpleFileA url += aFileName; return xFileAccess->exists( url ); } - catch( com::sun::star::uno::Exception& e ) + catch( com::sun::star::uno::Exception& ) { - (void)e; OSL_FAIL((OString("sd::HtmlExport::checkFileExists(), exception caught: ") + rtl::OUStringToOString( comphelper::anyToString( cppu::getCaughtException() ), RTL_TEXTENCODING_UTF8 )).getStr() ); } @@ -3178,9 +3177,8 @@ bool HtmlExport::checkForExistingFiles() } } } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL((OString("sd::HtmlExport::checkForExistingFiles(), exception caught: ") + rtl::OUStringToOString( comphelper::anyToString( cppu::getCaughtException() ), RTL_TEXTENCODING_UTF8 )).getStr() ); bFound = false; diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx index fb619f086b24..32f9def046ad 100644 --- a/sd/source/filter/ppt/pptinanimations.cxx +++ b/sd/source/filter/ppt/pptinanimations.cxx @@ -635,9 +635,8 @@ void AnimationImporter::fixMainSequenceTiming( const ::com::sun::star::uno::Refe } } } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL("sd::AnimationImporter::fixMainSequenceTiming(), exception caught!" ); } } @@ -661,9 +660,8 @@ void AnimationImporter::fixInteractiveSequenceTiming( const ::com::sun::star::un xClickNode->setBegin( aBegin ); } } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL("sd::AnimationImporter::fixInteractiveSequenceTiming(), exception caught!" ); } } diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx index c2e74f11434c..e8d501a48d20 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationDialog.cxx @@ -1818,9 +1818,8 @@ void CustomAnimationEffectTabPage::onSoundPreview() mxPlayer.set( avmedia::MediaWindow::createPlayer( aSoundURL ), uno::UNO_QUERY_THROW ); mxPlayer->start(); } - catch( uno::Exception& e ) + catch( uno::Exception& ) { - (void)e; OSL_FAIL("CustomAnimationEffectTabPage::onSoundPreview(), exception caught!" ); } } diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index 7790ef5a9f01..eccbc61591af 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -797,10 +797,9 @@ void CustomAnimationList::append( CustomAnimationEffectPtr pEffect ) mpLastParentEntry = pEntry; } } - catch( Exception& e ) + catch( Exception& ) { - (void)e; - OSL_FAIL("sd::CustomAnimationList::append(), exception catched!" ); + OSL_FAIL("sd::CustomAnimationList::append(), exception caught!" ); } } @@ -856,7 +855,7 @@ void CustomAnimationList::onSelectionChanged( Any aSelection ) } catch( Exception& ) { - OSL_FAIL( "sd::CustomAnimationList::onSelectionChanged(), Exception catched!" ); + OSL_FAIL( "sd::CustomAnimationList::onSelectionChanged(), Exception caught!" ); } } diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index bb166818a77f..742d745e41a4 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -235,10 +235,9 @@ CustomAnimationPane::CustomAnimationPane( ::Window* pParent, ViewShellBase& rBas mxView = Reference< XDrawView >::query(mrBase.GetController()); addListener(); } - catch( Exception& e ) + catch( Exception& ) { - (void)e; - OSL_FAIL( "sd::CustomAnimationPane::CustomAnimationPane(), Exception cought!" ); + OSL_FAIL( "sd::CustomAnimationPane::CustomAnimationPane(), Exception caught!" ); } // get current page and update custom animation list @@ -1045,7 +1044,7 @@ void CustomAnimationPane::onSelectionChanged() } catch( Exception& ) { - OSL_FAIL( "sd::CustomAnimationPane::onSelectionChanged(), Exception catched!" ); + OSL_FAIL( "sd::CustomAnimationPane::onSelectionChanged(), Exception caught!" ); } } } @@ -1275,9 +1274,8 @@ static sal_Bool hasVisibleShape( const Reference< XShape >& xShape ) return eFillStyle != FillStyle_NONE || eLineStyle != ::com::sun::star::drawing::LineStyle_NONE; } } - catch( Exception& e ) + catch( Exception& ) { - (void)e; } return sal_True; } @@ -1773,7 +1771,7 @@ void CustomAnimationPane::onChangeCurrentPage() } catch( Exception& ) { - OSL_FAIL( "sd::CustomAnimationPane::onChangeCurrentPage(), exception catched!" ); + OSL_FAIL( "sd::CustomAnimationPane::onChangeCurrentPage(), exception caught!" ); } } @@ -1830,10 +1828,9 @@ bool getTextSelection( const Any& rSelection, Reference< XShape >& xShape, std:: return true; } - catch( Exception& e ) + catch( Exception& ) { - (void)e; - OSL_FAIL( "sd::CustomAnimationPane::getTextSelection(), exception cought!" ); + OSL_FAIL( "sd::CustomAnimationPane::getTextSelection(), exception caught!" ); } return false; diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 1eb18ed310aa..87bac6d035b8 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -209,9 +209,8 @@ void AnnotationManagerImpl::init() addListener(); mxView = Reference< XDrawView >::query(mrBase.GetController()); } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL( "sd::AnnotationManagerImpl::AnnotationManagerImpl(), Exception caught!" ); } diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx index 3c0c3e3abe00..e30ae0313279 100644 --- a/sd/source/ui/dlg/dlgass.cxx +++ b/sd/source/ui/dlg/dlgass.cxx @@ -872,10 +872,9 @@ void AssistentDlgImpl::ProvideTemplates (void) { UpdatePreview(sal_True); } - catch (uno::RuntimeException& e) + catch (uno::RuntimeException& ) { // Ignore all exceptions. - (void) e; } } } @@ -1792,9 +1791,8 @@ String AssistentDlgImpl::GetUiTextForCommand (const ::rtl::OUString& sCommandURL } while(false); } - catch (com::sun::star::uno::Exception& rException) + catch (com::sun::star::uno::Exception& ) { - (void)rException; } return sLabel; @@ -1849,9 +1847,8 @@ Image AssistentDlgImpl::GetUiIconForCommand (const ::rtl::OUString& sCommandURL) } while(false); } - catch (com::sun::star::uno::Exception& rException) + catch (com::sun::star::uno::Exception& ) { - (void)rException; } return aIcon; diff --git a/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx b/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx index 06abaa23ed0a..6689c7be9a44 100644 --- a/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx +++ b/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx @@ -243,7 +243,7 @@ void ConfigurationControllerResourceManager::DeactivateResource ( { aDescriptor.mxResourceFactory->releaseResource(aDescriptor.mxResource); } - catch (lang::DisposedException& rException) + catch (const lang::DisposedException& rException) { if ( ! rException.Context.is() || rException.Context == aDescriptor.mxResourceFactory) diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index 633f0684f6e4..18edbb2c1f4f 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -1329,9 +1329,8 @@ sal_Bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) mxPlayer.set( avmedia::MediaWindow::createPlayer( pInfo->GetBookmark()), uno::UNO_QUERY_THROW ); mxPlayer->start(); } - catch( uno::Exception& e ) + catch( uno::Exception& ) { - (void)e; } bAnimated = sal_True; } diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index 63eb11d1f673..8df640718584 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -338,9 +338,8 @@ bool AnimationSlideController::getSlideAPI( sal_Int32 nSlideNumber, Reference< X return true; } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL( (OString("sd::AnimationSlideController::getSlideAPI(), " "exception caught: ") + @@ -660,9 +659,8 @@ void SAL_CALL SlideshowImpl::disposing() if( mxView.is() ) mxView->dispose(); } - catch( Exception& e ) + catch( Exception& ) { - static_cast(e); OSL_FAIL( (OString("sd::SlideshowImpl::stop(), " "exception caught: ") + @@ -889,9 +887,8 @@ bool SlideshowImpl::startPreview( mpShowWindow->SetPreviewMode(); } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL( (OString("sd::SlideshowImpl::startPreview(), " "exception caught: ") + @@ -1138,9 +1135,8 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings ) setActiveXToolbarsVisible( sal_False ); } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL( (OString("sd::SlideshowImpl::startShow(), " "exception caught: ") + @@ -1201,9 +1197,8 @@ bool SlideshowImpl::startShowImpl( const Sequence< beans::PropertyValue >& aProp return true; } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL( (OString("sd::SlideshowImpl::startShowImpl(), " "exception caught: ") + @@ -1240,9 +1235,8 @@ void SlideshowImpl::paint( const Rectangle& /* rRect */ ) // aEvt.UpdateRect = TODO mxView->paint( aEvt ); } - catch( Exception& e ) + catch( Exception& ) { - static_cast(e); OSL_FAIL( (OString("sd::SlideshowImpl::paint(), " "exception caught: ") + @@ -1295,9 +1289,8 @@ void SlideshowImpl::removeShapeEvents() maShapeEventMap.clear(); } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL( (OString("sd::SlideshowImpl::removeShapeEvents(), " "exception caught: ") + @@ -1331,9 +1324,8 @@ void SlideshowImpl::registerShapeEvents(sal_Int32 nSlideNumber) registerShapeEvents( xDrawPage ); } } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL( (OString("sd::SlideshowImpl::registerShapeEvents(), " "exception caught: ") + @@ -1411,9 +1403,8 @@ void SlideshowImpl::registerShapeEvents( Reference< XShapes >& xShapes ) throw( mxShow->setShapeCursor( xShape, awt::SystemPointer::REFHAND ); } } - catch( Exception& e ) + catch( Exception& ) { - static_cast(e); OSL_FAIL( (OString("sd::SlideshowImpl::registerShapeEvents(), " "exception caught: ") + @@ -1483,9 +1474,8 @@ void SAL_CALL SlideshowImpl::pause() throw (RuntimeException) mxListenerProxy->paused(); } } - catch( Exception& e ) + catch( Exception& ) { - static_cast(e); OSL_FAIL( (OString("sd::SlideshowImpl::pause(), " "exception caught: ") + @@ -1520,9 +1510,8 @@ void SAL_CALL SlideshowImpl::resume() throw (RuntimeException) } } } - catch( Exception& e ) + catch( Exception& ) { - static_cast(e); OSL_FAIL( (OString("sd::SlideshowImpl::resume(), " "exception caught: ") + @@ -1586,9 +1575,8 @@ void SlideshowImpl::click( const Reference< XShape >& xShape, const ::com::sun:: mxPlayer.set(avmedia::MediaWindow::createPlayer(pEvent->maStrBookmark), uno::UNO_QUERY_THROW ); mxPlayer->start(); } - catch( uno::Exception& e ) + catch( uno::Exception& ) { - (void)e; OSL_FAIL("sd::SlideshowImpl::click(), exception caught!" ); } } @@ -1943,9 +1931,8 @@ sal_Int32 SlideshowImpl::updateSlideShow (void) } } } - catch( Exception& e ) + catch( Exception& ) { - static_cast(e); OSL_FAIL( (OString("sd::SlideshowImpl::updateSlideShow(), exception caught: ") + rtl::OUStringToOString( @@ -2074,10 +2061,9 @@ bool SlideshowImpl::keyInput(const KeyEvent& rKEvt) break; } } - catch( Exception& e ) + catch( Exception& ) { bRet = false; - static_cast(e); OSL_FAIL( (OString("sd::SlideshowImpl::keyInput(), " "exception caught: ") + @@ -2469,9 +2455,8 @@ Reference< XSlideShow > SlideshowImpl::createSlideShow() const xShow.set( xInt, UNO_QUERY_THROW ); } - catch( uno::Exception& e ) + catch( uno::Exception& ) { - (void)e; OSL_FAIL( (OString("sd::SlideshowImpl::createSlideShow(), " "exception caught: ") + @@ -2679,9 +2664,8 @@ void SlideshowImpl::resize( const Size& rSize ) awt::WindowEvent aEvt; mxView->windowResized(aEvt); } - catch( Exception& e ) + catch( Exception& ) { - static_cast(e); OSL_FAIL( (OString("sd::SlideshowImpl::resize(), " "exception caught: ") + @@ -3040,9 +3024,8 @@ void SAL_CALL SlideshowImpl::setUsePen( sal_Bool bMouseAsPen ) throw (RuntimeExc mxShow->setProperty( aPenPropSwitchPenMode ); } } - catch( Exception& e ) + catch( Exception& ) { - static_cast(e); OSL_FAIL( (OString("sd::SlideshowImpl::setUsePen(), " "exception caught: ") + @@ -3115,9 +3098,8 @@ void SAL_CALL SlideshowImpl::setEraseAllInk(bool bEraseAllInk) throw (RuntimeExc aPenPropEraseAllInk.Value <<= bEraseAllInk; mxShow->setProperty( aPenPropEraseAllInk ); } - catch( Exception& e ) + catch( Exception& ) { - static_cast(e); OSL_TRACE( (OString("sd::SlideshowImpl::setEraseAllInk(), " "exception caught: ") + @@ -3336,9 +3318,8 @@ void SlideshowImpl::gotoPreviousSlide (const bool bSkipAllMainSequenceEffects) } } } - catch( Exception& e ) + catch( Exception& ) { - static_cast(e); OSL_FAIL( (OString("sd::SlideshowImpl::gotoPreviousSlide(), " "exception caught: ") + @@ -3437,9 +3418,8 @@ void SAL_CALL SlideshowImpl::stopSound( ) throw (RuntimeException) mxPlayer.clear(); } } - catch( Exception& e ) + catch( Exception& ) { - static_cast(e); OSL_FAIL( (OString("sd::SlideshowImpl::stopSound(), " "exception caught: ") + diff --git a/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx b/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx index 914f39628062..1f78d8e263a4 100644 --- a/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx +++ b/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx @@ -134,13 +134,11 @@ CacheConfiguration::CacheConfiguration (void) xHierarchy->getByHierarchicalName(sPathToNode), UNO_QUERY); } - catch (RuntimeException &aException) + catch (RuntimeException &) { - (void)aException; } - catch (Exception &aException) + catch (Exception &) { - (void)aException; } } @@ -157,9 +155,8 @@ Any CacheConfiguration::GetValue (const ::rtl::OUString& rName) { aResult = mxCacheNode->getByName(rName); } - catch (Exception &aException) + catch (Exception &) { - (void)aException; } } diff --git a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx index b503363c64a8..44ce6c5f2124 100644 --- a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx +++ b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx @@ -221,14 +221,12 @@ void QueueProcessor::ProcessOneRequest ( } } } - catch (::com::sun::star::uno::RuntimeException &aException) + catch (::com::sun::star::uno::RuntimeException &) { - (void) aException; OSL_FAIL("RuntimeException caught in QueueProcessor"); } - catch (::com::sun::star::uno::Exception &aException) + catch (::com::sun::star::uno::Exception &) { - (void) aException; OSL_FAIL("Exception caught in QueueProcessor"); } } diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx index 0d9f576327d3..d86ce83e8289 100644 --- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx +++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx @@ -189,9 +189,8 @@ SlideSorterController::~SlideSorterController (void) if (xComponent.is()) xComponent->dispose(); } - catch( uno::Exception& e ) + catch( uno::Exception& ) { - (void)e; OSL_FAIL( "sd::SlideSorterController::~SlideSorterController(), exception caught!" ); } diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx index 4ef5cf62b5db..22beaae0df9b 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx +++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx @@ -165,9 +165,8 @@ SlideSorterViewShell::~SlideSorterViewShell (void) xComponent->dispose(); } } - catch( ::com::sun::star::uno::Exception& e ) + catch( ::com::sun::star::uno::Exception& ) { - (void)e; OSL_FAIL("sd::SlideSorterViewShell::~SlideSorterViewShell(), exception caught!" ); } GetFrameView()->Disconnect(); diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx index 678da8aebb96..a9943f86e300 100644 --- a/sd/source/ui/table/TableDesignPane.cxx +++ b/sd/source/ui/table/TableDesignPane.cxx @@ -150,9 +150,8 @@ TableDesignPane::TableDesignPane( ::Window* pParent, ViewShellBase& rBase, bool mxTableFamily = Reference< XIndexAccess >( xFamilies->getByName( sFamilyName ), UNO_QUERY_THROW ); } - catch( Exception& e ) + catch( Exception& ) { - (void)e; OSL_FAIL( "sd::CustomAnimationPane::CustomAnimationPane(), Exception caught!" ); } diff --git a/sd/source/ui/tools/ConfigurationAccess.cxx b/sd/source/ui/tools/ConfigurationAccess.cxx index 2ae41508f723..3a9994cf76ca 100644 --- a/sd/source/ui/tools/ConfigurationAccess.cxx +++ b/sd/source/ui/tools/ConfigurationAccess.cxx @@ -148,7 +148,7 @@ Any ConfigurationAccess::GetConfigurationNode ( return rxNode->getByHierarchicalName(sPathToNode); } } - catch (Exception& rException) + catch (const Exception& rException) { OSL_TRACE ("caught exception while getting configuration node %s: %s", ::rtl::OUStringToOString(sPathToNode, RTL_TEXTENCODING_UTF8).getStr(), diff --git a/sd/source/ui/unoidl/sddetect.cxx b/sd/source/ui/unoidl/sddetect.cxx index 73f3b741ae3f..47114ca6ccaa 100644 --- a/sd/source/ui/unoidl/sddetect.cxx +++ b/sd/source/ui/unoidl/sddetect.cxx @@ -269,7 +269,7 @@ SdFilterDetect::~SdFilterDetect() sFilterName = pFilter->GetName(); aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pFilter ? pFilter->IsOwnTemplateFormat() : sal_False, &sFilterName ); } - catch( lang::WrappedTargetException& aWrap ) + catch( const lang::WrappedTargetException& aWrap ) { packages::zip::ZipIOException aZipException; if ( ( aWrap.TargetException >>= aZipException ) && aTypeName.Len() ) diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index b8a9e0dec87c..54874de15129 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -253,9 +253,8 @@ void DrawViewShell::SelectionHasChanged (void) } } } - catch( ::com::sun::star::uno::Exception& e ) + catch( ::com::sun::star::uno::Exception& ) { - (void)e; OSL_FAIL( (rtl::OString("sd::DrawViewShell::SelectionHasChanged(), " "exception caught: ") + -- cgit