[Libreoffice-commits] core.git: Branch 'feature/vclref' - cppcanvas/source cui/source drawinglayer/source editeng/source extensions/source forms/source sc/source svtools/source vcl/source

Michael Meeks michael.meeks at collabora.com
Fri Mar 20 13:24:31 PDT 2015


 cppcanvas/source/mtfrenderer/implrenderer.cxx              |    2 -
 cui/source/options/optjava.cxx                             |    2 -
 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx |    4 +--
 drawinglayer/source/tools/converters.cxx                   |    2 -
 editeng/source/editeng/editeng.cxx                         |    2 -
 extensions/source/propctrlr/propertyeditor.cxx             |    5 ++++
 extensions/source/propctrlr/propertyeditor.hxx             |    2 -
 forms/source/solar/control/navtoolbar.cxx                  |    2 +
 forms/source/solar/inc/navtoolbar.hxx                      |    2 -
 sc/source/core/data/documen8.cxx                           |    2 -
 sc/source/ui/cctrl/tbzoomsliderctrl.cxx                    |    2 -
 svtools/source/brwbox/brwbox1.cxx                          |    2 -
 svtools/source/graphic/grfmgr2.cxx                         |    2 -
 svtools/source/graphic/provider.cxx                        |    2 -
 svtools/source/misc/sampletext.cxx                         |    2 -
 svtools/source/table/gridtablerenderer.cxx                 |    2 -
 vcl/source/filter/graphicfilter.cxx                        |    2 -
 vcl/source/filter/sgfbram.cxx                              |    2 -
 vcl/source/filter/sgvmain.cxx                              |    2 -
 vcl/source/filter/sgvtext.cxx                              |    2 -
 vcl/source/gdi/cvtsvm.cxx                                  |    6 ++---
 vcl/source/gdi/gdimetafiletools.cxx                        |    2 -
 vcl/source/gdi/gdimtf.cxx                                  |   14 ++++++-------
 vcl/source/gdi/impanmvw.cxx                                |    2 -
 vcl/source/gdi/impgraph.cxx                                |    2 -
 vcl/source/gdi/impvect.cxx                                 |    2 -
 vcl/source/gdi/pdfwriter_impl.cxx                          |    2 -
 vcl/source/gdi/print2.cxx                                  |    6 ++---
 vcl/source/outdev/bitmap.cxx                               |    2 -
 vcl/source/outdev/transparent.cxx                          |    2 -
 vcl/source/outdev/wallpaper.cxx                            |    2 -
 31 files changed, 46 insertions(+), 41 deletions(-)

New commits:
commit ee04f1ed636255d585dececd83f37d40aef10a38
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Fri Mar 20 18:58:34 2015 +0000

    cure a lot of unfortunate ScopedVclPtrs.
    
    Change-Id: I2149511f958ba75e81dc41b10b01eb9d19610037

diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 3582537..0ba1874 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -2908,7 +2908,7 @@ namespace cppcanvas
 
             VectorOfOutDevStates    aStateStack;
 
