From 085c179b9e146ef27d98aed72d5b681c585cabfc Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Fri, 18 Nov 2022 15:31:56 +0300 Subject: Simplify a bit Change-Id: Ie2cdb0a361376b488d9829c892c9f4c6e9711503 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142941 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- svx/source/svdraw/sdrpaintwindow.cxx | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'svx') diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx index 6c3b328ba5ea..ebed55326a57 100644 --- a/svx/source/svdraw/sdrpaintwindow.cxx +++ b/svx/source/svdraw/sdrpaintwindow.cxx @@ -252,7 +252,7 @@ SdrPaintWindow::~SdrPaintWindow() { mxOverlayManager.clear(); - DestroyPreRenderDevice(); + mpPreRenderDevice.reset(); } rtl::Reference< sdr::overlay::OverlayManager > const & SdrPaintWindow::GetOverlayManager() const @@ -292,21 +292,12 @@ void SdrPaintWindow::PreparePreRenderDevice() { mpPreRenderDevice.reset(new SdrPreRenderDevice(*mpOutputDevice)); } + mpPreRenderDevice->PreparePreRenderDevice(); } else { - DestroyPreRenderDevice(); + mpPreRenderDevice.reset(); } - - if(mpPreRenderDevice) - { - mpPreRenderDevice->PreparePreRenderDevice(); - } -} - -void SdrPaintWindow::DestroyPreRenderDevice() -{ - mpPreRenderDevice.reset(); } void SdrPaintWindow::OutputPreRenderDevice(const vcl::Region& rExpandedRegion) -- cgit