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 /sd | |
parent | ccac587b1bfc15ed3974cbd9dd59d1e1edda17a3 (diff) |
Resolves: fdo#46728 reference count the overlay managers
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/animations/motionpathtag.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/annotations/annotationtag.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/view/viewoverlaymanager.cxx | 5 |
3 files changed, 9 insertions, 6 deletions
diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx index ebfa3caf3d34..d4cd4b3b2f54 100644 --- a/sd/source/ui/animations/motionpathtag.cxx +++ b/sd/source/ui/animations/motionpathtag.cxx @@ -312,13 +312,14 @@ void SdPathHdl::CreateB2dIAObject() if(rPageWindow.GetPaintWindow().OutputToWindow()) { - if(rPageWindow.GetOverlayManager() && mpPathObj) + rtl::Reference< ::sdr::overlay::OverlayManager > xManager = rPageWindow.GetOverlayManager(); + if (xManager.is() && mpPathObj) { const sdr::contact::ViewContact& rVC = mpPathObj->GetViewContact(); const drawinglayer::primitive2d::Primitive2DSequence aSequence = rVC.getViewIndependentPrimitive2DSequence(); sdr::overlay::OverlayObject* pNew = new sdr::overlay::OverlayPrimitive2DSequenceObject(aSequence); - rPageWindow.GetOverlayManager()->add(*pNew); + xManager->add(*pNew); maOverlayGroup.append(*pNew); } } diff --git a/sd/source/ui/annotations/annotationtag.cxx b/sd/source/ui/annotations/annotationtag.cxx index 7a4ee0c0b248..b8381c52539c 100644 --- a/sd/source/ui/annotations/annotationtag.cxx +++ b/sd/source/ui/annotations/annotationtag.cxx @@ -237,7 +237,8 @@ void AnnotationHdl::CreateB2dIAObject() const SdrPageWindow& rPageWindow = *pPageView->GetPageWindow(b); SdrPaintWindow& rPaintWindow = rPageWindow.GetPaintWindow(); - if(rPaintWindow.OutputToWindow() && rPageWindow.GetOverlayManager() ) + rtl::Reference< ::sdr::overlay::OverlayManager > xManager = rPageWindow.GetOverlayManager(); + if(rPaintWindow.OutputToWindow() && xManager.is() ) { ::sdr::overlay::OverlayObject* pOverlayObject = 0; @@ -259,7 +260,7 @@ void AnnotationHdl::CreateB2dIAObject() pOverlayObject = new ::sdr::overlay::OverlayBitmapEx( aPosition, aBitmapEx, 0, 0 ); } - rPageWindow.GetOverlayManager()->add(*pOverlayObject); + xManager->add(*pOverlayObject); maOverlayGroup.append(*pOverlayObject); } } diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx index 081655f9cd91..236655b6d9fb 100644 --- a/sd/source/ui/view/viewoverlaymanager.cxx +++ b/sd/source/ui/view/viewoverlaymanager.cxx @@ -277,12 +277,13 @@ void ImageButtonHdl::CreateB2dIAObject() const SdrPageWindow& rPageWindow = *pPageView->GetPageWindow(b); SdrPaintWindow& rPaintWindow = rPageWindow.GetPaintWindow(); - if(rPaintWindow.OutputToWindow() && rPageWindow.GetOverlayManager() ) + rtl::Reference< ::sdr::overlay::OverlayManager > xManager = rPageWindow.GetOverlayManager(); + if(rPaintWindow.OutputToWindow() && xManager.is() ) { ::sdr::overlay::OverlayObject* pOverlayObject = 0; pOverlayObject = new ::sdr::overlay::OverlayBitmapEx( aPosition, aBitmapEx, 0, 0 ); - rPageWindow.GetOverlayManager()->add(*pOverlayObject); + xManager->add(*pOverlayObject); maOverlayGroup.append(*pOverlayObject); } } |