From eaf0c263eb1a72a58d2a67cc0506ab022d7c4be4 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 12 Oct 2018 17:12:22 +0200 Subject: loplugin:staticconstfield improvements And fix ScXMLCachedRowAttrAccess::Cache which was never setting its mnTab field, and hence would never be hit. And fix oox::xls::CellBlockBuffer, which was never setting mnCurrRow. Change-Id: I2c46aa050b9ebe3c2dc2e52579555f97945dd61c Reviewed-on: https://gerrit.libreoffice.org/61772 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vcl/source/gdi/octree.cxx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'vcl/source/gdi/octree.cxx') diff --git a/vcl/source/gdi/octree.cxx b/vcl/source/gdi/octree.cxx index 21af8416fee9..4635067901f8 100644 --- a/vcl/source/gdi/octree.cxx +++ b/vcl/source/gdi/octree.cxx @@ -232,14 +232,13 @@ void Octree::GetPalIndex( OctreeNode* pNode ) } } -InverseColorMap::InverseColorMap( const BitmapPalette& rPal ) : - nBits( 8 - OCTREE_BITS ) +InverseColorMap::InverseColorMap( const BitmapPalette& rPal ) { const int nColorMax = 1 << OCTREE_BITS; - const unsigned long xsqr = 1 << ( nBits << 1 ); + const unsigned long xsqr = 1 << ( gnBits << 1 ); const unsigned long xsqr2 = xsqr << 1; const int nColors = rPal.GetEntryCount(); - const long x = 1 << nBits; + const long x = 1 << gnBits; const long x2 = x >> 1; sal_uLong r, g, b; long rxx, gxx, bxx; @@ -258,9 +257,9 @@ InverseColorMap::InverseColorMap( const BitmapPalette& rPal ) : long bdist = cBlue - x2; rdist = rdist*rdist + gdist*gdist + bdist*bdist; - const long crinc = ( xsqr - ( cRed << nBits ) ) << 1; - const long cginc = ( xsqr - ( cGreen << nBits ) ) << 1; - const long cbinc = ( xsqr - ( cBlue << nBits ) ) << 1; + const long crinc = ( xsqr - ( cRed << gnBits ) ) << 1; + const long cginc = ( xsqr - ( cGreen << gnBits ) ) << 1; + const long cbinc = ( xsqr - ( cBlue << gnBits ) ) << 1; sal_uLong* cdp = reinterpret_cast(pBuffer.get()); sal_uInt8* crgbp = pMap.get(); -- cgit