summaryrefslogtreecommitdiff
path: root/include/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-11 09:48:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-01-13 06:49:23 +0000
commite8b49f09074fe184374bee5062715357427ae044 (patch)
treeb9cf1f5e3d7ab8b98345a512b6ddb0da42fe2919 /include/vcl
parent5e0e27e758e6f7fa325f36e6e51540e10bab0fdc (diff)
new loplugin: useuniqueptr: vcl
Change-Id: Idcbc8655108ff57c06c33bbcabd652387bf3c4ec Reviewed-on: https://gerrit.libreoffice.org/32948 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/vcl')
-rw-r--r--include/vcl/builder.hxx2
-rw-r--r--include/vcl/commandevent.hxx4
-rw-r--r--include/vcl/field.hxx3
-rw-r--r--include/vcl/graph.hxx4
-rw-r--r--include/vcl/metaact.hxx5
-rw-r--r--include/vcl/oldprintadaptor.hxx2
-rw-r--r--include/vcl/print.hxx3
-rw-r--r--include/vcl/printerinfomanager.hxx3
-rw-r--r--include/vcl/textdata.hxx3
-rw-r--r--include/vcl/txtattr.hxx4
10 files changed, 20 insertions, 13 deletions
diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx
index 428f9aa76e4d..e849ee5de40f 100644
--- a/include/vcl/builder.hxx
+++ b/include/vcl/builder.hxx
@@ -473,7 +473,7 @@ public:
}
protected:
- VclBuilder *m_pUIBuilder;
+ std::unique_ptr<VclBuilder> m_pUIBuilder;
};
/*
diff --git a/include/vcl/commandevent.hxx b/include/vcl/commandevent.hxx
index 51dab89536c3..8d9496de97cb 100644
--- a/include/vcl/commandevent.hxx
+++ b/include/vcl/commandevent.hxx
@@ -91,7 +91,7 @@ class VCL_DLLPUBLIC CommandExtTextInputData
{
private:
OUString maText;
- ExtTextInputAttr* mpTextAttr;
+ std::unique_ptr<ExtTextInputAttr[]> mpTextAttr;
sal_Int32 mnCursorPos;
sal_uInt16 mnCursorFlags;
bool mbOnlyCursor;
@@ -106,7 +106,7 @@ public:
~CommandExtTextInputData();
const OUString& GetText() const { return maText; }
- const ExtTextInputAttr* GetTextAttr() const { return mpTextAttr; }
+ const ExtTextInputAttr* GetTextAttr() const { return mpTextAttr.get(); }
sal_Int32 GetCursorPos() const { return mnCursorPos; }
bool IsCursorVisible() const { return (mnCursorFlags & EXTTEXTINPUT_CURSOR_INVISIBLE) == 0; }
diff --git a/include/vcl/field.hxx b/include/vcl/field.hxx
index c19865b4e76e..b149d1a39f95 100644
--- a/include/vcl/field.hxx
+++ b/include/vcl/field.hxx
@@ -39,7 +39,8 @@ class VCL_DLLPUBLIC FormatterBase
{
private:
VclPtr<Edit> mpField;
- LocaleDataWrapper* mpLocaleDataWrapper;
+ std::unique_ptr<LocaleDataWrapper>
+ mpLocaleDataWrapper;
bool mbReformat;
bool mbStrictFormat;
bool mbEmptyFieldValue;
diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx
index 3869db57b782..1339a88c7319 100644
--- a/include/vcl/graph.hxx
+++ b/include/vcl/graph.hxx
@@ -66,9 +66,9 @@ public:
protected:
OUString maUpperName;
- GraphicReader() : mpReaderData( nullptr ) {}
+ GraphicReader();
private:
- ReaderData* mpReaderData;
+ std::unique_ptr<ReaderData> mpReaderData;
};
class VCL_DLLPUBLIC GraphicConversionParameters
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index c7a26cd9727b..5041f3a954ee 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -445,7 +445,8 @@ private:
Point maStartPt;
OUString maStr;
- long* mpDXAry;
+ std::unique_ptr<long[]>
+ mpDXAry;
sal_Int32 mnIndex;
sal_Int32 mnLen;
@@ -473,7 +474,7 @@ public:
const OUString& GetText() const { return maStr; }
sal_Int32 GetIndex() const { return mnIndex; }
sal_Int32 GetLen() const { return mnLen; }
- long* GetDXArray() const { return mpDXAry; }
+ long* GetDXArray() const { return mpDXAry.get(); }
};
class VCL_DLLPUBLIC MetaStretchTextAction : public MetaAction
diff --git a/include/vcl/oldprintadaptor.hxx b/include/vcl/oldprintadaptor.hxx
index bd65f4d2ce27..9889a18b6870 100644
--- a/include/vcl/oldprintadaptor.hxx
+++ b/include/vcl/oldprintadaptor.hxx
@@ -27,7 +27,7 @@ namespace vcl
struct ImplOldStyleAdaptorData;
class VCL_DLLPUBLIC OldStylePrintAdaptor : public PrinterController
{
- ImplOldStyleAdaptorData* mpData;
+ std::unique_ptr<ImplOldStyleAdaptorData> mpData;
public:
OldStylePrintAdaptor( const VclPtr< Printer >& );
virtual ~OldStylePrintAdaptor() override;
diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index f452564c107d..a743cb0ab295 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -392,7 +392,8 @@ enum class NupOrderType
class VCL_DLLPUBLIC PrinterController
{
- ImplPrinterControllerData* mpImplData;
+ std::unique_ptr<ImplPrinterControllerData>
+ mpImplData;
protected:
PrinterController( const VclPtr<Printer>& );
public:
diff --git a/include/vcl/printerinfomanager.hxx b/include/vcl/printerinfomanager.hxx
index 258b54491f2b..4b1105df4337 100644
--- a/include/vcl/printerinfomanager.hxx
+++ b/include/vcl/printerinfomanager.hxx
@@ -107,7 +107,8 @@ protected:
std::list< SystemPrintQueue > m_aSystemPrintQueues;
- SystemQueueInfo* m_pQueueInfo;
+ std::unique_ptr<SystemQueueInfo>
+ m_pQueueInfo;
Type m_eType;
bool m_bUseIncludeFeature;
diff --git a/include/vcl/textdata.hxx b/include/vcl/textdata.hxx
index de0dabd93348..0ce7955e59f8 100644
--- a/include/vcl/textdata.hxx
+++ b/include/vcl/textdata.hxx
@@ -25,6 +25,7 @@
#include <rtl/ustring.hxx>
#include <svl/hint.hxx>
#include <vcl/dllapi.h>
+#include <memory>
enum class ExtTextInputAttr;
@@ -126,7 +127,7 @@ public:
struct TEIMEInfos
{
OUString aOldTextAfterStartPos;
- ExtTextInputAttr* pAttribs;
+ std::unique_ptr<ExtTextInputAttr[]> pAttribs;
TextPaM aPos;
sal_Int32 nLen;
bool bCursor;
diff --git a/include/vcl/txtattr.hxx b/include/vcl/txtattr.hxx
index cab94b248e0b..a02ef5850446 100644
--- a/include/vcl/txtattr.hxx
+++ b/include/vcl/txtattr.hxx
@@ -25,6 +25,7 @@
#include <tools/debug.hxx>
#include <vcl/vclenum.hxx>
#include <vcl/dllapi.h>
+#include <memory>
namespace vcl { class Font; }
@@ -129,7 +130,8 @@ public:
class TextCharAttrib
{
private:
- TextAttrib* mpAttr;
+ std::unique_ptr<TextAttrib>
+ mpAttr;
sal_Int32 mnStart;
sal_Int32 mnEnd;