summaryrefslogtreecommitdiffstats
path: root/include/svx/sdrpaintwindow.hxx
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2017-01-01 12:43:45 +0100
committerJan Holesovsky <kendy@collabora.com>2017-03-22 17:48:14 +0000
commitb396bc042dad1d553ebf51897ef012c08c41a86a (patch)
tree84ad701497e449bfa03a521bef4c3ddb75ed0bdc /include/svx/sdrpaintwindow.hxx
parentcodesigning script for macosx compained about double signing (diff)
downloadcore-b396bc042dad1d553ebf51897ef012c08c41a86a.tar.gz
core-b396bc042dad1d553ebf51897ef012c08c41a86a.zip
Calc: safer life cycle handling for OutputDevice in SdrPaintWindow
Change-Id: I5469332c4ef98bce8cd9c2caff5bf61dbf102b23 Reviewed-on: https://gerrit.libreoffice.org/33220 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'include/svx/sdrpaintwindow.hxx')
-rw-r--r--include/svx/sdrpaintwindow.hxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/svx/sdrpaintwindow.hxx b/include/svx/sdrpaintwindow.hxx
index 25c51c52563b..bcb0b0a8c843 100644
--- a/include/svx/sdrpaintwindow.hxx
+++ b/include/svx/sdrpaintwindow.hxx
@@ -46,7 +46,7 @@ PaintTransparentChildren(vcl::Window & rWindow, Rectangle const& rPixelRect);
class SdrPreRenderDevice
{
// The original OutputDevice
- OutputDevice& mrOutputDevice;
+ VclPtr<OutputDevice> mpOutputDevice;
// The VirtualDevice for PreRendering
VclPtr<VirtualDevice> mpPreRenderDevice;
@@ -65,7 +65,7 @@ class SVX_DLLPUBLIC SdrPaintWindow
{
private:
// the OutputDevice this window represents
- OutputDevice& mrOutputDevice;
+ VclPtr<OutputDevice> mpOutputDevice;
/// In case mrOutputDevice is a buffer for a vcl::Window, this is the window.
VclPtr<vcl::Window> mpWindow;
@@ -95,7 +95,7 @@ public:
// data read accesses
SdrPaintView& GetPaintView() const { return mrPaintView; }
- OutputDevice& GetOutputDevice() const { return mrOutputDevice; }
+ OutputDevice& GetOutputDevice() const { return *mpOutputDevice.get(); }
vcl::Window* GetWindow() const { return mpWindow; }
// OVERLAYMANAGER
@@ -108,13 +108,13 @@ public:
Rectangle GetVisibleArea() const;
// Is OutDev a printer?
- bool OutputToPrinter() const { return (OUTDEV_PRINTER == mrOutputDevice.GetOutDevType()); }
+ bool OutputToPrinter() const { return (OUTDEV_PRINTER == mpOutputDevice->GetOutDevType()); }
// Is OutDev a window?
- bool OutputToWindow() const { return (OUTDEV_WINDOW == mrOutputDevice.GetOutDevType()); }
+ bool OutputToWindow() const { return (OUTDEV_WINDOW == mpOutputDevice->GetOutDevType()); }
// Is OutDev a VirtualDevice?
- bool OutputToVirtualDevice() const { return (OUTDEV_VIRDEV == mrOutputDevice.GetOutDevType()); }
+ bool OutputToVirtualDevice() const { return (OUTDEV_VIRDEV == mpOutputDevice->GetOutDevType()); }
// Is OutDev a recording MetaFile?
bool OutputToRecordingMetaFile() const;
@@ -134,7 +134,7 @@ public:
void setTemporaryTarget(bool bNew) { mbTemporaryTarget = bNew; }
// #i72889# get target output device, take into account output buffering
- OutputDevice& GetTargetOutputDevice() { if(mpPreRenderDevice) return mpPreRenderDevice->GetPreRenderDevice(); else return mrOutputDevice; }
+ OutputDevice& GetTargetOutputDevice() { if(mpPreRenderDevice) return mpPreRenderDevice->GetPreRenderDevice(); else return *mpOutputDevice.get(); }
};
// typedefs for a list of SdrPaintWindows