summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-22 13:25:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-23 09:31:20 +0200
commitd1e47b1428abf1732ab4d5e219b210760d4152e0 (patch)
tree8eac1def834ba548c45a8a1a18e8e39d45eedc1d /include
parenttdf#105461 PDF export of editeng fill color: restrict to logic map modes (diff)
downloadcore-d1e47b1428abf1732ab4d5e219b210760d4152e0.tar.gz
core-d1e47b1428abf1732ab4d5e219b210760d4152e0.zip
enhance useuniqueptr loplugin
teach it to look for the following sequence in a destructor: delete m_pfoo; m_pfoo = nullptr; Change-Id: Icd6271a63a024e32b53cc9e599f8f59952160380 Reviewed-on: https://gerrit.libreoffice.org/37900 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/sfx2/sfxbasemodel.hxx4
-rw-r--r--include/svl/poolitem.hxx3
-rw-r--r--include/unotools/options.hxx1
-rw-r--r--include/vcl/field.hxx2
4 files changed, 7 insertions, 3 deletions
diff --git a/include/sfx2/sfxbasemodel.hxx b/include/sfx2/sfxbasemodel.hxx
index 1188bef60028..c8cb5783cf99 100644
--- a/include/sfx2/sfxbasemodel.hxx
+++ b/include/sfx2/sfxbasemodel.hxx
@@ -87,6 +87,8 @@
#include <cppuhelper/implbase.hxx>
#include <svl/lstner.hxx>
+#include <memory>
+
class SfxMedium;
class SfxPrinter;
class SfxViewShell;
@@ -738,7 +740,7 @@ private:
private:
- IMPL_SfxBaseModel_DataContainer* m_pData ;
+ std::unique_ptr<IMPL_SfxBaseModel_DataContainer> m_pData;
// cannot be held in m_pData, since it needs to be accessed in non-threadsafe context
const bool m_bSupportEmbeddedScripts;
const bool m_bSupportDocRecovery;
diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx
index 78ed4120841f..eae64a52388c 100644
--- a/include/svl/poolitem.hxx
+++ b/include/svl/poolitem.hxx
@@ -23,6 +23,7 @@
#include <sal/config.h>
#include <climits>
+#include <memory>
#include <com/sun/star/uno/Any.hxx>
#include <svl/hint.hxx>
@@ -256,7 +257,7 @@ public:
class SVL_DLLPUBLIC SfxSetItem: public SfxPoolItem
{
- SfxItemSet *pSet;
+ std::unique_ptr<SfxItemSet> pSet;
SfxSetItem & operator=( const SfxSetItem& ) = delete;
diff --git a/include/unotools/options.hxx b/include/unotools/options.hxx
index 08773f4f53c4..c2316aacf940 100644
--- a/include/unotools/options.hxx
+++ b/include/unotools/options.hxx
@@ -78,6 +78,7 @@ namespace utl {
// notify listeners; nHint is an implementation detail of the particular class deriving from ConfigurationBroadcaster
void NotifyListeners( ConfigurationHints nHint );
ConfigurationBroadcaster();
+ ConfigurationBroadcaster(ConfigurationBroadcaster const & );
virtual ~ConfigurationBroadcaster();
virtual void BlockBroadcasts( bool bBlock );
};
diff --git a/include/vcl/field.hxx b/include/vcl/field.hxx
index 763fe714d9f0..7fca5c290205 100644
--- a/include/vcl/field.hxx
+++ b/include/vcl/field.hxx
@@ -269,7 +269,7 @@ public:
class VCL_DLLPUBLIC DateFormatter : public FormatterBase
{
private:
- CalendarWrapper* mpCalendarWrapper;
+ std::unique_ptr<CalendarWrapper> mpCalendarWrapper;
Date maFieldDate;
Date maLastDate;
Date maMin;