[Libreoffice-commits] core.git: sc/source
Noel Grandin
noel.grandin at collabora.co.uk
Wed Jul 4 06:36:02 UTC 2018
sc/source/ui/inc/notemark.hxx | 2 +-
sc/source/ui/view/notemark.cxx | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit ac49eb6ef947e21504d7f20d2d5e9fea4dbd263f
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Tue Jul 3 09:42:47 2018 +0200
loplugin:useuniqueptr in ScNoteMarker
Change-Id: I4880f23a6c5879807430b60e812c6c697cf69268
Reviewed-on: https://gerrit.libreoffice.org/56905
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sc/source/ui/inc/notemark.hxx b/sc/source/ui/inc/notemark.hxx
index a8305316e2d4..a8a7fd8d01dc 100644
--- a/sc/source/ui/inc/notemark.hxx
+++ b/sc/source/ui/inc/notemark.hxx
@@ -47,7 +47,7 @@ private:
tools::Rectangle m_aRect;
ScDrawView* m_pDrawView;
- SdrModel* m_pModel;
+ std::unique_ptr<SdrModel> m_pModel;
std::shared_ptr< SdrCaptionObj > m_xObject;
bool m_bVisible;
DECL_LINK( TimeHdl, Timer*, void );
diff --git a/sc/source/ui/view/notemark.cxx b/sc/source/ui/view/notemark.cxx
index 3df9dc44e2ff..5f4b4d2e91d5 100644
--- a/sc/source/ui/view/notemark.cxx
+++ b/sc/source/ui/view/notemark.cxx
@@ -71,14 +71,14 @@ ScNoteMarker::~ScNoteMarker()
InvalidateWin();
- delete m_pModel;
+ m_pModel.reset();
}
IMPL_LINK_NOARG(ScNoteMarker, TimeHdl, Timer *, void)
{
if (!m_bVisible)
{
- m_pModel = new SdrModel();
+ m_pModel.reset( new SdrModel() );
m_pModel->SetScaleUnit(MapUnit::Map100thMM);
SfxItemPool& rPool = m_pModel->GetItemPool();
rPool.SetDefaultMetric(MapUnit::Map100thMM);
More information about the Libreoffice-commits
mailing list