summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-05-06 21:15:38 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-05-06 23:55:19 +0100
commit0393df4f9c2cb163350aef3fa14e7d1662367065 (patch)
tree4555f33ff7a5694d64ff2505a4a50aa5ec5ec1fe
parent0237d8a6917ff486034747c4d28bf97611abcd3b (diff)
VclPtr: one ref too many
Change-Id: Ie360ae76f8692abbc5487f9b76b543477cce438b
-rw-r--r--sd/inc/sdmod.hxx4
-rw-r--r--sd/source/ui/app/sdmod.cxx7
2 files changed, 5 insertions, 6 deletions
diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx
index 3d2b268e4517..c99acded1fa4 100644
--- a/sd/inc/sdmod.hxx
+++ b/sd/inc/sdmod.hxx
@@ -31,6 +31,7 @@
#include <com/sun/star/text/WritingMode.hpp>
#include <sfx2/module.hxx>
#include <vcl/vclevent.hxx>
+#include <vcl/virdev.hxx>
#include <sal/types.h>
#include <map>
#include <memory>
@@ -41,7 +42,6 @@ class EditFieldInfo;
class SdTransferable;
class SvNumberFormatter;
class SfxErrorHandler;
-class OutputDevice;
class SdDrawDocument;
class SfxFrame;
@@ -144,7 +144,7 @@ protected:
in the sense that it does not represent a printer. The pointer may
be NULL when the virtual device could not be created.
*/
- VclPtr< OutputDevice > mpVirtualRefDevice;
+ VclPtr< VirtualDevice > mpVirtualRefDevice;
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx
index 5c3b2dde6ecd..422e2a89153b 100644
--- a/sd/source/ui/app/sdmod.cxx
+++ b/sd/source/ui/app/sdmod.cxx
@@ -94,10 +94,9 @@ SdModule::SdModule(SfxObjectFactory* pFact1, SfxObjectFactory* pFact2 )
// Create a new ref device and (by calling SetReferenceDevice())
// set its resolution to 600 DPI. This leads to a visually better
// formatting of text in small sizes (6 point and below.)
- VirtualDevice* pDevice = new VirtualDevice;
- mpVirtualRefDevice = pDevice;
- pDevice->SetMapMode( MAP_100TH_MM );
- pDevice->SetReferenceDevice ( VirtualDevice::REFDEV_MODE06 );
+ mpVirtualRefDevice.reset(VclPtr<VirtualDevice>::Create());
+ mpVirtualRefDevice->SetMapMode( MAP_100TH_MM );
+ mpVirtualRefDevice->SetReferenceDevice ( VirtualDevice::REFDEV_MODE06 );
}
// Dtor