summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-05-26 16:02:50 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-05-27 13:58:23 +0100
commitf34c1e9ba7d831c42c89d3c59d501ce6cc858dbe (patch)
tree76ba9cd6bd24d988f8e9c4bc6f2c531b6d1f6386 /sc
parent3a34f96a16ad3063302670a57a1ed508302e3ffb (diff)
tdf#91416 - fix some incorrectly allocated VirtualDevices.
Change-Id: I9ebed313827986473c60e77b7e218b4c1b2487fe (cherry picked from commit f849d96463d967214bc063f6de912a082272c395)
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/docshell/sizedev.cxx2
-rw-r--r--sc/source/ui/view/gridwin4.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/docshell/sizedev.cxx b/sc/source/ui/docshell/sizedev.cxx
index 744266efe4f5..90bca78f619f 100644
--- a/sc/source/ui/docshell/sizedev.cxx
+++ b/sc/source/ui/docshell/sizedev.cxx
@@ -39,7 +39,7 @@ ScSizeDeviceProvider::ScSizeDeviceProvider( ScDocShell* pDocSh )
}
else
{
- pDevice = new VirtualDevice;
+ pDevice = VclPtr<VirtualDevice>::Create();
pDevice->SetDigitLanguage( SC_MOD()->GetOptDigitLanguage() );
bOwner = true;
}
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index c175d022a0a0..bfda05af7464 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -498,7 +498,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
// #i45033# For OLE inplace editing with different zoom factors,
// use a virtual device with 1/100th mm as text formatting reference
- xFmtVirtDev.reset( new VirtualDevice );
+ xFmtVirtDev.reset( VclPtr<VirtualDevice>::Create() );
xFmtVirtDev->SetMapMode( MAP_100TH_MM );
aOutputData.SetFmtDevice( xFmtVirtDev.get() );