diff options
Diffstat (limited to 'filter/source/graphicfilter/ipict')
-rw-r--r-- | filter/source/graphicfilter/ipict/ipict.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx index badebaf82c3a..6621eddd3c60 100644 --- a/filter/source/graphicfilter/ipict/ipict.cxx +++ b/filter/source/graphicfilter/ipict/ipict.cxx @@ -146,7 +146,7 @@ class PictReader { private: SvStream * pPict; // The Pict file to read. - VirtualDevice * pVirDev; // Here the drawing methos will be called. + VclPtr<VirtualDevice> pVirDev; // Here the drawing methos will be called. // A recording into the GDIMetaFile will take place. sal_uLong nOrigPos; // Initial position in pPict. @@ -1881,7 +1881,7 @@ void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile ) aHRes = aVRes = Fraction( 1, 1 ); - pVirDev = new VirtualDevice(); + pVirDev = VclPtr<VirtualDevice>::Create(); pVirDev->EnableOutput(false); rGDIMetaFile.Record(pVirDev); @@ -1942,7 +1942,7 @@ void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile ) pVirDev->SetClipRegion(); rGDIMetaFile.Stop(); - delete pVirDev; + pVirDev.disposeAndClear(); rGDIMetaFile.SetPrefMapMode( MapMode( MAP_INCH, Point(), aHRes, aVRes ) ); rGDIMetaFile.SetPrefSize( aBoundingRect.GetSize() ); |