summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-08-25 11:09:38 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-10-21 10:36:39 +0200
commite26f8d2592a3d7cc5b43b3246b364397dd704f0d (patch)
tree8677f333ba26a23f2999ab3a083696a8d2e29b74 /sd
parent3dce7bd77c56e61cd9457b03e8cf4137a7630eb9 (diff)
coverity#1401307 document checked 'Uncaught exception'
markup std::unique_ptr where coverity warns a dtor might throw exceptions which won't throw in practice, or where std::terminate is an acceptable response if they do Change-Id: Icc99cdecf8d8b011e599574f0a05b59efd1c65c2 Reviewed-on: https://gerrit.libreoffice.org/41561 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/framework/module/ToolBarModule.hxx3
-rw-r--r--sd/source/ui/func/fuolbull.cxx4
-rw-r--r--sd/source/ui/func/fuoltext.cxx2
-rw-r--r--sd/source/ui/inc/OutlineView.hxx3
-rw-r--r--sd/source/ui/inc/ViewShellImplementation.hxx4
-rw-r--r--sd/source/ui/inc/ViewShellManager.hxx3
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx3
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx3
-rw-r--r--sd/source/ui/view/ToolBarManager.cxx3
-rw-r--r--sd/source/ui/view/drtxtob1.cxx2
-rw-r--r--sd/source/ui/view/outlnvs2.cxx2
-rw-r--r--sd/source/ui/view/outlnvsh.cxx2
12 files changed, 20 insertions, 14 deletions
diff --git a/sd/source/ui/framework/module/ToolBarModule.hxx b/sd/source/ui/framework/module/ToolBarModule.hxx
index 933f064bd65e..d0e1ebed80b6 100644
--- a/sd/source/ui/framework/module/ToolBarModule.hxx
+++ b/sd/source/ui/framework/module/ToolBarModule.hxx
@@ -27,6 +27,7 @@
#include <com/sun/star/frame/XController.hpp>
#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/compbase.hxx>
+#include <o3tl/deleter.hxx>
#include <memory>
namespace sd {
@@ -71,7 +72,7 @@ private:
css::uno::Reference<
css::drawing::framework::XConfigurationController> mxConfigurationController;
ViewShellBase* mpBase;
- std::unique_ptr<ToolBarManager::UpdateLock> mpToolBarManagerLock;
+ std::unique_ptr<ToolBarManager::UpdateLock, o3tl::default_delete<ToolBarManager::UpdateLock>> mpToolBarManagerLock;
bool mbMainViewSwitchUpdatePending;
void HandleUpdateStart();
diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx
index 03deeed1b511..4461dfade3bb 100644
--- a/sd/source/ui/func/fuolbull.cxx
+++ b/sd/source/ui/func/fuolbull.cxx
@@ -97,7 +97,7 @@ void FuOutlineBullet::DoExecute( SfxRequest& rReq )
OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
- std::unique_ptr< OutlineViewModelChangeGuard > aGuard;
+ std::unique_ptr<OutlineViewModelChangeGuard, o3tl::default_delete<OutlineViewModelChangeGuard>> aGuard;
if (OutlineView* pView = dynamic_cast<OutlineView*>(mpView))
{
@@ -232,7 +232,7 @@ void FuOutlineBullet::SetCurrentBulletsNumbering(SfxRequest& rReq)
}
OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
- std::unique_ptr< OutlineViewModelChangeGuard > aGuard;
+ std::unique_ptr<OutlineViewModelChangeGuard, o3tl::default_delete<OutlineViewModelChangeGuard>> aGuard;
if (OutlineView* pView = dynamic_cast<OutlineView*>(mpView))
{
pOLV = pView->GetViewByWindow(mpViewShell->GetActiveWindow());
diff --git a/sd/source/ui/func/fuoltext.cxx b/sd/source/ui/func/fuoltext.cxx
index b342d506f4ce..14cb95413f78 100644
--- a/sd/source/ui/func/fuoltext.cxx
+++ b/sd/source/ui/func/fuoltext.cxx
@@ -211,7 +211,7 @@ bool FuOutlineText::KeyInput(const KeyEvent& rKEvt)
{
mpWindow->GrabFocus();
- std::unique_ptr< OutlineViewModelChangeGuard > aGuard;
+ std::unique_ptr<OutlineViewModelChangeGuard, o3tl::default_delete<OutlineViewModelChangeGuard>> aGuard;
if( (nKeyGroup != KEYGROUP_CURSOR) && (nKeyGroup != KEYGROUP_FKEYS) )
aGuard.reset( new OutlineViewModelChangeGuard( *pOutlineView ) );
diff --git a/sd/source/ui/inc/OutlineView.hxx b/sd/source/ui/inc/OutlineView.hxx
index 945fcbae93c8..60dc8569e17b 100644
--- a/sd/source/ui/inc/OutlineView.hxx
+++ b/sd/source/ui/inc/OutlineView.hxx
@@ -23,6 +23,7 @@
#include <memory>
#include <vcl/image.hxx>
#include <editeng/lrspitem.hxx>
+#include <o3tl/deleter.hxx>
#include "View.hxx"
class SdPage;
@@ -204,7 +205,7 @@ private:
DECL_LINK(EventMultiplexerListener, sd::tools::EventMultiplexerEvent&, void);
/** holds a model guard during drag and drop between BeginMovingHdl and EndMovingHdl */
- std::unique_ptr< OutlineViewModelChangeGuard > maDragAndDropModelGuard;
+ std::unique_ptr<OutlineViewModelChangeGuard, o3tl::default_delete<OutlineViewModelChangeGuard>> maDragAndDropModelGuard;
vcl::Font maPageNumberFont;
vcl::Font maBulletFont;
diff --git a/sd/source/ui/inc/ViewShellImplementation.hxx b/sd/source/ui/inc/ViewShellImplementation.hxx
index 2e2d797df415..65222ff5fe5f 100644
--- a/sd/source/ui/inc/ViewShellImplementation.hxx
+++ b/sd/source/ui/inc/ViewShellImplementation.hxx
@@ -23,7 +23,7 @@
#include "ViewShell.hxx"
#include "ViewShellManager.hxx"
#include "ToolBarManager.hxx"
-
+#include <o3tl/deleter.hxx>
#include <memory>
class SvxIMapDlg;
@@ -73,7 +73,7 @@ public:
void Release (bool bForce = false);
DECL_LINK(TimeoutCallback, Timer *, void);
private:
- ::std::unique_ptr<ToolBarManager::UpdateLock> mpLock;
+ ::std::unique_ptr<ToolBarManager::UpdateLock, o3tl::default_delete<ToolBarManager::UpdateLock>> mpLock;
/** The timer is used both as a safe guard to unlock the update lock
when Release() is not called explicitly. It is also used to
defer the release of the lock to a time when the UI is not
diff --git a/sd/source/ui/inc/ViewShellManager.hxx b/sd/source/ui/inc/ViewShellManager.hxx
index 932d835a1eab..c9e89ee86aa9 100644
--- a/sd/source/ui/inc/ViewShellManager.hxx
+++ b/sd/source/ui/inc/ViewShellManager.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_SD_SOURCE_UI_INC_VIEWSHELLMANAGER_HXX
#include "ShellFactory.hxx"
+#include <o3tl/deleter.hxx>
#include <memory>
class FmFormShell;
@@ -182,7 +183,7 @@ public:
private:
class Implementation;
- ::std::unique_ptr<ViewShellManager::Implementation> mpImpl;
+ std::unique_ptr<ViewShellManager::Implementation, o3tl::default_delete<ViewShellManager::Implementation>> mpImpl;
bool mbValid;
void LockUpdate();
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
index 5eea4cd46dde..0a3fbfe812e7 100644
--- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
@@ -58,6 +58,7 @@
#include "app.hrc"
#include "sdresid.hxx"
#include "strings.hrc"
+#include <o3tl/deleter.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/dispatch.hxx>
#include <svx/svdpagv.hxx>
@@ -303,7 +304,7 @@ protected:
virtual bool ProcessDragEvent (SelectionFunction::EventDescriptor& rDescriptor) override;
private:
- std::unique_ptr<DragAndDropContext> mpDragAndDropContext;
+ std::unique_ptr<DragAndDropContext, o3tl::default_delete<DragAndDropContext>> mpDragAndDropContext;
};
//===== SelectionFunction =====================================================
diff --git a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
index 4e852081de01..57bf311e23ce 100644
--- a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
@@ -29,6 +29,7 @@
#include "View.hxx"
#include <sfx2/viewfrm.hxx>
#include "pres.hxx"
+#include <o3tl/deleter.hxx>
#include <tools/gen.hxx>
#include <svx/svdmodel.hxx>
#include <vcl/region.hxx>
@@ -224,7 +225,7 @@ private:
std::shared_ptr<PageObjectPainter> mpPageObjectPainter;
vcl::Region maRedrawRegion;
SharedILayerPainter mpBackgroundPainter;
- std::unique_ptr<ToolTip> mpToolTip;
+ std::unique_ptr<ToolTip, o3tl::default_delete<ToolTip>> mpToolTip;
bool mbIsRearrangePending;
::std::vector<Link<LinkParamNone*,void>> maVisibilityChangeListeners;
diff --git a/sd/source/ui/view/ToolBarManager.cxx b/sd/source/ui/view/ToolBarManager.cxx
index b2ede96f664f..8aecd998617e 100644
--- a/sd/source/ui/view/ToolBarManager.cxx
+++ b/sd/source/ui/view/ToolBarManager.cxx
@@ -28,6 +28,7 @@
#include <com/sun/star/ui/UIElementType.hpp>
#include <osl/mutex.hxx>
+#include <o3tl/deleter.hxx>
#include <o3tl/enumrange.hxx>
#include <rtl/ref.hxx>
#include <sfx2/app.hxx>
@@ -316,7 +317,7 @@ private:
*/
::std::unique_ptr<LayouterLock> mpSynchronousLayouterLock;
::std::unique_ptr<LayouterLock> mpAsynchronousLayouterLock;
- ::std::unique_ptr<ViewShellManager::UpdateLock> mpViewShellManagerLock;
+ ::std::unique_ptr<ViewShellManager::UpdateLock, o3tl::default_delete<ViewShellManager::UpdateLock>> mpViewShellManagerLock;
ImplSVEvent * mnPendingUpdateCall;
ImplSVEvent * mnPendingSetValidCall;
ToolBarRules maToolBarRules;
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index f453acd062ed..e113cf9b6409 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -87,7 +87,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
sal_uInt16 nSlot = rReq.GetSlot();
OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
- std::unique_ptr< OutlineViewModelChangeGuard > aGuard;
+ std::unique_ptr<OutlineViewModelChangeGuard, o3tl::default_delete<OutlineViewModelChangeGuard>> aGuard;
if( dynamic_cast< const OutlineView *>( mpView ) != nullptr)
{
diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx
index 1509e5822201..97d1f7319558 100644
--- a/sd/source/ui/view/outlnvs2.cxx
+++ b/sd/source/ui/view/outlnvs2.cxx
@@ -351,7 +351,7 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq)
void OutlineViewShell::FuTemporaryModify(SfxRequest &rReq)
{
sal_uInt16 nSId = rReq.GetSlot();
- std::unique_ptr< OutlineViewModelChangeGuard > aGuard;
+ std::unique_ptr<OutlineViewModelChangeGuard, o3tl::default_delete<OutlineViewModelChangeGuard>> aGuard;
if (nSId != SID_OUTLINE_BULLET && nSId != FN_SVX_SET_BULLET && nSId != FN_SVX_SET_NUMBER)
{
aGuard.reset( new OutlineViewModelChangeGuard(*pOlView) );
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index fba7fe04696b..ea8d4fa7c75c 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -416,7 +416,7 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq)
bool bPreviewState = false;
sal_uLong nSlot = rReq.GetSlot();
- std::unique_ptr< OutlineViewModelChangeGuard > aGuard;
+ std::unique_ptr<OutlineViewModelChangeGuard, o3tl::default_delete<OutlineViewModelChangeGuard>> aGuard;
if( pOlView && (
(nSlot == SID_TRANSLITERATE_SENTENCE_CASE) ||
(nSlot == SID_TRANSLITERATE_TITLE_CASE) ||