summaryrefslogtreecommitdiff
path: root/vcl/source/gdi
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-01 08:33:09 +0200
committerNoel Grandin <noel@peralex.com>2015-04-01 10:37:02 +0200
commit3e672693e35e720177eac98094c42570fca9cfbb (patch)
treec9ef0c732ca293a4b26037a72cd6e612dfaa4ac5 /vcl/source/gdi
parentedc189dbfac35d9a587ec50d0f382bb66444eca8 (diff)
loplugin:staticfunction
Change-Id: I909cf7e77f9d7194575636248196fda311fffdb6
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r--vcl/source/gdi/alpha.cxx2
-rw-r--r--vcl/source/gdi/bitmap.cxx20
-rw-r--r--vcl/source/gdi/bitmap3.cxx4
-rw-r--r--vcl/source/gdi/bitmap4.cxx12
-rw-r--r--vcl/source/gdi/bmpfast.cxx18
-rw-r--r--vcl/source/gdi/impvect.cxx2
-rw-r--r--vcl/source/gdi/impvect.hxx14
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx4
-rw-r--r--vcl/source/gdi/sallayout.cxx6
9 files changed, 41 insertions, 41 deletions
diff --git a/vcl/source/gdi/alpha.cxx b/vcl/source/gdi/alpha.cxx
index 1a26072df8b8..ad1b5cc744e1 100644
--- a/vcl/source/gdi/alpha.cxx
+++ b/vcl/source/gdi/alpha.cxx
@@ -100,7 +100,7 @@ bool AlphaMask::Replace( const Bitmap& rMask, sal_uInt8 cReplaceTransparency )
pAcc->SetPixel( nY, nX, aReplace );
}
- ( (Bitmap&) rMask ).ReleaseAccess( pMaskAcc );
+ Bitmap::ReleaseAccess( pMaskAcc );
ReleaseAccess( pAcc );
return bRet;
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index 71ae7a3ddba8..3df5896513ed 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -702,7 +702,7 @@ bool Bitmap::Rotate( long nAngle10, const Color& rFillColor )
pWriteAcc->SetPixel( nY, nX, pReadAcc->GetPixel( nOtherY--, nOtherX ) );
}
- aNewBmp.ReleaseAccess( pWriteAcc );
+ Bitmap::ReleaseAccess( pWriteAcc );
}
aRotatedBmp = aNewBmp;
@@ -772,7 +772,7 @@ bool Bitmap::Rotate( long nAngle10, const Color& rFillColor )
}
}
- aNewBmp.ReleaseAccess( pWriteAcc );
+ Bitmap::ReleaseAccess( pWriteAcc );
}
aRotatedBmp = aNewBmp;
@@ -818,7 +818,7 @@ bool Bitmap::Crop( const Rectangle& rRectPixel )
for( long nX = 0, nX2 = nOldX; nX < nNewWidth; nX++, nX2++ )
pWriteAcc->SetPixel( nY, nX, pReadAcc->GetPixel( nY2, nX2 ) );
- aNewBmp.ReleaseAccess( pWriteAcc );
+ Bitmap::ReleaseAccess( pWriteAcc );
bRet = true;
}
@@ -899,7 +899,7 @@ bool Bitmap::CopyPixel( const Rectangle& rRectDst,
}
if( pSrcAcc )
- pSrc->ReleaseAccess( pSrcAcc );
+ Bitmap::ReleaseAccess( pSrcAcc );
if( pDstAcc )
ReleaseAccess( pDstAcc );
@@ -953,7 +953,7 @@ bool Bitmap::CopyPixel( const Rectangle& rRectDst,
bRet = ( nWidth > 0L ) && ( nHeight > 0L );
}
- pSrc->ReleaseAccess( pReadAcc );
+ Bitmap::ReleaseAccess( pReadAcc );
}
}
}
@@ -1060,7 +1060,7 @@ bool Bitmap::CopyPixel_AlphaOptimized( const Rectangle& rRectDst, const Rectangl
bRet = ( nWidth > 0L ) && ( nHeight > 0L );
}
- pSrc->ReleaseAccess( pReadAcc );
+ Bitmap::ReleaseAccess( pReadAcc );
}
}
}
@@ -1168,7 +1168,7 @@ bool Bitmap::Expand( sal_uLong nDX, sal_uLong nDY, const Color* pInitColor )
for( nX = 0; nX < nNewWidth; nX++ )
pWriteAcc->SetPixel( nY, nX, aColor );
- aNewBmp.ReleaseAccess( pWriteAcc );
+ Bitmap::ReleaseAccess( pWriteAcc );
bRet = true;
}
@@ -1543,7 +1543,7 @@ bool Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor )
bRet = true;
}
- ( (Bitmap&) rMask ).ReleaseAccess( pMaskAcc );
+ Bitmap::ReleaseAccess( pMaskAcc );
ReleaseAccess( pAcc );
return bRet;
@@ -1577,7 +1577,7 @@ bool Bitmap::Replace( const AlphaMask& rAlpha, const Color& rMergeColor )
ReleaseAccess( pAcc );
( (AlphaMask&) rAlpha ).ReleaseAccess( pAlphaAcc );
- aNewBmp.ReleaseAccess( pNewAcc );
+ Bitmap::ReleaseAccess( pNewAcc );
if( bRet )
{
@@ -1921,7 +1921,7 @@ bool Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine )
bRet = true;
}
- ( (Bitmap&) rMask ).ReleaseAccess( pMaskAcc );
+ Bitmap::ReleaseAccess( pMaskAcc );
ReleaseAccess( pAcc );
return bRet;
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index 5bf275d98832..60ed14d9f3ae 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -2447,12 +2447,12 @@ void Bitmap::ImplMedianCut( sal_uLong* pColBuf, BitmapPalette& rPal,
bool Bitmap::Vectorize( tools::PolyPolygon& rPolyPoly, sal_uLong nFlags, const Link* pProgress )
{
- return ImplVectorizer().ImplVectorize( *this, rPolyPoly, nFlags, pProgress );
+ return ImplVectorizer::ImplVectorize( *this, rPolyPoly, nFlags, pProgress );
}
bool Bitmap::Vectorize( GDIMetaFile& rMtf, sal_uInt8 cReduce, sal_uLong nFlags, const Link* pProgress )
{
- return ImplVectorizer().ImplVectorize( *this, rMtf, cReduce, nFlags, pProgress );
+ return ImplVectorizer::ImplVectorize( *this, rMtf, cReduce, nFlags, pProgress );
}
bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
diff --git a/vcl/source/gdi/bitmap4.cxx b/vcl/source/gdi/bitmap4.cxx
index e4b15f14793c..d5dc4705111a 100644
--- a/vcl/source/gdi/bitmap4.cxx
+++ b/vcl/source/gdi/bitmap4.cxx
@@ -234,7 +234,7 @@ bool Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor,
delete[] pColm;
delete[] pRows;
- aNewBmp.ReleaseAccess( pWriteAcc );
+ Bitmap::ReleaseAccess( pWriteAcc );
bRet = true;
}
@@ -363,7 +363,7 @@ bool Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Lin
delete[] pColm;
delete[] pRows;
- aNewBmp.ReleaseAccess( pWriteAcc );
+ Bitmap::ReleaseAccess( pWriteAcc );
bRet = true;
}
@@ -489,7 +489,7 @@ bool Bitmap::ImplSobelGrey( const BmpFilterParam* /*pFilterParam*/, const Link*
delete[] pHMap;
delete[] pVMap;
- aNewBmp.ReleaseAccess( pWriteAcc );
+ Bitmap::ReleaseAccess( pWriteAcc );
bRet = true;
}
@@ -601,7 +601,7 @@ bool Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* /*p
delete[] pHMap;
delete[] pVMap;
- aNewBmp.ReleaseAccess( pWriteAcc );
+ Bitmap::ReleaseAccess( pWriteAcc );
bRet = true;
}
@@ -735,7 +735,7 @@ bool Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pProgr
}
}
- aNewBmp.ReleaseAccess( pWriteAcc );
+ Bitmap::ReleaseAccess( pWriteAcc );
bRet = true;
}
@@ -899,7 +899,7 @@ bool Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProg
if( pNewBmp )
{
- pNewBmp->ReleaseAccess( pWriteAcc );
+ Bitmap::ReleaseAccess( pWriteAcc );
if( bRet )
{
diff --git a/vcl/source/gdi/bmpfast.cxx b/vcl/source/gdi/bmpfast.cxx
index ff51c23dedd9..eba1f92d2e31 100644
--- a/vcl/source/gdi/bmpfast.cxx
+++ b/vcl/source/gdi/bmpfast.cxx
@@ -63,8 +63,8 @@ public:
PIXBYTE GetRed() const { return mpPixel[0]; }
PIXBYTE GetGreen() const { return mpPixel[1]; }
PIXBYTE GetBlue() const { return mpPixel[2]; }
- PIXBYTE GetAlpha() const { return 0; }
- void SetAlpha( PIXBYTE ) const {}
+ static PIXBYTE GetAlpha() { return 0; }
+ static void SetAlpha( PIXBYTE ) {}
void SetColor( PIXBYTE r, PIXBYTE g, PIXBYTE b ) const
{
@@ -83,8 +83,8 @@ public:
PIXBYTE GetRed() const { return mpPixel[2]; }
PIXBYTE GetGreen() const { return mpPixel[1]; }
PIXBYTE GetBlue() const { return mpPixel[0]; }
- PIXBYTE GetAlpha() const { return 0; }
- void SetAlpha( PIXBYTE ) const {}
+ static PIXBYTE GetAlpha() { return 0; }
+ static void SetAlpha( PIXBYTE ) {}
void SetColor( PIXBYTE r, PIXBYTE g, PIXBYTE b ) const
{
@@ -184,8 +184,8 @@ public:
PIXBYTE GetRed() const { return (mpPixel[0] & 0xF8U); }
PIXBYTE GetGreen() const { return (mpPixel[0]<<5U) | ((mpPixel[1]>>3U)&28U); }
PIXBYTE GetBlue() const { return (mpPixel[1]<<3U); }
- PIXBYTE GetAlpha() const { return 0; }
- void SetAlpha( PIXBYTE ) const {}
+ static PIXBYTE GetAlpha() { return 0; }
+ static void SetAlpha( PIXBYTE ) {}
void SetColor( PIXBYTE r, PIXBYTE g, PIXBYTE b ) const
{
@@ -204,8 +204,8 @@ public:
PIXBYTE GetRed() const { return (mpPixel[1] & 0xF8U); }
PIXBYTE GetGreen() const { return (mpPixel[1]<<5U) | ((mpPixel[0]>>3U)&28U); }
PIXBYTE GetBlue() const { return (mpPixel[0]<<3U); }
- PIXBYTE GetAlpha() const { return 0; }
- void SetAlpha( PIXBYTE ) const {}
+ static PIXBYTE GetAlpha() { return 0; }
+ static void SetAlpha( PIXBYTE ) {}
void SetColor( PIXBYTE r, PIXBYTE g, PIXBYTE b ) const
{
@@ -221,7 +221,7 @@ public:
void operator++() { mpPixel += 1; }
PIXBYTE GetAlpha() const { return mpPixel[0]; }
void SetAlpha( PIXBYTE a ) const { mpPixel[0] = a; }
- void SetColor( PIXBYTE, PIXBYTE, PIXBYTE ) const {}
+ static void SetColor( PIXBYTE, PIXBYTE, PIXBYTE ) {}
};
// TODO: for some reason many Alpha maps are BMP_FORMAT_8BIT_PAL
diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx
index 30cc1021fbf4..024d53f154a7 100644
--- a/vcl/source/gdi/impvect.cxx
+++ b/vcl/source/gdi/impvect.cxx
@@ -1059,7 +1059,7 @@ bool ImplVectorizer::ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, Im
return true;
}
-bool ImplVectorizer::ImplIsUp( ImplVectMap* pMap, long nY, long nX ) const
+bool ImplVectorizer::ImplIsUp( ImplVectMap* pMap, long nY, long nX )
{
if( pMap->IsDone( nY - 1L, nX ) )
return true;
diff --git a/vcl/source/gdi/impvect.hxx b/vcl/source/gdi/impvect.hxx
index f36f3c169067..0051bef68bab 100644
--- a/vcl/source/gdi/impvect.hxx
+++ b/vcl/source/gdi/impvect.hxx
@@ -33,20 +33,20 @@ class ImplVectorizer
{
private:
- ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor );
- void ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPolyPoly, sal_uInt8 cReduce, sal_uLong nFlags );
- bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain );
- bool ImplIsUp( ImplVectMap* pMap, long nY, long nX ) const;
- void ImplLimitPolyPoly( tools::PolyPolygon& rPolyPoly );
+ static ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor );
+ static void ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPolyPoly, sal_uInt8 cReduce, sal_uLong nFlags );
+ static bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain );
+ static bool ImplIsUp( ImplVectMap* pMap, long nY, long nX );
+ static void ImplLimitPolyPoly( tools::PolyPolygon& rPolyPoly );
public:
ImplVectorizer();
~ImplVectorizer();
- bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
+ static bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
sal_uInt8 cReduce, sal_uLong nFlags, const Link* pProgress );
- bool ImplVectorize( const Bitmap& rMonoBmp, tools::PolyPolygon& rPolyPoly,
+ static bool ImplVectorize( const Bitmap& rMonoBmp, tools::PolyPolygon& rPolyPoly,
sal_uLong nFlags, const Link* pProgress );
};
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index a85e7515e513..eabf0c1b8c1d 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -9135,7 +9135,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
if( !rLayout.GetNextGlyphs( 1, &aGlyphId, aPos, nStart, &nAdvance ) )
break;
- if( !rLayout.IsSpacingGlyph( aGlyphId ) )
+ if( !SalLayout::IsSpacingGlyph( aGlyphId ) )
{
if( !nWidth )
aStartPt = aPos;
@@ -9235,7 +9235,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
if( !rLayout.GetNextGlyphs( 1, &aGlyphId, aPos, nStart, &nAdvance ) )
break;
- if( !rLayout.IsSpacingGlyph( aGlyphId ) )
+ if( !SalLayout::IsSpacingGlyph( aGlyphId ) )
{
Point aAdjOffset = aOffset;
aAdjOffset.X() += (nAdvance - nEmphWidth) / 2;
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 82d87c322caf..15883f4e7e0e 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -807,7 +807,7 @@ bool SalLayout::GetBoundRect( SalGraphics& rSalGraphics, Rectangle& rRect ) cons
return bRet;
}
-bool SalLayout::IsSpacingGlyph( sal_GlyphId nGlyph ) const
+bool SalLayout::IsSpacingGlyph( sal_GlyphId nGlyph )
{
bool bRet = false;
if( nGlyph & GF_ISCHAR )
@@ -1674,7 +1674,7 @@ void MultiSalLayout::AdjustLayout( ImplLayoutArgs& rArgs )
mpLayouts[n]->AdjustLayout( aMultiArgs );
// disable glyph-injection for glyph-fallback SalLayout iteration
- mpLayouts[n]->DisableGlyphInjection( true );
+ SalLayout::DisableGlyphInjection( true );
// remove unused parts of component
if( n > 0 )
@@ -1933,7 +1933,7 @@ void MultiSalLayout::AdjustLayout( ImplLayoutArgs& rArgs )
// reenable glyph-injection
for( n = 0; n < mnLevel; ++n )
- mpLayouts[n]->DisableGlyphInjection( false );
+ SalLayout::DisableGlyphInjection( false );
}
void MultiSalLayout::InitFont() const