-            ScopedVclPtr<VirtualDevice> aVDev = new VirtualDevice;
+            ScopedVclPtr<VirtualDevice> aVDev( new VirtualDevice() );
             aVDev->EnableOutput( false );
 
             // Setup VDev for state tracking and mapping
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index f1a1376..c661d82c 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -437,7 +437,7 @@ IMPL_LINK( SvxJavaOptionsPage, DialogClosedHdl, DialogClosedEvent*, pEvt )
 
 IMPL_LINK_NOARG( SvxJavaOptionsPage, ExpertConfigHdl_Impl )
 {
-    ScopedVclPtr<CuiAboutConfigTabPage> m_pExpertConfigDlg = new CuiAboutConfigTabPage(this);
+    ScopedVclPtr<CuiAboutConfigTabPage> m_pExpertConfigDlg( new CuiAboutConfigTabPage(this) );
     m_pExpertConfigDlg->Reset();//initialize and reset function
 
     if( RET_OK == m_pExpertConfigDlg->Execute() )
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 935b0b5..8b26870 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -252,7 +252,7 @@ namespace drawinglayer
             const Rectangle aPrimitiveRectangle(
                 basegfx::fround(aPrimitiveRange.getMinX()), basegfx::fround(aPrimitiveRange.getMinY()),
                 basegfx::fround(aPrimitiveRange.getMaxX()), basegfx::fround(aPrimitiveRange.getMaxY()));
-            ScopedVclPtr<VirtualDevice> aContentVDev = new VirtualDevice;
+            ScopedVclPtr<VirtualDevice> aContentVDev( new VirtualDevice() );
             MapMode aNewMapMode(pLastOutputDevice->GetMapMode());
 
             mpOutputDevice = aContentVDev.get();
@@ -2016,7 +2016,7 @@ namespace drawinglayer
                             const Rectangle aRectPixel(mpOutputDevice->LogicToPixel(aRectLogic));
                             Size aSizePixel(aRectPixel.GetSize());
                             const Point aEmptyPoint;
-                            ScopedVclPtr<VirtualDevice> aBufferDevice = new VirtualDevice;
+                            ScopedVclPtr<VirtualDevice> aBufferDevice( new VirtualDevice() );
                             const sal_uInt32 nMaxQuadratPixels(500000);
                             const sal_uInt32 nViewVisibleArea(aSizePixel.getWidth() * aSizePixel.getHeight());
                             double fReduceFactor(1.0);
diff --git a/drawinglayer/source/tools/converters.cxx b/drawinglayer/source/tools/converters.cxx
index 03318cc..2a667a7 100644
--- a/drawinglayer/source/tools/converters.cxx
+++ b/drawinglayer/source/tools/converters.cxx
@@ -73,7 +73,7 @@ namespace drawinglayer
                 const Point aEmptyPoint;
                 const Size aSizePixel(nDiscreteWidth, nDiscreteHeight);
                 geometry::ViewInformation2D aViewInformation2D(rViewInformation2D);
-                ScopedVclPtr<VirtualDevice> maContent = new VirtualDevice;
+                ScopedVclPtr<VirtualDevice> maContent(new VirtualDevice());
 
                 // prepare vdev
                 maContent->SetOutputSizePixel(aSizePixel, false);
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 85e4d9c..79006c1 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -1758,7 +1758,7 @@ SvxFont EditEngine::GetStandardSvxFont( sal_Int32 nPara )
 
 void EditEngine::StripPortions()
 {
-    ScopedVclPtr<VirtualDevice> aTmpDev = new VirtualDevice;
+    ScopedVclPtr<VirtualDevice> aTmpDev( new VirtualDevice() );
     Rectangle aBigRect( Point( 0, 0 ), Size( 0x7FFFFFFF, 0x7FFFFFFF ) );
     if ( IsVertical() )
     {
diff --git a/extensions/source/propctrlr/propertyeditor.cxx b/extensions/source/propctrlr/propertyeditor.cxx
index 17a73e6..5908186 100644
--- a/extensions/source/propctrlr/propertyeditor.cxx
+++ b/extensions/source/propctrlr/propertyeditor.cxx
@@ -96,6 +96,11 @@ namespace pcr
             m_aPropertyPageIds.swap( aEmpty );
         }
 
+        while ( !m_aHiddenPages.empty() )
+        {
+            m_aHiddenPages.begin()->second.pPage.disposeAndClear();
+            m_aHiddenPages.erase( m_aHiddenPages.begin() );
+        }
         m_aHiddenPages.clear();
     }
 
diff --git a/extensions/source/propctrlr/propertyeditor.hxx b/extensions/source/propctrlr/propertyeditor.hxx
index 2e2d6fd..a43ee8d 100644
--- a/extensions/source/propctrlr/propertyeditor.hxx
+++ b/extensions/source/propctrlr/propertyeditor.hxx
@@ -49,7 +49,7 @@ namespace pcr
         struct HiddenPage
         {
             sal_uInt16  nPos;
-            ScopedVclPtr<TabPage>    pPage;
+            VclPtr<TabPage>    pPage;
             HiddenPage() : nPos( 0 ), pPage( NULL ) { }
             HiddenPage( sal_uInt16 _nPos, TabPage* _pPage ) : nPos( _nPos ), pPage( _pPage ) { }
         };
diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx
index 9695c93..88b854b 100644
--- a/forms/source/solar/control/navtoolbar.cxx
+++ b/forms/source/solar/control/navtoolbar.cxx
@@ -152,6 +152,8 @@ namespace frm
 
     void NavigationToolBar::dispose()
     {
+        for (auto i = m_aChildWins.begin(); i != m_aChildWins.end(); ++i)
+            i->disposeAndClear();
         m_aChildWins.clear();
         m_pToolbar.disposeAndClear();
         vcl::Window::dispose();
diff --git a/forms/source/solar/inc/navtoolbar.hxx b/forms/source/solar/inc/navtoolbar.hxx
index ec66f92..79d1266 100644
--- a/forms/source/solar/inc/navtoolbar.hxx
+++ b/forms/source/solar/inc/navtoolbar.hxx
@@ -61,7 +61,7 @@ namespace frm
                                         m_pDescriptionProvider;
         ImageSize                       m_eImageSize;
         VclPtr<ImplNavToolBar>          m_pToolbar;
-        ::std::vector< ScopedVclPtr<vcl::Window> > m_aChildWins;
+        ::std::vector< VclPtr<vcl::Window> > m_aChildWins;
 
     public:
         NavigationToolBar(
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index 191b0b8..4977929 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -158,7 +158,7 @@ void ScDocument::SetPrinter( SfxPrinter* pNewPrinter )
     }
     else
     {
-        ScopedVclPtr<SfxPrinter> pOld = pPrinter;
+        ScopedVclPtr<SfxPrinter> pOld( pPrinter );
         pPrinter = pNewPrinter;
         UpdateDrawPrinter();
         pPrinter->SetDigitLanguage( SC_MOD()->GetOptDigitLanguage() );
diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
index d0e181b..9a6282a 100644
--- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
+++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
@@ -401,7 +401,7 @@ void ScZoomSliderWnd::DoPaint( const Rectangle& /*rRect*/ )
     Size aSliderWindowSize = GetOutputSizePixel();
     Rectangle aRect( Point( 0, 0 ), aSliderWindowSize );
 
-    ScopedVclPtr<VirtualDevice> pVDev = new VirtualDevice( *this );
+    ScopedVclPtr<VirtualDevice> pVDev( new VirtualDevice( *this ) );
     pVDev->SetOutputSizePixel( aSliderWindowSize );
 
     Rectangle   aSlider = aRect;
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx
index 2e65fdd..80148ef 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -58,8 +58,6 @@ namespace
     }
 }
 
-
-
 void BrowseBox::ConstructImpl( BrowserMode nMode )
 {
     OSL_TRACE( "BrowseBox: %p->ConstructImpl", this );
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index e31bbe7..39241ff 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -1900,7 +1900,7 @@ bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const Rectangle& rArea, c
         // First combine very small bitmaps into a larger tile
 
 
-        ScopedVclPtr<VirtualDevice>   aVDev = new VirtualDevice;
+        ScopedVclPtr<VirtualDevice> aVDev( new VirtualDevice() );
         const int       nNumTilesInCacheX( (nTileCacheSize1D + rSizePixel.Width()-1) / rSizePixel.Width() );
         const int       nNumTilesInCacheY( (nTileCacheSize1D + rSizePixel.Height()-1) / rSizePixel.Height() );
 
diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx
index 360974b..c535b4c 100644
--- a/svtools/source/graphic/provider.cxx
+++ b/svtools/source/graphic/provider.cxx
@@ -634,7 +634,7 @@ void ImplApplyFilterData( ::Graphic& rGraphic, uno::Sequence< beans::PropertyVal
     }
     else if ( ( rGraphic.GetType() == GRAPHIC_GDIMETAFILE ) && nImageResolution )
     {
-        ScopedVclPtr<VirtualDevice> aDummyVDev = new VirtualDevice;
+        ScopedVclPtr<VirtualDevice> aDummyVDev( new VirtualDevice() );
         GDIMetaFile aMtf( rGraphic.GetGDIMetaFile() );
         Size aMtfSize( OutputDevice::LogicToLogic( aMtf.GetPrefSize(), aMtf.GetPrefMapMode(), MAP_100TH_MM ) );
         if ( aMtfSize.Width() && aMtfSize.Height() )
diff --git a/svtools/source/misc/sampletext.cxx b/svtools/source/misc/sampletext.cxx
index a1cb7a8..889103d 100644
--- a/svtools/source/misc/sampletext.cxx
+++ b/svtools/source/misc/sampletext.cxx
@@ -1623,7 +1623,7 @@ OUString makeRepresentativeTextForFont(sal_Int16 nScriptType, const vcl::Font &r
 {
     OUString sRet(makeRepresentativeTextForLanguage(rFont.GetLanguage()));
 
-    ScopedVclPtr<VirtualDevice> aDevice = new VirtualDevice;
+    ScopedVclPtr<VirtualDevice> aDevice( new VirtualDevice() );
     if (sRet.isEmpty() || (-1 != aDevice->HasGlyphs(rFont, sRet)))
     {
         aDevice->SetFont(rFont);
diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx
index 4f4ad26..b36ac6d 100644
--- a/svtools/source/table/gridtablerenderer.cxx
+++ b/svtools/source/table/gridtablerenderer.cxx
@@ -86,7 +86,7 @@ namespace svt { namespace table
 
             Point const aBitmapPos( 0, 0 );
             Size const aBitmapSize( nSortIndicatorWidth, nSortIndicatorHeight );
-            ScopedVclPtr<VirtualDevice> aDevice = new VirtualDevice( i_device, 0, 0 );
+            ScopedVclPtr<VirtualDevice> aDevice( new VirtualDevice( i_device, 0, 0 ) );
             aDevice->SetOutputSizePixel( aBitmapSize );
 
             DecorationView aDecoView( aDevice.get() );
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 155104e..04acf2f 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1889,7 +1889,7 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString
         {
             Size aSizePixel;
             sal_uLong nColorCount,nBitsPerPixel,nNeededMem,nMaxMem;
-            ScopedVclPtr<VirtualDevice> aVirDev = new VirtualDevice;
+            ScopedVclPtr<VirtualDevice> aVirDev( new VirtualDevice() );
 
             nMaxMem = 1024;
             nMaxMem *= 1024; // In Bytes
diff --git a/vcl/source/filter/sgfbram.cxx b/vcl/source/filter/sgfbram.cxx
index 11d3960..575eb29 100644
--- a/vcl/source/filter/sgfbram.cxx
+++ b/vcl/source/filter/sgfbram.cxx
@@ -390,7 +390,7 @@ Color Hpgl2SvFarbe( sal_uInt8 nFarb )
 
 bool SgfFilterVect(SvStream& rInp, SgfHeader& rHead, SgfEntry&, GDIMetaFile& rMtf)
 {
-    ScopedVclPtr<VirtualDevice> aOutDev = new VirtualDevice;
+    ScopedVclPtr<VirtualDevice> aOutDev( new VirtualDevice() );
     SgfVector aVect;
     sal_uInt8      nFarb;
     sal_uInt8      nFrb0=7;
diff --git a/vcl/source/filter/sgvmain.cxx b/vcl/source/filter/sgvmain.cxx
index d1d62a8..d02c2f9 100644
--- a/vcl/source/filter/sgvmain.cxx
+++ b/vcl/source/filter/sgvmain.cxx
@@ -794,7 +794,7 @@ bool SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf )
 {
     bool          bRet = false;
     PageType      aPage;
-    ScopedVclPtr<VirtualDevice> aOutDev = new VirtualDevice;
+    ScopedVclPtr<VirtualDevice> aOutDev( new VirtualDevice() );
     OutputDevice* pOutDev;
     sal_uLong         nStdPos;
     sal_uLong         nCharPos;
diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx
index 4b343ae..fe83362 100644
--- a/vcl/source/filter/sgvtext.cxx
+++ b/vcl/source/filter/sgvtext.cxx
@@ -664,7 +664,7 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType&
                 double, double,
                 UCHAR* cLine, bool TextFit)
 {
-    ScopedVclPtr<VirtualDevice> vOut = new VirtualDevice;
+    ScopedVclPtr<VirtualDevice> vOut( new VirtualDevice() );
     UCHAR        c,c0;
     UCHAR        ct;
     bool         First;               // first char ?
diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx
index fc427f7..3e7b937 100644
--- a/vcl/source/gdi/cvtsvm.cxx
+++ b/vcl/source/gdi/cvtsvm.cxx
@@ -479,7 +479,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
 
     LineInfo            aLineInfo( LINE_NONE, 0 );
     ::std::stack< LineInfo* >    aLIStack;
-    ScopedVclPtr<VirtualDevice>  aFontVDev = new VirtualDevice;
+    ScopedVclPtr<VirtualDevice>  aFontVDev( new VirtualDevice() );
     rtl_TextEncoding    eActualCharSet = osl_getThreadTextEncoding();
     bool                bFatLine = false;
 
@@ -1355,7 +1355,7 @@ void SVMConverter::ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf )
     rtl_TextEncoding    eActualCharSet = osl_getThreadTextEncoding();
     const Size          aPrefSize( rMtf.GetPrefSize() );
     bool                bRop_0_1 = false;
-    ScopedVclPtr<VirtualDevice>  aSaveVDev = new VirtualDevice;
+    ScopedVclPtr<VirtualDevice>  aSaveVDev( new VirtualDevice() );
     Color               aLineCol( COL_BLACK );
     ::std::stack< Color* >  aLineColStack;
 
@@ -2292,7 +2292,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
 
                 {
                     // write actions for hatch
-                    ScopedVclPtr<VirtualDevice> aVDev = new VirtualDevice;
+                    ScopedVclPtr<VirtualDevice> aVDev( new VirtualDevice() );
                     GDIMetaFile     aTmpMtf;
 
                     aVDev->AddHatchActions( rPolyPoly, rHatch, aTmpMtf );
diff --git a/vcl/source/gdi/gdimetafiletools.cxx b/vcl/source/gdi/gdimetafiletools.cxx
index dff820c..ec6c17a 100644
--- a/vcl/source/gdi/gdimetafiletools.cxx
+++ b/vcl/source/gdi/gdimetafiletools.cxx
@@ -161,7 +161,7 @@ namespace
         // in pixel mode for alpha channel painting (black is transparent,
         // white to paint 100% opacity)
         const Size aSizePixel(rBitmapEx.GetSizePixel());
-        ScopedVclPtr<VirtualDevice> aVDev = new VirtualDevice;
+        ScopedVclPtr<VirtualDevice> aVDev( new VirtualDevice() );
 
         aVDev->SetOutputSizePixel(aSizePixel);
         aVDev->EnableMapMode(false);
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index b0a40ea..4a3c6d6 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -723,7 +723,7 @@ void GDIMetaFile::Move( long nX, long nY )
 {
     const Size      aBaseOffset( nX, nY );
     Size            aOffset( aBaseOffset );
-    ScopedVclPtr<VirtualDevice>   aMapVDev = new VirtualDevice;
+    ScopedVclPtr<VirtualDevice> aMapVDev( new VirtualDevice() );
 
     aMapVDev->EnableOutput( false );
     aMapVDev->SetMapMode( GetPrefMapMode() );
@@ -757,7 +757,7 @@ void GDIMetaFile::Move( long nX, long nY, long nDPIX, long nDPIY )
 {
     const Size      aBaseOffset( nX, nY );
     Size            aOffset( aBaseOffset );
-    ScopedVclPtr<VirtualDevice>   aMapVDev = new VirtualDevice;
+    ScopedVclPtr<VirtualDevice> aMapVDev( new VirtualDevice() );
 
     aMapVDev->EnableOutput( false );
     aMapVDev->SetReferenceDevice( nDPIX, nDPIY );
@@ -825,7 +825,7 @@ void GDIMetaFile::Scale( const Fraction& rScaleX, const Fraction& rScaleY )
 void GDIMetaFile::Clip( const Rectangle& i_rClipRect )
 {
     Rectangle aCurRect( i_rClipRect );
-    ScopedVclPtr<VirtualDevice>   aMapVDev = new VirtualDevice;
+    ScopedVclPtr<VirtualDevice> aMapVDev( new VirtualDevice() );
 
     aMapVDev->EnableOutput( false );
     aMapVDev->SetMapMode( GetPrefMapMode() );
@@ -892,7 +892,7 @@ void GDIMetaFile::ImplAddGradientEx( GDIMetaFile&         rMtf,
                                      const Gradient&      rGrad     )
 {
     // Generate comment, GradientEx and Gradient actions (within DrawGradient)
-    ScopedVclPtr<VirtualDevice> aVDev = new VirtualDevice( rMapDev, 0 );
+    ScopedVclPtr<VirtualDevice> aVDev( new VirtualDevice( rMapDev, 0 ) );
     aVDev->EnableOutput( false );
     GDIMetaFile aGradMtf;
 
@@ -917,7 +917,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
     if( nAngle10 )
     {
         GDIMetaFile     aMtf;
-        ScopedVclPtr<VirtualDevice>   aMapVDev = new VirtualDevice;
+        ScopedVclPtr<VirtualDevice> aMapVDev( new VirtualDevice() );
         const double    fAngle = F_PI1800 * nAngle10;
         const double    fSin = sin( fAngle );
         const double    fCos = cos( fAngle );
@@ -1400,7 +1400,7 @@ static void ImplActionBounds( Rectangle& o_rOutBounds,
 Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHairline ) const
 {
     GDIMetaFile     aMtf;
-    ScopedVclPtr<VirtualDevice> aMapVDev = new VirtualDevice( i_rReference );
+    ScopedVclPtr<VirtualDevice> aMapVDev( new VirtualDevice( i_rReference ) );
 
     aMapVDev->EnableOutput( false );
     aMapVDev->SetMapMode( GetPrefMapMode() );
@@ -2890,7 +2890,7 @@ SvStream& GDIMetaFile::Write( SvStream& rOStm )
 bool GDIMetaFile::CreateThumbnail(BitmapEx& rBitmapEx, sal_uInt32 nMaximumExtent, BmpConversion eColorConversion, long nScaleFlag) const
 {
     // initialization seems to be complicated but is used to avoid rounding errors
-    ScopedVclPtr<VirtualDevice>  aVDev = new VirtualDevice;
+    ScopedVclPtr<VirtualDevice> aVDev( new VirtualDevice() );
     const Point     aNullPt;
     const Point     aTLPix( aVDev->LogicToPixel( aNullPt, GetPrefMapMode() ) );
     const Point     aBRPix( aVDev->LogicToPixel( Point( GetPrefSize().Width() - 1, GetPrefSize().Height() - 1 ), GetPrefMapMode() ) );
diff --git a/vcl/source/gdi/impanmvw.cxx b/vcl/source/gdi/impanmvw.cxx
index 913bdf7..913c9c7 100644
--- a/vcl/source/gdi/impanmvw.cxx
+++ b/vcl/source/gdi/impanmvw.cxx
@@ -154,7 +154,7 @@ void ImplAnimView::getPosSize( const AnimationBitmap& rAnm, Point& rPosPix, Size
 
 void ImplAnimView::drawToPos( sal_uLong nPos )
 {
-    ScopedVclPtr<VirtualDevice>    aVDev = new VirtualDevice;
+    ScopedVclPtr<VirtualDevice> aVDev( new VirtualDevice() );
     boost::scoped_ptr<vcl::Region> pOldClip(!maClip.IsNull() ? new vcl::Region( mpOut->GetClipRegion() ) : NULL);
 
     aVDev->SetOutputSizePixel( maSzPix, false );
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index a258329..eaade7c 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -467,7 +467,7 @@ Bitmap ImpGraphic::ImplGetBitmap(const GraphicConversionParameters& rParameters)
         if(maEx.IsEmpty())
         {
             // calculate size
-            ScopedVclPtr<VirtualDevice> aVDev = new VirtualDevice;
+            ScopedVclPtr<VirtualDevice> aVDev( new VirtualDevice() );
             Size aDrawSize(aVDev->LogicToPixel(maMetaFile.GetPrefSize(), maMetaFile.GetPrefMapMode()));
 
             if(rParameters.getSizePixel().Width() && rParameters.getSizePixel().Height())
diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx
index b761e89..adde24c 100644
--- a/vcl/source/gdi/impvect.cxx
+++ b/vcl/source/gdi/impvect.cxx
@@ -712,7 +712,7 @@ bool ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
         if( rMtf.GetActionSize() )
         {
             MapMode         aMap( MAP_100TH_MM );
-            ScopedVclPtr<VirtualDevice>   aVDev = new VirtualDevice;
+            ScopedVclPtr<VirtualDevice> aVDev( new VirtualDevice() );
             const Size      aLogSize1( aVDev->PixelToLogic( Size( 1, 1 ), aMap ) );
 
             rMtf.SetPrefMapMode( aMap );
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index afaf6eb..1234821 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -9672,7 +9672,7 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit& rObject )
     sal_Int32 nFunctionObject = createObject();
     CHECK_RETURN( updateObject( nFunctionObject ) );
 
-    ScopedVclPtr<VirtualDevice> aDev = new VirtualDevice;
+    ScopedVclPtr<VirtualDevice> aDev( new VirtualDevice() );
     aDev->SetOutputSizePixel( rObject.m_aSize );
     aDev->SetMapMode( MapMode( MAP_PIXEL ) );
     if( m_aContext.ColorMode == PDFWriter::DrawGreyscale )
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index 1d3060c..60b3e16 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -728,7 +728,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
         ConnectedComponents aBackgroundComponent;
 
         // create an OutputDevice to record mapmode changes and the like
-        ScopedVclPtr<VirtualDevice> aMapModeVDev = new VirtualDevice;
+        ScopedVclPtr<VirtualDevice> aMapModeVDev( new VirtualDevice() );
         aMapModeVDev->mnDPIX = mnDPIX;
         aMapModeVDev->mnDPIY = mnDPIY;
         aMapModeVDev->EnableOutput(false);
@@ -1155,10 +1155,10 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
                         Point           aDstPtPix( aBoundRect.TopLeft() );
                         Size            aDstSzPix;
 
-                        ScopedVclPtr<VirtualDevice> aMapVDev = new VirtualDevice;   // here, we record only mapmode information
+                        ScopedVclPtr<VirtualDevice> aMapVDev( new VirtualDevice() );   // here, we record only mapmode information
                         aMapVDev->EnableOutput(false);
 
-                        ScopedVclPtr<VirtualDevice> aPaintVDev = new VirtualDevice; // into this one, we render.
+                        ScopedVclPtr<VirtualDevice> aPaintVDev( new VirtualDevice() ); // into this one, we render.
                         aPaintVDev->SetBackground( aBackgroundComponent.aBgColor );
 
                         rOutMtf.AddAction( new MetaPushAction( PushFlags::MAPMODE ) );
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index b3b3e7b..ab527d0 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -410,7 +410,7 @@ Bitmap OutputDevice::GetBitmap( const Point& rSrcPt, const Size& rSize ) const
                 // If the visible part has been clipped, we have to create a
                 // Bitmap with the correct size in which we copy the clipped
                 // Bitmap to the correct position.
-                ScopedVclPtr<VirtualDevice> aVDev = new VirtualDevice( *this );
+                ScopedVclPtr<VirtualDevice> aVDev( new VirtualDevice( *this ) );
 
                 if ( aVDev->SetOutputSizePixel( aRect.GetSize() ) )
                 {
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index 8ffcb2d..9d782c5 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -431,7 +431,7 @@ void OutputDevice::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly,
 
         if( !bDrawn )
         {
-            ScopedVclPtr<VirtualDevice> aVDev = new VirtualDevice( *this, 1 );
+            ScopedVclPtr<VirtualDevice> aVDev( new VirtualDevice( *this, 1 ) );
             const Size aDstSz( aDstRect.GetSize() );
             const sal_uInt8 cTrans = (sal_uInt8) MinMax( FRound( nTransparencePercent * 2.55 ), 0, 255 );
 
diff --git a/vcl/source/outdev/wallpaper.cxx b/vcl/source/outdev/wallpaper.cxx
index 87f4314..5d01f31 100644
--- a/vcl/source/outdev/wallpaper.cxx
+++ b/vcl/source/outdev/wallpaper.cxx
@@ -129,7 +129,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY,
         {
             if( !pCached && !rWallpaper.GetColor().GetTransparency() )
             {
-                ScopedVclPtr<VirtualDevice> aVDev = new VirtualDevice( *this );
+                ScopedVclPtr<VirtualDevice> aVDev( new VirtualDevice( *this ) );
                 aVDev->SetBackground( rWallpaper.GetColor() );
                 aVDev->SetOutputSizePixel( Size( nBmpWidth, nBmpHeight ) );
                 aVDev->DrawBitmapEx( Point(), aBmpEx );


More information about the Libreoffice-commits mailing list