From 12f6e237b8b7b8ff9508edc9e348a387290c240c Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Thu, 19 Mar 2015 19:07:14 +0000 Subject: vclptr: misc. bug fixing. Change-Id: Id56188c0f72b74bc9ce6eed558a8339d4175d628 --- filter/source/graphicfilter/icgm/cgm.hxx | 1 + sw/qa/tiledrendering/tiledrendering.cxx | 6 +++--- sw/source/core/frmedt/fecopy.cxx | 2 +- sw/source/core/layout/paintfrm.cxx | 8 ++++---- vcl/workben/vcldemo.cxx | 30 +++++++++++++++--------------- 5 files changed, 24 insertions(+), 23 deletions(-) diff --git a/filter/source/graphicfilter/icgm/cgm.hxx b/filter/source/graphicfilter/icgm/cgm.hxx index c6c0fa689158..e851819cee4a 100644 --- a/filter/source/graphicfilter/icgm/cgm.hxx +++ b/filter/source/graphicfilter/icgm/cgm.hxx @@ -28,6 +28,7 @@ #include #include +#include #include "cgmtypes.hxx" class Graphic; diff --git a/sw/qa/tiledrendering/tiledrendering.cxx b/sw/qa/tiledrendering/tiledrendering.cxx index c89d6f49574e..8f9a51aee6dc 100644 --- a/sw/qa/tiledrendering/tiledrendering.cxx +++ b/sw/qa/tiledrendering/tiledrendering.cxx @@ -130,14 +130,14 @@ IMPL_LINK ( TiledRenderingDialog, RenderHdl, Button *, EMPTYARG ) // // SystemGraphicsData aData; // [setup the aData] - // VirtualDevice aDevice(&aData, [color depth]); + // VirtualDevice pDevice(&aData, [color depth]); ScopedVclPtr< VirtualDevice > pDevice(new VirtualDevice()); // paint to it pViewShell->PaintTile(*pDevice.get(), contextWidth, contextHeight, tilePosX, tilePosY, tileWidth, tileHeight); - // copy the aDevice content to mpImage - Bitmap aBitmap(pDevice->GetBitmap(aDevice->PixelToLogic(Point(0,0)), pDevice->PixelToLogic(Size(contextWidth, contextHeight)))); + // copy the pDevice content to mpImage + Bitmap aBitmap(pDevice->GetBitmap(pDevice->PixelToLogic(Point(0,0)), pDevice->PixelToLogic(Size(contextWidth, contextHeight)))); mpImage->SetImage(Image(aBitmap)); // update the dialog size diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index 91ac5290f87a..d8ec94862bd0 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -1248,7 +1248,7 @@ bool SwFEShell::GetDrawObjGraphic( SotClipboardFormatId nFmt, Graphic& rGrf ) co GDIMetaFile aMtf; aMtf.Record( pVirtDev.get() ); - aGrf.Draw( &aVirtDev, aPt, aSz ); + aGrf.Draw( pVirtDev, aPt, aSz ); aMtf.Stop(); aMtf.SetPrefMapMode( aTmp ); aMtf.SetPrefSize( aSz ); diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 00ce3847aab1..6ad6d8350762 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -7671,7 +7671,7 @@ Graphic SwFlyFrmFmt::MakeGraphic( ImageMap* pMap ) vcl::Window *pWin = pSh->GetWin(); sal_uInt16 nZoom = pSh->GetViewOptions()->GetZoom(); - ::SetOutDevAndWin( pSh, &aDev, 0, 100 ); + ::SetOutDevAndWin( pSh, pDev, 0, 100 ); gProp.bSFlyMetafile = true; gProp.pSFlyMetafileOut = pWin; @@ -7689,15 +7689,15 @@ Graphic SwFlyFrmFmt::MakeGraphic( ImageMap* pMap ) pImp->PaintLayer( pIDDMA->GetHellId(), 0, aOut, &aPageBackgrdColor, pFlyPage->IsRightToLeft(), &aSwRedirector ); - gProp.pSLines->PaintLines( &aDev, gProp ); + gProp.pSLines->PaintLines( pDev, gProp ); if ( pFly->IsFlyInCntFrm() ) pFly->Paint( aOut ); - gProp.pSLines->PaintLines( &aDev, gProp ); + gProp.pSLines->PaintLines( pDev, gProp ); // OD 30.08.2002 #102450# - add 3rd parameter pImp->PaintLayer( pIDDMA->GetHeavenId(), 0, aOut, &aPageBackgrdColor, pFlyPage->IsRightToLeft(), &aSwRedirector ); - gProp.pSLines->PaintLines( &aDev, gProp ); + gProp.pSLines->PaintLines( pDev, gProp ); DELETEZ( gProp.pSLines ); gProp.pSFlyOnlyDraw = 0; diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 508d38fe7647..4c4358ae4cbe 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -947,18 +947,18 @@ public: // Compositing onto 2x colors beyond our control ScopedVclPtr< VirtualDevice > aWhite(new VirtualDevice()); ScopedVclPtr< VirtualDevice > aBlack(new VirtualDevice()); - aWhite.SetOutputSizePixel(aSrc.GetSizePixel()); - aWhite.SetBackground(Wallpaper(COL_WHITE)); - aWhite.Erase(); - aBlack.SetOutputSizePixel(aSrc.GetSizePixel()); - aBlack.SetBackground(Wallpaper(COL_BLACK)); - aBlack.Erase(); - aWhite.DrawBitmapEx(Point(), aSrc); - aBlack.DrawBitmapEx(Point(), aSrc); + aWhite->SetOutputSizePixel(aSrc.GetSizePixel()); + aWhite->SetBackground(Wallpaper(COL_WHITE)); + aWhite->Erase(); + aBlack->SetOutputSizePixel(aSrc.GetSizePixel()); + aBlack->SetBackground(Wallpaper(COL_BLACK)); + aBlack->Erase(); + aWhite->DrawBitmapEx(Point(), aSrc); + aBlack->DrawBitmapEx(Point(), aSrc); // Now recover that alpha... - Bitmap aWhiteBmp = aWhite.GetBitmap(Point(),aSrc.GetSizePixel()); - Bitmap aBlackBmp = aBlack.GetBitmap(Point(),aSrc.GetSizePixel()); + Bitmap aWhiteBmp = aWhite->GetBitmap(Point(),aSrc.GetSizePixel()); + Bitmap aBlackBmp = aBlack->GetBitmap(Point(),aSrc.GetSizePixel()); AlphaMask aMask(aSrc.GetSizePixel()); Bitmap aRecovered(aSrc.GetSizePixel(), 24); { @@ -1504,16 +1504,16 @@ public: DrawWallpaper(aWholeSize, aWallpaper); Pop(); - ScopedVclPtr< VirtualDevice > aDev(new VirtualDevice(*this)); - aDev.EnableRTL(IsRTLEnabled()); - aDev.SetOutputSizePixel(aExclude.GetSize()); + ScopedVclPtr< VirtualDevice > pDev(new VirtualDevice(*this)); + pDev->EnableRTL(IsRTLEnabled()); + pDev->SetOutputSizePixel(aExclude.GetSize()); Rectangle aSubRect(aWholeSize); aSubRect.Move(-aExclude.Left(), -aExclude.Top()); - aDev.DrawWallpaper(aSubRect, aWallpaper ); + pDev->DrawWallpaper(aSubRect, aWallpaper ); DrawOutDev(aExclude.TopLeft(), aExclude.GetSize(), - Point( 0, 0 ), aExclude.GetSize(), aDev ); + Point( 0, 0 ), aExclude.GetSize(), *pDev.get() ); } }; -- cgit