summaryrefslogtreecommitdiff
path: root/hwpfilter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-11 14:19:47 +0200
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2017-12-05 08:17:08 -0500
commit5bc2433dd92ab1d7d83a962e4601db5d77d39cf8 (patch)
tree84501ed350e2d44d54c22ec257bfa77a69609431 /hwpfilter
parent0f455f2309d018906e147269f839f52aa22eaf6a (diff)
new loplugin useuniqueptr
Change-Id: Ic7a8b32887c968d86568e4cfad7ddd1f4da7c73f Reviewed-on: https://gerrit.libreoffice.org/33339 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 98e4013c22c4ce63090a575e698cc2af82925e6b) (cherry picked from commit 051b2fbdad2a4b18f6d4b30134438e11fb9bec64)
Diffstat (limited to 'hwpfilter')
-rw-r--r--hwpfilter/source/hwpreader.cxx3
-rw-r--r--hwpfilter/source/hwpreader.hxx4
2 files changed, 4 insertions, 3 deletions
diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index 54ec8f550842..44af35646132 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -108,13 +108,12 @@ struct HwpReaderPrivate
HwpReader::HwpReader()
{
mxList = new AttributeListImpl;
- d = new HwpReaderPrivate;
+ d.reset( new HwpReaderPrivate );
}
HwpReader::~HwpReader()
{
- delete d;
}
extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportHWP(const OUString &rURL)
diff --git a/hwpfilter/source/hwpreader.hxx b/hwpfilter/source/hwpreader.hxx
index 7f71c46ec1bb..f60d7877373b 100644
--- a/hwpfilter/source/hwpreader.hxx
+++ b/hwpfilter/source/hwpreader.hxx
@@ -19,6 +19,7 @@
#ifndef INCLUDED_HWPFILTER_SOURCE_HWPREADER_HXX
#define INCLUDED_HWPFILTER_SOURCE_HWPREADER_HXX
+
#include <errno.h>
#include <stdio.h>
#include <string.h>
@@ -41,6 +42,7 @@
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/weak.hxx>
+#include <memory>
using namespace ::cppu;
using namespace ::com::sun::star::lang;
@@ -93,7 +95,7 @@ private:
Reference< XDocumentHandler > m_rxDocumentHandler;
rtl::Reference<AttributeListImpl> mxList;
HWPFile hwpfile;
- HwpReaderPrivate *d;
+ std::unique_ptr<HwpReaderPrivate> d;
private:
/* -------- Document Parsing --------- */
void makeMeta();