Kaydet (Commit) 0393df4f authored tarafından Caolán McNamara's avatar Caolán McNamara

VclPtr: one ref too many

Change-Id: Ie360ae76f8692abbc5487f9b76b543477cce438b
üst 0237d8a6
......@@ -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;
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment