summaryrefslogtreecommitdiff
path: root/sc/source/ui/view
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2018-06-08 17:09:55 -0400
committerEike Rathke <erack@redhat.com>2018-06-26 14:24:02 +0200
commitb6b1ded0a0539e7be1b5338de378a3276a6ff445 (patch)
tree79ac65de77ee5eadf714adb62628f74f4265491f /sc/source/ui/view
parentf5e2dbb40cab1a21dc972806ee4038f52843e838 (diff)
sc: replace ScCaptionPtr with std::shared_ptr, tdf#117997, tdf#117228
Change-Id: I9b6a2c2504c9ce060906ac3bf156721709fef2f3 Reviewed-on: https://gerrit.libreoffice.org/55490 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/source/ui/view')
-rw-r--r--sc/source/ui/view/drawview.cxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx2
-rw-r--r--sc/source/ui/view/notemark.cxx2
-rw-r--r--sc/source/ui/view/tabview5.cxx2
-rw-r--r--sc/source/ui/view/viewfun6.cxx2
5 files changed, 5 insertions, 5 deletions
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index 9069aede14ad..51b281c91b3f 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -867,7 +867,7 @@ void ScDrawView::DeleteMarked()
{
// rescue note data for undo (with pointer to caption object)
ScNoteData aNoteData = pNote->GetNoteData();
- OSL_ENSURE( aNoteData.mxCaption.get() == pCaptObj, "ScDrawView::DeleteMarked - caption object does not match" );
+ OSL_ENSURE( aNoteData.m_pCaption.get() == pCaptObj, "ScDrawView::DeleteMarked - caption object does not match" );
// collect the drawing undo action created while deleting the note
if( bUndo )
pDrawLayer->BeginCalcUndo(false);
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index a159d448b726..a1598a203b0a 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -360,7 +360,7 @@ static void lcl_UnLockComment( ScDrawView* pView, const Point& rPos, const ScVie
ScDocument& rDoc = *pViewData->GetDocument();
ScAddress aCellPos( pViewData->GetCurX(), pViewData->GetCurY(), pViewData->GetTabNo() );
ScPostIt* pNote = rDoc.GetNote( aCellPos );
- SdrObject* pObj = pNote ? pNote->GetCaption() : nullptr;
+ SdrObject* pObj = pNote ? pNote->GetCaption().get() : nullptr;
if( pObj && pObj->GetLogicRect().IsInside( rPos ) && ScDrawLayer::IsNoteCaption( pObj ) )
{
const ScProtectionAttr* pProtAttr = rDoc.GetAttr( aCellPos, ATTR_PROTECTION );
diff --git a/sc/source/ui/view/notemark.cxx b/sc/source/ui/view/notemark.cxx
index af3a404401fb..3df9dc44e2ff 100644
--- a/sc/source/ui/view/notemark.cxx
+++ b/sc/source/ui/view/notemark.cxx
@@ -67,7 +67,7 @@ ScNoteMarker::ScNoteMarker( vcl::Window* pWin, vcl::Window* pRight, vcl::Window*
ScNoteMarker::~ScNoteMarker()
{
if (m_pModel)
- m_xObject.release(); // deleting pModel also deletes the SdrCaptionObj
+ m_xObject.reset(); // deleting pModel also deletes the SdrCaptionObj
InvalidateWin();
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index 8f95f23078db..058bedd5b1d0 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -653,7 +653,7 @@ void ScTabView::OnLOKNoteStateChanged(const ScPostIt* pNote)
if (!comphelper::LibreOfficeKit::isActive())
return;
- const SdrCaptionObj* pCaption = pNote->GetCaption();
+ const SdrCaptionObj* pCaption = pNote->GetCaption().get();
if (!pCaption) return;
tools::Rectangle aRect = pCaption->GetLogicRect();
diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx
index f37d0d1241fc..28c0340986ba 100644
--- a/sc/source/ui/view/viewfun6.cxx
+++ b/sc/source/ui/view/viewfun6.cxx
@@ -495,7 +495,7 @@ void ScViewFunc::EditNote()
/* Drawing object has been created in ScDocument::GetOrCreateNote() or
in ScPostIt::ShowCaptionTemp(), so ScPostIt::GetCaption() should
return a caption object. */
- if( SdrCaptionObj* pCaption = pNote->GetCaption() )
+ if( SdrCaptionObj* pCaption = pNote->GetCaption().get() )
{
if ( ScDrawView* pScDrawView = GetScDrawView() )
pScDrawView->SyncForGrid( pCaption );