diff options
Diffstat (limited to 'vcl/source/outdev')
-rw-r--r-- | vcl/source/outdev/bitmap.cxx | 6 | ||||
-rw-r--r-- | vcl/source/outdev/clipping.cxx | 4 | ||||
-rw-r--r-- | vcl/source/outdev/font.cxx | 50 | ||||
-rw-r--r-- | vcl/source/outdev/gradient.cxx | 4 | ||||
-rw-r--r-- | vcl/source/outdev/hatch.cxx | 2 | ||||
-rw-r--r-- | vcl/source/outdev/line.cxx | 2 | ||||
-rw-r--r-- | vcl/source/outdev/map.cxx | 6 | ||||
-rw-r--r-- | vcl/source/outdev/nativecontrols.cxx | 2 | ||||
-rw-r--r-- | vcl/source/outdev/outdev.cxx | 62 | ||||
-rw-r--r-- | vcl/source/outdev/outdevstate.cxx | 28 | ||||
-rw-r--r-- | vcl/source/outdev/polygon.cxx | 2 | ||||
-rw-r--r-- | vcl/source/outdev/text.cxx | 36 | ||||
-rw-r--r-- | vcl/source/outdev/transparent.cxx | 6 | ||||
-rw-r--r-- | vcl/source/outdev/wallpaper.cxx | 4 |
14 files changed, 107 insertions, 107 deletions
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx index adddcaa84dfd..c48f653c8526 100644 --- a/vcl/source/outdev/bitmap.cxx +++ b/vcl/source/outdev/bitmap.cxx @@ -937,7 +937,7 @@ void OutputDevice::DrawDeviceAlphaBitmapSlowPath(const Bitmap& rBitmap, const Al GDIMetaFile* pOldMetaFile = mpMetaFile; const bool bOldMap = mbMap; - mpMetaFile = NULL; // fdo#55044 reset before GetBitmap! + mpMetaFile = nullptr; // fdo#55044 reset before GetBitmap! mbMap = false; Bitmap aBmp(GetBitmap(aDstRect.TopLeft(), aDstRect.GetSize())); @@ -1013,7 +1013,7 @@ void OutputDevice::DrawDeviceAlphaBitmapSlowPath(const Bitmap& rBitmap, const Al // #110958# Disable alpha VDev, we're doing the necessary // stuff explicitly further below if (mpAlphaVDev) - mpAlphaVDev = NULL; + mpAlphaVDev = nullptr; DrawBitmap(aDstRect.TopLeft(), aNewBitmap); @@ -1052,7 +1052,7 @@ bool OutputDevice::DrawTransformBitmapExDirect( const basegfx::B2DPoint aTopX(aFullTransform * basegfx::B2DPoint(1.0, 0.0)); const basegfx::B2DPoint aTopY(aFullTransform * basegfx::B2DPoint(0.0, 1.0)); SalBitmap* pSalSrcBmp = rBitmapEx.GetBitmap().ImplGetImpBitmap()->ImplGetSalBitmap(); - SalBitmap* pSalAlphaBmp = 0; + SalBitmap* pSalAlphaBmp = nullptr; if(rBitmapEx.IsTransparent()) { diff --git a/vcl/source/outdev/clipping.cxx b/vcl/source/outdev/clipping.cxx index fbd26785b4b2..9396f262362b 100644 --- a/vcl/source/outdev/clipping.cxx +++ b/vcl/source/outdev/clipping.cxx @@ -43,7 +43,7 @@ void OutputDevice::SetClipRegion() if ( mpMetaFile ) mpMetaFile->AddAction( new MetaClipRegionAction( vcl::Region(), false ) ); - SetDeviceClipRegion( NULL ); + SetDeviceClipRegion( nullptr ); if( mpAlphaVDev ) mpAlphaVDev->SetClipRegion(); @@ -57,7 +57,7 @@ void OutputDevice::SetClipRegion( const vcl::Region& rRegion ) if ( rRegion.IsNull() ) { - SetDeviceClipRegion( NULL ); + SetDeviceClipRegion( nullptr ); } else { diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index 22567deaf993..3686d71ed76c 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -103,7 +103,7 @@ int OutputDevice::GetDevFontCount() const bool OutputDevice::IsFontAvailable( const OUString& rFontName ) const { PhysicalFontFamily* pFound = mpFontCollection->FindFontFamily( rFontName ); - return (pFound != NULL); + return (pFound != nullptr); } int OutputDevice::GetDevFontSizeCount( const vcl::Font& rFont ) const @@ -494,7 +494,7 @@ void OutputDevice::ImplClearFontData( const bool bNewFontLists ) if ( mpFontEntry ) { mpFontCache->Release( mpFontEntry ); - mpFontEntry = NULL; + mpFontEntry = nullptr; } mbInitFont = true; @@ -505,12 +505,12 @@ void OutputDevice::ImplClearFontData( const bool bNewFontLists ) if ( mpGetDevFontList ) { delete mpGetDevFontList; - mpGetDevFontList = NULL; + mpGetDevFontList = nullptr; } if ( mpGetDevSizeList ) { delete mpGetDevSizeList; - mpGetDevSizeList = NULL; + mpGetDevSizeList = nullptr; } // release all physically selected fonts on this device @@ -539,8 +539,8 @@ void OutputDevice::ImplClearFontData( const bool bNewFontLists ) delete mpFontCollection; if( mpFontCache && mpFontCache != pSVData->maGDIData.mpScreenFontCache ) delete mpFontCache; - mpFontCollection = 0; - mpFontCache = 0; + mpFontCollection = nullptr; + mpFontCache = nullptr; } } } @@ -985,14 +985,14 @@ ImplFontEntry::ImplFontEntry( const FontSelectPattern& rFontSelData ) : m_pFontCache(nullptr) , maFontSelData( rFontSelData ) , maMetric( rFontSelData ) - , mpConversion( NULL ) + , mpConversion( nullptr ) , mnLineHeight( 0 ) , mnRefCount( 1 ) , mnSetFontFlags( 0 ) , mnOwnOrientation( 0 ) , mnOrientation( 0 ) , mbInit( false ) - , mpUnicodeFallbackList( NULL ) + , mpUnicodeFallbackList( nullptr ) { maFontSelData.mpFontEntry = this; } @@ -1076,8 +1076,8 @@ FontSelectPatternAttributes::FontSelectPatternAttributes( const vcl::Font& rFont FontSelectPattern::FontSelectPattern( const vcl::Font& rFont, const OUString& rSearchName, const Size& rSize, float fExactHeight) : FontSelectPatternAttributes(rFont, rSearchName, rSize, fExactHeight) - , mpFontData( NULL ) - , mpFontEntry( NULL ) + , mpFontData( nullptr ) + , mpFontEntry( nullptr ) { } @@ -1243,7 +1243,7 @@ bool ImplFontCache::IFSD_Equal::operator()(const FontSelectPattern& rA, const Fo } ImplFontCache::ImplFontCache() -: mpFirstEntry( NULL ), +: mpFirstEntry( nullptr ), mnRef0Count( 0 ) {} @@ -1272,8 +1272,8 @@ ImplFontEntry* ImplFontCache::GetFontEntry( PhysicalFontCollection* pFontList, { // check if a directly matching logical font instance is already cached, // the most recently used font usually has a hit rate of >50% - ImplFontEntry *pEntry = NULL; - PhysicalFontFamily* pFontFamily = NULL; + ImplFontEntry *pEntry = nullptr; + PhysicalFontFamily* pFontFamily = nullptr; IFSD_Equal aIFSD_Equal; if( mpFirstEntry && aIFSD_Equal( aFontSelData, mpFirstEntry->maFontSelData ) ) pEntry = mpFirstEntry; @@ -1288,7 +1288,7 @@ ImplFontEntry* ImplFontCache::GetFontEntry( PhysicalFontCollection* pFontList, { // find the best matching logical font family and update font selector accordingly pFontFamily = pFontList->ImplFindByFont( aFontSelData ); - DBG_ASSERT( (pFontFamily != NULL), "ImplFontCache::Get() No logical font found!" ); + DBG_ASSERT( (pFontFamily != nullptr), "ImplFontCache::Get() No logical font found!" ); if( pFontFamily ) aFontSelData.maSearchName = pFontFamily->GetSearchName(); @@ -1301,7 +1301,7 @@ ImplFontEntry* ImplFontCache::GetFontEntry( PhysicalFontCollection* pFontList, } } - PhysicalFontFace* pFontData = NULL; + PhysicalFontFace* pFontData = nullptr; if (!pEntry && pFontFamily)// no cache hit => find the best matching physical font face { @@ -1372,7 +1372,7 @@ ImplFontEntry* ImplFontCache::GetGlyphFallbackFont( PhysicalFontCollection* pFon // e.g. PsPrint Arial->Helvetica for udiaeresis when Helvetica doesn't support it if( nFallbackLevel >= 1) { - PhysicalFontFamily* pFallbackData = NULL; + PhysicalFontFamily* pFallbackData = nullptr; //fdo#33898 If someone has EUDC installed then they really want that to //be used as the first-choice glyph fallback seeing as it's filled with @@ -1388,7 +1388,7 @@ ImplFontEntry* ImplFontCache::GetGlyphFallbackFont( PhysicalFontCollection* pFon pFallbackData = pFontCollection->GetGlyphFallbackFont(rFontSelData, rMissingCodes, nFallbackLevel-1); // escape when there are no font candidates if( !pFallbackData ) - return NULL; + return nullptr; // override the font name rFontSelData.SetFamilyName( pFallbackData->GetFamilyName() ); // clear the cached normalized name @@ -1435,7 +1435,7 @@ void ImplFontCache::Release(ImplFontEntry* pEntry) assert(mnRef0Count>=0 && "ImplFontCache::Release() - refcount0 underflow"); if( mpFirstEntry == pFontEntry ) - mpFirstEntry = NULL; + mpFirstEntry = nullptr; } assert(mnRef0Count==0 && "ImplFontCache::Release() - refcount0 mismatch"); @@ -1473,7 +1473,7 @@ void ImplFontCache::Invalidate() } // #112304# make sure the font cache is really clean - mpFirstEntry = NULL; + mpFirstEntry = nullptr; maFontInstanceList.clear(); assert(mnRef0Count==0 && "ImplFontCache::Invalidate() - mnRef0Count non-zero"); @@ -1990,7 +1990,7 @@ void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout ) Color aOldFillColor = GetFillColor(); bool bOldMap = mbMap; GDIMetaFile* pOldMetaFile = mpMetaFile; - mpMetaFile = NULL; + mpMetaFile = nullptr; EnableMapMode( false ); FontEmphasisMark nEmphasisMark = ImplGetEmphasisMarkStyle( maFont ); @@ -2084,13 +2084,13 @@ SalLayout* OutputDevice::getFallbackFont(ImplFontEntry &rFallbackFont, SalLayout* pFallback = mpGraphics->GetTextLayout( rLayoutArgs, nFallbackLevel ); if (!pFallback) - return NULL; + return nullptr; if (!pFallback->LayoutText(rLayoutArgs)) { // there is no need for a font that couldn't resolve anything pFallback->Release(); - return NULL; + return nullptr; } pFallback->AdjustLayout( rLayoutArgs ); @@ -2107,11 +2107,11 @@ SalLayout* OutputDevice::ImplGlyphFallbackLayout( SalLayout* pSalLayout, ImplLay { SAL_WARN ("vcl.gdi", "No font entry set in OutputDevice"); assert(mpFontEntry); - return NULL; + return nullptr; } // prepare multi level glyph fallback - MultiSalLayout* pMultiSalLayout = NULL; + MultiSalLayout* pMultiSalLayout = nullptr; ImplLayoutRuns aLayoutRuns = rLayoutArgs.maRuns; rLayoutArgs.PrepareFallback(); rLayoutArgs.mnFlags |= SalLayoutFlags::ForFallback; @@ -2280,7 +2280,7 @@ sal_Int32 OutputDevice::HasGlyphs( const vcl::Font& rTempFont, const OUString& r if( ! pFontCharMap->HasChar( rStr[i] ) ) return nIndex; - pFontCharMap = 0; + pFontCharMap = nullptr; return -1; } diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx index 847cce31089d..fdf6d33ba53c 100644 --- a/vcl/source/outdev/gradient.cxx +++ b/vcl/source/outdev/gradient.cxx @@ -139,9 +139,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, aClixPolyPoly.IsRect() ? NULL : &aClixPolyPoly ); + DrawLinearGradient( aRect, aGradient, aClixPolyPoly.IsRect() ? nullptr : &aClixPolyPoly ); else - DrawComplexGradient( aRect, aGradient, aClixPolyPoly.IsRect() ? NULL : &aClixPolyPoly ); + DrawComplexGradient( aRect, aGradient, aClixPolyPoly.IsRect() ? nullptr : &aClixPolyPoly ); } Pop(); diff --git a/vcl/source/outdev/hatch.cxx b/vcl/source/outdev/hatch.cxx index 484ba61dd3e4..ca8ccd1b4240 100644 --- a/vcl/source/outdev/hatch.cxx +++ b/vcl/source/outdev/hatch.cxx @@ -104,7 +104,7 @@ void OutputDevice::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& aPolyPoly.Optimize( PolyOptimizeFlags::NO_SAME ); aHatch.SetDistance( ImplLogicWidthToDevicePixel( aHatch.GetDistance() ) ); - mpMetaFile = NULL; + mpMetaFile = nullptr; EnableMapMode( false ); Push( PushFlags::LINECOLOR ); SetLineColor( aHatch.GetColor() ); diff --git a/vcl/source/outdev/line.cxx b/vcl/source/outdev/line.cxx index 2e76acf2ef7d..bf4f2f6a3c8f 100644 --- a/vcl/source/outdev/line.cxx +++ b/vcl/source/outdev/line.cxx @@ -225,7 +225,7 @@ void OutputDevice::drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const Lin } GDIMetaFile* pOldMetaFile = mpMetaFile; - mpMetaFile = NULL; + mpMetaFile = nullptr; if(aLinePolyPolygon.count()) { diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx index 70de3fb248e7..1a0b2799ab66 100644 --- a/vcl/source/outdev/map.cxx +++ b/vcl/source/outdev/map.cxx @@ -349,13 +349,13 @@ void OutputDevice::ImplInvalidateViewTransform() if(mpOutDevData->mpViewTransform) { delete mpOutDevData->mpViewTransform; - mpOutDevData->mpViewTransform = NULL; + mpOutDevData->mpViewTransform = nullptr; } if(mpOutDevData->mpInverseViewTransform) { delete mpOutDevData->mpInverseViewTransform; - mpOutDevData->mpInverseViewTransform = NULL; + mpOutDevData->mpInverseViewTransform = nullptr; } } @@ -821,7 +821,7 @@ void OutputDevice::SetRelativeMapMode( const MapMode& rNewMapMode ) rNewMapMode.GetScaleY().GetDenominator(), maMapMode.GetScaleY().GetNumerator() ); - Point aPt( LogicToLogic( Point(), NULL, &rNewMapMode ) ); + Point aPt( LogicToLogic( Point(), nullptr, &rNewMapMode ) ); if ( eNew != eOld ) { if ( eOld > MAP_PIXEL ) diff --git a/vcl/source/outdev/nativecontrols.cxx b/vcl/source/outdev/nativecontrols.cxx index ae036d6d0193..650d08af2cc5 100644 --- a/vcl/source/outdev/nativecontrols.cxx +++ b/vcl/source/outdev/nativecontrols.cxx @@ -53,7 +53,7 @@ static bool EnableNativeWidget( const OutputDevice& i_rDevice ) { const vcl::ExtOutDevData* pOutDevData( i_rDevice.GetExtOutDevData() ); const vcl::PDFExtOutDevData* pPDFData( dynamic_cast< const vcl::PDFExtOutDevData* >( pOutDevData ) ); - if ( pPDFData != NULL ) + if ( pPDFData != nullptr ) return false; return true; } diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx index 4f13a3d86902..b343f502e0fe 100644 --- a/vcl/source/outdev/outdev.cxx +++ b/vcl/source/outdev/outdev.cxx @@ -88,20 +88,20 @@ OutputDevice::OutputDevice() : maTextLineColor( COL_TRANSPARENT ), mxSettings( new AllSettings(Application::GetSettings()) ) { - mpGraphics = NULL; - mpUnoGraphicsList = NULL; - mpPrevGraphics = NULL; - mpNextGraphics = NULL; - mpMetaFile = NULL; - mpFontEntry = NULL; - mpFontCache = NULL; - mpFontCollection = NULL; - mpGetDevFontList = NULL; - mpGetDevSizeList = NULL; + mpGraphics = nullptr; + mpUnoGraphicsList = nullptr; + mpPrevGraphics = nullptr; + mpNextGraphics = nullptr; + mpMetaFile = nullptr; + mpFontEntry = nullptr; + mpFontCache = nullptr; + mpFontCollection = nullptr; + mpGetDevFontList = nullptr; + mpGetDevSizeList = nullptr; mpOutDevStateStack = new OutDevStateStack; - mpPDFWriter = NULL; - mpAlphaVDev = NULL; - mpExtOutDevData = NULL; + mpPDFWriter = nullptr; + mpAlphaVDev = nullptr; + mpExtOutDevData = nullptr; mnOutOffX = 0; mnOutOffY = 0; mnOutWidth = 0; @@ -172,12 +172,12 @@ OutputDevice::OutputDevice() : // struct ImplOutDevData- see #i82615# mpOutDevData = new ImplOutDevData; - mpOutDevData->mpRotateDev = NULL; - mpOutDevData->mpRecordLayout = NULL; + mpOutDevData->mpRotateDev = nullptr; + mpOutDevData->mpRecordLayout = nullptr; // #i75163# - mpOutDevData->mpViewTransform = NULL; - mpOutDevData->mpInverseViewTransform = NULL; + mpOutDevData->mpViewTransform = nullptr; + mpOutDevData->mpInverseViewTransform = nullptr; mbDisposed = false; } @@ -210,7 +210,7 @@ void OutputDevice::dispose() if ( pWrapper ) pWrapper->ReleaseAllGraphics( this ); delete mpUnoGraphicsList; - mpUnoGraphicsList = NULL; + mpUnoGraphicsList = nullptr; } mpOutDevData->mpRotateDev.disposeAndClear(); @@ -219,7 +219,7 @@ void OutputDevice::dispose() ImplInvalidateViewTransform(); delete mpOutDevData; - mpOutDevData = NULL; + mpOutDevData = nullptr; // for some reason, we haven't removed state from the stack properly if ( !mpOutDevStateStack->empty() ) @@ -231,7 +231,7 @@ void OutputDevice::dispose() } } delete mpOutDevStateStack; - mpOutDevStateStack = NULL; + mpOutDevStateStack = nullptr; // release the active font instance if( mpFontEntry ) @@ -240,30 +240,30 @@ void OutputDevice::dispose() // remove cached results of GetDevFontList/GetDevSizeList // TODO: use smart pointers for them delete mpGetDevFontList; - mpGetDevFontList = NULL; + mpGetDevFontList = nullptr; delete mpGetDevSizeList; - mpGetDevSizeList = NULL; + mpGetDevSizeList = nullptr; // release ImplFontCache specific to this OutputDevice // TODO: refcount ImplFontCache if( mpFontCache && (mpFontCache != ImplGetSVData()->maGDIData.mpScreenFontCache) - && (ImplGetSVData()->maGDIData.mpScreenFontCache != NULL) ) + && (ImplGetSVData()->maGDIData.mpScreenFontCache != nullptr) ) { delete mpFontCache; - mpFontCache = NULL; + mpFontCache = nullptr; } // release ImplFontList specific to this OutputDevice // TODO: refcount ImplFontList if( mpFontCollection && (mpFontCollection != ImplGetSVData()->maGDIData.mpScreenFontList) - && (ImplGetSVData()->maGDIData.mpScreenFontList != NULL) ) + && (ImplGetSVData()->maGDIData.mpScreenFontList != nullptr) ) { mpFontCollection->Clear(); delete mpFontCollection; - mpFontCollection = NULL; + mpFontCollection = nullptr; } mpAlphaVDev.disposeAndClear(); @@ -516,7 +516,7 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize, AdjustTwoRect( aPosAry, aSrcOutRect ); if ( aPosAry.mnSrcWidth && aPosAry.mnSrcHeight && aPosAry.mnDestWidth && aPosAry.mnDestHeight ) - mpGraphics->CopyBits( aPosAry, NULL, this, NULL ); + mpGraphics->CopyBits( aPosAry, nullptr, this, nullptr ); } if( mpAlphaVDev ) @@ -649,7 +649,7 @@ void OutputDevice::CopyDeviceArea( SalTwoRect& aPosAry, bool /*bWindowInvalidate aPosAry.mnDestWidth = aPosAry.mnSrcWidth; aPosAry.mnDestHeight = aPosAry.mnSrcHeight; - mpGraphics->CopyBits(aPosAry, NULL, this, NULL); + mpGraphics->CopyBits(aPosAry, nullptr, this, nullptr); } // Direct OutputDevice drawing private function @@ -659,7 +659,7 @@ void OutputDevice::drawOutDevDirect( const OutputDevice* pSrcDev, SalTwoRect& rP SalGraphics* pSrcGraphics; if ( this == pSrcDev ) - pSrcGraphics = NULL; + pSrcGraphics = nullptr; else { if ( (GetOutDevType() != pSrcDev->GetOutDevType()) || @@ -675,7 +675,7 @@ void OutputDevice::drawOutDevDirect( const OutputDevice* pSrcDev, SalTwoRect& rP else { if ( static_cast<vcl::Window*>(this)->mpWindowImpl->mpFrameWindow == static_cast<const vcl::Window*>(pSrcDev)->mpWindowImpl->mpFrameWindow ) - pSrcGraphics = NULL; + pSrcGraphics = nullptr; else { if ( !pSrcDev->mpGraphics ) @@ -833,7 +833,7 @@ bool OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize, { GDIMetaFile* pOldMetaFile = mpMetaFile; - mpMetaFile = NULL; + mpMetaFile = nullptr; Graphic( *pSubst ).Draw( this, rPoint, rSize ); mpMetaFile = pOldMetaFile; } diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx index ad8e8aef9f1d..aa3de62f881d 100644 --- a/vcl/source/outdev/outdevstate.cxx +++ b/vcl/source/outdev/outdevstate.cxx @@ -40,17 +40,17 @@ #include "sallayout.hxx" OutDevState::OutDevState() - : mpMapMode(0) + : mpMapMode(nullptr) , mbMapActive(false) - , mpClipRegion(0) - , mpLineColor(0) - , mpFillColor(0) - , mpFont(0) - , mpTextColor(0) - , mpTextFillColor(0) - , mpTextLineColor(0) - , mpOverlineColor(0) - , mpRefPoint(0) + , mpClipRegion(nullptr) + , mpLineColor(nullptr) + , mpFillColor(nullptr) + , mpFont(nullptr) + , mpTextColor(nullptr) + , mpTextFillColor(nullptr) + , mpTextLineColor(nullptr) + , mpOverlineColor(nullptr) + , mpRefPoint(nullptr) , meTextAlign(ALIGN_TOP) , meRasterOp(ROP_OVERPAINT) , mnTextLayoutMode(TEXT_LAYOUT_DEFAULT) @@ -142,7 +142,7 @@ void OutputDevice::Pop() mpMetaFile->AddAction( new MetaPopAction() ); GDIMetaFile* pOldMetaFile = mpMetaFile; - mpMetaFile = NULL; + mpMetaFile = nullptr; if ( mpOutDevStateStack->empty() ) { @@ -636,19 +636,19 @@ void OutputDevice::ImplReleaseFonts() if ( mpFontEntry ) { mpFontCache->Release( mpFontEntry ); - mpFontEntry = NULL; + mpFontEntry = nullptr; } if ( mpGetDevFontList ) { delete mpGetDevFontList; - mpGetDevFontList = NULL; + mpGetDevFontList = nullptr; } if ( mpGetDevSizeList ) { delete mpGetDevSizeList; - mpGetDevSizeList = NULL; + mpGetDevSizeList = nullptr; } } diff --git a/vcl/source/outdev/polygon.cxx b/vcl/source/outdev/polygon.cxx index dca527b004ee..563a4b2454da 100644 --- a/vcl/source/outdev/polygon.cxx +++ b/vcl/source/outdev/polygon.cxx @@ -114,7 +114,7 @@ void OutputDevice::DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly ) if( aPoly.GetSize() >= 2 ) { GDIMetaFile* pOldMF = mpMetaFile; - mpMetaFile = NULL; + mpMetaFile = nullptr; DrawPolygon( aPoly ); diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index dc1bcfcbacb1..9a745bea0db5 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -275,7 +275,7 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout ) mnOutOffX = 0L; mnOutOffY = 0L; - mpMetaFile = NULL; + mpMetaFile = nullptr; EnableMapMode( false ); DrawMask( aPoint, aBmp, GetTextColor() ); @@ -929,7 +929,7 @@ long OutputDevice::GetTextWidth( const OUString& rStr, sal_Int32 nIndex, sal_Int vcl::TextLayoutCache const*const pLayoutCache) const { - long nWidth = GetTextArray( rStr, NULL, nIndex, nLen, pLayoutCache ); + long nWidth = GetTextArray( rStr, nullptr, nIndex, nLen, pLayoutCache ); return nWidth; } @@ -1318,12 +1318,12 @@ SalLayout* OutputDevice::ImplLayout(const OUString& rOrigStr, // we need a graphics if( !mpGraphics ) if( !AcquireGraphics() ) - return NULL; + return nullptr; // initialize font if needed if( mbNewFont ) if( !ImplNewFont() ) - return NULL; + return nullptr; if( mbInitFont ) InitFont(); @@ -1332,7 +1332,7 @@ SalLayout* OutputDevice::ImplLayout(const OUString& rOrigStr, { const sal_Int32 nNewLen = rOrigStr.getLength() - nMinIndex; if( nNewLen <= 0 ) - return NULL; + return nullptr; nLen = nNewLen; } @@ -1391,11 +1391,11 @@ SalLayout* OutputDevice::ImplLayout(const OUString& rOrigStr, if( pSalLayout && !pSalLayout->LayoutText( aLayoutArgs ) ) { pSalLayout->Release(); - pSalLayout = NULL; + pSalLayout = nullptr; } if( !pSalLayout ) - return NULL; + return nullptr; // do glyph fallback if needed // #105768# avoid fallback for very small font sizes @@ -1442,7 +1442,7 @@ std::shared_ptr<vcl::TextLayoutCache> OutputDevice::CreateTextLayoutCache( bool OutputDevice::GetTextIsRTL( const OUString& rString, sal_Int32 nIndex, sal_Int32 nLen ) const { OUString aStr( rString ); - ImplLayoutArgs aArgs = ImplPrepareLayoutArgs( aStr, nIndex, nLen, 0, NULL ); + ImplLayoutArgs aArgs = ImplPrepareLayoutArgs( aStr, nIndex, nLen, 0, nullptr ); bool bRTL = false; int nCharPos = -1; if (!aArgs.GetNextPos(&nCharPos, &bRTL)) @@ -1832,7 +1832,7 @@ void OutputDevice::AddTextRectActions( const Rectangle& rRect, // #i47157# Factored out to ImplDrawTextRect(), to be shared // between us and DrawText() vcl::DefaultTextLayout aLayout( *this ); - ImplDrawText( *this, rRect, rOrigStr, nStyle, NULL, NULL, aLayout ); + ImplDrawText( *this, rRect, rOrigStr, nStyle, nullptr, nullptr, aLayout ); // and restore again EnableOutput( bOutputEnabled ); @@ -1851,7 +1851,7 @@ void OutputDevice::DrawText( const Rectangle& rRect, const OUString& rOrigStr, D pDisplayText = &mpOutDevData->mpRecordLayout->m_aDisplayText; } - bool bDecomposeTextRectAction = ( _pTextLayout != NULL ) && _pTextLayout->DecomposeTextRectAction(); + bool bDecomposeTextRectAction = ( _pTextLayout != nullptr ) && _pTextLayout->DecomposeTextRectAction(); if ( mpMetaFile && !bDecomposeTextRectAction ) mpMetaFile->AddAction( new MetaTextRectAction( rRect, rOrigStr, nStyle ) ); @@ -1870,7 +1870,7 @@ void OutputDevice::DrawText( const Rectangle& rRect, const OUString& rOrigStr, D // create MetaActionType::TEXTs otherwise) GDIMetaFile* pMtf = mpMetaFile; if ( !bDecomposeTextRectAction ) - mpMetaFile = NULL; + mpMetaFile = nullptr; // #i47157# Factored out to ImplDrawText(), to be used also // from AddTextRectActions() @@ -2063,7 +2063,7 @@ OUString OutputDevice::ImplGetEllipsisString( const OutputDevice& rTargetDevice, { OUString aPath( rOrigStr ); OUString aAbbreviatedPath; - osl_abbreviateSystemPath( aPath.pData, &aAbbreviatedPath.pData, nIndex, NULL ); + osl_abbreviateSystemPath( aPath.pData, &aAbbreviatedPath.pData, nIndex, nullptr ); aStr = aAbbreviatedPath; } else if ( nStyle & DrawTextFlags::NewsEllipsis ) @@ -2449,7 +2449,7 @@ bool OutputDevice::GetTextBoundRect( Rectangle& rRect, bool bRet = false; rRect.SetEmpty(); - SalLayout* pSalLayout = NULL; + SalLayout* pSalLayout = nullptr; const Point aPoint; // calculate offset when nBase!=nIndex long nXOffset = 0; @@ -2653,7 +2653,7 @@ bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector, const_cast<OutputDevice&>(*this).mbNewFont = true; } - SalLayout* pSalLayout = NULL; + SalLayout* pSalLayout = nullptr; // calculate offset when nBase!=nIndex long nXOffset = 0; @@ -2725,7 +2725,7 @@ bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector, // fall back to bitmap method to get the bounding rectangle, // so we need a monochrome virtual device with matching font pSalLayout = ImplLayout( rStr, nIndex, nLen, Point(0,0), nLayoutWidth, pDXArray ); - if (pSalLayout == 0) + if (pSalLayout == nullptr) return false; long nOrgWidth = pSalLayout->GetTextWidth(); long nOrgHeight = mpFontEntry->mnLineHeight + mnEmphasisAscent @@ -2750,7 +2750,7 @@ bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector, aVDev->SetTextFillColor(); pSalLayout = aVDev->ImplLayout( rStr, nIndex, nLen, Point(0,0), nLayoutWidth, pDXArray ); - if (pSalLayout == 0) + if (pSalLayout == nullptr) return false; long nWidth = pSalLayout->GetTextWidth(); long nHeight = aVDev->mpFontEntry->mnLineHeight + aVDev->mnEmphasisAscent + @@ -2784,14 +2784,14 @@ bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector, OUString aStr( rStr ); // prepare for e.g. localized digits sal_Int32 nIndex2 = nIndex; // only needed until nIndex is sal_Int32 sal_Int32 nLen2 = nLen; // only needed until nLen is sal_Int32 - ImplLayoutArgs aLayoutArgs = ImplPrepareLayoutArgs( aStr, nIndex2, nLen2, 0, NULL ); + ImplLayoutArgs aLayoutArgs = ImplPrepareLayoutArgs( aStr, nIndex2, nLen2, 0, nullptr ); for( int nCharPos = -1; aLayoutArgs.GetNextPos( &nCharPos, &bRTL);) { bool bSuccess = false; // draw character into virtual device pSalLayout = aVDev->ImplLayout( rStr, nCharPos, 1, Point(0,0), nLayoutWidth, pDXArray ); - if (pSalLayout == 0) + if (pSalLayout == nullptr) return false; long nCharWidth = pSalLayout->GetTextWidth(); diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx index 38df3311f885..cbe7cd1833b4 100644 --- a/vcl/source/outdev/transparent.cxx +++ b/vcl/source/outdev/transparent.cxx @@ -374,10 +374,10 @@ void OutputDevice::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly, // operation explicitly further below. if( mpAlphaVDev ) - mpAlphaVDev = NULL; + mpAlphaVDev = nullptr; GDIMetaFile* pOldMetaFile = mpMetaFile; - mpMetaFile = NULL; + mpMetaFile = nullptr; tools::PolyPolygon aPolyPoly( LogicToPixel( rPolyPoly ) ); Rectangle aPolyRect( aPolyPoly.GetBoundRect() ); @@ -678,7 +678,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, Point aPoint; Rectangle aDstRect( aPoint, GetOutputSizePixel() ); - mpMetaFile = NULL; + mpMetaFile = nullptr; aDstRect.Intersection( aOutRect ); ClipToPaintRegion( aDstRect ); diff --git a/vcl/source/outdev/wallpaper.cxx b/vcl/source/outdev/wallpaper.cxx index 175f0d199eda..d2c01dbeb25e 100644 --- a/vcl/source/outdev/wallpaper.cxx +++ b/vcl/source/outdev/wallpaper.cxx @@ -180,7 +180,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY, aSize = Size( nWidth, nHeight ); } - mpMetaFile = NULL; + mpMetaFile = nullptr; EnableMapMode( false ); Push( PushFlags::CLIPREGION ); IntersectClipRegion( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) ); @@ -355,7 +355,7 @@ void OutputDevice::DrawGradientWallpaper( long nX, long nY, aBound = Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ); - mpMetaFile = NULL; + mpMetaFile = nullptr; EnableMapMode( false ); Push( PushFlags::CLIPREGION ); IntersectClipRegion( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) ); |