diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2017-01-23 09:01:42 +0100 |
---|---|---|
committer | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2017-01-23 13:50:45 +0000 |
commit | abc8057ab1a1189ff7f88d42b13b363ceb228d16 (patch) | |
tree | 20145fa90c9a1bf91dea3489d384fe6d28ac2ec0 /sc | |
parent | 5f1bc19a9a0dbdf88e11ef81cc8c2f302748632c (diff) |
pass ownership by pointer
to show the intend of the code.
assert on invalid objects.
remove useless OSL_ENSURE.
make sure list of owning pointers can't be copied.
Change-Id: I3cccf8ea87585ec9fe62921203a4d12e617ce15c
Reviewed-on: https://gerrit.libreoffice.org/33393
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 14 | ||||
-rw-r--r-- | sc/source/ui/view/tabview3.cxx | 4 |
2 files changed, 9 insertions, 9 deletions
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 578fd2a84486..3ac3af0dc73f 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -5848,7 +5848,7 @@ void ScGridWindow::UpdateCopySourceOverlay() ::basegfx::B2DRange aRange(aLogic.Left(), aLogic.Top(), aLogic.Right(), aLogic.Bottom()); ScOverlayDashedBorder* pDashedBorder = new ScOverlayDashedBorder(aRange, aHighlight); xOverlayManager->add(*pDashedBorder); - mpOOSelectionBorder->append(*pDashedBorder); + mpOOSelectionBorder->append(pDashedBorder); } if ( aOldMode != aDrawMode ) @@ -6066,7 +6066,7 @@ void ScGridWindow::UpdateCursorOverlay() xOverlayManager->add(*pOverlay); mpOOCursors.reset(new sdr::overlay::OverlayObjectList); - mpOOCursors->append(*pOverlay); + mpOOCursors->append(pOverlay); // notify the LibreOfficeKit too updateLibreOfficeKitSelection(pViewData, aPixelRects); @@ -6142,7 +6142,7 @@ void ScGridWindow::UpdateSelectionOverlay() xOverlayManager->add(*pOverlay); mpOOSelection.reset(new sdr::overlay::OverlayObjectList); - mpOOSelection->append(*pOverlay); + mpOOSelection->append(pOverlay); // notify the LibreOfficeKit too updateLibreOfficeKitSelection(pViewData, aPixelRects); @@ -6239,7 +6239,7 @@ void ScGridWindow::UpdateAutoFillOverlay() xOverlayManager->add(*pOverlay); mpOOAutoFill.reset(new sdr::overlay::OverlayObjectList); - mpOOAutoFill->append(*pOverlay); + mpOOAutoFill->append(pOverlay); } if ( aOldMode != aDrawMode ) @@ -6366,7 +6366,7 @@ void ScGridWindow::UpdateDragRectOverlay() xOverlayManager->add(*pOverlay); mpOODragRect.reset(new sdr::overlay::OverlayObjectList); - mpOODragRect->append(*pOverlay); + mpOODragRect->append(pOverlay); } } @@ -6412,7 +6412,7 @@ void ScGridWindow::UpdateHeaderOverlay() xOverlayManager->add(*pOverlay); mpOOHeader.reset(new sdr::overlay::OverlayObjectList); - mpOOHeader->append(*pOverlay); + mpOOHeader->append(pOverlay); } } @@ -6479,7 +6479,7 @@ void ScGridWindow::UpdateShrinkOverlay() xOverlayManager->add(*pOverlay); mpOOShrink.reset(new sdr::overlay::OverlayObjectList); - mpOOShrink->append(*pOverlay); + mpOOShrink->append(pOverlay); } } diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index 58a846c2ce6e..98bdecf322f5 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -733,7 +733,7 @@ void ScTabView::TestHintWindow() ScOverlayHint* pOverlay = new ScOverlayHint(aTitle, aMessage, aCommentColor, pFrameWin->GetFont()); mxInputHintOO.reset(new sdr::overlay::OverlayObjectList); - mxInputHintOO->append(*pOverlay); + mxInputHintOO->append(pOverlay); Size aHintWndSize = pOverlay->GetSizePixel(); long nCellSizeX = 0; @@ -767,7 +767,7 @@ void ScTabView::TestHintWindow() ScOverlayHint* pOtherOverlay = new ScOverlayHint(aTitle, aMessage, aCommentColor, pFrameWin->GetFont()); Point aFooPos(pWindow->PixelToLogic(aOtherPos, pWindow->GetDrawMapMode())); pOtherOverlay->SetPos(aFooPos, pWindow->GetDrawMapMode()); - mxInputHintOO->append(*pOtherOverlay); + mxInputHintOO->append(pOtherOverlay); xOverlayManager->add(*pOtherOverlay); } } |