summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-23 09:44:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-24 08:21:33 +0200
commit070980765bc5b2fc3b59e000cdc0611ac1fb622e (patch)
treed6339699656c78517c3ad03dbcbfe2e657956ed4 /include
parenta11b9c00b84474e1e37fa8abdfd50df87a674cf1 (diff)
loplugin:useuniqueptr in ToolBox
Change-Id: Id2cbc7d70de2e0ddf0503448575fe2c2ca0120a0 Reviewed-on: https://gerrit.libreoffice.org/53345 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/toolbox.hxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index 92382df66bce..2018be7986d4 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -28,6 +28,7 @@
#include <o3tl/typed_flags_set.hxx>
#include <limits>
+#include <memory>
#include <vector>
#include <com/sun/star/frame/XFrame.hpp>
@@ -98,9 +99,9 @@ private:
ImplToolItems::size_type mnLines;
};
- ImplToolBoxPrivateData* mpData;
+ std::unique_ptr<ImplToolBoxPrivateData> mpData;
std::vector<ImplToolSize> maFloatSizes;
- Idle *mpIdle;
+ std::unique_ptr<Idle> mpIdle;
tools::Rectangle maUpperRect;
tools::Rectangle maLowerRect;
tools::Rectangle maPaintRect;
@@ -254,7 +255,7 @@ public:
SAL_DLLPRIVATE void ImplDrawMenuButton(vcl::RenderContext& rRenderContext, bool bHighlight);
SAL_DLLPRIVATE void ImplDrawButton(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect, sal_uInt16 highlight, bool bChecked, bool bEnabled, bool bIsWindow);
SAL_DLLPRIVATE ImplToolItems::size_type ImplCountLineBreaks() const;
- SAL_DLLPRIVATE ImplToolBoxPrivateData* ImplGetToolBoxPrivateData() const { return mpData; }
+ SAL_DLLPRIVATE ImplToolBoxPrivateData* ImplGetToolBoxPrivateData() const { return mpData.get(); }
protected:
virtual void ApplySettings(vcl::RenderContext& rRenderContext) override;