Kaydet (Commit) 3426b8ea authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in SwEditWin

Change-Id: I93dc00565c5ae99be774300bdde92e08546b3571
Reviewed-on: https://gerrit.libreoffice.org/57937
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 574a6265
......@@ -174,8 +174,7 @@ void SwEditWin::CleanupDropUserMarker()
{
if ( m_pUserMarker )
{
delete m_pUserMarker;
m_pUserMarker = nullptr;
m_pUserMarker.reset();
m_pUserMarkerObj = nullptr;
}
}
......@@ -464,7 +463,7 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt )
if(m_pUserMarkerObj)
{
m_pUserMarker = new SdrDropMarkerOverlay( *rSh.GetDrawView(), *m_pUserMarkerObj );
m_pUserMarker.reset(new SdrDropMarkerOverlay( *rSh.GetDrawView(), *m_pUserMarkerObj ));
}
}
}
......
......@@ -428,8 +428,7 @@ void SwEditWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle
if( rRect.IsInside( aRect ) )
{
// then cancel
delete m_pShadCursor;
m_pShadCursor = nullptr;
m_pShadCursor.reset();
}
else if( rRect.IsOver( aRect ))
{
......
......@@ -85,13 +85,13 @@ class SwEditWin final : public vcl::Window,
// type/object where the mouse pointer is
SwCallMouseEvent m_aSaveCallEvent;
SwApplyTemplate *m_pApplyTempl;
SwAnchorMarker *m_pAnchorMarker; // for relocating the anchor
std::unique_ptr<SwApplyTemplate> m_pApplyTempl;
std::unique_ptr<SwAnchorMarker> m_pAnchorMarker; // for relocating the anchor
SdrDropMarkerOverlay *m_pUserMarker;
std::unique_ptr<SdrDropMarkerOverlay> m_pUserMarker;
SdrObject *m_pUserMarkerObj;
SwShadowCursor *m_pShadCursor;
Point *m_pRowColumnSelectionStart; // save position where table row/column selection has been started
std::unique_ptr<SwShadowCursor> m_pShadCursor;
boost::optional<Point> m_xRowColumnSelectionStart; // save position where table row/column selection has been started
SwView &m_rView;
......@@ -124,7 +124,7 @@ class SwEditWin final : public vcl::Window,
sal_uInt16 m_nKS_NUMDOWN_Count; // #i23725#
sal_uInt16 m_nKS_NUMINDENTINC_Count;
SwFrameControlsManager *m_pFrameControlsManager;
std::unique_ptr<SwFrameControlsManager> m_pFrameControlsManager;
void LeaveArea(const Point &);
void JustifyAreaTimer();
......@@ -224,7 +224,7 @@ public:
static bool IsInputSequenceCheckingRequired( const OUString &rText, const SwPaM& rCursor );
void SetApplyTemplate(const SwApplyTemplate &);
SwApplyTemplate* GetApplyTemplate() const { return m_pApplyTempl; }
SwApplyTemplate* GetApplyTemplate() const { return m_pApplyTempl.get(); }
void StartExecuteDrag();
void DragFinished();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment