diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-15 20:41:33 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-16 12:54:44 +0000 |
commit | a1ceacc17e3f30d5e9c06b3218ad8ec26ca2f1b9 (patch) | |
tree | 56a29f66f75f326a0a677ab1697ce28f1bc9fcbf /vcl/source | |
parent | 18f41dfaf19d656d290c47d196ef2702e169a522 (diff) |
boost::foo_ptr->std::foo_ptr
Change-Id: I9219619b538b6530a89f5932ac51eb3b62eb396a
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/app/dbggui.cxx | 5 | ||||
-rw-r--r-- | vcl/source/app/session.cxx | 31 | ||||
-rw-r--r-- | vcl/source/edit/texteng.cxx | 6 | ||||
-rw-r--r-- | vcl/source/edit/vclmedit.cxx | 3 | ||||
-rw-r--r-- | vcl/source/filter/graphicfilter.cxx | 24 | ||||
-rw-r--r-- | vcl/source/filter/wmf/winmtf.hxx | 3 | ||||
-rw-r--r-- | vcl/source/gdi/bitmapex.cxx | 96 | ||||
-rw-r--r-- | vcl/source/gdi/embeddedfontshelper.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/gfxlink.cxx | 24 | ||||
-rw-r--r-- | vcl/source/gdi/image.cxx | 5 | ||||
-rw-r--r-- | vcl/source/gdi/impanmvw.cxx | 19 | ||||
-rw-r--r-- | vcl/source/gdi/impgraph.cxx | 52 | ||||
-rw-r--r-- | vcl/source/gdi/impvect.cxx | 41 | ||||
-rw-r--r-- | vcl/source/gdi/pdfextoutdevdata.cxx | 8 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter.cxx | 168 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl2.cxx | 52 | ||||
-rw-r--r-- | vcl/source/gdi/salgdilayout.cxx | 6 | ||||
-rw-r--r-- | vcl/source/opengl/OpenGLContext.cxx | 26 | ||||
-rw-r--r-- | vcl/source/outdev/gradient.cxx | 74 | ||||
-rw-r--r-- | vcl/source/outdev/transparent.cxx | 84 | ||||
-rw-r--r-- | vcl/source/window/openglwin.cxx | 12 |
21 files changed, 368 insertions, 377 deletions
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&) |