summaryrefslogtreecommitdiff
path: root/sd/source/ui
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2011-12-25 15:08:11 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2011-12-25 15:09:58 +0900
commit8cc98837d30d818fe3a2e4063798c7451044eb9c (patch)
tree2da46809bc97a39489c6d57c8c855ebefb58899d /sd/source/ui
parent8b18c70b994e8239f2f0dfd549fcc27feceb413c (diff)
catch exception by constant reference
Diffstat (limited to 'sd/source/ui')
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx3
-rw-r--r--sd/source/ui/animations/CustomAnimationList.cxx7
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.cxx17
-rw-r--r--sd/source/ui/annotations/annotationmanager.cxx3
-rw-r--r--sd/source/ui/dlg/dlgass.cxx9
-rw-r--r--sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx2
-rw-r--r--sd/source/ui/func/fusel.cxx3
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx60
-rw-r--r--sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx9
-rw-r--r--sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx6
-rw-r--r--sd/source/ui/slidesorter/controller/SlideSorterController.cxx3
-rw-r--r--sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx3
-rw-r--r--sd/source/ui/table/TableDesignPane.cxx3
-rw-r--r--sd/source/ui/tools/ConfigurationAccess.cxx2
-rw-r--r--sd/source/ui/unoidl/sddetect.cxx2
-rw-r--r--sd/source/ui/view/drviews1.cxx3
16 files changed, 48 insertions, 87 deletions
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<void>(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<void>(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<void>(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<void>(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<void>(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<void>(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<void>(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<void>(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<void>(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<void>(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<void>(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<void>(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: ") +