summaryrefslogtreecommitdiff
path: root/vcl/source/gdi
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r--vcl/source/gdi/bitmapex.cxx96
-rw-r--r--vcl/source/gdi/embeddedfontshelper.cxx6
-rw-r--r--vcl/source/gdi/gfxlink.cxx24
-rw-r--r--vcl/source/gdi/image.cxx5
-rw-r--r--vcl/source/gdi/impanmvw.cxx19
-rw-r--r--vcl/source/gdi/impgraph.cxx52
-rw-r--r--vcl/source/gdi/impvect.cxx41
-rw-r--r--vcl/source/gdi/pdfextoutdevdata.cxx8
-rw-r--r--vcl/source/gdi/pdfwriter.cxx168
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx52
-rw-r--r--vcl/source/gdi/salgdilayout.cxx6
11 files changed, 236 insertions, 241 deletions
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index ca40b4a46e4a..a95466d4cf33 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -44,7 +44,8 @@
#include <salinst.hxx>
#include <svdata.hxx>
#include <com/sun/star/beans/XFastPropertySet.hpp>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
+
using namespace ::com::sun::star;
BitmapEx::BitmapEx() :
@@ -800,10 +801,10 @@ bool BitmapEx::Create( const ::com::sun::star::uno::Reference<
{
// 0 means get BitmapEx
uno::Any aAny = xFastPropertySet->getFastPropertyValue( 0 );
- boost::scoped_ptr<BitmapEx> pBitmapEx(reinterpret_cast<BitmapEx*>( *reinterpret_cast<const sal_Int64*>(aAny.getValue())));
- if( pBitmapEx )
+ std::unique_ptr<BitmapEx> xBitmapEx(reinterpret_cast<BitmapEx*>( *reinterpret_cast<const sal_Int64*>(aAny.getValue())));
+ if( xBitmapEx )
{
- *this = *pBitmapEx;
+ *this = *xBitmapEx;
return true;
}
}
@@ -843,14 +844,13 @@ namespace
bool bSmooth)
{
Bitmap aDestination(aDestinationSize, 24);
- boost::scoped_ptr<BitmapWriteAccess> pWrite(aDestination.AcquireWriteAccess());
+ std::unique_ptr<BitmapWriteAccess> xWrite(aDestination.AcquireWriteAccess());
- if(pWrite)
+ if(xWrite)
{
- //const Size aContentSizePixel(rSource.GetSizePixel());
- boost::scoped_ptr<BitmapReadAccess> pRead((const_cast< Bitmap& >(rSource)).AcquireReadAccess());
+ std::unique_ptr<BitmapReadAccess> xRead((const_cast< Bitmap& >(rSource)).AcquireReadAccess());
- if(pRead)
+ if (xRead)
{
const Size aDestinationSizePixel(aDestination.GetSizePixel());
const BitmapColor aOutside(BitmapColor(0xff, 0xff, 0xff));
@@ -863,10 +863,10 @@ namespace
if(bSmooth)
{
- pWrite->SetPixel(
+ xWrite->SetPixel(
y,
x,
- pRead->GetInterpolatedColorWithFallback(
+ xRead->GetInterpolatedColorWithFallback(
aSourceCoor.getY(),
aSourceCoor.getX(),
aOutside));
@@ -875,10 +875,10 @@ namespace
{
// this version does the correct <= 0.0 checks, so no need
// to do the static_cast< sal_Int32 > self and make an error
- pWrite->SetPixel(
+ xWrite->SetPixel(
y,
x,
- pRead->GetColorWithFallback(
+ xRead->GetColorWithFallback(
aSourceCoor.getY(),
aSourceCoor.getX(),
aOutside));
@@ -1028,12 +1028,12 @@ BitmapEx BitmapEx::ModifyBitmapEx(const basegfx::BColorModifierStack& rBColorMod
// do NOT use erase; for e.g. 8bit Bitmaps, the nearest color to the given
// erase color is determined and used -> this may be different from what is
// wanted here. Better create a new bitmap with the needed color explicitely
- boost::scoped_ptr<BitmapReadAccess> pReadAccess(aChangedBitmap.AcquireReadAccess());
- OSL_ENSURE(pReadAccess, "Got no Bitmap ReadAccess ?!?");
+ std::unique_ptr<BitmapReadAccess> xReadAccess(aChangedBitmap.AcquireReadAccess());
+ OSL_ENSURE(xReadAccess, "Got no Bitmap ReadAccess ?!?");
- if(pReadAccess)
+ if(xReadAccess)
{
- BitmapPalette aNewPalette(pReadAccess->GetPalette());
+ BitmapPalette aNewPalette(xReadAccess->GetPalette());
aNewPalette[0] = BitmapColor(Color(pReplace->getBColor()));
aChangedBitmap = Bitmap(
aChangedBitmap.GetSizePixel(),
@@ -1056,34 +1056,34 @@ BitmapEx BitmapEx::ModifyBitmapEx(const basegfx::BColorModifierStack& rBColorMod
}
else
{
- boost::scoped_ptr<BitmapWriteAccess> pContent(aChangedBitmap.AcquireWriteAccess());
+ std::unique_ptr<BitmapWriteAccess> xContent(aChangedBitmap.AcquireWriteAccess());
- if(pContent)
+ if(xContent)
{
const double fConvertColor(1.0 / 255.0);
- if(pContent->HasPalette())
+ if(xContent->HasPalette())
{
- const sal_uInt16 nCount(pContent->GetPaletteEntryCount());
+ const sal_uInt16 nCount(xContent->GetPaletteEntryCount());
for(sal_uInt16 b(0); b < nCount; b++)
{
- const BitmapColor& rCol = pContent->GetPaletteColor(b);
+ const BitmapColor& rCol = xContent->GetPaletteColor(b);
const basegfx::BColor aBSource(
rCol.GetRed() * fConvertColor,
rCol.GetGreen() * fConvertColor,
rCol.GetBlue() * fConvertColor);
const basegfx::BColor aBDest(rModifier->getModifiedColor(aBSource));
- pContent->SetPaletteColor(b, BitmapColor(Color(aBDest)));
+ xContent->SetPaletteColor(b, BitmapColor(Color(aBDest)));
}
}
- else if(BMP_FORMAT_24BIT_TC_BGR == pContent->GetScanlineFormat())
+ else if(BMP_FORMAT_24BIT_TC_BGR == xContent->GetScanlineFormat())
{
- for(sal_uInt32 y(0L); y < (sal_uInt32)pContent->Height(); y++)
+ for(sal_uInt32 y(0L); y < (sal_uInt32)xContent->Height(); y++)
{
- Scanline pScan = pContent->GetScanline(y);
+ Scanline pScan = xContent->GetScanline(y);
- for(sal_uInt32 x(0L); x < (sal_uInt32)pContent->Width(); x++)
+ for(sal_uInt32 x(0L); x < (sal_uInt32)xContent->Width(); x++)
{
const basegfx::BColor aBSource(
*(pScan + 2)* fConvertColor,
@@ -1096,13 +1096,13 @@ BitmapEx BitmapEx::ModifyBitmapEx(const basegfx::BColorModifierStack& rBColorMod
}
}
}
- else if(BMP_FORMAT_24BIT_TC_RGB == pContent->GetScanlineFormat())
+ else if(BMP_FORMAT_24BIT_TC_RGB == xContent->GetScanlineFormat())
{
- for(sal_uInt32 y(0L); y < (sal_uInt32)pContent->Height(); y++)
+ for(sal_uInt32 y(0L); y < (sal_uInt32)xContent->Height(); y++)
{
- Scanline pScan = pContent->GetScanline(y);
+ Scanline pScan = xContent->GetScanline(y);
- for(sal_uInt32 x(0L); x < (sal_uInt32)pContent->Width(); x++)
+ for(sal_uInt32 x(0L); x < (sal_uInt32)xContent->Width(); x++)
{
const basegfx::BColor aBSource(
*pScan * fConvertColor,
@@ -1117,18 +1117,18 @@ BitmapEx BitmapEx::ModifyBitmapEx(const basegfx::BColorModifierStack& rBColorMod
}
else
{
- for(sal_uInt32 y(0L); y < (sal_uInt32)pContent->Height(); y++)
+ for(sal_uInt32 y(0L); y < (sal_uInt32)xContent->Height(); y++)
{
- for(sal_uInt32 x(0L); x < (sal_uInt32)pContent->Width(); x++)
+ for(sal_uInt32 x(0L); x < (sal_uInt32)xContent->Width(); x++)
{
- const BitmapColor aBMCol(pContent->GetColor(y, x));
+ const BitmapColor aBMCol(xContent->GetColor(y, x));
const basegfx::BColor aBSource(
(double)aBMCol.GetRed() * fConvertColor,
(double)aBMCol.GetGreen() * fConvertColor,
(double)aBMCol.GetBlue() * fConvertColor);
const basegfx::BColor aBDest(rModifier->getModifiedColor(aBSource));
- pContent->SetPixel(y, x, BitmapColor(Color(aBDest)));
+ xContent->SetPixel(y, x, BitmapColor(Color(aBDest)));
}
}
}
@@ -1223,16 +1223,16 @@ BitmapEx createBlendFrame(
aContent.Erase(COL_BLACK);
- BitmapWriteAccess* pContent = aContent.AcquireWriteAccess();
+ BitmapWriteAccess* xContent = aContent.AcquireWriteAccess();
BitmapWriteAccess* pAlpha = aAlpha.AcquireWriteAccess();
- if(pContent && pAlpha)
+ if(xContent && pAlpha)
{
long x(0);
long y(0);
// x == 0, y == 0, top-left corner
- pContent->SetPixel(0, 0, aColorTopLeft);
+ xContent->SetPixel(0, 0, aColorTopLeft);
pAlpha->SetPixelIndex(0, 0, nAlpha);
// y == 0, top line left to right
@@ -1241,7 +1241,7 @@ BitmapEx createBlendFrame(
Color aMix(aColorTopLeft);
aMix.Merge(aColorTopRight, 255 - sal_uInt8((x * 255) / nW));
- pContent->SetPixel(0, x, aMix);
+ xContent->SetPixel(0, x, aMix);
pAlpha->SetPixelIndex(0, x, nAlpha);
}
@@ -1249,7 +1249,7 @@ BitmapEx createBlendFrame(
// #i123690# Caution! When nW is 1, x == nW is possible (!)
if(x < nW)
{
- pContent->SetPixel(0, x, aColorTopRight);
+ xContent->SetPixel(0, x, aColorTopRight);
pAlpha->SetPixelIndex(0, x, nAlpha);
}
@@ -1259,7 +1259,7 @@ BitmapEx createBlendFrame(
Color aMixA(aColorTopLeft);
aMixA.Merge(aColorBottomLeft, 255 - sal_uInt8((y * 255) / nH));
- pContent->SetPixel(y, 0, aMixA);
+ xContent->SetPixel(y, 0, aMixA);
pAlpha->SetPixelIndex(y, 0, nAlpha);
// #i123690# Caution! When nW is 1, x == nW is possible (!)
@@ -1268,7 +1268,7 @@ BitmapEx createBlendFrame(
Color aMixB(aColorTopRight);
aMixB.Merge(aColorBottomRight, 255 - sal_uInt8((y * 255) / nH));
- pContent->SetPixel(y, x, aMixB);
+ xContent->SetPixel(y, x, aMixB);
pAlpha->SetPixelIndex(y, x, nAlpha);
}
}
@@ -1277,7 +1277,7 @@ BitmapEx createBlendFrame(
if(y < nH)
{
// x == 0, y == nH - 1, bottom-left corner
- pContent->SetPixel(y, 0, aColorBottomLeft);
+ xContent->SetPixel(y, 0, aColorBottomLeft);
pAlpha->SetPixelIndex(y, 0, nAlpha);
// y == nH - 1, bottom line left to right
@@ -1286,7 +1286,7 @@ BitmapEx createBlendFrame(
Color aMix(aColorBottomLeft);
aMix.Merge(aColorBottomRight, 255 - sal_uInt8(((x - 0)* 255) / nW));
- pContent->SetPixel(y, x, aMix);
+ xContent->SetPixel(y, x, aMix);
pAlpha->SetPixelIndex(y, x, nAlpha);
}
@@ -1294,21 +1294,21 @@ BitmapEx createBlendFrame(
// #i123690# Caution! When nW is 1, x == nW is possible (!)
if(x < nW)
{
- pContent->SetPixel(y, x, aColorBottomRight);
+ xContent->SetPixel(y, x, aColorBottomRight);
pAlpha->SetPixelIndex(y, x, nAlpha);
}
}
- aContent.ReleaseAccess(pContent);
+ aContent.ReleaseAccess(xContent);
aAlpha.ReleaseAccess(pAlpha);
pBlendFrameCache->m_aLastResult = BitmapEx(aContent, aAlpha);
}
else
{
- if(pContent)
+ if(xContent)
{
- aContent.ReleaseAccess(pContent);
+ aContent.ReleaseAccess(xContent);
}
if(pAlpha)
diff --git a/vcl/source/gdi/embeddedfontshelper.cxx b/vcl/source/gdi/embeddedfontshelper.cxx
index ba67e76f8c64..6a4f79260d99 100644
--- a/vcl/source/gdi/embeddedfontshelper.cxx
+++ b/vcl/source/gdi/embeddedfontshelper.cxx
@@ -10,8 +10,6 @@
#include <config_folders.h>
#include <config_eot.h>
-#include <boost/scoped_ptr.hpp>
-#include <boost/shared_ptr.hpp>
#include <osl/file.hxx>
#include <rtl/bootstrap.hxx>
#include <vcl/outdev.hxx>
@@ -115,7 +113,7 @@ bool EmbeddedFontsHelper::addEmbeddedFont( uno::Reference< io::XInputStream > st
libeot::EOTMetadata eotMetadata;
libeot::EOTError uncompressError =
libeot::EOT2ttf_buffer( reinterpret_cast<unsigned char *>(&fontData[0]), fontData.size(), &eotMetadata, &nakedPointerToUncompressedFont, &uncompressedFontSize );
- boost::shared_ptr<unsigned char> uncompressedFont( nakedPointerToUncompressedFont, libeot::EOTfreeBuffer );
+ std::shared_ptr<unsigned char> uncompressedFont( nakedPointerToUncompressedFont, libeot::EOTfreeBuffer );
if( uncompressError != libeot::EOT_SUCCESS )
{
SAL_WARN( "vcl.fonts", "Failed to uncompress font" );
@@ -232,7 +230,7 @@ OUString EmbeddedFontsHelper::fontFileUrl( const OUString& familyName, FontFamil
SalGraphics* graphics = Application::GetDefaultDevice()->GetGraphics();
PhysicalFontCollection fonts;
graphics->GetDevFontList( &fonts );
- boost::scoped_ptr< ImplGetDevFontList > fontInfo( fonts.GetDevFontList());
+ std::unique_ptr< ImplGetDevFontList > fontInfo( fonts.GetDevFontList());
PhysicalFontFace* selected = NULL;
for( int i = 0;
i < fontInfo->Count();
diff --git a/vcl/source/gdi/gfxlink.cxx b/vcl/source/gdi/gfxlink.cxx
index c352b81dfeb7..2d569659d987 100644
--- a/vcl/source/gdi/gfxlink.cxx
+++ b/vcl/source/gdi/gfxlink.cxx
@@ -27,7 +27,7 @@
#include <vcl/gfxlink.hxx>
#include <vcl/cvtgrf.hxx>
#include <com/sun/star/ucb/CommandAbortedException.hpp>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
GfxLink::GfxLink() :
meType ( GFX_LINK_TYPE_NONE ),
@@ -322,12 +322,12 @@ ImpSwap::ImpSwap( sal_uInt8* pData, sal_uLong nDataSize ) :
maURL = aTempFile.GetURL();
if( !maURL.isEmpty() )
{
- boost::scoped_ptr<SvStream> pOStm(::utl::UcbStreamHelper::CreateStream( maURL, STREAM_READWRITE | StreamMode::SHARE_DENYWRITE ));
- if( pOStm )
+ std::unique_ptr<SvStream> xOStm(::utl::UcbStreamHelper::CreateStream( maURL, STREAM_READWRITE | StreamMode::SHARE_DENYWRITE ));
+ if( xOStm )
{
- pOStm->Write( pData, mnDataSize );
- bool bError = ( ERRCODE_NONE != pOStm->GetError() );
- pOStm.reset();
+ xOStm->Write( pData, mnDataSize );
+ bool bError = ( ERRCODE_NONE != xOStm->GetError() );
+ xOStm.reset();
if( bError )
{
@@ -351,18 +351,18 @@ sal_uInt8* ImpSwap::GetData() const
if( IsSwapped() )
{
- boost::scoped_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( maURL, STREAM_READWRITE ));
- if( pIStm )
+ std::unique_ptr<SvStream> xIStm(::utl::UcbStreamHelper::CreateStream( maURL, STREAM_READWRITE ));
+ if( xIStm )
{
pData = new sal_uInt8[ mnDataSize ];
- pIStm->Read( pData, mnDataSize );
- bool bError = ( ERRCODE_NONE != pIStm->GetError() );
- sal_Size nActReadSize = pIStm->Tell();
+ xIStm->Read( pData, mnDataSize );
+ bool bError = ( ERRCODE_NONE != xIStm->GetError() );
+ sal_Size nActReadSize = xIStm->Tell();
if (nActReadSize != mnDataSize)
{
bError = true;
}
- pIStm.reset();
+ xIStm.reset();
if( bError )
delete[] pData, pData = NULL;
diff --git a/vcl/source/gdi/image.cxx b/vcl/source/gdi/image.cxx
index 478f04979a75..5c0b0dcb4610 100644
--- a/vcl/source/gdi/image.cxx
+++ b/vcl/source/gdi/image.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <boost/scoped_ptr.hpp>
#include <boost/scoped_array.hpp>
#include <osl/file.hxx>
@@ -301,10 +300,10 @@ ImageList::ImageList( const ResId& rResId ) :
sal_uLong nObjMask = pResMgr->ReadLong();
pResMgr->ReadString(); //skip string
- ::boost::scoped_ptr< Color > spMaskColor;
+ std::unique_ptr< Color > xMaskColor;
if( nObjMask & RSC_IMAGE_MASKCOLOR )
- spMaskColor.reset( new Color( ResId( (RSHEADER_TYPE*)pResMgr->GetClass(), *pResMgr ) ) );
+ xMaskColor.reset( new Color( ResId( (RSHEADER_TYPE*)pResMgr->GetClass(), *pResMgr ) ) );
pResMgr->Increment( ResMgr::GetObjSize( (RSHEADER_TYPE*)pResMgr->GetClass() ) );
diff --git a/vcl/source/gdi/impanmvw.cxx b/vcl/source/gdi/impanmvw.cxx
index 6fac2e802ae5..c3e7b793580c 100644
--- a/vcl/source/gdi/impanmvw.cxx
+++ b/vcl/source/gdi/impanmvw.cxx
@@ -21,7 +21,6 @@
#include <vcl/virdev.hxx>
#include <vcl/window.hxx>
#include <tools/helpers.hxx>
-#include <boost/scoped_ptr.hpp>
ImplAnimView::ImplAnimView( Animation* pParent, OutputDevice* pOut,
const Point& rPt, const Size& rSz,
@@ -155,7 +154,7 @@ void ImplAnimView::getPosSize( const AnimationBitmap& rAnm, Point& rPosPix, Size
void ImplAnimView::drawToPos( sal_uLong nPos )
{
VirtualDevice aVDev;
- boost::scoped_ptr<vcl::Region> pOldClip(!maClip.IsNull() ? new vcl::Region( mpOut->GetClipRegion() ) : NULL);
+ std::unique_ptr<vcl::Region> xOldClip(!maClip.IsNull() ? new vcl::Region( mpOut->GetClipRegion() ) : NULL);
aVDev.SetOutputSizePixel( maSzPix, false );
nPos = std::min( nPos, (sal_uLong) mpParent->Count() - 1UL );
@@ -163,13 +162,13 @@ void ImplAnimView::drawToPos( sal_uLong nPos )
for( sal_uLong i = 0UL; i <= nPos; i++ )
draw( i, &aVDev );
- if( pOldClip )
+ if (xOldClip)
mpOut->SetClipRegion( maClip );
mpOut->DrawOutDev( maDispPt, maDispSz, Point(), maSzPix, aVDev );
- if( pOldClip )
- mpOut->SetClipRegion( *pOldClip );
+ if (xOldClip)
+ mpOut->SetClipRegion(*xOldClip);
}
void ImplAnimView::draw( sal_uLong nPos, VirtualDevice* pVDev )
@@ -261,17 +260,17 @@ void ImplAnimView::draw( sal_uLong nPos, VirtualDevice* pVDev )
if( !pVDev )
{
- boost::scoped_ptr<vcl::Region> pOldClip(!maClip.IsNull() ? new vcl::Region( mpOut->GetClipRegion() ) : NULL);
+ std::unique_ptr<vcl::Region> xOldClip(!maClip.IsNull() ? new vcl::Region( mpOut->GetClipRegion() ) : NULL);
- if( pOldClip )
+ if (xOldClip)
mpOut->SetClipRegion( maClip );
mpOut->DrawOutDev( maDispPt, maDispSz, Point(), maSzPix, *pDev );
- if( pOldClip )
+ if( xOldClip)
{
- mpOut->SetClipRegion( *pOldClip );
- pOldClip.reset();
+ mpOut->SetClipRegion(*xOldClip);
+ xOldClip.reset();
}
delete pDev;
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 2a66b164ce36..457f50b3fa27 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -38,7 +38,7 @@
#include <impgraph.hxx>
#include <com/sun/star/ucb/CommandAbortedException.hpp>
#include <vcl/dibtools.hxx>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
#define GRAPHIC_MTFTOBMP_MAXEXT 2048
#define GRAPHIC_STREAMBUFSIZE 8192UL
@@ -1161,20 +1161,20 @@ bool ImpGraphic::ImplSwapOut()
if( !aTmpURL.GetMainURL( INetURLObject::NO_DECODE ).isEmpty() )
{
- boost::scoped_ptr<SvStream> pOStm;
+ std::unique_ptr<SvStream> xOStm;
try
{
- pOStm.reset(::utl::UcbStreamHelper::CreateStream( aTmpURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READWRITE | StreamMode::SHARE_DENYWRITE ));
+ xOStm.reset(::utl::UcbStreamHelper::CreateStream( aTmpURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READWRITE | StreamMode::SHARE_DENYWRITE ));
}
catch( const ::com::sun::star::uno::Exception& )
{
}
- if( pOStm )
+ if( xOStm )
{
- pOStm->SetVersion( SOFFICE_FILEFORMAT_50 );
- pOStm->SetCompressMode( SvStreamCompressFlags::NATIVE );
+ xOStm->SetVersion( SOFFICE_FILEFORMAT_50 );
+ xOStm->SetCompressMode( SvStreamCompressFlags::NATIVE );
- if( ( bRet = ImplSwapOut( pOStm.get() ) ) )
+ if( ( bRet = ImplSwapOut( xOStm.get() ) ) )
{
mpSwapFile = new ImpSwapFile;
mpSwapFile->nRefCount = 1;
@@ -1182,7 +1182,7 @@ bool ImpGraphic::ImplSwapOut()
}
else
{
- pOStm.reset();
+ xOStm.reset();
try
{
@@ -1219,19 +1219,19 @@ void ImpGraphic::ImplSwapOutAsLink()
mbSwapOut = true;
}
-bool ImpGraphic::ImplSwapOut( SvStream* pOStm )
+bool ImpGraphic::ImplSwapOut( SvStream* xOStm )
{
bool bRet = false;
- if( pOStm )
+ if( xOStm )
{
- pOStm->SetBufferSize( GRAPHIC_STREAMBUFSIZE );
+ xOStm->SetBufferSize( GRAPHIC_STREAMBUFSIZE );
- if( !pOStm->GetError() && ImplWriteEmbedded( *pOStm ) )
+ if( !xOStm->GetError() && ImplWriteEmbedded( *xOStm ) )
{
- pOStm->Flush();
+ xOStm->Flush();
- if( !pOStm->GetError() )
+ if( !xOStm->GetError() )
{
ImplClearGraphics( true );
bRet = mbSwapOut = true;
@@ -1259,22 +1259,22 @@ bool ImpGraphic::ImplSwapIn()
if( !aSwapURL.isEmpty() )
{
- boost::scoped_ptr<SvStream> pIStm;
+ std::unique_ptr<SvStream> xIStm;
try
{
- pIStm.reset(::utl::UcbStreamHelper::CreateStream( aSwapURL, STREAM_READWRITE | StreamMode::SHARE_DENYWRITE ));
+ xIStm.reset(::utl::UcbStreamHelper::CreateStream( aSwapURL, STREAM_READWRITE | StreamMode::SHARE_DENYWRITE ));
}
catch( const ::com::sun::star::uno::Exception& )
{
}
- if( pIStm )
+ if( xIStm )
{
- pIStm->SetVersion( SOFFICE_FILEFORMAT_50 );
- pIStm->SetCompressMode( SvStreamCompressFlags::NATIVE );
+ xIStm->SetVersion( SOFFICE_FILEFORMAT_50 );
+ xIStm->SetCompressMode( SvStreamCompressFlags::NATIVE );
- bRet = ImplSwapIn( pIStm.get() );
- pIStm.reset();
+ bRet = ImplSwapIn( xIStm.get() );
+ xIStm.reset();
if( mpSwapFile )
{
@@ -1316,18 +1316,18 @@ bool ImpGraphic::ImplSwapIn()
return bRet;
}
-bool ImpGraphic::ImplSwapIn( SvStream* pIStm )
+bool ImpGraphic::ImplSwapIn( SvStream* xIStm )
{
bool bRet = false;
- if( pIStm )
+ if( xIStm )
{
- pIStm->SetBufferSize( GRAPHIC_STREAMBUFSIZE );
+ xIStm->SetBufferSize( GRAPHIC_STREAMBUFSIZE );
- if( !pIStm->GetError() )
+ if( !xIStm->GetError() )
{
mbSwapUnderway = true;
- bRet = ImplReadEmbedded( *pIStm );
+ bRet = ImplReadEmbedded( *xIStm );
mbSwapUnderway = false;
if( !bRet )
diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx
index b547380a78d0..61ef2ea3971c 100644
--- a/vcl/source/gdi/impvect.cxx
+++ b/vcl/source/gdi/impvect.cxx
@@ -27,7 +27,7 @@
#include <vcl/virdev.hxx>
#include <impvect.hxx>
#include <boost/scoped_array.hpp>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
#define VECT_POLY_MAX 8192
@@ -634,8 +634,8 @@ bool ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
VECT_PROGRESS( pProgress, 0 );
- boost::scoped_ptr<Bitmap> pBmp(new Bitmap( rColorBmp ));
- BitmapReadAccess* pRAcc = pBmp->AcquireReadAccess();
+ std::unique_ptr<Bitmap> xBmp(new Bitmap( rColorBmp ));
+ BitmapReadAccess* pRAcc = xBmp->AcquireReadAccess();
if( pRAcc )
{
@@ -677,16 +677,15 @@ bool ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
{
const BitmapColor aBmpCol( pRAcc->GetPaletteColor( pColorSet[ i ].mnIndex ) );
const Color aFindColor( aBmpCol.GetRed(), aBmpCol.GetGreen(), aBmpCol.GetBlue() );
-// const sal_uInt8 cLum = aFindColor.GetLuminance();
- boost::scoped_ptr<ImplVectMap> pMap(ImplExpand( pRAcc, aFindColor ));
+ std::unique_ptr<ImplVectMap> xMap(ImplExpand( pRAcc, aFindColor ));
VECT_PROGRESS( pProgress, FRound( fPercent += fPercentStep_2 ) );
- if( pMap )
+ if( xMap )
{
aPolyPoly.Clear();
- ImplCalculate( pMap.get(), aPolyPoly, cReduce, nFlags );
- pMap.reset();
+ ImplCalculate( xMap.get(), aPolyPoly, cReduce, nFlags );
+ xMap.reset();
if( aPolyPoly.Count() )
{
@@ -723,8 +722,8 @@ bool ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
}
}
- pBmp->ReleaseAccess( pRAcc );
- pBmp.reset();
+ xBmp->ReleaseAccess( pRAcc );
+ xBmp.reset();
VECT_PROGRESS( pProgress, 100 );
return bRet;
@@ -734,29 +733,29 @@ bool ImplVectorizer::ImplVectorize( const Bitmap& rMonoBmp,
tools::PolyPolygon& rPolyPoly,
sal_uLong nFlags, const Link* pProgress )
{
- boost::scoped_ptr<Bitmap> pBmp(new Bitmap( rMonoBmp ));
+ std::unique_ptr<Bitmap> xBmp(new Bitmap( rMonoBmp ));
BitmapReadAccess* pRAcc;
bool bRet = false;
VECT_PROGRESS( pProgress, 10 );
- if( pBmp->GetBitCount() > 1 )
- pBmp->Convert( BMP_CONVERSION_1BIT_THRESHOLD );
+ if( xBmp->GetBitCount() > 1 )
+ xBmp->Convert( BMP_CONVERSION_1BIT_THRESHOLD );
VECT_PROGRESS( pProgress, 30 );
- pRAcc = pBmp->AcquireReadAccess();
- boost::scoped_ptr<ImplVectMap> pMap(ImplExpand( pRAcc, COL_BLACK ));
- pBmp->ReleaseAccess( pRAcc );
- pBmp.reset();
+ pRAcc = xBmp->AcquireReadAccess();
+ std::unique_ptr <ImplVectMap> xMap(ImplExpand( pRAcc, COL_BLACK ));
+ xBmp->ReleaseAccess( pRAcc );
+ xBmp.reset();
VECT_PROGRESS( pProgress, 60 );
- if( pMap )
+ if( xMap )
{
rPolyPoly.Clear();
- ImplCalculate( pMap.get(), rPolyPoly, 0, nFlags );
- pMap.reset();
+ ImplCalculate( xMap.get(), rPolyPoly, 0, nFlags );
+ xMap.reset();
ImplLimitPolyPoly( rPolyPoly );
if( nFlags & BMP_VECTORIZE_REDUCE_EDGES )
@@ -860,7 +859,7 @@ ImplVectMap* ImplVectorizer::ImplExpand( BitmapReadAccess* pRAcc, const Color& r
{
ImplVectMap* pMap = NULL;
- if( pRAcc && pRAcc->Width() && pRAcc->Height() )
+ if( pRAcc && pRAcc->Width() && pRAcc->Height() )
{
const long nOldWidth = pRAcc->Width();
const long nOldHeight = pRAcc->Height();
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx
index ec0a4162202b..3cab7d14dc76 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -25,8 +25,8 @@
#include "basegfx/polygon/b2dpolygon.hxx"
#include "basegfx/polygon/b2dpolygontools.hxx"
-#include <boost/shared_ptr.hpp>
#include <set>
+#include <memory>
#include <map>
namespace vcl
@@ -294,7 +294,7 @@ struct PageSyncData
std::deque< PDFWriter::StructAttribute > mParaStructAttributes;
std::deque< PDFWriter::StructAttributeValue > mParaStructAttributeValues;
std::deque< Graphic > mGraphics;
- std::deque< ::boost::shared_ptr< PDFWriter::AnyWidget > >
+ std::deque< std::shared_ptr< PDFWriter::AnyWidget > >
mControls;
GlobalSyncData* mpGlobalData;
@@ -381,7 +381,7 @@ bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAc
break;
case PDFExtOutDevDataSync::CreateControl:
{
- ::boost::shared_ptr< PDFWriter::AnyWidget > pControl( mControls.front() );
+ std::shared_ptr< PDFWriter::AnyWidget > pControl( mControls.front() );
DBG_ASSERT( pControl.get(), "PageSyncData::PlaySyncPageAct: invalid widget!" );
if ( pControl.get() )
rWriter.CreateControl( *pControl );
@@ -739,7 +739,7 @@ void PDFExtOutDevData::CreateControl( const PDFWriter::AnyWidget& rControlType,
{
mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::CreateControl );
- ::boost::shared_ptr< PDFWriter::AnyWidget > pClone( rControlType.Clone() );
+ std::shared_ptr< PDFWriter::AnyWidget > pClone( rControlType.Clone() );
mpPageSyncData->mControls.push_back( pClone );
}
diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx
index 81ad0f5cb2f0..4701eded681f 100644
--- a/vcl/source/gdi/pdfwriter.cxx
+++ b/vcl/source/gdi/pdfwriter.cxx
@@ -29,7 +29,7 @@ PDFWriter::AnyWidget::~AnyWidget()
PDFWriter::PDFWriter( const PDFWriter::PDFWriterContext& rContext, const com::sun::star::uno::Reference< com::sun::star::beans::XMaterialHolder >& xEnc )
:
- pImplementation( new PDFWriterImpl( rContext, xEnc, *this ) )
+ xImplementation( new PDFWriterImpl( rContext, xEnc, *this ) )
{
}
@@ -39,32 +39,32 @@ PDFWriter::~PDFWriter()
OutputDevice* PDFWriter::GetReferenceDevice()
{
- return pImplementation->getReferenceDevice();
+ return xImplementation->getReferenceDevice();
}
sal_Int32 PDFWriter::NewPage( sal_Int32 nPageWidth, sal_Int32 nPageHeight, Orientation eOrientation )
{
- return pImplementation->newPage( nPageWidth, nPageHeight, eOrientation );
+ return xImplementation->newPage( nPageWidth, nPageHeight, eOrientation );
}
bool PDFWriter::Emit()
{
- return pImplementation->emit();
+ return xImplementation->emit();
}
void PDFWriter::SetDocumentLocale( const com::sun::star::lang::Locale& rLoc )
{
- pImplementation->setDocumentLocale( rLoc );
+ xImplementation->setDocumentLocale( rLoc );
}
void PDFWriter::SetFont( const vcl::Font& rFont )
{
- pImplementation->setFont( rFont );
+ xImplementation->setFont( rFont );
}
void PDFWriter::DrawText( const Point& rPos, const OUString& rText )
{
- pImplementation->drawText( rPos, rText, 0, rText.getLength() );
+ xImplementation->drawText( rPos, rText, 0, rText.getLength() );
}
void PDFWriter::DrawTextLine(
@@ -75,7 +75,7 @@ void PDFWriter::DrawTextLine(
FontUnderline eOverline,
bool bUnderlineAbove )
{
- pImplementation->drawTextLine( rPos, nWidth, eStrikeout, eUnderline, eOverline, bUnderlineAbove );
+ xImplementation->drawTextLine( rPos, nWidth, eStrikeout, eUnderline, eOverline, bUnderlineAbove );
}
void PDFWriter::DrawTextArray(
@@ -85,7 +85,7 @@ void PDFWriter::DrawTextArray(
sal_Int32 nIndex,
sal_Int32 nLen )
{
- pImplementation->drawTextArray( rStartPt, rStr, pDXAry, nIndex, nLen );
+ xImplementation->drawTextArray( rStartPt, rStr, pDXAry, nIndex, nLen );
}
void PDFWriter::DrawStretchText(
@@ -95,7 +95,7 @@ void PDFWriter::DrawStretchText(
sal_Int32 nIndex,
sal_Int32 nLen )
{
- pImplementation->drawStretchText( rStartPt, nWidth, rStr, nIndex, nLen );
+ xImplementation->drawStretchText( rStartPt, nWidth, rStr, nIndex, nLen );
}
void PDFWriter::DrawText(
@@ -103,343 +103,343 @@ void PDFWriter::DrawText(
const OUString& rStr,
sal_uInt16 nStyle )
{
- pImplementation->drawText( rRect, rStr, nStyle );
+ xImplementation->drawText( rRect, rStr, nStyle );
}
void PDFWriter::DrawLine( const Point& rStart, const Point& rStop )
{
- pImplementation->drawLine( rStart, rStop );
+ xImplementation->drawLine( rStart, rStop );
}
void PDFWriter::DrawLine( const Point& rStart, const Point& rStop, const LineInfo& rInfo )
{
- pImplementation->drawLine( rStart, rStop, rInfo );
+ xImplementation->drawLine( rStart, rStop, rInfo );
}
void PDFWriter::DrawPolygon( const Polygon& rPoly )
{
- pImplementation->drawPolygon( rPoly );
+ xImplementation->drawPolygon( rPoly );
}
void PDFWriter::DrawPolyLine( const Polygon& rPoly )
{
- pImplementation->drawPolyLine( rPoly );
+ xImplementation->drawPolyLine( rPoly );
}
void PDFWriter::DrawRect( const Rectangle& rRect )
{
- pImplementation->drawRectangle( rRect );
+ xImplementation->drawRectangle( rRect );
}
void PDFWriter::DrawRect( const Rectangle& rRect, sal_uLong nHorzRound, sal_uLong nVertRound )
{
- pImplementation->drawRectangle( rRect, nHorzRound, nVertRound );
+ xImplementation->drawRectangle( rRect, nHorzRound, nVertRound );
}
void PDFWriter::DrawEllipse( const Rectangle& rRect )
{
- pImplementation->drawEllipse( rRect );
+ xImplementation->drawEllipse( rRect );
}
void PDFWriter::DrawArc( const Rectangle& rRect, const Point& rStart, const Point& rStop )
{
- pImplementation->drawArc( rRect, rStart, rStop, false, false );
+ xImplementation->drawArc( rRect, rStart, rStop, false, false );
}
void PDFWriter::DrawPie( const Rectangle& rRect, const Point& rStart, const Point& rStop )
{
- pImplementation->drawArc( rRect, rStart, rStop, true, false );
+ xImplementation->drawArc( rRect, rStart, rStop, true, false );
}
void PDFWriter::DrawChord( const Rectangle& rRect, const Point& rStart, const Point& rStop )
{
- pImplementation->drawArc( rRect, rStart, rStop, false, true );
+ xImplementation->drawArc( rRect, rStart, rStop, false, true );
}
void PDFWriter::DrawPolyLine( const Polygon& rPoly, const LineInfo& rInfo )
{
- pImplementation->drawPolyLine( rPoly, rInfo );
+ xImplementation->drawPolyLine( rPoly, rInfo );
}
void PDFWriter::DrawPolyLine( const Polygon& rPoly, const ExtLineInfo& rInfo )
{
- pImplementation->drawPolyLine( rPoly, rInfo );
+ xImplementation->drawPolyLine( rPoly, rInfo );
}
void PDFWriter::DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly )
{
- pImplementation->drawPolyPolygon( rPolyPoly );
+ xImplementation->drawPolyPolygon( rPolyPoly );
}
void PDFWriter::DrawPixel( const Point& rPos, const Color& rColor )
{
- pImplementation->drawPixel( rPos, rColor );
+ xImplementation->drawPixel( rPos, rColor );
}
void PDFWriter::DrawBitmap( const Point& rDestPt, const Size& rDestSize, const Bitmap& rBitmap )
{
- pImplementation->drawBitmap( rDestPt, rDestSize, rBitmap );
+ xImplementation->drawBitmap( rDestPt, rDestSize, rBitmap );
}
void PDFWriter::DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, const BitmapEx& rBitmap )
{
- pImplementation->drawBitmap( rDestPt, rDestSize, rBitmap );
+ xImplementation->drawBitmap( rDestPt, rDestSize, rBitmap );
}
void PDFWriter::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch )
{
- pImplementation->drawHatch( rPolyPoly, rHatch );
+ xImplementation->drawHatch( rPolyPoly, rHatch );
}
void PDFWriter::DrawGradient( const Rectangle& rRect, const Gradient& rGradient )
{
- pImplementation->drawGradient( rRect, rGradient );
+ xImplementation->drawGradient( rRect, rGradient );
}
void PDFWriter::DrawGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient )
{
- pImplementation->push(PushFlags::CLIPREGION);
- pImplementation->setClipRegion( rPolyPoly.getB2DPolyPolygon() );
- pImplementation->drawGradient( rPolyPoly.GetBoundRect(), rGradient );
- pImplementation->pop();
+ xImplementation->push(PushFlags::CLIPREGION);
+ xImplementation->setClipRegion( rPolyPoly.getB2DPolyPolygon() );
+ xImplementation->drawGradient( rPolyPoly.GetBoundRect(), rGradient );
+ xImplementation->pop();
}
void PDFWriter::DrawWallpaper( const Rectangle& rRect, const Wallpaper& rWallpaper )
{
- pImplementation->drawWallpaper( rRect, rWallpaper );
+ xImplementation->drawWallpaper( rRect, rWallpaper );
}
void PDFWriter::DrawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent )
{
- pImplementation->drawTransparent( rPolyPoly, nTransparencePercent );
+ xImplementation->drawTransparent( rPolyPoly, nTransparencePercent );
}
void PDFWriter::BeginTransparencyGroup()
{
- pImplementation->beginTransparencyGroup();
+ xImplementation->beginTransparencyGroup();
}
void PDFWriter::EndTransparencyGroup( const Rectangle& rRect, sal_uInt16 nTransparentPercent )
{
- pImplementation->endTransparencyGroup( rRect, nTransparentPercent );
+ xImplementation->endTransparencyGroup( rRect, nTransparentPercent );
}
void PDFWriter::Push( PushFlags nFlags )
{
- pImplementation->push( nFlags );
+ xImplementation->push( nFlags );
}
void PDFWriter::Pop()
{
- pImplementation->pop();
+ xImplementation->pop();
}
void PDFWriter::SetMapMode( const MapMode& rMapMode )
{
- pImplementation->setMapMode( rMapMode );
+ xImplementation->setMapMode( rMapMode );
}
void PDFWriter::SetLineColor( const Color& rColor )
{
- pImplementation->setLineColor( rColor );
+ xImplementation->setLineColor( rColor );
}
void PDFWriter::SetFillColor( const Color& rColor )
{
- pImplementation->setFillColor( rColor );
+ xImplementation->setFillColor( rColor );
}
void PDFWriter::SetClipRegion()
{
- pImplementation->clearClipRegion();
+ xImplementation->clearClipRegion();
}
void PDFWriter::SetClipRegion( const basegfx::B2DPolyPolygon& rRegion )
{
- pImplementation->setClipRegion( rRegion );
+ xImplementation->setClipRegion( rRegion );
}
void PDFWriter::MoveClipRegion( long nHorzMove, long nVertMove )
{
- pImplementation->moveClipRegion( nHorzMove, nVertMove );
+ xImplementation->moveClipRegion( nHorzMove, nVertMove );
}
void PDFWriter::IntersectClipRegion( const basegfx::B2DPolyPolygon& rRegion )
{
- pImplementation->intersectClipRegion( rRegion );
+ xImplementation->intersectClipRegion( rRegion );
}
void PDFWriter::IntersectClipRegion( const Rectangle& rRect )
{
- pImplementation->intersectClipRegion( rRect );
+ xImplementation->intersectClipRegion( rRect );
}
void PDFWriter::SetLayoutMode( ComplexTextLayoutMode nMode )
{
- pImplementation->setLayoutMode( nMode );
+ xImplementation->setLayoutMode( nMode );
}
void PDFWriter::SetDigitLanguage( LanguageType eLang )
{
- pImplementation->setDigitLanguage( eLang );
+ xImplementation->setDigitLanguage( eLang );
}
void PDFWriter::SetTextColor( const Color& rColor )
{
- pImplementation->setTextColor( rColor );
+ xImplementation->setTextColor( rColor );
}
void PDFWriter::SetTextFillColor()
{
- pImplementation->setTextFillColor();
+ xImplementation->setTextFillColor();
}
void PDFWriter::SetTextFillColor( const Color& rColor )
{
- pImplementation->setTextFillColor( rColor );
+ xImplementation->setTextFillColor( rColor );
}
void PDFWriter::SetTextLineColor()
{
- pImplementation->setTextLineColor();
+ xImplementation->setTextLineColor();
}
void PDFWriter::SetTextLineColor( const Color& rColor )
{
- pImplementation->setTextLineColor( rColor );
+ xImplementation->setTextLineColor( rColor );
}
void PDFWriter::SetOverlineColor()
{
- pImplementation->setOverlineColor();
+ xImplementation->setOverlineColor();
}
void PDFWriter::SetOverlineColor( const Color& rColor )
{
- pImplementation->setOverlineColor( rColor );
+ xImplementation->setOverlineColor( rColor );
}
void PDFWriter::SetTextAlign( ::TextAlign eAlign )
{
- pImplementation->setTextAlign( eAlign );
+ xImplementation->setTextAlign( eAlign );
}
void PDFWriter::DrawJPGBitmap( SvStream& rStreamData, bool bIsTrueColor, const Size& rSrcSizePixel, const Rectangle& rTargetArea, const Bitmap& rMask )
{
- pImplementation->drawJPGBitmap( rStreamData, bIsTrueColor, rSrcSizePixel, rTargetArea, rMask );
+ xImplementation->drawJPGBitmap( rStreamData, bIsTrueColor, rSrcSizePixel, rTargetArea, rMask );
}
sal_Int32 PDFWriter::CreateLink( const Rectangle& rRect, sal_Int32 nPageNr )
{
- return pImplementation->createLink( rRect, nPageNr );
+ return xImplementation->createLink( rRect, nPageNr );
}
sal_Int32 PDFWriter::RegisterDestReference( sal_Int32 nDestId, const Rectangle& rRect, sal_Int32 nPageNr, DestAreaType eType )
{
- return pImplementation->registerDestReference( nDestId, rRect, nPageNr, eType );
+ return xImplementation->registerDestReference( nDestId, rRect, nPageNr, eType );
}
//--->i56629
sal_Int32 PDFWriter::CreateNamedDest( const OUString& sDestName, const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
{
- return pImplementation->createNamedDest( sDestName, rRect, nPageNr, eType );
+ return xImplementation->createNamedDest( sDestName, rRect, nPageNr, eType );
}
sal_Int32 PDFWriter::CreateDest( const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
{
- return pImplementation->createDest( rRect, nPageNr, eType );
+ return xImplementation->createDest( rRect, nPageNr, eType );
}
sal_Int32 PDFWriter::SetLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId )
{
- return pImplementation->setLinkDest( nLinkId, nDestId );
+ return xImplementation->setLinkDest( nLinkId, nDestId );
}
sal_Int32 PDFWriter::SetLinkURL( sal_Int32 nLinkId, const OUString& rURL )
{
- return pImplementation->setLinkURL( nLinkId, rURL );
+ return xImplementation->setLinkURL( nLinkId, rURL );
}
void PDFWriter::SetLinkPropertyID( sal_Int32 nLinkId, sal_Int32 nPropertyId )
{
- pImplementation->setLinkPropertyId( nLinkId, nPropertyId );
+ xImplementation->setLinkPropertyId( nLinkId, nPropertyId );
}
sal_Int32 PDFWriter::CreateOutlineItem( sal_Int32 nParent, const OUString& rText, sal_Int32 nDestID )
{
- return pImplementation->createOutlineItem( nParent, rText, nDestID );
+ return xImplementation->createOutlineItem( nParent, rText, nDestID );
}
sal_Int32 PDFWriter::SetOutlineItemParent( sal_Int32 nItem, sal_Int32 nNewParent )
{
- return pImplementation->setOutlineItemParent( nItem, nNewParent );
+ return xImplementation->setOutlineItemParent( nItem, nNewParent );
}
sal_Int32 PDFWriter::SetOutlineItemText( sal_Int32 nItem, const OUString& rText )
{
- return pImplementation->setOutlineItemText( nItem, rText );
+ return xImplementation->setOutlineItemText( nItem, rText );
}
sal_Int32 PDFWriter::SetOutlineItemDest( sal_Int32 nItem, sal_Int32 nDest )
{
- return pImplementation->setOutlineItemDest( nItem, nDest );
+ return xImplementation->setOutlineItemDest( nItem, nDest );
}
void PDFWriter::CreateNote( const Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr )
{
- pImplementation->createNote( rRect, rNote, nPageNr );
+ xImplementation->createNote( rRect, rNote, nPageNr );
}
sal_Int32 PDFWriter::BeginStructureElement( PDFWriter::StructElement eType, const OUString& rAlias )
{
- return pImplementation->beginStructureElement( eType, rAlias );
+ return xImplementation->beginStructureElement( eType, rAlias );
}
void PDFWriter::EndStructureElement()
{
- pImplementation->endStructureElement();
+ xImplementation->endStructureElement();
}
bool PDFWriter::SetCurrentStructureElement( sal_Int32 nID )
{
- return pImplementation->setCurrentStructureElement( nID );
+ return xImplementation->setCurrentStructureElement( nID );
}
bool PDFWriter::SetStructureAttribute( enum StructAttribute eAttr, enum StructAttributeValue eVal )
{
- return pImplementation->setStructureAttribute( eAttr, eVal );
+ return xImplementation->setStructureAttribute( eAttr, eVal );
}
bool PDFWriter::SetStructureAttributeNumerical( enum StructAttribute eAttr, sal_Int32 nValue )
{
- return pImplementation->setStructureAttributeNumerical( eAttr, nValue );
+ return xImplementation->setStructureAttributeNumerical( eAttr, nValue );
}
void PDFWriter::SetStructureBoundingBox( const Rectangle& rRect )
{
- pImplementation->setStructureBoundingBox( rRect );
+ xImplementation->setStructureBoundingBox( rRect );
}
void PDFWriter::SetActualText( const OUString& rText )
{
- pImplementation->setActualText( rText );
+ xImplementation->setActualText( rText );
}
void PDFWriter::SetAlternateText( const OUString& rText )
{
- pImplementation->setAlternateText( rText );
+ xImplementation->setAlternateText( rText );
}
void PDFWriter::SetAutoAdvanceTime( sal_uInt32 nSeconds, sal_Int32 nPageNr )
{
- pImplementation->setAutoAdvanceTime( nSeconds, nPageNr );
+ xImplementation->setAutoAdvanceTime( nSeconds, nPageNr );
}
void PDFWriter::SetPageTransition( PDFWriter::PageTransition eType, sal_uInt32 nMilliSec, sal_Int32 nPageNr )
{
- pImplementation->setPageTransition( eType, nMilliSec, nPageNr );
+ xImplementation->setPageTransition( eType, nMilliSec, nPageNr );
}
sal_Int32 PDFWriter::CreateControl( const PDFWriter::AnyWidget& rControl, sal_Int32 nPageNr )
{
- return pImplementation->createControl( rControl, nPageNr );
+ return xImplementation->createControl( rControl, nPageNr );
}
PDFOutputStream::~PDFOutputStream()
@@ -448,12 +448,12 @@ PDFOutputStream::~PDFOutputStream()
void PDFWriter::AddStream( const OUString& rMimeType, PDFOutputStream* pStream, bool bCompress )
{
- pImplementation->addStream( rMimeType, pStream, bCompress );
+ xImplementation->addStream( rMimeType, pStream, bCompress );
}
std::set< PDFWriter::ErrorCode > PDFWriter::GetErrors()
{
- return pImplementation->getErrors();
+ return xImplementation->getErrors();
}
com::sun::star::uno::Reference< com::sun::star::beans::XMaterialHolder >
@@ -467,7 +467,7 @@ PDFWriter::InitEncryption( const OUString& i_rOwnerPassword,
void PDFWriter::PlayMetafile( const GDIMetaFile& i_rMTF, const vcl::PDFWriter::PlayMetafileContext& i_rPlayContext, PDFExtOutDevData* i_pData )
{
- pImplementation->playMetafile( i_rMTF, i_pData, i_rPlayContext, NULL);
+ xImplementation->playMetafile( i_rMTF, i_pData, i_rPlayContext, NULL);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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 );
}
}
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index 88a0abc1d352..6c66232a4293 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -43,7 +43,7 @@
#include <svdata.hxx>
#include <outdata.hxx>
#include <boost/scoped_array.hpp>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
#include <basegfx/polygon/b2dpolygon.hxx>
@@ -705,7 +705,7 @@ bool SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, const
{
Rectangle rgn( rControlRegion );
mirror( rgn, pOutDev );
- boost::scoped_ptr< ImplControlValue > mirrorValue( aValue.clone());
+ std::unique_ptr< ImplControlValue > mirrorValue( aValue.clone());
mirror( *mirrorValue, pOutDev );
bool bRet = drawNativeControl( nType, nPart, rgn, nState, *mirrorValue, aCaption );
return bRet;
@@ -722,7 +722,7 @@ bool SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart,
{
Rectangle rgn( rControlRegion );
mirror( rgn, pOutDev );
- boost::scoped_ptr< ImplControlValue > mirrorValue( aValue.clone());
+ std::unique_ptr< ImplControlValue > mirrorValue( aValue.clone());
mirror( *mirrorValue, pOutDev );
if( getNativeControlRegion( nType, nPart, rgn, nState, *mirrorValue, aCaption,
rNativeBoundingRegion, rNativeContentRegion ) )