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>
This commit is contained in:
parent
8683fbd301
commit
5ee24060e4
2 changed files with 9 additions and 20 deletions
|
@ -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;
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue