summaryrefslogtreecommitdiff
path: root/include/editeng/boxitem.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-17 10:18:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-24 07:57:37 +0100
commit8eab42ddce2e9a01e65d82e2e5741a7d59fdd6ba (patch)
treec75152e5301ccca4c7fa9b282073a09a20c5ccba /include/editeng/boxitem.hxx
parent3199d25a2e0f533fdd52e0a8006552df1a5932ca (diff)
loplugin:useuniqueptr in SvxBoxItem
Change-Id: I0702a25c765fc8781b65320f44c0e0c3c56269a7 Reviewed-on: https://gerrit.libreoffice.org/48408 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/editeng/boxitem.hxx')
-rw-r--r--include/editeng/boxitem.hxx26
1 files changed, 14 insertions, 12 deletions
diff --git a/include/editeng/boxitem.hxx b/include/editeng/boxitem.hxx
index a9b70f4c288a..e6ebd6d42379 100644
--- a/include/editeng/boxitem.hxx
+++ b/include/editeng/boxitem.hxx
@@ -25,6 +25,7 @@
#include <editeng/editengdllapi.h>
#include <com/sun/star/table/BorderLine2.hpp>
#include <o3tl/typed_flags_set.hxx>
+#include <memory>
// class SvxBoxItem ------------------------------------------------------
@@ -52,10 +53,11 @@ serializing to stream.
class EDITENG_DLLPUBLIC SvxBoxItem : public SfxPoolItem
{
- editeng::SvxBorderLine *pTop,
- *pBottom,
- *pLeft,
- *pRight;
+ std::unique_ptr<editeng::SvxBorderLine>
+ pTop,
+ pBottom,
+ pLeft,
+ pRight;
sal_uInt16 nTopDist,
nBottomDist,
nLeftDist,
@@ -88,10 +90,10 @@ public:
virtual void ScaleMetrics( long nMult, long nDiv ) override;
virtual bool HasMetrics() const override;
- const editeng::SvxBorderLine* GetTop() const { return pTop; }
- const editeng::SvxBorderLine* GetBottom() const { return pBottom; }
- const editeng::SvxBorderLine* GetLeft() const { return pLeft; }
- const editeng::SvxBorderLine* GetRight() const { return pRight; }
+ const editeng::SvxBorderLine* GetTop() const { return pTop.get(); }
+ const editeng::SvxBorderLine* GetBottom() const { return pBottom.get(); }
+ const editeng::SvxBorderLine* GetLeft() const { return pLeft.get(); }
+ const editeng::SvxBorderLine* GetRight() const { return pRight.get(); }
const editeng::SvxBorderLine* GetLine( SvxBoxItemLine nLine ) const;
@@ -158,8 +160,8 @@ namespace o3tl
class EDITENG_DLLPUBLIC SvxBoxInfoItem : public SfxPoolItem
{
- editeng::SvxBorderLine* pHori; //inner horizontal Line
- editeng::SvxBorderLine* pVert; //inner vertical Line
+ std::unique_ptr<editeng::SvxBorderLine> pHori; //inner horizontal Line
+ std::unique_ptr<editeng::SvxBorderLine> pVert; //inner vertical Line
bool mbEnableHor; /// true = Enable inner horizontal line.
bool mbEnableVer; /// true = Enable inner vertical line.
@@ -201,8 +203,8 @@ public:
virtual void ScaleMetrics( long nMult, long nDiv ) override;
virtual bool HasMetrics() const override;
- const editeng::SvxBorderLine* GetHori() const { return pHori; }
- const editeng::SvxBorderLine* GetVert() const { return pVert; }
+ const editeng::SvxBorderLine* GetHori() const { return pHori.get(); }
+ const editeng::SvxBorderLine* GetVert() const { return pVert.get(); }
//The Pointers are being copied!
void SetLine( const editeng::SvxBorderLine* pNew, SvxBoxInfoItemLine nLine );