diff options
19 files changed, 55 insertions, 51 deletions
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index bd93b07beb9a..1fd6adca3c98 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -59,6 +59,7 @@ #include <com/sun/star/embed/XEmbedPersist.hpp> #include <svtools/embedtransfer.hxx> +#include <tools/diagnose_ex.h> #include <ViewShell.hxx> using namespace com::sun::star; @@ -1271,7 +1272,7 @@ sal_Int8 SdPageObjsTLB::ExecuteDrop( const ExecuteDropEvent& rEvt ) } catch (com::sun::star::uno::Exception&) { - OSL_ASSERT(false); + DBG_UNHANDLED_EXCEPTION(); } if (nRet == DND_ACTION_NONE) diff --git a/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx b/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx index afaa4a97505e..2e481096d884 100644 --- a/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx +++ b/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx @@ -34,6 +34,7 @@ #include <com/sun/star/lang/IllegalArgumentException.hpp> #include <com/sun/star/lang/DisposedException.hpp> #include <tools/debug.hxx> +#include <tools/diagnose_ex.h> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -126,8 +127,7 @@ void ConfigurationControllerBroadcaster::NotifyListeners ( } catch(RuntimeException&) { - DBG_ASSERT(false, - "ConfigurationController: caught exception while notifying listeners"); + DBG_UNHANDLED_EXCEPTION(); } } } @@ -215,8 +215,7 @@ void ConfigurationControllerBroadcaster::DisposeAndClear (void) } catch (RuntimeException&) { - DBG_ASSERT(false, - "ConfigurationController: caught exception while notifying dispose"); + DBG_UNHANDLED_EXCEPTION(); } } else diff --git a/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx b/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx index 5c680e274392..97f67cf5541f 100644 --- a/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx +++ b/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx @@ -36,6 +36,7 @@ #include "ResourceFactoryManager.hxx" #include "framework/FrameworkHelper.hxx" #include <com/sun/star/lang/DisposedException.hpp> +#include <tools/diagnose_ex.h> #include <algorithm> #include <boost/bind.hpp> @@ -172,7 +173,7 @@ void ConfigurationControllerResourceManager::ActivateResource ( } catch(Exception&) { - OSL_ENSURE(false, "caught exception while activating resource"); + DBG_UNHANDLED_EXCEPTION(); } if (xResource.is()) @@ -201,7 +202,7 @@ void ConfigurationControllerResourceManager::ActivateResource ( } catch (RuntimeException&) { - OSL_ASSERT(false); + DBG_UNHANDLED_EXCEPTION(); } } @@ -261,7 +262,7 @@ void ConfigurationControllerResourceManager::DeactivateResource ( } catch (RuntimeException&) { - OSL_ASSERT(false); + DBG_UNHANDLED_EXCEPTION(); } #if defined VERBOSE && VERBOSE>=1 diff --git a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx index d6400e567597..957945c2f097 100644 --- a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx +++ b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx @@ -38,6 +38,7 @@ #include "framework/FrameworkHelper.hxx" #include <comphelper/scopeguard.hxx> +#include <tools/diagnose_ex.h> #include <boost/bind.hpp> @@ -247,8 +248,7 @@ void ConfigurationUpdater::UpdateConfiguration (void) } catch (RuntimeException e) { - OSL_TRACE("caught exception while updating the current configuration"); - DBG_ASSERT(false, "caught exception while updating the current configuration"); + DBG_UNHANDLED_EXCEPTION(); } #if defined VERBOSE && VERBOSE>0 @@ -343,7 +343,7 @@ void ConfigurationUpdater::UpdateCore (const ConfigurationClassifier& rClassifie } catch(RuntimeException) { - OSL_ASSERT(false); + DBG_UNHANDLED_EXCEPTION(); } } diff --git a/sd/source/ui/framework/factories/PresentationFactory.cxx b/sd/source/ui/framework/factories/PresentationFactory.cxx index 7165b93f8ca8..96c18243b01a 100644 --- a/sd/source/ui/framework/factories/PresentationFactory.cxx +++ b/sd/source/ui/framework/factories/PresentationFactory.cxx @@ -38,6 +38,7 @@ #include "ViewShellBase.hxx" #include <com/sun/star/drawing/framework/XControllerManager.hpp> #include <cppuhelper/compbase1.hxx> +#include <tools/diagnose_ex.h> #include "slideshow.hxx" using namespace ::com::sun::star; @@ -158,7 +159,7 @@ PresentationFactory::PresentationFactory ( } catch (RuntimeException&) { - OSL_ASSERT(false); + DBG_UNHANDLED_EXCEPTION(); } } @@ -312,7 +313,7 @@ void SAL_CALL PresentationFactoryProvider::initialize( } catch (RuntimeException&) { - OSL_ASSERT(false); + DBG_UNHANDLED_EXCEPTION(); } } } diff --git a/sd/source/ui/framework/module/ModuleController.cxx b/sd/source/ui/framework/module/ModuleController.cxx index 63ff7e9589bd..a241d9020ac7 100644 --- a/sd/source/ui/framework/module/ModuleController.cxx +++ b/sd/source/ui/framework/module/ModuleController.cxx @@ -38,6 +38,8 @@ #include <boost/bind.hpp> #include <hash_map> +#include <tools/diagnose_ex.h> + using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::drawing::framework; @@ -171,7 +173,7 @@ void ModuleController::LoadFactories (const Reference<XComponentContext>& rxCont } catch (Exception&) { - OSL_TRACE("ERROR in ModuleController::LoadFactories"); + DBG_UNHANDLED_EXCEPTION(); } } diff --git a/sd/source/ui/framework/tools/FrameworkHelper.cxx b/sd/source/ui/framework/tools/FrameworkHelper.cxx index 4ce1bfebf6ee..9a49aa88876d 100644 --- a/sd/source/ui/framework/tools/FrameworkHelper.cxx +++ b/sd/source/ui/framework/tools/FrameworkHelper.cxx @@ -55,6 +55,7 @@ #include "vcl/svapp.hxx" #include <osl/doublecheckedlocking.h> #include <osl/getglobalmutex.hxx> +#include <tools/diagnose_ex.h> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -720,7 +721,7 @@ void FrameworkHelper::HandleModeChangeSlot ( } catch (RuntimeException&) { - OSL_TRACE("HandleModeChangeSlot: caught exception"); + DBG_UNHANDLED_EXCEPTION(); } } @@ -855,7 +856,7 @@ void FrameworkHelper::UpdateConfiguration (void) } catch (RuntimeException&) { - DBG_ASSERT(false, "FrameworkHelper::UpdateConfiguration: caught exception"); + DBG_UNHANDLED_EXCEPTION(); } } } @@ -1056,7 +1057,7 @@ CallbackCaller::CallbackCaller ( } catch (RuntimeException&) { - DBG_ASSERT(false,"ConfigurationUpdateGuard: caught exception"); + DBG_UNHANDLED_EXCEPTION(); } } @@ -1083,7 +1084,7 @@ void CallbackCaller::disposing (void) } catch (RuntimeException&) { - DBG_ASSERT(false,"~ConfigurationUpdateGuard: caught exception"); + DBG_UNHANDLED_EXCEPTION(); } } diff --git a/sd/source/ui/slideshow/PaneHider.cxx b/sd/source/ui/slideshow/PaneHider.cxx index a6b1241496ca..43d24395cdd4 100644 --- a/sd/source/ui/slideshow/PaneHider.cxx +++ b/sd/source/ui/slideshow/PaneHider.cxx @@ -45,6 +45,8 @@ #include <com/sun/star/drawing/framework/XConfiguration.hpp> #include <com/sun/star/lang/DisposedException.hpp> +#include <tools/diagnose_ex.h> + using namespace ::com::sun::star::uno; using namespace ::com::sun::star::drawing::framework; using ::sd::framework::FrameworkHelper; @@ -91,7 +93,7 @@ PaneHider::PaneHider (const ViewShell& rViewShell, SlideshowImpl* pSlideShow) } catch (RuntimeException&) { - DBG_ASSERT(false, "caught exception in PaneHider constructor"); + DBG_UNHANDLED_EXCEPTION(); } } diff --git a/sd/source/ui/slidesorter/controller/SlsListener.cxx b/sd/source/ui/slidesorter/controller/SlsListener.cxx index 9c51643b2b49..c9e5a7a37fa6 100644 --- a/sd/source/ui/slidesorter/controller/SlsListener.cxx +++ b/sd/source/ui/slidesorter/controller/SlsListener.cxx @@ -52,6 +52,7 @@ #include <com/sun/star/frame/FrameActionEvent.hpp> #include <com/sun/star/frame/FrameAction.hpp> #include <sfx2/viewfrm.hxx> +#include <tools/diagnose_ex.h> using namespace ::com::sun::star::accessibility; @@ -231,8 +232,7 @@ void Listener::ConnectToController (void) } catch (beans::UnknownPropertyException aEvent) { - OSL_TRACE ("caught exception in SlideSorterController::SetupListeners: %s", - ::rtl::OUStringToOString(aEvent.Message, RTL_TEXTENCODING_UTF8).getStr()); + DBG_UNHANDLED_EXCEPTION(); } try { @@ -240,8 +240,7 @@ void Listener::ConnectToController (void) } catch (beans::UnknownPropertyException aEvent) { - OSL_TRACE ("caught exception in SlideSorterController::SetupListeners: %s", - ::rtl::OUStringToOString(aEvent.Message, RTL_TEXTENCODING_UTF8).getStr()); + DBG_UNHANDLED_EXCEPTION(); } } @@ -289,9 +288,7 @@ void Listener::DisconnectFromController (void) } catch (beans::UnknownPropertyException aEvent) { - OSL_TRACE ("caught exception in destructor of SlideSorterController: %s", - ::rtl::OUStringToOString(aEvent.Message, - RTL_TEXTENCODING_UTF8).getStr()); + DBG_UNHANDLED_EXCEPTION(); } mbListeningToController = false; @@ -491,9 +488,7 @@ void SAL_CALL Listener::propertyChange ( } catch (beans::UnknownPropertyException aEvent) { - OSL_TRACE ("caught exception while accessing the page number of a slide: %s", - ::rtl::OUStringToOString(aEvent.Message, - RTL_TEXTENCODING_UTF8).getStr()); + DBG_UNHANDLED_EXCEPTION(); } catch (lang::DisposedException&) { diff --git a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx index 4f21e48cce93..fa1976c24c81 100644 --- a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx +++ b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx @@ -53,6 +53,8 @@ #include "sdpage.hxx" #include "FrameView.hxx" +#include <tools/diagnose_ex.h> + using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -228,13 +230,9 @@ sal_Int32 SlideSorterModel::GetIndex (const Reference<drawing::XDrawPage>& rxSli return nNumber; } } - catch (beans::UnknownPropertyException&) - { - OSL_ASSERT(false); - } - catch (lang::DisposedException&) + catch (uno::Exception&) { - OSL_ASSERT(false); + DBG_UNHANDLED_EXCEPTION(); } } diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx index 8c3fd4532c4f..19b14dc37fdb 100644 --- a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx +++ b/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx @@ -64,6 +64,7 @@ #include <boost/shared_ptr.hpp> #include <com/sun/star/uno/Exception.hpp> #include <vcl/svapp.hxx> +#include <tools/diagnose_ex.h> using namespace ::sdr::contact; using namespace ::sd::slidesorter::model; @@ -1169,7 +1170,7 @@ BitmapEx PageObjectViewObjectContact::GetPreview ( } catch (const ::com::sun::star::uno::Exception&) { - OSL_TRACE("PageObjectViewObjectContact::GetPreview: caught exception"); + DBG_UNHANDLED_EXCEPTION(); } return aBitmap; diff --git a/sd/source/ui/toolpanel/controls/DocumentHelper.cxx b/sd/source/ui/toolpanel/controls/DocumentHelper.cxx index 19e51186299b..80189f8d0128 100644 --- a/sd/source/ui/toolpanel/controls/DocumentHelper.cxx +++ b/sd/source/ui/toolpanel/controls/DocumentHelper.cxx @@ -46,6 +46,7 @@ #include <com/sun/star/frame/XComponentLoader.hpp> #include <com/sun/star/container/XIndexAccess.hpp> #include "stlpool.hxx" +#include <tools/diagnose_ex.h> using namespace ::com::sun::star; @@ -248,9 +249,7 @@ SdPage* DocumentHelper::AddMasterPage ( catch (uno::Exception& rException) { pClonedMasterPage = NULL; - OSL_TRACE("caught exception while adding master page: %s", - ::rtl::OUStringToOString(rException.Message, - RTL_TEXTENCODING_UTF8).getStr()); + DBG_UNHANDLED_EXCEPTION(); } catch (::std::exception rException) { diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx index d01a86a94276..4726dc4a7b1f 100644 --- a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx +++ b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx @@ -43,6 +43,7 @@ #include <vcl/image.hxx> #include <vcl/pngread.hxx> #include <com/sun/star/embed/ElementModes.hpp> +#include <tools/diagnose_ex.h> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -294,7 +295,7 @@ SdPage* TemplatePageObjectProvider::operator() (SdDrawDocument* pContainerDocume } catch (uno::RuntimeException) { - OSL_TRACE ("caught exception while loading page from template file"); + DBG_UNHANDLED_EXCEPTION(); pPage = NULL; } diff --git a/sd/source/ui/tools/ConfigurationAccess.cxx b/sd/source/ui/tools/ConfigurationAccess.cxx index a262f0e1a652..2c3e2c33e648 100644 --- a/sd/source/ui/tools/ConfigurationAccess.cxx +++ b/sd/source/ui/tools/ConfigurationAccess.cxx @@ -36,6 +36,7 @@ #include <com/sun/star/container/XHierarchicalNameAccess.hpp> #include <com/sun/star/util/XChangesBatch.hpp> #include <comphelper/processfactory.hxx> +#include <tools/diagnose_ex.h> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -116,11 +117,9 @@ void ConfigurationAccess::Initialize ( sAccessService, aCreationArguments); } - catch (Exception& rException) + catch (Exception&) { - OSL_TRACE ("caught exception while opening configuration: %s", - ::rtl::OUStringToOString(rException.Message, - RTL_TEXTENCODING_UTF8).getStr()); + DBG_UNHANDLED_EXCEPTION(); } } diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx index 770ca7fabf6c..ea8177087c86 100644 --- a/sd/source/ui/tools/PreviewRenderer.cxx +++ b/sd/source/ui/tools/PreviewRenderer.cxx @@ -45,6 +45,7 @@ #include <svx/editstat.hxx> #include <tools/link.hxx> #include <vcl/svapp.hxx> +#include <tools/diagnose_ex.h> namespace sd { @@ -134,7 +135,7 @@ Image PreviewRenderer::RenderPage ( } catch (const com::sun::star::uno::Exception&) { - OSL_TRACE("PreviewRenderer::RenderPage: caught exception"); + DBG_UNHANDLED_EXCEPTION(); } } @@ -196,7 +197,7 @@ Image PreviewRenderer::RenderSubstitution ( } catch (const com::sun::star::uno::Exception&) { - OSL_TRACE("PreviewRenderer::RenderPage: caught exception"); + DBG_UNHANDLED_EXCEPTION(); } return aPreview; @@ -305,7 +306,7 @@ void PreviewRenderer::PaintPage (const SdPage* pPage) } catch (const ::com::sun::star::uno::Exception&) { - OSL_TRACE("PreviewRenderer::PaintPage: caught exception"); + DBG_UNHANDLED_EXCEPTION(); } // Restore the previous online spelling and redlining states. diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index a672ce978233..47b4dbf05671 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -61,6 +61,7 @@ #include <svx/editeng.hxx> #include <vcl/metric.hxx> #include <sfx2/viewfrm.hxx> +#include <tools/diagnose_ex.h> #include "strings.hrc" #include "sdstring.hrc" @@ -977,7 +978,7 @@ void Outliner::ProvideNextTextObject (void) } catch (::com::sun::star::uno::Exception e) { - OSL_TRACE ("Outliner %p: caught exception while ending text edit mode", this); + DBG_UNHANDLED_EXCEPTION(); } SetUpdateMode(FALSE); OutlinerView* pOutlinerView = mpImpl->GetOutlinerView(); diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index 614afc06eece..475dd3fdcedb 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -1633,7 +1633,7 @@ void ViewShellBase::Implementation::GetSlotState (SfxItemSet& rSet) } catch (RuntimeException&) { - DBG_ASSERT(false, "ViewShellBase::Implementation::GetSlotState(): caught exception"); + DBG_UNHANDLED_EXCEPTION(); } } diff --git a/sd/source/ui/view/ViewTabBar.cxx b/sd/source/ui/view/ViewTabBar.cxx index 8b2440c0938f..66e5c2c82223 100644 --- a/sd/source/ui/view/ViewTabBar.cxx +++ b/sd/source/ui/view/ViewTabBar.cxx @@ -57,6 +57,7 @@ #include <com/sun/star/lang/XUnoTunnel.hpp> #include <com/sun/star/lang/DisposedException.hpp> #include <comphelper/processfactory.hxx> +#include <tools/diagnose_ex.h> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -475,7 +476,7 @@ bool ViewTabBar::ActivatePage (void) } catch (RuntimeException&) { - DBG_ASSERT(false,"ViewTabBar::ActivatePage(): caught exception"); + DBG_UNHANDLED_EXCEPTION(); } return false; diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index 54e0f37a1b19..10da05fac3dc 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -93,6 +93,7 @@ #include "DrawDocShell.hxx" #include "sdabstdlg.hxx" #include <sfx2/ipclient.hxx> +#include <tools/diagnose_ex.h> #include "ViewShellBase.hxx" #include "FormShellManager.hxx" #include "LayerTabBar.hxx" @@ -417,7 +418,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) } catch (RuntimeException&) { - DBG_ASSERT(false, "caught exception while handline SID_RELOAD"); + DBG_UNHANDLED_EXCEPTION(); } // We have to return immediately to avoid accessing this object. |