summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-03-01 12:06:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-03-05 07:34:30 +0100
commit5ee24060e4bb9490afb9f7322a13a52bd33dcd0b (patch)
tree76156a84f8809f27edb96f8b478e1d10184a4a04 /lotuswordpro
parent8683fbd30161ef9b7e6f28be339a63b092698896 (diff)
loplugin:useuniqueptr in XFFrameStyle
Change-Id: I812c9fc7ab297e962994265e69feb80f82adc49a Reviewed-on: https://gerrit.libreoffice.org/50752 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/inc/xfilter/xfframestyle.hxx9
-rw-r--r--lotuswordpro/source/filter/xfilter/xfframestyle.cxx20
2 files changed, 9 insertions, 20 deletions
diff --git a/lotuswordpro/inc/xfilter/xfframestyle.hxx b/lotuswordpro/inc/xfilter/xfframestyle.hxx
index 11db8a900896..6fa40fe0bca0 100644
--- a/lotuswordpro/inc/xfilter/xfframestyle.hxx
+++ b/lotuswordpro/inc/xfilter/xfframestyle.hxx
@@ -66,6 +66,7 @@
#include <xfilter/xfmargins.hxx>
#include <xfilter/xfcolor.hxx>
#include <xfilter/xfpadding.hxx>
+#include <memory>
class XFBorders;
class XFColumns;
@@ -151,10 +152,10 @@ protected:
enumXFWrap m_eWrap;
XFPadding m_aPad;
XFMargins m_aMargins;
- XFBorders *m_pBorders;
- XFColumns *m_pColumns;
- XFShadow *m_pShadow;
- XFBGImage *m_pBGImage;
+ std::unique_ptr<XFBorders> m_pBorders;
+ std::unique_ptr<XFColumns> m_pColumns;
+ std::unique_ptr<XFShadow> m_pShadow;
+ std::unique_ptr<XFBGImage> m_pBGImage;
XFColor m_aBackColor;
bool m_bProtectContent;
bool m_bProtectSize;
diff --git a/lotuswordpro/source/filter/xfilter/xfframestyle.cxx b/lotuswordpro/source/filter/xfilter/xfframestyle.cxx
index 1127633f8ae4..f40ee4651540 100644
--- a/lotuswordpro/source/filter/xfilter/xfframestyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfframestyle.cxx
@@ -65,10 +65,6 @@
XFFrameStyle::XFFrameStyle()
: m_eWrap(enumXFWrapNone)
- , m_pBorders(nullptr)
- , m_pColumns(nullptr)
- , m_pShadow(nullptr)
- , m_pBGImage(nullptr)
, m_bProtectContent(false)
, m_bProtectSize(false)
, m_bProtectPos(false)
@@ -82,34 +78,26 @@ XFFrameStyle::XFFrameStyle()
XFFrameStyle::~XFFrameStyle()
{
- delete m_pBorders;
- delete m_pColumns;
- delete m_pShadow;
- delete m_pBGImage;
}
void XFFrameStyle::SetBorders(XFBorders *pBorders)
{
- delete m_pBorders;
- m_pBorders = pBorders;
+ m_pBorders.reset(pBorders);
}
void XFFrameStyle::SetColumns(XFColumns *pColumns)
{
- delete m_pColumns;
- m_pColumns = pColumns;
+ m_pColumns.reset(pColumns);
}
void XFFrameStyle::SetShadow(XFShadow *pShadow)
{
- delete m_pShadow;
- m_pShadow = pShadow;
+ m_pShadow.reset(pShadow);
}
void XFFrameStyle::SetBackImage(XFBGImage *image)
{
- delete m_pBGImage;
- m_pBGImage = image;
+ m_pBGImage.reset(image);
}
enumXFStyle XFFrameStyle::GetStyleFamily()