summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-02-15 20:41:33 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-02-16 12:54:44 +0000
commita1ceacc17e3f30d5e9c06b3218ad8ec26ca2f1b9 (patch)
tree56a29f66f75f326a0a677ab1697ce28f1bc9fcbf /vcl
parent18f41dfaf19d656d290c47d196ef2702e169a522 (diff)
boost::foo_ptr->std::foo_ptr
Change-Id: I9219619b538b6530a89f5932ac51eb3b62eb396a
Diffstat (limited to 'vcl')
-rw-r--r--vcl/generic/fontmanager/fontconfig.cxx2
-rw-r--r--vcl/generic/print/bitmap_gfx.cxx40
-rw-r--r--vcl/generic/print/genprnpsp.cxx18
-rw-r--r--vcl/inc/pch/precompiled_vcl.hxx1
-rw-r--r--vcl/inc/unx/gtk/gtkinst.hxx6
-rw-r--r--vcl/inc/unx/gtk/gtkprn.hxx4
-rw-r--r--vcl/inc/unx/salgdi.h7
-rw-r--r--vcl/inc/unx/sm.hxx4
-rw-r--r--vcl/inc/win/salgdi.h4
-rw-r--r--vcl/opengl/x11/salvd.cxx2
-rw-r--r--vcl/source/app/dbggui.cxx5
-rw-r--r--vcl/source/app/session.cxx31
-rw-r--r--vcl/source/edit/texteng.cxx6
-rw-r--r--vcl/source/edit/vclmedit.cxx3
-rw-r--r--vcl/source/filter/graphicfilter.cxx24
-rw-r--r--vcl/source/filter/wmf/winmtf.hxx3
-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
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx26
-rw-r--r--vcl/source/outdev/gradient.cxx74
-rw-r--r--vcl/source/outdev/transparent.cxx84
-rw-r--r--vcl/source/window/openglwin.cxx12
-rw-r--r--vcl/unx/generic/app/sm.cxx32
-rw-r--r--vcl/unx/generic/gdi/gdiimpl.cxx6
-rw-r--r--vcl/unx/generic/gdi/salbmp.cxx28
-rw-r--r--vcl/unx/generic/gdi/salgdi.cxx70
-rw-r--r--vcl/unx/generic/gdi/salgdi2.cxx35
-rw-r--r--vcl/unx/generic/gdi/salgdi3.cxx36
-rw-r--r--vcl/unx/generic/gdi/salvd.cxx2
-rw-r--r--vcl/unx/generic/printer/printerinfomanager.cxx2
-rw-r--r--vcl/unx/gtk/app/gtkinst.cxx8
-rw-r--r--vcl/unx/gtk/gdi/salprn-gtk.cxx84
-rw-r--r--vcl/win/source/gdi/salnativewidgets-luna.cxx8
-rw-r--r--vcl/win/source/gdi/winlayout.cxx6
-rw-r--r--vcl/workben/vcldemo.cxx4
44 files changed, 568 insertions, 586 deletions
diff --git a/vcl/generic/fontmanager/fontconfig.cxx b/vcl/generic/fontmanager/fontconfig.cxx
index edc6035bf0af..8504ef083c39 100644
--- a/vcl/generic/fontmanager/fontconfig.cxx
+++ b/vcl/generic/fontmanager/fontconfig.cxx
@@ -782,7 +782,7 @@ namespace
OString mapToFontConfigLangTag(const LanguageTag &rLangTag)
{
#if defined(FC_VERSION) && (FC_VERSION >= 20492)
- boost::shared_ptr<FcStrSet> xLangSet(FcGetLangs(), FcStrSetDestroy);
+ std::shared_ptr<FcStrSet> xLangSet(FcGetLangs(), FcStrSetDestroy);
OString sLangAttrib;
sLangAttrib = OUStringToOString(rLangTag.getBcp47(), RTL_TEXTENCODING_UTF8).toAsciiLowerCase();
diff --git a/vcl/generic/print/bitmap_gfx.cxx b/vcl/generic/print/bitmap_gfx.cxx
index dc6997de92a2..2811da8a2d8e 100644
--- a/vcl/generic/print/bitmap_gfx.cxx
+++ b/vcl/generic/print/bitmap_gfx.cxx
@@ -22,8 +22,6 @@
#include "generic/printergfx.hxx"
#include "vcl/strhelper.hxx"
-#include <boost/scoped_ptr.hpp>
-
namespace psp {
const sal_uInt32 nLineLength = 80;
@@ -492,18 +490,18 @@ PrinterGfx::DrawPS1GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea)
WritePS (mpPageBody, pGrayImage);
// image body
- boost::scoped_ptr<HexEncoder> pEncoder(new HexEncoder (mpPageBody));
+ std::unique_ptr<HexEncoder> xEncoder(new HexEncoder (mpPageBody));
for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++)
{
for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++)
{
unsigned char nByte = rBitmap.GetPixelGray (nRow, nColumn);
- pEncoder->EncodeByte (nByte);
+ xEncoder->EncodeByte (nByte);
}
}
- pEncoder.reset();
+ xEncoder.reset();
WritePS (mpPageBody, "\n");
}
@@ -575,17 +573,17 @@ PrinterGfx::writePS2Colorspace(const PrinterBmp& rBitmap, psp::ImageType nType)
nChar += psp::appendStr ("\npsp_ascii85string\n", pImage + nChar);
WritePS (mpPageBody, pImage);
- boost::scoped_ptr<ByteEncoder> pEncoder(mbCompressBmp ? new LZWEncoder(mpPageBody)
+ std::unique_ptr<ByteEncoder> xEncoder(mbCompressBmp ? new LZWEncoder(mpPageBody)
: new Ascii85Encoder(mpPageBody));
for (sal_uInt32 i = 0; i < nSize; i++)
{
PrinterColor aColor = rBitmap.GetPaletteColor(i);
- pEncoder->EncodeByte (aColor.GetRed());
- pEncoder->EncodeByte (aColor.GetGreen());
- pEncoder->EncodeByte (aColor.GetBlue());
+ xEncoder->EncodeByte (aColor.GetRed());
+ xEncoder->EncodeByte (aColor.GetGreen());
+ xEncoder->EncodeByte (aColor.GetBlue());
}
- pEncoder.reset();
+ xEncoder.reset();
WritePS (mpPageBody, "pop ] setcolorspace\n");
}
@@ -600,7 +598,7 @@ PrinterGfx::DrawPS2GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea)
writePS2Colorspace(rBitmap, psp::GrayScaleImage);
writePS2ImageHeader(rArea, psp::GrayScaleImage);
- boost::scoped_ptr<ByteEncoder> pEncoder(mbCompressBmp ? new LZWEncoder(mpPageBody)
+ std::unique_ptr<ByteEncoder> xEncoder(mbCompressBmp ? new LZWEncoder(mpPageBody)
: new Ascii85Encoder(mpPageBody));
for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++)
@@ -608,7 +606,7 @@ PrinterGfx::DrawPS2GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea)
for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++)
{
unsigned char nByte = rBitmap.GetPixelGray (nRow, nColumn);
- pEncoder->EncodeByte (nByte);
+ xEncoder->EncodeByte (nByte);
}
}
}
@@ -619,7 +617,7 @@ PrinterGfx::DrawPS2MonoImage (const PrinterBmp& rBitmap, const Rectangle& rArea)
writePS2Colorspace(rBitmap, psp::MonochromeImage);
writePS2ImageHeader(rArea, psp::MonochromeImage);
- boost::scoped_ptr<ByteEncoder> pEncoder(mbCompressBmp ? new LZWEncoder(mpPageBody)
+ std::unique_ptr<ByteEncoder> xEncoder(mbCompressBmp ? new LZWEncoder(mpPageBody)
: new Ascii85Encoder(mpPageBody));
for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++)
@@ -634,14 +632,14 @@ PrinterGfx::DrawPS2MonoImage (const PrinterBmp& rBitmap, const Rectangle& rArea)
if (++nBitPos == 8)
{
- pEncoder->EncodeByte (nByte);
+ xEncoder->EncodeByte (nByte);
nBitPos = 0;
nByte = 0;
}
}
// keep the row byte aligned
if (nBitPos != 0)
- pEncoder->EncodeByte (nByte);
+ xEncoder->EncodeByte (nByte);
}
}
@@ -651,7 +649,7 @@ PrinterGfx::DrawPS2PaletteImage (const PrinterBmp& rBitmap, const Rectangle& rAr
writePS2Colorspace(rBitmap, psp::PaletteImage);
writePS2ImageHeader(rArea, psp::PaletteImage);
- boost::scoped_ptr<ByteEncoder> pEncoder(mbCompressBmp ? new LZWEncoder(mpPageBody)
+ std::unique_ptr<ByteEncoder> xEncoder(mbCompressBmp ? new LZWEncoder(mpPageBody)
: new Ascii85Encoder(mpPageBody));
for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++)
@@ -659,7 +657,7 @@ PrinterGfx::DrawPS2PaletteImage (const PrinterBmp& rBitmap, const Rectangle& rAr
for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++)
{
unsigned char nByte = rBitmap.GetPixelIdx (nRow, nColumn);
- pEncoder->EncodeByte (nByte);
+ xEncoder->EncodeByte (nByte);
}
}
}
@@ -670,7 +668,7 @@ PrinterGfx::DrawPS2TrueColorImage (const PrinterBmp& rBitmap, const Rectangle& r
writePS2Colorspace(rBitmap, psp::TrueColorImage);
writePS2ImageHeader(rArea, psp::TrueColorImage);
- boost::scoped_ptr<ByteEncoder> pEncoder(mbCompressBmp ? new LZWEncoder(mpPageBody)
+ std::unique_ptr<ByteEncoder> xEncoder(mbCompressBmp ? new LZWEncoder(mpPageBody)
: new Ascii85Encoder(mpPageBody));
for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++)
@@ -678,9 +676,9 @@ PrinterGfx::DrawPS2TrueColorImage (const PrinterBmp& rBitmap, const Rectangle& r
for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++)
{
PrinterColor aColor = rBitmap.GetPixelRGB (nRow, nColumn);
- pEncoder->EncodeByte (aColor.GetRed());
- pEncoder->EncodeByte (aColor.GetGreen());
- pEncoder->EncodeByte (aColor.GetBlue());
+ xEncoder->EncodeByte (aColor.GetRed());
+ xEncoder->EncodeByte (aColor.GetGreen());
+ xEncoder->EncodeByte (aColor.GetBlue());
}
}
}
diff --git a/vcl/generic/print/genprnpsp.cxx b/vcl/generic/print/genprnpsp.cxx
index 02de54681adc..093590443375 100644
--- a/vcl/generic/print/genprnpsp.cxx
+++ b/vcl/generic/print/genprnpsp.cxx
@@ -1068,7 +1068,7 @@ bool PspSalPrinter::StartJob( const OUString* i_pFileName, const OUString& i_rJo
vcl::PDFWriter::PlayMetafileContext aMtfContext;
aMtfContext.m_bOnlyLosslessCompression = true;
- boost::shared_ptr<vcl::PDFWriter> pWriter;
+ std::shared_ptr<vcl::PDFWriter> xWriter;
std::vector< PDFPrintFile > aPDFFiles;
std::shared_ptr<Printer> xPrinter(i_rController.getPrinter());
int nAllPages = i_rController.getFilteredPageCount();
@@ -1107,12 +1107,12 @@ bool PspSalPrinter::StartJob( const OUString* i_pFileName, const OUString& i_rJo
// or on paper format change - cups does not support multiple paper formats per job (yet?)
// so we need to start a new job to get a new paper format from the printer
// orientation switches (that is switch of height and width) is handled transparently by CUPS
- if( ! pWriter ||
+ if( ! xWriter ||
(aNewParm != aLastParm && ! i_pFileName ) )
{
- if( pWriter )
+ if( xWriter )
{
- pWriter->Emit();
+ xWriter->Emit();
}
// produce PDF file
OUString aPDFUrl;
@@ -1136,20 +1136,20 @@ bool PspSalPrinter::StartJob( const OUString* i_pFileName, const OUString& i_rJo
aContext.URL = aPDFUrl;
// create and initialize PDFWriter
- pWriter.reset( new vcl::PDFWriter( aContext, uno::Reference< beans::XMaterialHolder >() ) );
+ xWriter.reset( new vcl::PDFWriter( aContext, uno::Reference< beans::XMaterialHolder >() ) );
}
- pWriter->NewPage( TenMuToPt( aNewParm.maPageSize.Width() ),
+ xWriter->NewPage( TenMuToPt( aNewParm.maPageSize.Width() ),
TenMuToPt( aNewParm.maPageSize.Height() ),
vcl::PDFWriter::Portrait );
- pWriter->PlayMetafile( aPageFile, aMtfContext, NULL );
+ xWriter->PlayMetafile( aPageFile, aMtfContext, NULL );
}
}
// emit the last file
- if( pWriter )
- pWriter->Emit();
+ if( xWriter )
+ xWriter->Emit();
// handle collate, copy count and multiple jobs correctly
int nOuterJobs = 1;
diff --git a/vcl/inc/pch/precompiled_vcl.hxx b/vcl/inc/pch/precompiled_vcl.hxx
index ef5d36718dba..c2b8c9c72e6a 100644
--- a/vcl/inc/pch/precompiled_vcl.hxx
+++ b/vcl/inc/pch/precompiled_vcl.hxx
@@ -140,7 +140,6 @@
#include <boost/optional.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
#include <boost/scoped_array.hpp>
-#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <cassert>
#include <cmath>
diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx
index e8fb76c374f4..642038056630 100644
--- a/vcl/inc/unx/gtk/gtkinst.hxx
+++ b/vcl/inc/unx/gtk/gtkinst.hxx
@@ -20,8 +20,6 @@
#ifndef INCLUDED_VCL_INC_UNX_GTK_GTKINST_HXX
#define INCLUDED_VCL_INC_UNX_GTK_GTKINST_HXX
-#include <boost/shared_ptr.hpp>
-
#include <unx/salinst.h>
#include <generic/gensys.h>
#include <headless/svpinst.hxx>
@@ -102,14 +100,14 @@ public:
void addEvent( sal_uInt16 nMask );
void subtractEvent( sal_uInt16 nMask );
- boost::shared_ptr<vcl::unx::GtkPrintWrapper> getPrintWrapper() const;
+ std::shared_ptr<vcl::unx::GtkPrintWrapper> getPrintWrapper() const;
private:
std::vector<GtkSalTimer *> m_aTimers;
bool IsTimerExpired();
bool bNeedsInit;
- mutable boost::shared_ptr<vcl::unx::GtkPrintWrapper> m_pPrintWrapper;
+ mutable std::shared_ptr<vcl::unx::GtkPrintWrapper> m_xPrintWrapper;
};
#endif // INCLUDED_VCL_INC_UNX_GTK_GTKINST_HXX
diff --git a/vcl/inc/unx/gtk/gtkprn.hxx b/vcl/inc/unx/gtk/gtkprn.hxx
index 1e9cddc7cd9a..478048a22fe0 100644
--- a/vcl/inc/unx/gtk/gtkprn.hxx
+++ b/vcl/inc/unx/gtk/gtkprn.hxx
@@ -12,7 +12,7 @@
#include "generic/genprn.h"
-#include <boost/scoped_ptr.hpp>
+#include <memory>
struct GtkSalPrinter_Impl;
@@ -35,7 +35,7 @@ private:
int i_nCopies, bool i_bCollate, vcl::PrinterController& io_rController);
private:
- boost::scoped_ptr<GtkSalPrinter_Impl> m_pImpl;
+ std::unique_ptr<GtkSalPrinter_Impl> m_xImpl;
};
class VCL_DLLPUBLIC GtkSalInfoPrinter : public PspSalInfoPrinter
diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h
index baa7de7c4286..40e1cd65b449 100644
--- a/vcl/inc/unx/salgdi.h
+++ b/vcl/inc/unx/salgdi.h
@@ -33,9 +33,8 @@
#include "sallayout.hxx"
#include "vclpluginapi.h"
-#include <boost/scoped_ptr.hpp>
-
#include <deque>
+#include <memory>
class ImplFontMetricData;
class FontSelectPattern;
@@ -345,8 +344,8 @@ protected:
bool bFontGC_ : 1; // is Font GC valid
private:
- boost::scoped_ptr<SalGraphicsImpl> mpImpl;
- boost::scoped_ptr<TextRenderImpl> mpTextRenderImpl;
+ std::unique_ptr<SalGraphicsImpl> mxImpl;
+ std::unique_ptr<TextRenderImpl> mxTextRenderImpl;
};
diff --git a/vcl/inc/unx/sm.hxx b/vcl/inc/unx/sm.hxx
index 3aee67a02d9a..48d202c6a7e4 100644
--- a/vcl/inc/unx/sm.hxx
+++ b/vcl/inc/unx/sm.hxx
@@ -23,9 +23,9 @@
#include <X11/SM/SMlib.h>
-#include "boost/scoped_ptr.hpp"
#include "tools/link.hxx"
#include <rtl/ustring.hxx>
+#include <memory>
#include "vclpluginapi.h"
@@ -35,7 +35,7 @@ class SalSession;
class SessionManagerClient
{
static SalSession * m_pSession;
- static boost::scoped_ptr< ICEConnectionObserver > m_pICEConnectionObserver;
+ static std::unique_ptr< ICEConnectionObserver > m_xICEConnectionObserver;
static SmcConn m_pSmcConnection;
static OString m_aClientID;
static bool m_bDocSaveDone;
diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index 66a92011ae80..b6036f5331a0 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -28,7 +28,7 @@
#include "impfont.hxx"
#include <vcl/fontcapabilities.hxx>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
#include <unordered_set>
#include <config_graphite.h>
@@ -188,7 +188,7 @@ class WinSalGraphics : public SalGraphics
friend class WinLayout;
protected:
- boost::scoped_ptr<SalGraphicsImpl> mpImpl;
+ std::unique_ptr<SalGraphicsImpl> mpImpl;
private:
HDC mhLocalDC; // HDC
diff --git a/vcl/opengl/x11/salvd.cxx b/vcl/opengl/x11/salvd.cxx
index a8b18f9a7861..0ade87d066a4 100644
--- a/vcl/opengl/x11/salvd.cxx
+++ b/vcl/opengl/x11/salvd.cxx
@@ -30,7 +30,7 @@ void X11SalGraphics::Init( X11OpenGLSalVirtualDevice *pDevice )
bWindow_ = pDisplay->IsDisplay();
bVirDev_ = true;
- mpImpl->Init();
+ mxImpl->Init();
}
X11OpenGLSalVirtualDevice::X11OpenGLSalVirtualDevice( SalGraphics* pGraphics,
diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx
index 523b2f7674b7..1c643f241176 100644
--- a/vcl/source/app/dbggui.cxx
+++ b/vcl/source/app/dbggui.cxx
@@ -58,7 +58,6 @@
#include <algorithm>
#include <boost/scoped_array.hpp>
-#include <boost/scoped_ptr.hpp>
using namespace ::com::sun::star;
@@ -809,11 +808,11 @@ void DbgGUIStart()
if ( pData )
{
- boost::scoped_ptr<DbgDialog> pDialog(new DbgDialog);
+ std::unique_ptr<DbgDialog> xDialog(new DbgDialog);
// we switch off dialog tests for the debug dialog
sal_uLong nOldFlags = pData->nTestFlags;
pData->nTestFlags &= ~DBG_TEST_DIALOG;
- if ( !pDialog->Execute() )
+ if (!xDialog->Execute())
pData->nTestFlags |= (nOldFlags & DBG_TEST_DIALOG);
}
else
diff --git a/vcl/source/app/session.cxx b/vcl/source/app/session.cxx
index 145eafb66e83..294a58172689 100644
--- a/vcl/source/app/session.cxx
+++ b/vcl/source/app/session.cxx
@@ -19,7 +19,6 @@
#include "sal/config.h"
-#include <boost/scoped_ptr.hpp>
#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/compbase1.hxx>
@@ -66,7 +65,7 @@ class VCLSession:
};
std::list< Listener > m_aListeners;
- boost::scoped_ptr< SalSession > m_pSession;
+ std::unique_ptr< SalSession > m_xSession;
bool m_bInteractionRequested;
bool m_bInteractionGranted;
bool m_bInteractionDone;
@@ -94,14 +93,14 @@ public:
VCLSession::VCLSession()
: cppu::WeakComponentImplHelper1< XSessionManagerClient >( m_aMutex ),
- m_pSession( ImplGetSVData()->mpDefInst->CreateSalSession() ),
+ m_xSession( ImplGetSVData()->mpDefInst->CreateSalSession() ),
m_bInteractionRequested( false ),
m_bInteractionGranted( false ),
m_bInteractionDone( false ),
m_bSaveDone( false )
{
- if( m_pSession )
- m_pSession->SetCallback( SalSessionEventProc, this );
+ if (m_xSession)
+ m_xSession->SetCallback( SalSessionEventProc, this );
}
void VCLSession::callSaveRequested( bool bShutdown, bool bCancelable )
@@ -123,14 +122,14 @@ void VCLSession::callSaveRequested( bool bShutdown, bool bCancelable )
m_bInteractionDone = false;
// without session we assume UI is always possible,
// so it was reqeusted and granted
- m_bInteractionRequested = m_bInteractionGranted = !m_pSession;
+ m_bInteractionRequested = m_bInteractionGranted = !m_xSession;
// answer the session manager even if no listeners available anymore
DBG_ASSERT( ! aListeners.empty(), "saveRequested but no listeners !" );
if( aListeners.empty() )
{
- if( m_pSession )
- m_pSession->saveDone();
+ if (m_xSession)
+ m_xSession->saveDone();
return;
}
}
@@ -157,8 +156,8 @@ void VCLSession::callInteractionGranted( bool bInteractionGranted )
DBG_ASSERT( ! aListeners.empty(), "interactionGranted but no listeners !" );
if( aListeners.empty() )
{
- if( m_pSession )
- m_pSession->interactionDone();
+ if (m_xSession)
+ m_xSession->interactionDone();
return;
}
}
@@ -271,7 +270,7 @@ void SAL_CALL VCLSession::queryInteraction( const css::uno::Reference<XSessionMa
osl::MutexGuard aGuard( m_aMutex );
if( ! m_bInteractionRequested )
{
- m_pSession->queryInteraction();
+ m_xSession->queryInteraction();
m_bInteractionRequested = true;
}
for( std::list< Listener >::iterator it = m_aListeners.begin(); it != m_aListeners.end(); ++it )
@@ -302,8 +301,8 @@ void SAL_CALL VCLSession::interactionDone( const css::uno::Reference< XSessionMa
if( nDone == nRequested && nDone > 0 )
{
m_bInteractionDone = true;
- if( m_pSession )
- m_pSession->interactionDone();
+ if (m_xSession)
+ m_xSession->interactionDone();
}
}
@@ -323,14 +322,14 @@ void SAL_CALL VCLSession::saveDone( const css::uno::Reference< XSessionManagerLi
if( bSaveDone )
{
m_bSaveDone = true;
- if( m_pSession )
- m_pSession->saveDone();
+ if (m_xSession)
+ m_xSession->saveDone();
}
}
sal_Bool SAL_CALL VCLSession::cancelShutdown() throw( RuntimeException, std::exception )
{
- return m_pSession && m_pSession->cancelShutdown();
+ return m_xSession && m_xSession->cancelShutdown();
}
// service implementation
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index 201eb16dfb2b..1897b676e4c1 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -54,9 +54,9 @@
#include <unicode/ubidi.h>
#include <cstdlib>
+#include <memory>
#include <set>
#include <vector>
-#include <boost/scoped_ptr.hpp>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -608,7 +608,7 @@ TextPaM TextEngine::ImpDeleteText( const TextSelection& rSel )
void TextEngine::ImpRemoveParagraph( sal_uLong nPara )
{
TextNode* pNode = mpDoc->GetNodes()[ nPara ];
- boost::scoped_ptr<TEParaPortion> pPortion(mpTEParaPortions->GetObject( nPara ));
+ std::unique_ptr<TEParaPortion> xPortion(mpTEParaPortions->GetObject( nPara ));
// the Node is handled by Undo and is deleted if appropriate
mpDoc->GetNodes().erase( mpDoc->GetNodes().begin() + nPara );
@@ -618,7 +618,7 @@ void TextEngine::ImpRemoveParagraph( sal_uLong nPara )
delete pNode;
mpTEParaPortions->Remove( nPara );
- pPortion.reset();
+ xPortion.reset();
ImpParagraphRemoved( nPara );
}
diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index d27d72328780..e176657002fb 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -31,7 +31,6 @@
#include <svids.hrc>
#include <vcl/scrbar.hxx>
#include <vcl/settings.hxx>
-#include <boost/scoped_ptr.hpp>
class TextWindow : public vcl::Window
{
@@ -939,7 +938,7 @@ VclMultiLineEdit::VclMultiLineEdit( vcl::Window* pParent, WinBits nWinStyle )
VclMultiLineEdit::~VclMultiLineEdit()
{
{
- boost::scoped_ptr< ImpVclMEdit > pDelete( pImpVclMEdit );
+ std::unique_ptr< ImpVclMEdit > xDelete(pImpVclMEdit);
pImpVclMEdit = NULL;
}
delete pUpdateDataTimer;
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index ebcb074358e2..fbb4e64f206c 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -65,7 +65,7 @@
#include <vcl/metaact.hxx>
#include <vector>
#include <boost/scoped_array.hpp>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
#include "FilterConfigCache.hxx"
#include "graphicfilter_internal.hxx"
@@ -828,7 +828,7 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r
{
Graphic aGraphic;
- boost::scoped_ptr<ResMgr> pResMgr(ResMgr::CreateResMgr( "svt", Application::GetSettings().GetUILanguageTag() ));
+ std::unique_ptr<ResMgr> xResMgr(ResMgr::CreateResMgr( "svt", Application::GetSettings().GetUILanguageTag() ));
sal_Int32 nLogicalWidth = rConfigItem.ReadInt32( "LogicalWidth", 0 );
sal_Int32 nLogicalHeight = rConfigItem.ReadInt32( "LogicalHeight", 0 );
@@ -1285,10 +1285,10 @@ sal_uInt16 GraphicFilter::CanImportGraphic( const INetURLObject& rPath,
DBG_ASSERT( rPath.GetProtocol() != INET_PROT_NOT_VALID, "GraphicFilter::CanImportGraphic() : ProtType == INET_PROT_NOT_VALID" );
OUString aMainUrl( rPath.GetMainURL( INetURLObject::NO_DECODE ) );
- boost::scoped_ptr<SvStream> pStream(::utl::UcbStreamHelper::CreateStream( aMainUrl, StreamMode::READ | StreamMode::SHARE_DENYNONE ));
- if ( pStream )
+ std::unique_ptr<SvStream> xStream(::utl::UcbStreamHelper::CreateStream( aMainUrl, StreamMode::READ | StreamMode::SHARE_DENYNONE ));
+ if (xStream)
{
- nRetValue = CanImportGraphic( aMainUrl, *pStream, nFormat, pDeterminedFormat );
+ nRetValue = CanImportGraphic( aMainUrl, *xStream, nFormat, pDeterminedFormat );
}
return nRetValue;
}
@@ -1315,10 +1315,10 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const INetURLObject&
DBG_ASSERT( rPath.GetProtocol() != INET_PROT_NOT_VALID, "GraphicFilter::ImportGraphic() : ProtType == INET_PROT_NOT_VALID" );
OUString aMainUrl( rPath.GetMainURL( INetURLObject::NO_DECODE ) );
- boost::scoped_ptr<SvStream> pStream(::utl::UcbStreamHelper::CreateStream( aMainUrl, StreamMode::READ | StreamMode::SHARE_DENYNONE ));
- if ( pStream )
+ std::unique_ptr<SvStream> xStream(::utl::UcbStreamHelper::CreateStream( aMainUrl, StreamMode::READ | StreamMode::SHARE_DENYNONE ));
+ if (xStream)
{
- nRetValue = ImportGraphic( rGraphic, aMainUrl, *pStream, nFormat, pDeterminedFormat, nImportFlags );
+ nRetValue = ImportGraphic( rGraphic, aMainUrl, *xStream, nFormat, pDeterminedFormat, nImportFlags );
}
return nRetValue;
}
@@ -1808,11 +1808,11 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const INetURLO
bool bAlreadyExists = DirEntryExists( rPath );
OUString aMainUrl( rPath.GetMainURL( INetURLObject::NO_DECODE ) );
- boost::scoped_ptr<SvStream> pStream(::utl::UcbStreamHelper::CreateStream( aMainUrl, StreamMode::WRITE | StreamMode::TRUNC ));
- if ( pStream )
+ std::unique_ptr<SvStream> xStream(::utl::UcbStreamHelper::CreateStream( aMainUrl, StreamMode::WRITE | StreamMode::TRUNC ));
+ if (xStream)
{
- nRetValue = ExportGraphic( rGraphic, aMainUrl, *pStream, nFormat, pFilterData );
- pStream.reset();
+ nRetValue = ExportGraphic( rGraphic, aMainUrl, *xStream, nFormat, pFilterData );
+ xStream.reset();
if( ( GRFILTER_OK != nRetValue ) && !bAlreadyExists )
KillDirEntry( aMainUrl );
diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx
index 7f7e781db917..c9a8f2d69ea3 100644
--- a/vcl/source/filter/wmf/winmtf.hxx
+++ b/vcl/source/filter/wmf/winmtf.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_VCL_SOURCE_FILTER_WMF_WINMTF_HXX
#include <sot/object.hxx>
-#include <boost/shared_ptr.hpp>
#include <vcl/graph.hxx>
#include <basegfx/tools/b2dclipstate.hxx>
#include <vcl/font.hxx>
@@ -454,7 +453,7 @@ struct SaveStruct
bool bFillStyleSelected;
};
-typedef boost::shared_ptr<SaveStruct> SaveStructPtr;
+typedef std::shared_ptr<SaveStruct> SaveStructPtr;
struct BSaveStruct
{
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 ) )
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index fa0684d063a3..4a7edff5b330 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -656,10 +656,10 @@ bool OpenGLContext::init( vcl::Window* pParent )
if(mbInitialized)
return true;
- m_pWindow.reset(pParent ? NULL : new vcl::Window(0, WB_NOBORDER|WB_NODIALOGCONTROL));
- mpWindow = pParent ? pParent : m_pWindow.get();
- if(m_pWindow)
- m_pWindow->setPosSizePixel(0,0,0,0);
+ m_xWindow.reset(pParent ? NULL : new vcl::Window(0, WB_NOBORDER|WB_NODIALOGCONTROL));
+ mpWindow = pParent ? pParent : m_xWindow.get();
+ if(m_xWindow)
+ m_xWindow->setPosSizePixel(0,0,0,0);
m_pChildWindow = 0;
initWindow();
return ImplInit();
@@ -1043,8 +1043,8 @@ bool OpenGLContext::InitGLEW()
void OpenGLContext::setWinPosAndSize(const Point &rPos, const Size& rSize)
{
- if(m_pWindow)
- m_pWindow->SetPosSizePixel(rPos, rSize);
+ if(m_xWindow)
+ m_xWindow->SetPosSizePixel(rPos, rSize);
if( m_pChildWindow )
m_pChildWindow->SetPosSizePixel(rPos, rSize);
@@ -1054,8 +1054,8 @@ void OpenGLContext::setWinPosAndSize(const Point &rPos, const Size& rSize)
void OpenGLContext::setWinSize(const Size& rSize)
{
- if(m_pWindow)
- m_pWindow->SetSizePixel(rSize);
+ if(m_xWindow)
+ m_xWindow->SetSizePixel(rSize);
if( m_pChildWindow )
m_pChildWindow->SetSizePixel(rSize);
@@ -1080,7 +1080,7 @@ bool OpenGLContext::initWindow()
{
SystemWindowData winData = generateWinData(mpWindow, false);
m_pChildWindow = new SystemChildWindow(mpWindow, 0, &winData, false);
- m_pChildWindowGC.reset(m_pChildWindow);
+ m_xChildWindowGC.reset(m_pChildWindow);
}
if( m_pChildWindow )
@@ -1108,7 +1108,7 @@ bool OpenGLContext::initWindow()
{
SystemWindowData winData = generateWinData(mpWindow, mbRequestLegacyContext);
m_pChildWindow = new SystemChildWindow(mpWindow, 0, &winData, false);
- m_pChildWindowGC.reset(m_pChildWindow);
+ m_xChildWindowGC.reset(m_pChildWindow);
}
if( m_pChildWindow )
@@ -1143,7 +1143,7 @@ bool OpenGLContext::initWindow()
if( !m_pChildWindow )
{
m_pChildWindow = new SystemChildWindow(mpWindow, 0, &winData, false);
- m_pChildWindowGC.reset(m_pChildWindow);
+ m_xChildWindowGC.reset(m_pChildWindow);
}
pChildSysData = m_pChildWindow->GetSystemData();
}
@@ -1447,8 +1447,8 @@ void OpenGLContext::show()
{
if (m_pChildWindow)
m_pChildWindow->Show();
- else if (m_pWindow)
- m_pWindow->Show();
+ else if (m_xWindow)
+ m_xWindow->Show();
}
SystemChildWindow* OpenGLContext::getChildWindow()
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index d6239d19c874..2c6e27f9c710 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -88,7 +88,7 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly,
// do nothing if the rectangle is empty
if ( !aRect.IsEmpty() )
{
- tools::PolyPolygon aClipPolyPoly( ImplLogicToDevicePixel( rPolyPoly ) );
+ tools::PolyPolygon aClixPolyPoly( ImplLogicToDevicePixel( rPolyPoly ) );
bool bDrawn = false;
if( !mpGraphics && !AcquireGraphics() )
@@ -102,7 +102,7 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly,
InitClipRegion();
// try to draw gradient natively
- bDrawn = mpGraphics->DrawGradient( aClipPolyPoly, aGradient, this );
+ bDrawn = mpGraphics->DrawGradient( aClixPolyPoly, aGradient, this );
if( !bDrawn && !mbOutputClipped )
{
@@ -132,9 +132,9 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly,
// if the clipping polypolygon is a rectangle, then it's the same size as the bounding of the
// polypolygon, so pass in a NULL for the clipping parameter
if( aGradient.GetStyle() == GradientStyle_LINEAR || rGradient.GetStyle() == GradientStyle_AXIAL )
- DrawLinearGradient( aRect, aGradient, aClipPolyPoly.IsRect() ? NULL : &aClipPolyPoly );
+ DrawLinearGradient( aRect, aGradient, aClixPolyPoly.IsRect() ? NULL : &aClixPolyPoly );
else
- DrawComplexGradient( aRect, aGradient, aClipPolyPoly.IsRect() ? NULL : &aClipPolyPoly );
+ DrawComplexGradient( aRect, aGradient, aClixPolyPoly.IsRect() ? NULL : &aClixPolyPoly );
}
Pop();
@@ -251,7 +251,7 @@ namespace
void OutputDevice::DrawLinearGradient( const Rectangle& rRect,
const Gradient& rGradient,
- const tools::PolyPolygon* pClipPolyPoly )
+ const tools::PolyPolygon* pClixPolyPoly )
{
// get BoundRect of rotated rectangle
Rectangle aRect;
@@ -329,7 +329,7 @@ void OutputDevice::DrawLinearGradient( const Rectangle& rRect,
aPoly[3] = aBorderRect.BottomLeft();
aPoly.Rotate( aCenter, nAngle );
- ImplDrawPolygon( aPoly, pClipPolyPoly );
+ ImplDrawPolygon( aPoly, pClixPolyPoly );
if ( !bLinear)
{
@@ -342,7 +342,7 @@ void OutputDevice::DrawLinearGradient( const Rectangle& rRect,
aPoly[3] = aBorderRect.BottomLeft();
aPoly.Rotate( aCenter, nAngle );
- ImplDrawPolygon( aPoly, pClipPolyPoly );
+ ImplDrawPolygon( aPoly, pClixPolyPoly );
}
}
@@ -393,7 +393,7 @@ void OutputDevice::DrawLinearGradient( const Rectangle& rRect,
aPoly[3] = aRect.BottomLeft();
aPoly.Rotate( aCenter, nAngle );
- ImplDrawPolygon( aPoly, pClipPolyPoly );
+ ImplDrawPolygon( aPoly, pClixPolyPoly );
if ( !bLinear )
{
@@ -405,7 +405,7 @@ void OutputDevice::DrawLinearGradient( const Rectangle& rRect,
aPoly[3] = aMirrorRect.BottomLeft();
aPoly.Rotate( aCenter, nAngle );
- ImplDrawPolygon( aPoly, pClipPolyPoly );
+ ImplDrawPolygon( aPoly, pClixPolyPoly );
}
}
if ( !bLinear)
@@ -425,13 +425,13 @@ void OutputDevice::DrawLinearGradient( const Rectangle& rRect,
aPoly[3] = aRect.BottomLeft();
aPoly.Rotate( aCenter, nAngle );
- ImplDrawPolygon( aPoly, pClipPolyPoly );
+ ImplDrawPolygon( aPoly, pClixPolyPoly );
}
}
void OutputDevice::DrawComplexGradient( const Rectangle& rRect,
const Gradient& rGradient,
- const tools::PolyPolygon* pClipPolyPoly )
+ const tools::PolyPolygon* pClixPolyPoly )
{
// Determine if we output via Polygon or PolyPolygon
// For all rasteroperations other then Overpaint always use PolyPolygon,
@@ -439,7 +439,7 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect,
// Also for printers always use PolyPolygon, as not all printers
// can print polygons on top of each other.
- boost::scoped_ptr<tools::PolyPolygon> pPolyPoly;
+ std::unique_ptr<tools::PolyPolygon> xPolyPoly;
Rectangle aRect;
Point aCenter;
Color aStartCol( rGradient.GetStartColor() );
@@ -458,7 +458,7 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect,
rGradient.GetBoundRect( rRect, aRect, aCenter );
if ( UsePolyPolygonForComplexGradient() )
- pPolyPoly.reset(new tools::PolyPolygon( 2 ));
+ xPolyPoly.reset(new tools::PolyPolygon( 2 ));
bool bMtf = false;
bool bComplex = true;
@@ -500,10 +500,10 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect,
mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) );
- if( pPolyPoly )
+ if( xPolyPoly )
{
- pPolyPoly->Insert( aPoly = rRect );
- pPolyPoly->Insert( aPoly );
+ xPolyPoly->Insert( aPoly = rRect );
+ xPolyPoly->Insert( aPoly );
}
else
{
@@ -515,7 +515,7 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect,
aExtRect.Right() += 1;
aExtRect.Bottom() += 1;
- ImplDrawPolygon( aPoly = aExtRect, pClipPolyPoly );
+ ImplDrawPolygon( aPoly = aExtRect, pClixPolyPoly );
}
// loop to output Polygone/PolyPolygone sequentially
@@ -538,23 +538,23 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect,
aPoly.Rotate( aCenter, nAngle );
// adapt colour accordingly
- const long nStepIndex = ( ( pPolyPoly ) ? i : ( i + 1 ) );
+ const long nStepIndex = ( ( xPolyPoly ) ? i : ( i + 1 ) );
nRed = GetGradientColorValue( nStartRed + ( ( nRedSteps * nStepIndex ) / nSteps ) );
nGreen = GetGradientColorValue( nStartGreen + ( ( nGreenSteps * nStepIndex ) / nSteps ) );
nBlue = GetGradientColorValue( nStartBlue + ( ( nBlueSteps * nStepIndex ) / nSteps ) );
// either slow tools::PolyPolygon output or fast Polygon-Paiting
- if( pPolyPoly )
+ if( xPolyPoly )
{
bPaintLastPolygon = true; // #107349# Paint last polygon only if loop has generated any output
- pPolyPoly->Replace( pPolyPoly->GetObject( 1 ), 0 );
- pPolyPoly->Replace( aPoly, 1 );
+ xPolyPoly->Replace( xPolyPoly->GetObject( 1 ), 0 );
+ xPolyPoly->Replace( aPoly, 1 );
- ImplDrawPolyPolygon( *pPolyPoly, pClipPolyPoly );
+ ImplDrawPolyPolygon( *xPolyPoly, pClixPolyPoly );
// #107349# Set fill color _after_ geometry painting:
- // pPolyPoly's geometry is the band from last iteration's
+ // xPolyPoly's geometry is the band from last iteration's
// aPoly to current iteration's aPoly. The window outdev
// path (see else below), on the other hand, paints the
// full aPoly. Thus, here, we're painting the band before
@@ -567,14 +567,14 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect,
// #107349# Set fill color _before_ geometry painting
mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) );
- ImplDrawPolygon( aPoly, pClipPolyPoly );
+ ImplDrawPolygon( aPoly, pClixPolyPoly );
}
}
// we should draw last inner Polygon if we output PolyPolygon
- if( pPolyPoly )
+ if( xPolyPoly )
{
- const Polygon& rPoly = pPolyPoly->GetObject( 1 );
+ const Polygon& rPoly = xPolyPoly->GetObject( 1 );
if( !rPoly.GetBoundRect().IsEmpty() )
{
@@ -589,7 +589,7 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect,
}
mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) );
- ImplDrawPolygon( rPoly, pClipPolyPoly );
+ ImplDrawPolygon( rPoly, pClixPolyPoly );
}
}
}
@@ -781,7 +781,7 @@ void OutputDevice::DrawComplexGradientToMetafile( const Rectangle& rRect,
// Also for printers always use PolyPolygon, as not all printers
// can print polygons on top of each other.
- boost::scoped_ptr<tools::PolyPolygon> pPolyPoly;
+ std::unique_ptr<tools::PolyPolygon> xPolyPoly;
Rectangle aRect;
Point aCenter;
Color aStartCol( rGradient.GetStartColor() );
@@ -799,7 +799,7 @@ void OutputDevice::DrawComplexGradientToMetafile( const Rectangle& rRect,
rGradient.GetBoundRect( rRect, aRect, aCenter );
- pPolyPoly.reset(new tools::PolyPolygon( 2 ));
+ xPolyPoly.reset(new tools::PolyPolygon( 2 ));
// last parameter - true if complex gradient, false if linear
long nStepCount = GetGradientSteps( rGradient, rRect, true, true );
@@ -840,8 +840,8 @@ void OutputDevice::DrawComplexGradientToMetafile( const Rectangle& rRect,
mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), true ) );
- pPolyPoly->Insert( aPoly = rRect );
- pPolyPoly->Insert( aPoly );
+ xPolyPoly->Insert( aPoly = rRect );
+ xPolyPoly->Insert( aPoly );
// loop to output Polygone/PolyPolygone sequentially
for( long i = 1; i < nSteps; i++ )
@@ -863,20 +863,20 @@ void OutputDevice::DrawComplexGradientToMetafile( const Rectangle& rRect,
aPoly.Rotate( aCenter, nAngle );
// adapt colour accordingly
- const long nStepIndex = ( ( pPolyPoly ) ? i : ( i + 1 ) );
+ const long nStepIndex = ( ( xPolyPoly ) ? i : ( i + 1 ) );
nRed = GetGradientColorValue( nStartRed + ( ( nRedSteps * nStepIndex ) / nSteps ) );
nGreen = GetGradientColorValue( nStartGreen + ( ( nGreenSteps * nStepIndex ) / nSteps ) );
nBlue = GetGradientColorValue( nStartBlue + ( ( nBlueSteps * nStepIndex ) / nSteps ) );
bPaintLastPolygon = true; // #107349# Paint last polygon only if loop has generated any output
- pPolyPoly->Replace( pPolyPoly->GetObject( 1 ), 0 );
- pPolyPoly->Replace( aPoly, 1 );
+ xPolyPoly->Replace( xPolyPoly->GetObject( 1 ), 0 );
+ xPolyPoly->Replace( aPoly, 1 );
- mpMetaFile->AddAction( new MetaPolyPolygonAction( *pPolyPoly ) );
+ mpMetaFile->AddAction( new MetaPolyPolygonAction( *xPolyPoly ) );
// #107349# Set fill color _after_ geometry painting:
- // pPolyPoly's geometry is the band from last iteration's
+ // xPolyPoly's geometry is the band from last iteration's
// aPoly to current iteration's aPoly. The window outdev
// path (see else below), on the other hand, paints the
// full aPoly. Thus, here, we're painting the band before
@@ -885,7 +885,7 @@ void OutputDevice::DrawComplexGradientToMetafile( const Rectangle& rRect,
mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), true ) );
}
- const Polygon& rPoly = pPolyPoly->GetObject( 1 );
+ const Polygon& rPoly = xPolyPoly->GetObject( 1 );
if( !rPoly.GetBoundRect().IsEmpty() )
{
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index 694cac55b75b..c180114315f1 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -682,12 +682,12 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
if( !aDstRect.IsEmpty() )
{
- boost::scoped_ptr<VirtualDevice> pVDev(new VirtualDevice);
+ std::unique_ptr<VirtualDevice> xVDev(new VirtualDevice);
- ((OutputDevice*)pVDev.get())->mnDPIX = mnDPIX;
- ((OutputDevice*)pVDev.get())->mnDPIY = mnDPIY;
+ ((OutputDevice*)xVDev.get())->mnDPIX = mnDPIX;
+ ((OutputDevice*)xVDev.get())->mnDPIY = mnDPIY;
- if( pVDev->SetOutputSizePixel( aDstRect.GetSize() ) )
+ if( xVDev->SetOutputSizePixel( aDstRect.GetSize() ) )
{
if(GetAntialiasing())
{
@@ -696,48 +696,48 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
// into account that the content is AntiAlialised and needs to be masked
// like that. Instead of masking, i will use a copy-modify-paste cycle
// here (as i already use in the VclPrimiziveRenderer with successs)
- pVDev->SetAntialiasing(GetAntialiasing());
+ xVDev->SetAntialiasing(GetAntialiasing());
// create MapMode for buffer (offset needed) and set
MapMode aMap(GetMapMode());
const Point aOutPos(PixelToLogic(aDstRect.TopLeft()));
aMap.SetOrigin(Point(-aOutPos.X(), -aOutPos.Y()));
- pVDev->SetMapMode(aMap);
+ xVDev->SetMapMode(aMap);
// copy MapMode state and disable for target
const bool bOrigMapModeEnabled(IsMapModeEnabled());
EnableMapMode(false);
// copy MapMode state and disable for buffer
- const bool bBufferMapModeEnabled(pVDev->IsMapModeEnabled());
- pVDev->EnableMapMode(false);
+ const bool bBufferMapModeEnabled(xVDev->IsMapModeEnabled());
+ xVDev->EnableMapMode(false);
// copy content from original to buffer
- pVDev->DrawOutDev( aPoint, pVDev->GetOutputSizePixel(), // dest
- aDstRect.TopLeft(), pVDev->GetOutputSizePixel(), // source
+ xVDev->DrawOutDev( aPoint, xVDev->GetOutputSizePixel(), // dest
+ aDstRect.TopLeft(), xVDev->GetOutputSizePixel(), // source
*this);
// draw MetaFile to buffer
- pVDev->EnableMapMode(bBufferMapModeEnabled);
+ xVDev->EnableMapMode(bBufferMapModeEnabled);
((GDIMetaFile&)rMtf).WindStart();
- ((GDIMetaFile&)rMtf).Play(pVDev.get(), rPos, rSize);
+ ((GDIMetaFile&)rMtf).Play(xVDev.get(), rPos, rSize);
((GDIMetaFile&)rMtf).WindStart();
// get content bitmap from buffer
- pVDev->EnableMapMode(false);
+ xVDev->EnableMapMode(false);
- const Bitmap aPaint(pVDev->GetBitmap(aPoint, pVDev->GetOutputSizePixel()));
+ const Bitmap aPaint(xVDev->GetBitmap(aPoint, xVDev->GetOutputSizePixel()));
// create alpha mask from gradient and get as Bitmap
- pVDev->EnableMapMode(bBufferMapModeEnabled);
- pVDev->SetDrawMode(DRAWMODE_GRAYGRADIENT);
- pVDev->DrawGradient(Rectangle(rPos, rSize), rTransparenceGradient);
- pVDev->SetDrawMode(DRAWMODE_DEFAULT);
- pVDev->EnableMapMode(false);
+ xVDev->EnableMapMode(bBufferMapModeEnabled);
+ xVDev->SetDrawMode(DRAWMODE_GRAYGRADIENT);
+ xVDev->DrawGradient(Rectangle(rPos, rSize), rTransparenceGradient);
+ xVDev->SetDrawMode(DRAWMODE_DEFAULT);
+ xVDev->EnableMapMode(false);
- const AlphaMask aAlpha(pVDev->GetBitmap(aPoint, pVDev->GetOutputSizePixel()));
+ const AlphaMask aAlpha(xVDev->GetBitmap(aPoint, xVDev->GetOutputSizePixel()));
- pVDev.reset();
+ xVDev.reset();
// draw masked content to target and restore MapMode
DrawBitmapEx(aDstRect.TopLeft(), BitmapEx(aPaint, aAlpha));
@@ -752,40 +752,40 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
const bool bOldMap = mbMap;
aMap.SetOrigin( Point( -aOutPos.X(), -aOutPos.Y() ) );
- pVDev->SetMapMode( aMap );
- const bool bVDevOldMap = pVDev->IsMapModeEnabled();
+ xVDev->SetMapMode( aMap );
+ const bool bVDevOldMap = xVDev->IsMapModeEnabled();
// create paint bitmap
( (GDIMetaFile&) rMtf ).WindStart();
- ( (GDIMetaFile&) rMtf ).Play( pVDev.get(), rPos, rSize );
+ ( (GDIMetaFile&) rMtf ).Play( xVDev.get(), rPos, rSize );
( (GDIMetaFile&) rMtf ).WindStart();
- pVDev->EnableMapMode( false );
- aPaint = pVDev->GetBitmap( Point(), pVDev->GetOutputSizePixel() );
- pVDev->EnableMapMode( bVDevOldMap ); // #i35331#: MUST NOT use EnableMapMode( sal_True ) here!
+ xVDev->EnableMapMode( false );
+ aPaint = xVDev->GetBitmap( Point(), xVDev->GetOutputSizePixel() );
+ xVDev->EnableMapMode( bVDevOldMap ); // #i35331#: MUST NOT use EnableMapMode( sal_True ) here!
// create mask bitmap
- pVDev->SetLineColor( COL_BLACK );
- pVDev->SetFillColor( COL_BLACK );
- pVDev->DrawRect( Rectangle( pVDev->PixelToLogic( Point() ), pVDev->GetOutputSize() ) );
- pVDev->SetDrawMode( DRAWMODE_WHITELINE | DRAWMODE_WHITEFILL | DRAWMODE_WHITETEXT |
+ xVDev->SetLineColor( COL_BLACK );
+ xVDev->SetFillColor( COL_BLACK );
+ xVDev->DrawRect( Rectangle( xVDev->PixelToLogic( Point() ), xVDev->GetOutputSize() ) );
+ xVDev->SetDrawMode( DRAWMODE_WHITELINE | DRAWMODE_WHITEFILL | DRAWMODE_WHITETEXT |
DRAWMODE_WHITEBITMAP | DRAWMODE_WHITEGRADIENT );
( (GDIMetaFile&) rMtf ).WindStart();
- ( (GDIMetaFile&) rMtf ).Play( pVDev.get(), rPos, rSize );
+ ( (GDIMetaFile&) rMtf ).Play( xVDev.get(), rPos, rSize );
( (GDIMetaFile&) rMtf ).WindStart();
- pVDev->EnableMapMode( false );
- aMask = pVDev->GetBitmap( Point(), pVDev->GetOutputSizePixel() );
- pVDev->EnableMapMode( bVDevOldMap ); // #i35331#: MUST NOT use EnableMapMode( sal_True ) here!
+ xVDev->EnableMapMode( false );
+ aMask = xVDev->GetBitmap( Point(), xVDev->GetOutputSizePixel() );
+ xVDev->EnableMapMode( bVDevOldMap ); // #i35331#: MUST NOT use EnableMapMode( sal_True ) here!
// create alpha mask from gradient
- pVDev->SetDrawMode( DRAWMODE_GRAYGRADIENT );
- pVDev->DrawGradient( Rectangle( rPos, rSize ), rTransparenceGradient );
- pVDev->SetDrawMode( DRAWMODE_DEFAULT );
- pVDev->EnableMapMode( false );
- pVDev->DrawMask( Point(), pVDev->GetOutputSizePixel(), aMask, Color( COL_WHITE ) );
+ xVDev->SetDrawMode( DRAWMODE_GRAYGRADIENT );
+ xVDev->DrawGradient( Rectangle( rPos, rSize ), rTransparenceGradient );
+ xVDev->SetDrawMode( DRAWMODE_DEFAULT );
+ xVDev->EnableMapMode( false );
+ xVDev->DrawMask( Point(), xVDev->GetOutputSizePixel(), aMask, Color( COL_WHITE ) );
- aAlpha = pVDev->GetBitmap( Point(), pVDev->GetOutputSizePixel() );
+ aAlpha = xVDev->GetBitmap( Point(), xVDev->GetOutputSizePixel() );
- pVDev.reset();
+ xVDev.reset();
EnableMapMode( false );
DrawBitmapEx( aDstRect.TopLeft(), BitmapEx( aPaint, aAlpha ) );
diff --git a/vcl/source/window/openglwin.cxx b/vcl/source/window/openglwin.cxx
index d132469c63ed..741940f45e2d 100644
--- a/vcl/source/window/openglwin.cxx
+++ b/vcl/source/window/openglwin.cxx
@@ -19,22 +19,22 @@ public:
OpenGLContext& getContext() { return maContext;}
private:
OpenGLContext maContext;
- boost::scoped_ptr<SystemChildWindow> mpChildWindow;
+ std::unique_ptr<SystemChildWindow> mxChildWindow;
};
OpenGLWindowImpl::OpenGLWindowImpl(vcl::Window* pWindow)
{
SystemWindowData aData = OpenGLContext::generateWinData(pWindow, false);
- mpChildWindow.reset(new SystemChildWindow(pWindow, 0, &aData));
- mpChildWindow->Show();
- maContext.init(mpChildWindow.get());
+ mxChildWindow.reset(new SystemChildWindow(pWindow, 0, &aData));
+ mxChildWindow->Show();
+ maContext.init(mxChildWindow.get());
pWindow->SetMouseTransparent(false);
}
OpenGLWindow::OpenGLWindow(vcl::Window* pParent):
Window(pParent, 0),
- mpImpl(new OpenGLWindowImpl(this)),
+ mxImpl(new OpenGLWindowImpl(this)),
mpRenderer(NULL)
{
}
@@ -47,7 +47,7 @@ OpenGLWindow::~OpenGLWindow()
OpenGLContext& OpenGLWindow::getContext()
{
- return mpImpl->getContext();
+ return mxImpl->getContext();
}
void OpenGLWindow::Paint(const Rectangle&)
diff --git a/vcl/unx/generic/app/sm.cxx b/vcl/unx/generic/app/sm.cxx
index 65522c6a41c9..782cc9063b3a 100644
--- a/vcl/unx/generic/app/sm.cxx
+++ b/vcl/unx/generic/app/sm.cxx
@@ -141,8 +141,8 @@ public:
};
SalSession * SessionManagerClient::m_pSession = NULL;
-boost::scoped_ptr< ICEConnectionObserver >
-SessionManagerClient::m_pICEConnectionObserver;
+std::unique_ptr< ICEConnectionObserver >
+SessionManagerClient::m_xICEConnectionObserver;
SmcConn SessionManagerClient::m_pSmcConnection = NULL;
OString SessionManagerClient::m_aClientID;
bool SessionManagerClient::m_bDocSaveDone = false; // HACK
@@ -403,8 +403,8 @@ void SessionManagerClient::saveDone()
{
if( m_pSmcConnection )
{
- assert(m_pICEConnectionObserver);
- osl::MutexGuard g(m_pICEConnectionObserver->m_ICEMutex);
+ assert(m_xICEConnectionObserver);
+ osl::MutexGuard g(m_xICEConnectionObserver->m_ICEMutex);
SmcSetProperties( m_pSmcConnection, nSmProps, ppSmProps );
SmcSaveYourselfDone( m_pSmcConnection, True );
SAL_INFO("vcl.sm", "sent SaveYourselfDone SmRestartHint of " << *pSmRestartHint );
@@ -414,17 +414,17 @@ void SessionManagerClient::saveDone()
void SessionManagerClient::open(SalSession * pSession)
{
- assert(!m_pSession && !m_pICEConnectionObserver && !m_pSmcConnection);
+ assert(!m_pSession && !m_xICEConnectionObserver && !m_pSmcConnection);
// must only be called once
m_pSession = pSession;
// This is the way Xt does it, so we can too:
if( getenv( "SESSION_MANAGER" ) )
{
- m_pICEConnectionObserver.reset(new ICEConnectionObserver);
- m_pICEConnectionObserver->activate();
+ m_xICEConnectionObserver.reset(new ICEConnectionObserver);
+ m_xICEConnectionObserver->activate();
{
- osl::MutexGuard g(m_pICEConnectionObserver->m_ICEMutex);
+ osl::MutexGuard g(m_xICEConnectionObserver->m_ICEMutex);
static SmcCallbacks aCallbacks; // does this need to be static?
aCallbacks.save_yourself.callback = SaveYourselfProc;
@@ -489,15 +489,15 @@ void SessionManagerClient::close()
{
if( m_pSmcConnection )
{
- assert(m_pICEConnectionObserver);
+ assert(m_xICEConnectionObserver);
{
- osl::MutexGuard g(m_pICEConnectionObserver->m_ICEMutex);
+ osl::MutexGuard g(m_xICEConnectionObserver->m_ICEMutex);
SAL_INFO("vcl.sm", "attempting SmcCloseConnection");
SmcCloseConnection( m_pSmcConnection, 0, NULL );
SAL_INFO("vcl.sm", "SmcConnection closed");
}
- m_pICEConnectionObserver->deactivate();
- m_pICEConnectionObserver.reset();
+ m_xICEConnectionObserver->deactivate();
+ m_xICEConnectionObserver.reset();
m_pSmcConnection = NULL;
}
}
@@ -507,8 +507,8 @@ bool SessionManagerClient::queryInteraction()
bool bRet = false;
if( m_pSmcConnection )
{
- assert(m_pICEConnectionObserver);
- osl::MutexGuard g(m_pICEConnectionObserver->m_ICEMutex);
+ assert(m_xICEConnectionObserver);
+ osl::MutexGuard g(m_xICEConnectionObserver->m_ICEMutex);
if( SmcInteractRequest( m_pSmcConnection, SmDialogNormal, InteractProc, NULL ) )
bRet = true;
}
@@ -519,8 +519,8 @@ void SessionManagerClient::interactionDone( bool bCancelShutdown )
{
if( m_pSmcConnection )
{
- assert(m_pICEConnectionObserver);
- osl::MutexGuard g(m_pICEConnectionObserver->m_ICEMutex);
+ assert(m_xICEConnectionObserver);
+ osl::MutexGuard g(m_xICEConnectionObserver->m_ICEMutex);
SmcInteractDone( m_pSmcConnection, bCancelShutdown ? True : False );
}
}
diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx
index 17a9a10a57f7..07f8efc7eefa 100644
--- a/vcl/unx/generic/gdi/gdiimpl.cxx
+++ b/vcl/unx/generic/gdi/gdiimpl.cxx
@@ -641,12 +641,12 @@ void X11SalGraphicsImpl::copyBits( const SalTwoRect& rPosAry,
// #i60699# No chance to handle graphics exposures - we copy
// to a temp bitmap first, into which no repaints are
// technically possible.
- boost::scoped_ptr<SalBitmap> pDDB(pSrcGraphics->getBitmap( rPosAry.mnSrcX,
+ std::unique_ptr<SalBitmap> xDDB(pSrcGraphics->getBitmap( rPosAry.mnSrcX,
rPosAry.mnSrcY,
rPosAry.mnSrcWidth,
rPosAry.mnSrcHeight ));
- if( !pDDB )
+ if( !xDDB )
{
stderr0( "SalGraphics::CopyBits !pSrcGraphics->GetBitmap()\n" );
return;
@@ -655,7 +655,7 @@ void X11SalGraphicsImpl::copyBits( const SalTwoRect& rPosAry,
SalTwoRect aPosAry( rPosAry );
aPosAry.mnSrcX = 0, aPosAry.mnSrcY = 0;
- drawBitmap( aPosAry, *pDDB );
+ drawBitmap( aPosAry, *xDDB );
}
else {
stderr0( "X11SalGraphicsImpl::CopyBits from Printer not yet implemented\n" );
diff --git a/vcl/unx/generic/gdi/salbmp.cxx b/vcl/unx/generic/gdi/salbmp.cxx
index 8a38b1bfba6c..45f0a9cd1637 100644
--- a/vcl/unx/generic/gdi/salbmp.cxx
+++ b/vcl/unx/generic/gdi/salbmp.cxx
@@ -50,7 +50,7 @@
#include <valgrind/memcheck.h>
#endif
-#include <boost/scoped_ptr.hpp>
+#include <memory>
// - SalBitmap -
@@ -414,8 +414,8 @@ XImage* X11SalBitmap::ImplCreateXImage(
{
BitmapBuffer* pDstBuf;
sal_uLong nDstFormat = BMP_FORMAT_TOP_DOWN;
- boost::scoped_ptr<BitmapPalette> pPal;
- boost::scoped_ptr<ColorMask> pMask;
+ std::unique_ptr<BitmapPalette> xPal;
+ std::unique_ptr<ColorMask> xMask;
switch( pImage->bits_per_pixel )
{
@@ -454,7 +454,7 @@ XImage* X11SalBitmap::ImplCreateXImage(
#endif
- pMask.reset(new ColorMask( pImage->red_mask, pImage->green_mask, pImage->blue_mask ));
+ xMask.reset(new ColorMask( pImage->red_mask, pImage->green_mask, pImage->blue_mask ));
}
break;
@@ -485,17 +485,17 @@ XImage* X11SalBitmap::ImplCreateXImage(
if( pImage->depth == 1 )
{
- pPal.reset(new BitmapPalette( 2 ));
- (*pPal)[ 0 ] = Color( COL_BLACK );
- (*pPal)[ 1 ] = Color( COL_WHITE );
+ xPal.reset(new BitmapPalette( 2 ));
+ (*xPal)[ 0 ] = Color( COL_BLACK );
+ (*xPal)[ 1 ] = Color( COL_WHITE );
}
else if( pImage->depth == 8 && mbGrey )
{
- pPal.reset(new BitmapPalette( 256 ));
+ xPal.reset(new BitmapPalette( 256 ));
for( sal_uInt16 i = 0; i < 256; i++ )
{
- BitmapColor& rBmpCol = (*pPal)[ i ];
+ BitmapColor& rBmpCol = (*xPal)[ i ];
rBmpCol.SetRed( i );
rBmpCol.SetGreen( i );
@@ -510,12 +510,12 @@ XImage* X11SalBitmap::ImplCreateXImage(
, (sal_uLong)(1 << pImage->depth)
);
- pPal.reset(new BitmapPalette( nCols ));
+ xPal.reset(new BitmapPalette( nCols ));
for( sal_uInt16 i = 0; i < nCols; i++ )
{
const SalColor nColor( rColMap.GetColor( i ) );
- BitmapColor& rBmpCol = (*pPal)[ i ];
+ BitmapColor& rBmpCol = (*xPal)[ i ];
rBmpCol.SetRed( SALCOLOR_RED( nColor ) );
rBmpCol.SetGreen( SALCOLOR_GREEN( nColor ) );
@@ -523,9 +523,9 @@ XImage* X11SalBitmap::ImplCreateXImage(
}
}
- pDstBuf = StretchAndConvert( *mpDIB, rTwoRect, nDstFormat, pPal.get(), pMask.get() );
- pPal.reset();
- pMask.reset();
+ pDstBuf = StretchAndConvert( *mpDIB, rTwoRect, nDstFormat, xPal.get(), xMask.get() );
+ xPal.reset();
+ xMask.reset();
if( pDstBuf && pDstBuf->mpBits )
{
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index 673e5cf1a5af..8bd40736e3ec 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -85,13 +85,13 @@ X11SalGraphics::X11SalGraphics():
{
if (OpenGLHelper::isVCLOpenGLEnabled())
{
- mpImpl.reset(new X11OpenGLSalGraphicsImpl(*this));
- mpTextRenderImpl.reset((new OpenGLX11CairoTextRender(false, *this)));
+ mxImpl.reset(new X11OpenGLSalGraphicsImpl(*this));
+ mxTextRenderImpl.reset((new OpenGLX11CairoTextRender(false, *this)));
}
else
{
- mpTextRenderImpl.reset((new X11CairoTextRender(false, *this)));
- mpImpl.reset(new X11SalGraphicsImpl(*this));
+ mxTextRenderImpl.reset((new X11CairoTextRender(false, *this)));
+ mxImpl.reset(new X11SalGraphicsImpl(*this));
}
}
@@ -109,7 +109,7 @@ void X11SalGraphics::freeResources()
DBG_ASSERT( !pPaintRegion_, "pPaintRegion_" );
if( mpClipRegion ) XDestroyRegion( mpClipRegion ), mpClipRegion = None;
- mpImpl->freeResources();
+ mxImpl->freeResources();
if( hBrush_ ) XFreePixmap( pDisplay, hBrush_ ), hBrush_ = None;
if( pFontGC_ ) XFreeGC( pDisplay, pFontGC_ ), pFontGC_ = None;
@@ -124,7 +124,7 @@ void X11SalGraphics::freeResources()
SalGraphicsImpl* X11SalGraphics::GetImpl() const
{
- return mpImpl.get();
+ return mxImpl.get();
}
void X11SalGraphics::SetDrawable( Drawable aDrawable, SalX11Screen nXScreen )
@@ -165,7 +165,7 @@ void X11SalGraphics::Init( SalFrame *pFrame, Drawable aTarget,
bVirDev_ = false;
SetDrawable( aTarget, nXScreen );
- mpImpl->Init();
+ mxImpl->Init();
}
void X11SalGraphics::DeInit()
@@ -314,123 +314,123 @@ void X11SalGraphics::GetResolution( sal_Int32 &rDPIX, sal_Int32 &rDPIY ) // cons
sal_uInt16 X11SalGraphics::GetBitCount() const
{
- return mpImpl->GetBitCount();
+ return mxImpl->GetBitCount();
}
long X11SalGraphics::GetGraphicsWidth() const
{
- return mpImpl->GetGraphicsWidth();
+ return mxImpl->GetGraphicsWidth();
}
void X11SalGraphics::ResetClipRegion()
{
- mpImpl->ResetClipRegion();
+ mxImpl->ResetClipRegion();
}
bool X11SalGraphics::setClipRegion( const vcl::Region& i_rClip )
{
- return mpImpl->setClipRegion( i_rClip );
+ return mxImpl->setClipRegion( i_rClip );
}
void X11SalGraphics::SetLineColor()
{
- mpImpl->SetLineColor();
+ mxImpl->SetLineColor();
}
void X11SalGraphics::SetLineColor( SalColor nSalColor )
{
- mpImpl->SetLineColor( nSalColor );
+ mxImpl->SetLineColor( nSalColor );
}
void X11SalGraphics::SetFillColor()
{
- mpImpl->SetFillColor();
+ mxImpl->SetFillColor();
}
void X11SalGraphics::SetFillColor( SalColor nSalColor )
{
- mpImpl->SetFillColor( nSalColor );
+ mxImpl->SetFillColor( nSalColor );
}
void X11SalGraphics::SetROPLineColor( SalROPColor nROPColor )
{
- mpImpl->SetROPLineColor( nROPColor );
+ mxImpl->SetROPLineColor( nROPColor );
}
void X11SalGraphics::SetROPFillColor( SalROPColor nROPColor )
{
- mpImpl->SetROPFillColor( nROPColor );
+ mxImpl->SetROPFillColor( nROPColor );
}
void X11SalGraphics::SetXORMode( bool bSet, bool bInvertOnly )
{
- mpImpl->SetXORMode( bSet, bInvertOnly );
+ mxImpl->SetXORMode( bSet, bInvertOnly );
}
void X11SalGraphics::drawPixel( long nX, long nY )
{
- mpImpl->drawPixel( nX, nY );
+ mxImpl->drawPixel( nX, nY );
}
void X11SalGraphics::drawPixel( long nX, long nY, SalColor nSalColor )
{
- mpImpl->drawPixel( nX, nY, nSalColor );
+ mxImpl->drawPixel( nX, nY, nSalColor );
}
void X11SalGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 )
{
- mpImpl->drawLine( nX1, nY1, nX2, nY2 );
+ mxImpl->drawLine( nX1, nY1, nX2, nY2 );
}
void X11SalGraphics::drawRect( long nX, long nY, long nDX, long nDY )
{
- mpImpl->drawRect( nX, nY, nDX, nDY );
+ mxImpl->drawRect( nX, nY, nDX, nDY );
}
void X11SalGraphics::drawPolyLine( sal_uInt32 nPoints, const SalPoint *pPtAry )
{
- mpImpl->drawPolyLine( nPoints, pPtAry );
+ mxImpl->drawPolyLine( nPoints, pPtAry );
}
void X11SalGraphics::drawPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry )
{
- mpImpl->drawPolygon( nPoints, pPtAry );
+ mxImpl->drawPolygon( nPoints, pPtAry );
}
void X11SalGraphics::drawPolyPolygon( sal_uInt32 nPoly,
const sal_uInt32 *pPoints,
PCONSTSALPOINT *pPtAry )
{
- mpImpl->drawPolyPolygon( nPoly, pPoints, pPtAry );
+ mxImpl->drawPolyPolygon( nPoly, pPoints, pPtAry );
}
bool X11SalGraphics::drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry )
{
- return mpImpl->drawPolyLineBezier( nPoints, pPtAry, pFlgAry );
+ return mxImpl->drawPolyLineBezier( nPoints, pPtAry, pFlgAry );
}
bool X11SalGraphics::drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry )
{
- return mpImpl->drawPolygonBezier( nPoints, pPtAry, pFlgAry );
+ return mxImpl->drawPolygonBezier( nPoints, pPtAry, pFlgAry );
}
bool X11SalGraphics::drawPolyPolygonBezier( sal_uInt32 nPoints, const sal_uInt32* pPoints,
const SalPoint* const* pPtAry, const sal_uInt8* const* pFlgAry)
{
- return mpImpl->drawPolyPolygonBezier( nPoints, pPoints, pPtAry, pFlgAry );
+ return mxImpl->drawPolyPolygonBezier( nPoints, pPoints, pPtAry, pFlgAry );
}
void X11SalGraphics::invert( sal_uInt32 nPoints,
const SalPoint* pPtAry,
SalInvert nFlags )
{
- mpImpl->invert( nPoints, pPtAry, nFlags );
+ mxImpl->invert( nPoints, pPtAry, nFlags );
}
bool X11SalGraphics::drawEPS( long nX, long nY, long nWidth,
long nHeight, void* pPtr, sal_uLong nSize )
{
- return mpImpl->drawEPS( nX, nY, nWidth, nHeight, pPtr, nSize );
+ return mxImpl->drawEPS( nX, nY, nWidth, nHeight, pPtr, nSize );
}
XRenderPictFormat* X11SalGraphics::GetXRenderFormat() const
@@ -458,7 +458,7 @@ SystemGraphicsData X11SalGraphics::GetGraphicsData() const
// draw a poly-polygon
bool X11SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rOrigPolyPoly, double fTransparency )
{
- return mpImpl->drawPolyPolygon( rOrigPolyPoly, fTransparency );
+ return mxImpl->drawPolyPolygon( rOrigPolyPoly, fTransparency );
}
bool X11SalGraphics::drawPolyLine(
@@ -468,23 +468,23 @@ bool X11SalGraphics::drawPolyLine(
basegfx::B2DLineJoin eLineJoin,
com::sun::star::drawing::LineCap eLineCap)
{
- return mpImpl->drawPolyLine( rPolygon, fTransparency, rLineWidth,
+ return mxImpl->drawPolyLine( rPolygon, fTransparency, rLineWidth,
eLineJoin, eLineCap );
}
bool X11SalGraphics::drawGradient(const tools::PolyPolygon& rPoly, const Gradient& rGradient)
{
- return mpImpl->drawGradient(rPoly, rGradient);
+ return mxImpl->drawGradient(rPoly, rGradient);
}
void X11SalGraphics::BeginPaint()
{
- return mpImpl->beginPaint();
+ return mxImpl->beginPaint();
}
void X11SalGraphics::EndPaint()
{
- return mpImpl->endPaint();
+ return mxImpl->endPaint();
}
SalGeometryProvider *X11SalGraphics::GetGeometryProvider() const
diff --git a/vcl/unx/generic/gdi/salgdi2.cxx b/vcl/unx/generic/gdi/salgdi2.cxx
index bd9238001468..850b2a84ee41 100644
--- a/vcl/unx/generic/gdi/salgdi2.cxx
+++ b/vcl/unx/generic/gdi/salgdi2.cxx
@@ -39,7 +39,6 @@
#include "vcl/bmpacc.hxx"
#include <outdata.hxx>
-#include <boost/scoped_ptr.hpp>
void X11SalGraphics::CopyScreenArea( Display* pDisplay,
Drawable aSrc, SalX11Screen nXScreenSrc, int nSrcDepth,
@@ -80,14 +79,14 @@ void X11SalGraphics::CopyScreenArea( Display* pDisplay,
bool X11SalGraphics::FillPixmapFromScreen( X11Pixmap* pPixmap, int nX, int nY )
{
- X11GraphicsImpl& rImpl = dynamic_cast<X11GraphicsImpl&>(*mpImpl.get());
+ X11GraphicsImpl& rImpl = dynamic_cast<X11GraphicsImpl&>(*mxImpl.get());
return rImpl.FillPixmapFromScreen( pPixmap, nX, nY );
}
bool X11SalGraphics::RenderPixmapToScreen( X11Pixmap* pPixmap, X11Pixmap* pMask, int nX, int nY )
{
SAL_INFO( "vcl", "RenderPixmapToScreen" );
- X11GraphicsImpl& rImpl = dynamic_cast<X11GraphicsImpl&>(*mpImpl.get());
+ X11GraphicsImpl& rImpl = dynamic_cast<X11GraphicsImpl&>(*mxImpl.get());
return rImpl.RenderPixmapToScreen( pPixmap, pMask, nX, nY );
}
@@ -151,7 +150,7 @@ void X11SalGraphics::YieldGraphicsExpose()
void X11SalGraphics::copyBits( const SalTwoRect& rPosAry,
SalGraphics *pSSrcGraphics )
{
- mpImpl->copyBits( rPosAry, pSSrcGraphics );
+ mxImpl->copyBits( rPosAry, pSSrcGraphics );
}
void X11SalGraphics::copyArea ( long nDestX, long nDestY,
@@ -159,13 +158,13 @@ void X11SalGraphics::copyArea ( long nDestX, long nDestY,
long nSrcWidth, long nSrcHeight,
sal_uInt16 n )
{
- mpImpl->copyArea( nDestX, nDestY, nSrcX, nSrcY, nSrcWidth, nSrcHeight, n );
+ mxImpl->copyArea( nDestX, nDestY, nSrcX, nSrcY, nSrcWidth, nSrcHeight, n );
}
bool X11SalGraphics::blendBitmap( const SalTwoRect& rTR,
const SalBitmap& rBitmap )
{
- return mpImpl->blendBitmap( rTR, rBitmap );
+ return mxImpl->blendBitmap( rTR, rBitmap );
}
bool X11SalGraphics::blendAlphaBitmap( const SalTwoRect& rTR,
@@ -173,31 +172,31 @@ bool X11SalGraphics::blendAlphaBitmap( const SalTwoRect& rTR,
const SalBitmap& rMaskBitmap,
const SalBitmap& rAlphaBitmap )
{
- return mpImpl->blendAlphaBitmap( rTR, rSrcBitmap, rMaskBitmap, rAlphaBitmap );
+ return mxImpl->blendAlphaBitmap( rTR, rSrcBitmap, rMaskBitmap, rAlphaBitmap );
}
void X11SalGraphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap )
{
- mpImpl->drawBitmap( rPosAry, rSalBitmap );
+ mxImpl->drawBitmap( rPosAry, rSalBitmap );
}
void X11SalGraphics::drawBitmap( const SalTwoRect& rPosAry,
const SalBitmap& rSrcBitmap,
const SalBitmap& rMaskBitmap )
{
- mpImpl->drawBitmap( rPosAry, rSrcBitmap, rMaskBitmap );
+ mxImpl->drawBitmap( rPosAry, rSrcBitmap, rMaskBitmap );
}
bool X11SalGraphics::drawAlphaBitmap( const SalTwoRect& rTR,
const SalBitmap& rSrcBitmap, const SalBitmap& rAlphaBmp )
{
- return mpImpl->drawAlphaBitmap( rTR, rSrcBitmap, rAlphaBmp );
+ return mxImpl->drawAlphaBitmap( rTR, rSrcBitmap, rAlphaBmp );
}
bool X11SalGraphics::drawAlphaBitmap( const SalTwoRect& rTR,
const SalBitmap& rBitmap )
{
- return mpImpl->drawAlphaBitmap( rTR, rBitmap );
+ return mxImpl->drawAlphaBitmap( rTR, rBitmap );
}
bool X11SalGraphics::drawTransformedBitmap(
@@ -207,37 +206,37 @@ bool X11SalGraphics::drawTransformedBitmap(
const SalBitmap& rSourceBitmap,
const SalBitmap* pAlphaBitmap)
{
- return mpImpl->drawTransformedBitmap( rNull, rX, rY, rSourceBitmap, pAlphaBitmap );
+ return mxImpl->drawTransformedBitmap( rNull, rX, rY, rSourceBitmap, pAlphaBitmap );
}
bool X11SalGraphics::drawAlphaRect( long nX, long nY, long nWidth,
long nHeight, sal_uInt8 nTransparency )
{
- return mpImpl->drawAlphaRect( nX, nY, nWidth, nHeight, nTransparency );
+ return mxImpl->drawAlphaRect( nX, nY, nWidth, nHeight, nTransparency );
}
void X11SalGraphics::drawBitmap( const SalTwoRect& rRect,
const SalBitmap& rBitmap,
SalColor nColor )
{
- mpImpl->drawBitmap( rRect, rBitmap, nColor );
+ mxImpl->drawBitmap( rRect, rBitmap, nColor );
}
void X11SalGraphics::drawMask( const SalTwoRect& rPosAry,
const SalBitmap &rSalBitmap,
SalColor nMaskColor )
{
- mpImpl->drawMask( rPosAry, rSalBitmap, nMaskColor );
+ mxImpl->drawMask( rPosAry, rSalBitmap, nMaskColor );
}
SalBitmap *X11SalGraphics::getBitmap( long nX, long nY, long nDX, long nDY )
{
- return mpImpl->getBitmap( nX, nY, nDX, nDY );
+ return mxImpl->getBitmap( nX, nY, nDX, nDY );
}
SalColor X11SalGraphics::getPixel( long nX, long nY )
{
- return mpImpl->getPixel( nX, nY );
+ return mxImpl->getPixel( nX, nY );
}
void X11SalGraphics::invert( long nX,
@@ -246,7 +245,7 @@ void X11SalGraphics::invert( long nX,
long nDY,
SalInvert nFlags )
{
- mpImpl->invert( nX, nY, nDX, nDY, nFlags );
+ mxImpl->invert( nX, nY, nDX, nDY, nFlags );
}
bool X11SalGraphics::supportsOperation( OutDevSupportType eType ) const
diff --git a/vcl/unx/generic/gdi/salgdi3.cxx b/vcl/unx/generic/gdi/salgdi3.cxx
index 622f77860e66..53afb0107aec 100644
--- a/vcl/unx/generic/gdi/salgdi3.cxx
+++ b/vcl/unx/generic/gdi/salgdi3.cxx
@@ -91,30 +91,30 @@ X11SalGraphics::GetFontGC()
void X11SalGraphics::DrawServerFontLayout( const ServerFontLayout& rLayout )
{
- mpTextRenderImpl->DrawServerFontLayout(rLayout);
+ mxTextRenderImpl->DrawServerFontLayout(rLayout);
}
const FontCharMapPtr X11SalGraphics::GetFontCharMap() const
{
- return mpTextRenderImpl->GetFontCharMap();
+ return mxTextRenderImpl->GetFontCharMap();
}
bool X11SalGraphics::GetFontCapabilities(vcl::FontCapabilities &rGetImplFontCapabilities) const
{
- return mpTextRenderImpl->GetFontCapabilities(rGetImplFontCapabilities);
+ return mxTextRenderImpl->GetFontCapabilities(rGetImplFontCapabilities);
}
// SalGraphics
sal_uInt16 X11SalGraphics::SetFont( FontSelectPattern *pEntry, int nFallbackLevel )
{
- return mpTextRenderImpl->SetFont(pEntry, nFallbackLevel);
+ return mxTextRenderImpl->SetFont(pEntry, nFallbackLevel);
}
void
X11SalGraphics::SetTextColor( SalColor nSalColor )
{
- mpTextRenderImpl->SetTextColor(nSalColor);
+ mxTextRenderImpl->SetTextColor(nSalColor);
nTextPixel_ = GetPixel( nSalColor );
bFontGC_ = false;
}
@@ -123,44 +123,44 @@ bool X11SalGraphics::AddTempDevFont( PhysicalFontCollection* pFontCollection,
const OUString& rFileURL,
const OUString& rFontName )
{
- return mpTextRenderImpl->AddTempDevFont(pFontCollection, rFileURL, rFontName);
+ return mxTextRenderImpl->AddTempDevFont(pFontCollection, rFileURL, rFontName);
}
void X11SalGraphics::ClearDevFontCache()
{
- mpTextRenderImpl->ClearDevFontCache();
+ mxTextRenderImpl->ClearDevFontCache();
}
void X11SalGraphics::GetDevFontList( PhysicalFontCollection* pFontCollection )
{
- mpTextRenderImpl->GetDevFontList(pFontCollection);
+ mxTextRenderImpl->GetDevFontList(pFontCollection);
}
void
X11SalGraphics::GetFontMetric( ImplFontMetricData *pMetric, int nFallbackLevel )
{
- mpTextRenderImpl->GetFontMetric(pMetric, nFallbackLevel);
+ mxTextRenderImpl->GetFontMetric(pMetric, nFallbackLevel);
}
bool X11SalGraphics::GetGlyphBoundRect( sal_GlyphId aGlyphId, Rectangle& rRect )
{
- return mpTextRenderImpl->GetGlyphBoundRect(aGlyphId, rRect);
+ return mxTextRenderImpl->GetGlyphBoundRect(aGlyphId, rRect);
}
bool X11SalGraphics::GetGlyphOutline( sal_GlyphId aGlyphId,
::basegfx::B2DPolyPolygon& rPolyPoly )
{
- return mpTextRenderImpl->GetGlyphOutline(aGlyphId, rPolyPoly);
+ return mxTextRenderImpl->GetGlyphOutline(aGlyphId, rPolyPoly);
}
SalLayout* X11SalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel )
{
- return mpTextRenderImpl->GetTextLayout(rArgs, nFallbackLevel);
+ return mxTextRenderImpl->GetTextLayout(rArgs, nFallbackLevel);
}
SystemFontData X11SalGraphics::GetSysFontData( int nFallbackLevel ) const
{
- return mpTextRenderImpl->GetSysFontData(nFallbackLevel);
+ return mxTextRenderImpl->GetSysFontData(nFallbackLevel);
}
bool X11SalGraphics::CreateFontSubset(
@@ -173,23 +173,23 @@ bool X11SalGraphics::CreateFontSubset(
FontSubsetInfo& rInfo
)
{
- return mpTextRenderImpl->CreateFontSubset(rToFile, pFont,
+ return mxTextRenderImpl->CreateFontSubset(rToFile, pFont,
pGlyphIds, pEncoding, pWidths, nGlyphCount, rInfo);
}
const void* X11SalGraphics::GetEmbedFontData( const PhysicalFontFace* pFont, const sal_Ucs* pUnicodes, sal_Int32* pWidths, size_t nLen, FontSubsetInfo& rInfo, long* pDataLen )
{
- return mpTextRenderImpl->GetEmbedFontData(pFont, pUnicodes, pWidths, nLen, rInfo, pDataLen);
+ return mxTextRenderImpl->GetEmbedFontData(pFont, pUnicodes, pWidths, nLen, rInfo, pDataLen);
}
void X11SalGraphics::FreeEmbedFontData( const void* pData, long nLen )
{
- mpTextRenderImpl->FreeEmbedFontData(pData, nLen);
+ mxTextRenderImpl->FreeEmbedFontData(pData, nLen);
}
const Ucs2SIntMap* X11SalGraphics::GetFontEncodingVector( const PhysicalFontFace* pFont, const Ucs2OStrMap** pNonEncoded, std::set<sal_Unicode> const** ppPriority)
{
- return mpTextRenderImpl->GetFontEncodingVector(pFont, pNonEncoded, ppPriority);
+ return mxTextRenderImpl->GetFontEncodingVector(pFont, pNonEncoded, ppPriority);
}
void X11SalGraphics::GetGlyphWidths( const PhysicalFontFace* pFont,
@@ -197,7 +197,7 @@ void X11SalGraphics::GetGlyphWidths( const PhysicalFontFace* pFont,
Int32Vector& rWidths,
Ucs2UIntMap& rUnicodeEnc )
{
- mpTextRenderImpl->GetGlyphWidths(pFont, bVertical, rWidths, rUnicodeEnc);
+ mxTextRenderImpl->GetGlyphWidths(pFont, bVertical, rWidths, rUnicodeEnc);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/generic/gdi/salvd.cxx b/vcl/unx/generic/gdi/salvd.cxx
index 3ec516bd038d..f7d572f374be 100644
--- a/vcl/unx/generic/gdi/salvd.cxx
+++ b/vcl/unx/generic/gdi/salvd.cxx
@@ -78,7 +78,7 @@ void X11SalGraphics::Init( X11SalVirtualDevice *pDevice, SalColormap* pColormap,
const Drawable aVdevDrawable = pDevice->GetDrawable();
SetDrawable( aVdevDrawable, m_nXScreen );
- mpImpl->Init();
+ mxImpl->Init();
}
X11SalVirtualDevice::X11SalVirtualDevice( SalGraphics* pGraphics,
diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx b/vcl/unx/generic/printer/printerinfomanager.cxx
index 51c9c2f3ae75..2690c881bd02 100644
--- a/vcl/unx/generic/printer/printerinfomanager.cxx
+++ b/vcl/unx/generic/printer/printerinfomanager.cxx
@@ -40,8 +40,6 @@
#include "osl/mutex.hxx"
#include "osl/process.h"
-#include <boost/scoped_ptr.hpp>
-
// filename of configuration files
#define PRINT_FILENAME "psprint.conf"
// the group of the global defaults
diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx
index 99efa229bd3e..e26e16158a48 100644
--- a/vcl/unx/gtk/app/gtkinst.cxx
+++ b/vcl/unx/gtk/app/gtkinst.cxx
@@ -450,12 +450,12 @@ GenPspGraphics *GtkInstance::CreatePrintGraphics()
return new GenPspGraphics();
}
-boost::shared_ptr<vcl::unx::GtkPrintWrapper>
+std::shared_ptr<vcl::unx::GtkPrintWrapper>
GtkInstance::getPrintWrapper() const
{
- if (!m_pPrintWrapper)
- m_pPrintWrapper.reset(new vcl::unx::GtkPrintWrapper);
- return m_pPrintWrapper;
+ if (!m_xPrintWrapper)
+ m_xPrintWrapper.reset(new vcl::unx::GtkPrintWrapper);
+ return m_xPrintWrapper;
}
#if GTK_CHECK_VERSION(3,0,0)
diff --git a/vcl/unx/gtk/gdi/salprn-gtk.cxx b/vcl/unx/gtk/gdi/salprn-gtk.cxx
index a636af504e69..650276c3a1f4 100644
--- a/vcl/unx/gtk/gdi/salprn-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salprn-gtk.cxx
@@ -65,11 +65,11 @@ public:
bool run();
GtkPrinter* getPrinter() const
{
- return m_pWrapper->print_unix_dialog_get_selected_printer(GTK_PRINT_UNIX_DIALOG(m_pDialog));
+ return m_xWrapper->print_unix_dialog_get_selected_printer(GTK_PRINT_UNIX_DIALOG(m_pDialog));
}
GtkPrintSettings* getSettings() const
{
- return m_pWrapper->print_unix_dialog_get_settings(GTK_PRINT_UNIX_DIALOG(m_pDialog));
+ return m_xWrapper->print_unix_dialog_get_settings(GTK_PRINT_UNIX_DIALOG(m_pDialog));
}
void updateControllerPrintRange();
#if 0
@@ -110,7 +110,7 @@ private:
vcl::PrinterController& m_rController;
std::map<GtkWidget*, OUString> m_aControlToPropertyMap;
std::map<GtkWidget*, sal_Int32> m_aControlToNumValMap;
- boost::shared_ptr<GtkPrintWrapper> m_pWrapper;
+ std::shared_ptr<GtkPrintWrapper> m_xWrapper;
};
struct GtkSalPrinter_Impl
@@ -213,10 +213,10 @@ GtkSalPrinter::StartJob(
if (!lcl_useSystemPrintDialog())
return PspSalPrinter::StartJob(i_pFileName, i_rJobName, i_rAppName, io_pSetupData, io_rController);
- assert(!m_pImpl);
+ assert(!m_xImpl);
- m_pImpl.reset(new GtkSalPrinter_Impl());
- m_pImpl->m_sJobName = i_rJobName;
+ m_xImpl.reset(new GtkSalPrinter_Impl());
+ m_xImpl->m_sJobName = i_rJobName;
OString sFileName;
if (i_pFileName)
@@ -229,16 +229,16 @@ GtkSalPrinter::StartJob(
return false;
}
aDialog.updateControllerPrintRange();
- m_pImpl->m_pPrinter = aDialog.getPrinter();
- m_pImpl->m_pSettings = aDialog.getSettings();
+ m_xImpl->m_pPrinter = aDialog.getPrinter();
+ m_xImpl->m_pSettings = aDialog.getSettings();
#if 0
- if (const gchar *uri = gtk_print_settings_get(m_pImpl->m_pSettings, GTK_PRINT_SETTINGS_OUTPUT_URI))
+ if (const gchar *uri = gtk_print_settings_get(m_xImpl->m_pSettings, GTK_PRINT_SETTINGS_OUTPUT_URI))
{
- const gchar *pStr = gtk_print_settings_get(m_pImpl->m_pSettings, GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT);
+ const gchar *pStr = gtk_print_settings_get(m_xImpl->m_pSettings, GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT);
if (pStr && !strcmp(pStr, "pdf"))
{
- aDialog.ExportAsPDF(OUString((const sal_Char *)uri, strlen((const sal_Char *)uri), RTL_TEXTENCODING_UTF8), m_pImpl->m_pSettings);
+ aDialog.ExportAsPDF(OUString((const sal_Char *)uri, strlen((const sal_Char *)uri), RTL_TEXTENCODING_UTF8), m_xImpl->m_pSettings);
bDoJob = false;
}
}
@@ -251,7 +251,7 @@ GtkSalPrinter::StartJob(
//To-Do proper name, watch for encodings
sFileName = OString("/tmp/hacking.ps");
- m_pImpl->m_sSpoolFile = sFileName;
+ m_xImpl->m_sSpoolFile = sFileName;
OUString aFileName = OStringToOUString(sFileName, osl_getThreadTextEncoding());
@@ -268,14 +268,14 @@ GtkSalPrinter::EndJob()
if (!lcl_useSystemPrintDialog())
return bRet;
- assert(m_pImpl);
+ assert(m_xImpl);
- if (!bRet || m_pImpl->m_sSpoolFile.isEmpty())
+ if (!bRet || m_xImpl->m_sSpoolFile.isEmpty())
return bRet;
- boost::shared_ptr<GtkPrintWrapper> const pWrapper(lcl_getGtkSalInstance().getPrintWrapper());
+ std::shared_ptr<GtkPrintWrapper> const xWrapper(lcl_getGtkSalInstance().getPrintWrapper());
- GtkPageSetup* pPageSetup = pWrapper->page_setup_new();
+ GtkPageSetup* pPageSetup = xWrapper->page_setup_new();
#if 0
//todo
gtk_page_setup_set_orientation(pPageSetup,);
@@ -286,14 +286,14 @@ GtkSalPrinter::EndJob()
gtk_page_setup_set_right_margin(pPageSetup,);
#endif
- GtkPrintJob* const pJob = pWrapper->print_job_new(
- OUStringToOString(m_pImpl->m_sJobName, RTL_TEXTENCODING_UTF8).getStr(),
- m_pImpl->m_pPrinter, m_pImpl->m_pSettings, pPageSetup);
+ GtkPrintJob* const pJob = xWrapper->print_job_new(
+ OUStringToOString(m_xImpl->m_sJobName, RTL_TEXTENCODING_UTF8).getStr(),
+ m_xImpl->m_pPrinter, m_xImpl->m_pSettings, pPageSetup);
GError* error = NULL;
- bRet = pWrapper->print_job_set_source_file(pJob, m_pImpl->m_sSpoolFile.getStr(), &error);
+ bRet = xWrapper->print_job_set_source_file(pJob, m_xImpl->m_sSpoolFile.getStr(), &error);
if (bRet)
- pWrapper->print_job_send(pJob, NULL, NULL, NULL);
+ xWrapper->print_job_send(pJob, NULL, NULL, NULL);
else
{
//To-Do, do something with this
@@ -302,7 +302,7 @@ GtkSalPrinter::EndJob()
}
g_object_unref(pPageSetup);
- m_pImpl.reset();
+ m_xImpl.reset();
//To-Do, remove temp spool file
@@ -398,9 +398,9 @@ lcl_combo_box_text_append(GtkWidget* const pWidget, gchar const* const pText)
GtkPrintDialog::GtkPrintDialog(vcl::PrinterController& io_rController)
: m_rController(io_rController)
- , m_pWrapper(lcl_getGtkSalInstance().getPrintWrapper())
+ , m_xWrapper(lcl_getGtkSalInstance().getPrintWrapper())
{
- assert(m_pWrapper->supportsPrinting());
+ assert(m_xWrapper->supportsPrinting());
impl_initDialog();
impl_initCustomTab();
impl_readFromSettings();
@@ -410,7 +410,7 @@ void
GtkPrintDialog::impl_initDialog()
{
//To-Do, like fpicker, set UI language
- m_pDialog = m_pWrapper->print_unix_dialog_new(NULL, NULL);
+ m_pDialog = m_xWrapper->print_unix_dialog_new(NULL, NULL);
vcl::Window* const pTopWindow(Application::GetActiveTopWindow());
if (pTopWindow)
@@ -424,7 +424,7 @@ GtkPrintDialog::impl_initDialog()
}
}
- m_pWrapper->print_unix_dialog_set_manual_capabilities(GTK_PRINT_UNIX_DIALOG(m_pDialog),
+ m_xWrapper->print_unix_dialog_set_manual_capabilities(GTK_PRINT_UNIX_DIALOG(m_pDialog),
GtkPrintCapabilities(GTK_PRINT_CAPABILITY_COPIES
| GTK_PRINT_CAPABILITY_COLLATE
| GTK_PRINT_CAPABILITY_REVERSE
@@ -745,7 +745,7 @@ GtkPrintDialog::impl_initCustomTab()
for (CustomTabs_t::const_reverse_iterator aI = aCustomTabs.rbegin(); aI != aEnd; ++aI)
{
gtk_widget_show_all(aI->first);
- m_pWrapper->print_unix_dialog_add_custom_tab(GTK_PRINT_UNIX_DIALOG(m_pDialog), aI->first,
+ m_xWrapper->print_unix_dialog_add_custom_tab(GTK_PRINT_UNIX_DIALOG(m_pDialog), aI->first,
gtk_label_new(OUStringToOString(aI->second, RTL_TEXTENCODING_UTF8).getStr()));
}
}
@@ -763,10 +763,10 @@ GtkPrintDialog::impl_initPrintContent(uno::Sequence<sal_Bool> const& i_rDisabled
// the controls in the rDisabled sequence (cf. the intialization of
// the "PrintContent" UI option in SwPrintUIOptions::SwPrintUIOptions,
// sw/source/core/view/printdata.cxx)
- if (m_pWrapper->supportsPrintSelection() && !i_rDisabled[2])
+ if (m_xWrapper->supportsPrintSelection() && !i_rDisabled[2])
{
- m_pWrapper->print_unix_dialog_set_support_selection(pDialog, TRUE);
- m_pWrapper->print_unix_dialog_set_has_selection(pDialog, TRUE);
+ m_xWrapper->print_unix_dialog_set_support_selection(pDialog, TRUE);
+ m_xWrapper->print_unix_dialog_set_has_selection(pDialog, TRUE);
}
beans::PropertyValue* const pPrintContent(
@@ -788,7 +788,7 @@ GtkPrintDialog::impl_initPrintContent(uno::Sequence<sal_Bool> const& i_rDisabled
break;
case 2:
#if GTK_CHECK_VERSION(2,14,0)
- if (m_pWrapper->supportsPrintSelection())
+ if (m_xWrapper->supportsPrintSelection())
ePrintPages = GTK_PRINT_PAGES_SELECTION;
else
#endif
@@ -797,8 +797,8 @@ GtkPrintDialog::impl_initPrintContent(uno::Sequence<sal_Bool> const& i_rDisabled
default:
SAL_WARN("vcl.gtk", "unexpected selection type: " << nSelectionType);
}
- m_pWrapper->print_settings_set_print_pages(pSettings, ePrintPages);
- m_pWrapper->print_unix_dialog_set_settings(pDialog, pSettings);
+ m_xWrapper->print_settings_set_print_pages(pSettings, ePrintPages);
+ m_xWrapper->print_unix_dialog_set_settings(pDialog, pSettings);
g_object_unref(G_OBJECT(pSettings));
}
}
@@ -1038,7 +1038,7 @@ GtkPrintDialog::updateControllerPrintRange()
{
GtkPrintSettings* const pSettings(getSettings());
// TODO: use get_print_pages
- if (const gchar* const pStr = m_pWrapper->print_settings_get(pSettings, GTK_PRINT_SETTINGS_PRINT_PAGES))
+ if (const gchar* const pStr = m_xWrapper->print_settings_get(pSettings, GTK_PRINT_SETTINGS_PRINT_PAGES))
{
beans::PropertyValue* pVal = m_rController.getValue(OUString("PrintRange"));
if (!pVal)
@@ -1063,7 +1063,7 @@ GtkPrintDialog::updateControllerPrintRange()
{
OUStringBuffer sBuf;
gint num_ranges;
- const GtkPageRange* const pRanges = m_pWrapper->print_settings_get_page_ranges(pSettings, &num_ranges);
+ const GtkPageRange* const pRanges = m_xWrapper->print_settings_get_page_ranges(pSettings, &num_ranges);
for (gint i = 0; i != num_ranges && pRanges; ++i)
{
sBuf.append(sal_Int32(pRanges[i].start+1));
@@ -1103,25 +1103,25 @@ GtkPrintDialog::impl_readFromSettings()
bool bChanged(false);
- const gint nOldCopyCount(m_pWrapper->print_settings_get_n_copies(pSettings));
+ const gint nOldCopyCount(m_xWrapper->print_settings_get_n_copies(pSettings));
const sal_Int32 nCopyCount(aCopyCount.toInt32());
if (nCopyCount > 0 && nOldCopyCount != nCopyCount)
{
bChanged = true;
- m_pWrapper->print_settings_set_n_copies(pSettings, sal::static_int_cast<gint>(nCopyCount));
+ m_xWrapper->print_settings_set_n_copies(pSettings, sal::static_int_cast<gint>(nCopyCount));
}
- const bool bOldCollate(m_pWrapper->print_settings_get_collate(pSettings));
+ const bool bOldCollate(m_xWrapper->print_settings_get_collate(pSettings));
const bool bCollate(aCollate.equalsIgnoreAsciiCase("true"));
if (bOldCollate != bCollate)
{
bChanged = true;
- m_pWrapper->print_settings_set_collate(pSettings, bCollate);
+ m_xWrapper->print_settings_set_collate(pSettings, bCollate);
}
// TODO: wth was this var. meant for?
(void) bChanged;
- m_pWrapper->print_unix_dialog_set_settings(GTK_PRINT_UNIX_DIALOG(m_pDialog), pSettings);
+ m_xWrapper->print_unix_dialog_set_settings(GTK_PRINT_UNIX_DIALOG(m_pDialog), pSettings);
g_object_unref(G_OBJECT(pSettings));
}
@@ -1135,10 +1135,10 @@ const
const OUString aPrintDialogStr("PrintDialog");
pItem->setValue(aPrintDialogStr,
OUString("CopyCount"),
- OUString::number(m_pWrapper->print_settings_get_n_copies(pSettings)));
+ OUString::number(m_xWrapper->print_settings_get_n_copies(pSettings)));
pItem->setValue(aPrintDialogStr,
OUString("Collate"),
- m_pWrapper->print_settings_get_collate(pSettings)
+ m_xWrapper->print_settings_get_collate(pSettings)
? OUString("true")
: OUString("false"))
;
diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx
index 179bc4e7b4c2..670137992aa8 100644
--- a/vcl/win/source/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx
@@ -1290,12 +1290,12 @@ bool WinSalGraphics::drawNativeControl( ControlType nType,
{
pImpl->PreDraw();
- boost::scoped_ptr<OpenGLTexture> pBlackTexture(aBlackDC.getTexture());
- boost::scoped_ptr<OpenGLTexture> pWhiteTexture(aWhiteDC.getTexture());
+ std::unique_ptr<OpenGLTexture> xBlackTexture(aBlackDC.getTexture());
+ std::unique_ptr<OpenGLTexture> xWhiteTexture(aWhiteDC.getTexture());
- if (pBlackTexture && pWhiteTexture)
+ if (xBlackTexture && xWhiteTexture)
{
- pImpl->DrawTextureDiff(*pWhiteTexture, *pBlackTexture, aBlackDC.getTwoRect());
+ pImpl->DrawTextureDiff(*xWhiteTexture, *xBlackTexture, aBlackDC.getTwoRect());
bOk = true;
}
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index bcadd8d538af..a46d2cd155ec 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -217,9 +217,9 @@ void WinLayout::DrawText(SalGraphics& rGraphics) const
{
pImpl->PreDraw();
- boost::scoped_ptr<OpenGLTexture> pTexture(aDC.getTexture());
- if (pTexture)
- pImpl->DrawMask(*pTexture, salColor, aDC.getTwoRect());
+ std::unique_ptr<OpenGLTexture> xTexture(aDC.getTexture());
+ if (xTexture)
+ pImpl->DrawMask(*xTexture, salColor, aDC.getTwoRect());
pImpl->PostDraw();
}
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 05adec176ff7..f02ac0390b8e 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -1542,12 +1542,12 @@ public:
}
DemoWin aMainWin(aRenderer, bThreads);
- boost::scoped_ptr<DemoWidgets> aWidgets;
+ std::unique_ptr<DemoWidgets> xWidgets;
aMainWin.SetText("Interactive VCL demo #1");
if (bWidgets)
- aWidgets.reset(new DemoWidgets());
+ xWidgets.reset(new DemoWidgets());
else
aMainWin.Show();