diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-15 20:41:33 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-16 12:54:44 +0000 |
commit | a1ceacc17e3f30d5e9c06b3218ad8ec26ca2f1b9 (patch) | |
tree | 56a29f66f75f326a0a677ab1697ce28f1bc9fcbf /vcl/source/gdi/pdfwriter_impl2.cxx | |
parent | 18f41dfaf19d656d290c47d196ef2702e169a522 (diff) |
boost::foo_ptr->std::foo_ptr
Change-Id: I9219619b538b6530a89f5932ac51eb3b62eb396a
Diffstat (limited to 'vcl/source/gdi/pdfwriter_impl2.cxx')
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl2.cxx | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index 73344f990bd1..475bcb00912c 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -42,7 +42,7 @@ #include "cppuhelper/implbase1.hxx" #include <rtl/digest.h> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace vcl; using namespace com::sun::star; @@ -244,11 +244,11 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa { bool bAssertionFired( false ); - boost::scoped_ptr<VirtualDevice> pPrivateDevice; + std::unique_ptr<VirtualDevice> xPrivateDevice; if( ! pDummyVDev ) { - pPrivateDevice.reset(new VirtualDevice()); - pDummyVDev = pPrivateDevice.get(); + xPrivateDevice.reset(new VirtualDevice()); + pDummyVDev = xPrivateDevice.get(); pDummyVDev->EnableOutput( false ); pDummyVDev->SetMapMode( i_rMtf.GetPrefMapMode() ); } @@ -431,8 +431,8 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa if ( nPixelX && nPixelY ) { Size aDstSizePixel( nPixelX, nPixelY ); - boost::scoped_ptr<VirtualDevice> pVDev(new VirtualDevice); - if( pVDev->SetOutputSizePixel( aDstSizePixel ) ) + std::unique_ptr<VirtualDevice> xVDev(new VirtualDevice); + if( xVDev->SetOutputSizePixel( aDstSizePixel ) ) { Bitmap aPaint, aMask; AlphaMask aAlpha; @@ -440,8 +440,8 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa MapMode aMapMode( pDummyVDev->GetMapMode() ); aMapMode.SetOrigin( aPoint ); - pVDev->SetMapMode( aMapMode ); - Size aDstSize( pVDev->PixelToLogic( aDstSizePixel ) ); + xVDev->SetMapMode( aMapMode ); + Size aDstSize( xVDev->PixelToLogic( aDstSizePixel ) ); Point aMtfOrigin( aTmpMtf.GetPrefMapMode().GetOrigin() ); if ( aMtfOrigin.X() || aMtfOrigin.Y() ) @@ -454,33 +454,33 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa // create paint bitmap aTmpMtf.WindStart(); - aTmpMtf.Play( pVDev.get(), aPoint, aDstSize ); + aTmpMtf.Play( xVDev.get(), aPoint, aDstSize ); aTmpMtf.WindStart(); - pVDev->EnableMapMode( false ); - aPaint = pVDev->GetBitmap( aPoint, aDstSizePixel ); - pVDev->EnableMapMode( true ); + xVDev->EnableMapMode( false ); + aPaint = xVDev->GetBitmap( aPoint, aDstSizePixel ); + xVDev->EnableMapMode( true ); // create mask bitmap - pVDev->SetLineColor( COL_BLACK ); - pVDev->SetFillColor( COL_BLACK ); - pVDev->DrawRect( Rectangle( aPoint, aDstSize ) ); - pVDev->SetDrawMode( DRAWMODE_WHITELINE | DRAWMODE_WHITEFILL | DRAWMODE_WHITETEXT | + xVDev->SetLineColor( COL_BLACK ); + xVDev->SetFillColor( COL_BLACK ); + xVDev->DrawRect( Rectangle( aPoint, aDstSize ) ); + xVDev->SetDrawMode( DRAWMODE_WHITELINE | DRAWMODE_WHITEFILL | DRAWMODE_WHITETEXT | DRAWMODE_WHITEBITMAP | DRAWMODE_WHITEGRADIENT ); aTmpMtf.WindStart(); - aTmpMtf.Play( pVDev.get(), aPoint, aDstSize ); + aTmpMtf.Play( xVDev.get(), aPoint, aDstSize ); aTmpMtf.WindStart(); - pVDev->EnableMapMode( false ); - aMask = pVDev->GetBitmap( aPoint, aDstSizePixel ); - pVDev->EnableMapMode( true ); + xVDev->EnableMapMode( false ); + aMask = xVDev->GetBitmap( aPoint, aDstSizePixel ); + xVDev->EnableMapMode( true ); // create alpha mask from gradient - pVDev->SetDrawMode( DRAWMODE_GRAYGRADIENT ); - pVDev->DrawGradient( Rectangle( aPoint, aDstSize ), rTransparenceGradient ); - pVDev->SetDrawMode( DRAWMODE_DEFAULT ); - pVDev->EnableMapMode( false ); - pVDev->DrawMask( aPoint, aDstSizePixel, aMask, Color( COL_WHITE ) ); - aAlpha = pVDev->GetBitmap( aPoint, aDstSizePixel ); + xVDev->SetDrawMode( DRAWMODE_GRAYGRADIENT ); + xVDev->DrawGradient( Rectangle( aPoint, aDstSize ), rTransparenceGradient ); + xVDev->SetDrawMode( DRAWMODE_DEFAULT ); + xVDev->EnableMapMode( false ); + xVDev->DrawMask( aPoint, aDstSizePixel, aMask, Color( COL_WHITE ) ); + aAlpha = xVDev->GetBitmap( aPoint, aDstSizePixel ); implWriteBitmapEx( rPos, rSize, BitmapEx( aPaint, aAlpha ), pDummyVDev, i_rContext ); } } |