summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-11-30 10:31:23 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-11-30 21:24:29 +0100
commit19b86af070453bb8671aefe7472012d19580dd81 (patch)
tree591f3b0163f512f3ec21f355bb706a191069fc5e
parent18a7a5859b6c2f59ab2f64eadfc6178abb96940b (diff)
silence various coverity warnings
Change-Id: I9ac4c179c30efa9d5950aa2106639d3781dd0308 Reviewed-on: https://gerrit.libreoffice.org/45583 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--include/vcl/dockwin.hxx3
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx3
-rw-r--r--sd/source/ui/view/viewshel.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par.hxx3
-rw-r--r--sw/source/uibase/app/docsh2.cxx3
-rw-r--r--vcl/source/edit/textview.cxx14
6 files changed, 17 insertions, 13 deletions
diff --git a/include/vcl/dockwin.hxx b/include/vcl/dockwin.hxx
index 63301f56c369..1378e07c1911 100644
--- a/include/vcl/dockwin.hxx
+++ b/include/vcl/dockwin.hxx
@@ -24,6 +24,7 @@
#include <vcl/dllapi.h>
#include <vcl/builder.hxx>
#include <vcl/floatwin.hxx>
+#include <o3tl/deleter.hxx>
#include <memory>
#include <vector>
@@ -167,7 +168,7 @@ public:
class VCL_DLLPUBLIC DockingManager
{
- std::vector<std::unique_ptr<ImplDockingWindowWrapper>> mvDockingWindows;
+ std::vector<std::unique_ptr<ImplDockingWindowWrapper, o3tl::default_delete<ImplDockingWindowWrapper>>> mvDockingWindows;
public:
DockingManager();
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx b/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx
index 241b310b3bf8..3666eec12373 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx
@@ -26,6 +26,7 @@
#include <sdxfer.hxx>
#include <sal/types.h>
+#include <o3tl/deleter.hxx>
#include <tools/solar.h>
#include <svx/svdpage.hxx>
@@ -134,7 +135,7 @@ private:
class UndoContext;
std::unique_ptr<UndoContext> mxUndoContext;
- std::unique_ptr<SelectionObserver::Context> mxSelectionObserverContext;
+ std::unique_ptr<SelectionObserver::Context, o3tl::default_delete<SelectionObserver::Context>> mxSelectionObserverContext;
ImplSVEvent * mnDragFinishedUserEventId;
void CreateSlideTransferable (
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 82a6e67db3cc..f335beaa3a54 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -1273,7 +1273,7 @@ void ViewShell::ImpSidUndo(SfxRequest& rReq)
{
//The xWatcher keeps the SlideSorter selection in sync
//with the page insertions/deletions that Undo may introduce
- std::unique_ptr<KeepSlideSorterInSyncWithPageChanges> xWatcher;
+ std::unique_ptr<KeepSlideSorterInSyncWithPageChanges, o3tl::default_delete<KeepSlideSorterInSyncWithPageChanges>> xWatcher;
slidesorter::SlideSorterViewShell* pSlideSorterViewShell
= slidesorter::SlideSorterViewShell::GetSlideSorter(GetViewShellBase());
if (pSlideSorterViewShell)
@@ -1342,7 +1342,7 @@ void ViewShell::ImpSidRedo(SfxRequest& rReq)
{
//The xWatcher keeps the SlideSorter selection in sync
//with the page insertions/deletions that Undo may introduce
- std::unique_ptr<KeepSlideSorterInSyncWithPageChanges> xWatcher;
+ std::unique_ptr<KeepSlideSorterInSyncWithPageChanges, o3tl::default_delete<KeepSlideSorterInSyncWithPageChanges>> xWatcher;
slidesorter::SlideSorterViewShell* pSlideSorterViewShell
= slidesorter::SlideSorterViewShell::GetSlideSorter(GetViewShellBase());
if (pSlideSorterViewShell)
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 968edc8eb73c..32cdc79aa96c 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -51,6 +51,7 @@
#include <fmtsrnd.hxx>
#include <ndtxt.hxx>
#include <editeng/lrspitem.hxx>
+#include <o3tl/deleter.hxx>
#include <oox/ole/olehelper.hxx>
#define SW_UD_IMAPDATA 2
@@ -1209,7 +1210,7 @@ private:
std::shared_ptr<WW8Fib> m_xWwFib;
std::unique_ptr<WW8Fonts> m_xFonts;
std::unique_ptr<WW8Dop> m_xWDop;
- std::unique_ptr<WW8ListManager> m_xLstManager;
+ std::unique_ptr<WW8ListManager, o3tl::default_delete<WW8ListManager>> m_xLstManager;
std::unique_ptr<WW8ScannerBase> m_xSBase;
std::shared_ptr<WW8PLCFMan> m_xPlcxMan;
std::map<short, OUString> m_aLinkStringMap;
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index e9877bf14ee9..6fbae6d556ae 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -119,6 +119,7 @@
#include <com/sun/star/script/vba/VBAEventId.hpp>
#include <editeng/acorrcfg.hxx>
#include <SwStyleNameMapper.hxx>
+#include <o3tl/deleter.hxx>
#include <officecfg/Office/Security.hxx>
#include <sfx2/fcontnr.hxx>
@@ -1546,7 +1547,7 @@ ErrCode SwDocShell::LoadStylesFromFile( const OUString& rURL,
if ( bImport )
{
SwRead pRead = ReadXML;
- std::unique_ptr<SwReader> pReader;
+ std::unique_ptr<SwReader, o3tl::default_delete<SwReader>> pReader;
std::unique_ptr<SwPaM> pPam;
// the SW3IO - Reader need the pam/wrtshell, because only then he
// insert the styles!
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index 1b2c82e6215e..9493e37e952e 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -19,6 +19,7 @@
#include <memory>
#include <i18nutil/searchopt.hxx>
+#include <o3tl/deleter.hxx>
#include <vcl/textview.hxx>
#include <vcl/texteng.hxx>
#include <vcl/settings.hxx>
@@ -124,11 +125,10 @@ struct ImpTextView
VclPtr<vcl::Window> mpWindow;
TextSelection maSelection;
Point maStartDocPos;
-// TextPaM maMBDownPaM;
- std::unique_ptr<vcl::Cursor> mpCursor;
+ std::unique_ptr<vcl::Cursor, o3tl::default_delete<vcl::Cursor>> mpCursor;
- std::unique_ptr<TextDDInfo> mpDDInfo;
+ std::unique_ptr<TextDDInfo, o3tl::default_delete<TextDDInfo>> mpDDInfo;
std::unique_ptr<SelectionEngine> mpSelEngine;
std::unique_ptr<TextSelFunctionSet> mpSelFuncSet;
@@ -176,7 +176,7 @@ TextView::TextView( ExtTextEngine* pEng, vcl::Window* pWindow ) :
mpImpl->mpSelEngine->SetSelectionMode( SelectionMode::Range );
mpImpl->mpSelEngine->EnableDrag( true );
- mpImpl->mpCursor = o3tl::make_unique<vcl::Cursor>();
+ mpImpl->mpCursor.reset(new vcl::Cursor);
mpImpl->mpCursor->Show();
pWindow->SetCursor( mpImpl->mpCursor.get() );
pWindow->SetInputContext( InputContext( pEng->GetFont(), InputContextFlags::Text|InputContextFlags::ExtText ) );
@@ -1858,7 +1858,7 @@ void TextView::dragGestureRecognized( const css::datatransfer::dnd::DragGestureE
SAL_WARN_IF( !mpImpl->maSelection.HasRange(), "vcl", "TextView::dragGestureRecognized: mpImpl->mbClickedInSelection, but no selection?" );
- mpImpl->mpDDInfo = o3tl::make_unique<TextDDInfo>();
+ mpImpl->mpDDInfo.reset(new TextDDInfo);
mpImpl->mpDDInfo->mbStarterOfDD = true;
TETextDataObject* pDataObj = new TETextDataObject( GetSelected() );
@@ -1997,8 +1997,8 @@ void TextView::dragOver( const css::datatransfer::dnd::DropTargetDragEvent& rDTD
{
SolarMutexGuard aVclGuard;
- if ( !mpImpl->mpDDInfo )
- mpImpl->mpDDInfo = o3tl::make_unique<TextDDInfo>();
+ if (!mpImpl->mpDDInfo)
+ mpImpl->mpDDInfo.reset(new TextDDInfo);
TextPaM aPrevDropPos = mpImpl->mpDDInfo->maDropPos;
Point aMousePos( rDTDE.LocationX, rDTDE.LocationY );