diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-03-20 10:31:48 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-10 12:27:19 +0100 |
commit | 047362988b5b9910b41ef6cc7d12a685d849bcae (patch) | |
tree | 55161f2f4790c6cbe86bfacc17f48ecbf74b96db | |
parent | vclptr: misc. bug fixing. (diff) | |
download | core-047362988b5b9910b41ef6cc7d12a685d849bcae.tar.gz core-047362988b5b9910b41ef6cc7d12a685d849bcae.zip |
vclptr: various mistakes fixed, and more ptr types converted.
Change-Id: Iba04ec828f7ce37fc6ede28a64f1c286d81ff705
-rw-r--r-- | editeng/source/editeng/impedit3.cxx | 2 | ||||
-rw-r--r-- | filter/source/graphicfilter/eps/eps.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin4.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx | 2 | ||||
-rw-r--r-- | svx/source/unodraw/UnoGraphicExporter.cxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/wmf/emfwr.hxx | 3 | ||||
-rw-r--r-- | vcl/source/gdi/print.cxx | 1 | ||||
-rw-r--r-- | vcl/source/outdev/outdev.cxx | 4 |
8 files changed, 12 insertions, 6 deletions
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 972c99701a5e..44a7f4401bf0 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -2810,7 +2810,7 @@ void ImpEditEngine::RecalcFormatterFontMetrics( FormatterFontMetric& rCurMetrics if ( ( nIntLeading == 0 ) && ( pRefDev->GetOutDevType() == OUTDEV_PRINTER ) ) { // Lets see what Leading one gets on the screen - VirtualDevice* pVDev = GetVirtualDevice( pRefDev->GetMapMode(), pRefDev->GetDrawMode() ); + VclPtr<VirtualDevice> pVDev = GetVirtualDevice( pRefDev->GetMapMode(), pRefDev->GetDrawMode() ); rFont.SetPhysFont( pVDev ); aMetric = pVDev->GetFontMetric(); diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx index 925823af956b..ef1a7317c85b 100644 --- a/filter/source/graphicfilter/eps/eps.cxx +++ b/filter/source/graphicfilter/eps/eps.cxx @@ -2141,7 +2141,7 @@ void PSWriter::ImplText( const OUString& rUniString, const Point& rPos, const lo vcl::Font aNotRotatedFont( maFont ); aNotRotatedFont.SetOrientation( 0 ); - ScopedVclPtr<VirtualDevice> pVirDev( new VirtualDevice() ); + ScopedVclPtr<VirtualDevice> pVirDev( new VirtualDevice( 1 ) ); pVirDev->SetMapMode( rVDev.GetMapMode() ); pVirDev->SetFont( aNotRotatedFont ); pVirDev->SetTextAlign( eTextAlign ); diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index e9d21852fc49..4a4d613021e6 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -482,7 +482,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod aOutputData.SetMirrorWidth( nMirrorWidth ); // needed for RTL aOutputData.SetSpellCheckContext(mpSpellCheckCxt.get()); - std::unique_ptr<VirtualDevice> xFmtVirtDev; + ScopedVclPtr< VirtualDevice > xFmtVirtDev; bool bLogicText = bTextWysiwyg; // call DrawStrings in logic MapMode? if ( bTextWysiwyg ) diff --git a/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx index 9b992eea67f2..327caddaafe3 100644 --- a/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx +++ b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx @@ -121,7 +121,7 @@ public: void Dispose (void); private: - ::boost::shared_ptr<VirtualDevice> mpLayerDevice; + ScopedVclPtr<VirtualDevice> mpLayerDevice; ::std::vector<SharedILayerPainter> maPainters; vcl::Region maInvalidationRegion; diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index 9c10297095c5..adfbf587abec 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -907,7 +907,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, if( !bSingleGraphic ) { // create a metafile for all shapes - ScopedVclPtr<VirtualDevice> aOut; + ScopedVclPtr<VirtualDevice> aOut(new VirtualDevice()); // calculate bound rect for all shapes Rectangle aBound; diff --git a/vcl/source/filter/wmf/emfwr.hxx b/vcl/source/filter/wmf/emfwr.hxx index dd34bbcd3517..d4925c147147 100644 --- a/vcl/source/filter/wmf/emfwr.hxx +++ b/vcl/source/filter/wmf/emfwr.hxx @@ -33,7 +33,7 @@ class EMFWriter { private: - ScopedVclPtr<VirtualDevice> maVDev; + ScopedVclPtr<VirtualDevice> maVDev; MapMode maDestMapMode; SvStream& m_rStm; bool* mpHandlesUsed; @@ -91,6 +91,7 @@ public: EMFWriter(SvStream &rStream) : m_rStm(rStream) + , maVDev( new VirtualDevice() ) , mpHandlesUsed(NULL) , mnHandleCount(0) , mnRecordCount(0) diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index 7ba564581514..7c48a7fa1fe3 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -1024,6 +1024,7 @@ void Printer::dispose() DBG_ASSERT( !IsJobActive(), "Printer::~Printer() - Job is active" ); delete mpPrinterOptions; + mpPrinterOptions = NULL; ReleaseGraphics(); if ( mpInfoPrinter ) diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx index d0d35ce0d57f..beee1b7fb63f 100644 --- a/vcl/source/outdev/outdev.cxx +++ b/vcl/source/outdev/outdev.cxx @@ -221,6 +221,7 @@ void OutputDevice::dispose() ImplInvalidateViewTransform(); delete mpOutDevData; + mpOutDevData = NULL; // for some reason, we haven't removed state from the stack properly if ( !mpOutDevStateStack->empty() ) @@ -232,6 +233,7 @@ void OutputDevice::dispose() } } delete mpOutDevStateStack; + mpOutDevStateStack = NULL; // release the active font instance if( mpFontEntry ) @@ -240,8 +242,10 @@ void OutputDevice::dispose() // remove cached results of GetDevFontList/GetDevSizeList // TODO: use smart pointers for them delete mpGetDevFontList; + mpGetDevFontList = NULL; delete mpGetDevSizeList; + mpGetDevSizeList = NULL; // release ImplFontCache specific to this OutputDevice // TODO: refcount ImplFontCache |