diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-03-13 15:14:33 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-03-13 15:15:11 +0000 |
commit | 131e5d35a4edb9f8875a197e8e0382c168834f70 (patch) | |
tree | 80a1f601731ccb98e25882c47fa1c1b36dc359be /sw/source | |
parent | ccac587b1bfc15ed3974cbd9dd59d1e1edda17a3 (diff) |
Resolves: fdo#46728 reference count the overlay managers
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/crsr/viscrs.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/docvw/AnchorOverlayObject.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/docvw/ShadowOverlayObject.cxx | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index 231f3493d4be..cbefb9f55135 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -345,9 +345,9 @@ void SwSelPaintRects::Show() else if(Count()) { SdrPaintWindow* pCandidate = pView->GetPaintWindow(0); - sdr::overlay::OverlayManager* pTargetOverlay = pCandidate->GetOverlayManager(); + rtl::Reference< ::sdr::overlay::OverlayManager > xTargetOverlay = pCandidate->GetOverlayManager(); - if(pTargetOverlay) + if (xTargetOverlay.is()) { // #i97672# get the system's highlight color and limit it to the maximum // allowed luminance. This is needed to react on too bright highlight colors @@ -377,7 +377,7 @@ void SwSelPaintRects::Show() aNewRanges, true); - pTargetOverlay->add(*mpCursorOverlay); + xTargetOverlay->add(*mpCursorOverlay); } } } diff --git a/sw/source/ui/docvw/AnchorOverlayObject.cxx b/sw/source/ui/docvw/AnchorOverlayObject.cxx index 9764a13f0fb3..abd549bedea5 100644 --- a/sw/source/ui/docvw/AnchorOverlayObject.cxx +++ b/sw/source/ui/docvw/AnchorOverlayObject.cxx @@ -258,9 +258,9 @@ ImplPrimitrive2DIDBlock(AnchorPrimitive, PRIMITIVE2D_ID_SWSIDEBARANCHORPRIMITIVE SdrPaintWindow* pPaintWindow = rDocView.GetDrawView()->GetPaintWindow(0); if( pPaintWindow ) { - sdr::overlay::OverlayManager* pOverlayManager = pPaintWindow->GetOverlayManager(); + rtl::Reference< ::sdr::overlay::OverlayManager > xOverlayManager = pPaintWindow->GetOverlayManager(); - if ( pOverlayManager ) + if ( xOverlayManager.is() ) { pAnchorOverlayObject = new AnchorOverlayObject( basegfx::B2DPoint( aAnchorRect.Left() , aAnchorRect.Bottom()-5*15), @@ -273,7 +273,7 @@ ImplPrimitrive2DIDBlock(AnchorPrimitive, PRIMITIVE2D_ID_SWSIDEBARANCHORPRIMITIVE aColorAnchor, false, false); - pOverlayManager->add(*pAnchorOverlayObject); + xOverlayManager->add(*pAnchorOverlayObject); } } } diff --git a/sw/source/ui/docvw/ShadowOverlayObject.cxx b/sw/source/ui/docvw/ShadowOverlayObject.cxx index 33780649cf66..712cfa56232b 100644 --- a/sw/source/ui/docvw/ShadowOverlayObject.cxx +++ b/sw/source/ui/docvw/ShadowOverlayObject.cxx @@ -188,15 +188,15 @@ ImplPrimitrive2DIDBlock(ShadowPrimitive, PRIMITIVE2D_ID_SWSIDEBARSHADOWPRIMITIVE SdrPaintWindow* pPaintWindow = rDocView.GetDrawView()->GetPaintWindow(0); if( pPaintWindow ) { - sdr::overlay::OverlayManager* pOverlayManager = pPaintWindow->GetOverlayManager(); + rtl::Reference< ::sdr::overlay::OverlayManager > xOverlayManager = pPaintWindow->GetOverlayManager(); - if ( pOverlayManager ) + if ( xOverlayManager.is() ) { pShadowOverlayObject = new ShadowOverlayObject( basegfx::B2DPoint(0,0), basegfx::B2DPoint(0,0), Color(0,0,0), SS_NORMAL ); - pOverlayManager->add(*pShadowOverlayObject); + xOverlayManager->add(*pShadowOverlayObject); } } } |