summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-11-01 16:38:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-11-03 10:30:00 +0100
commit0dca40256320753fdbd42ac9c7de889026d7d469 (patch)
tree647d059917e22a0b910f7d6d803bd50ad953edcd /vcl
parentb477f791e3e332b41c80782844c4c379212f0fd8 (diff)
loplugin:constparam in vcl,svtools
Change-Id: I7a3eb2bfda869e9e66db919f929ead60cf8890a4 Reviewed-on: https://gerrit.libreoffice.org/44209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/sallayout.hxx2
-rw-r--r--vcl/inc/sft.hxx8
-rw-r--r--vcl/source/filter/jpeg/JpegReader.cxx2
-rw-r--r--vcl/source/filter/jpeg/JpegReader.hxx2
-rw-r--r--vcl/source/fontsubset/sft.cxx8
-rw-r--r--vcl/source/fontsubset/ttcr.cxx4
-rw-r--r--vcl/source/gdi/bitmap3.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx6
-rw-r--r--vcl/source/gdi/pdfwriter_impl.hxx6
-rw-r--r--vcl/source/gdi/sallayout.cxx2
-rw-r--r--vcl/source/gdi/salmisc.cxx14
-rw-r--r--vcl/source/window/cursor.cxx2
-rw-r--r--vcl/source/window/toolbox.cxx2
-rw-r--r--vcl/source/window/winproc.cxx20
14 files changed, 40 insertions, 40 deletions
diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx
index b64de3ffed69..9b169eabcd29 100644
--- a/vcl/inc/sallayout.hxx
+++ b/vcl/inc/sallayout.hxx
@@ -115,7 +115,7 @@ private:
};
// For nice SAL_INFO logging of ImplLayoutArgs values
-std::ostream &operator <<(std::ostream& s, ImplLayoutArgs &rArgs);
+std::ostream &operator <<(std::ostream& s, ImplLayoutArgs const &rArgs);
// all positions/widths are in font units
// one exception: drawposition is in pixel units
diff --git a/vcl/inc/sft.hxx b/vcl/inc/sft.hxx
index 80225dc04fd6..3d676aa371e8 100644
--- a/vcl/inc/sft.hxx
+++ b/vcl/inc/sft.hxx
@@ -344,7 +344,7 @@ namespace vcl
* @ingroup sft
*
*/
- int CreateT3FromTTGlyphs(TrueTypeFont *ttf, FILE *outf, const char *fname, sal_uInt16 *glyphArray, sal_uInt8 *encoding, int nGlyphs, int wmode);
+ int CreateT3FromTTGlyphs(TrueTypeFont *ttf, FILE *outf, const char *fname, sal_uInt16 const *glyphArray, sal_uInt8 *encoding, int nGlyphs, int wmode);
/**
* Generates a new TrueType font and dumps it to <b>outf</b> file.
@@ -368,8 +368,8 @@ namespace vcl
*/
int CreateTTFromTTGlyphs(TrueTypeFont *ttf,
const char *fname,
- sal_uInt16 *glyphArray,
- sal_uInt8 *encoding,
+ sal_uInt16 const *glyphArray,
+ sal_uInt8 const *encoding,
int nGlyphs,
int nNameRecs,
NameRecord const *nr);
@@ -397,7 +397,7 @@ namespace vcl
int CreateT42FromTTGlyphs(TrueTypeFont *ttf,
FILE *outf,
const char *psname,
- sal_uInt16 *glyphArray,
+ sal_uInt16 const *glyphArray,
sal_uInt8 *encoding,
int nGlyphs);
diff --git a/vcl/source/filter/jpeg/JpegReader.cxx b/vcl/source/filter/jpeg/JpegReader.cxx
index 604b182b5bb1..7c0aecd5fa47 100644
--- a/vcl/source/filter/jpeg/JpegReader.cxx
+++ b/vcl/source/filter/jpeg/JpegReader.cxx
@@ -180,7 +180,7 @@ JPEGReader::~JPEGReader()
{
}
-bool JPEGReader::CreateBitmap(JPEGCreateBitmapParam& rParam)
+bool JPEGReader::CreateBitmap(JPEGCreateBitmapParam const & rParam)
{
if (rParam.nWidth > SAL_MAX_INT32 / 8 || rParam.nHeight > SAL_MAX_INT32 / 8)
return false; // avoid overflows later
diff --git a/vcl/source/filter/jpeg/JpegReader.hxx b/vcl/source/filter/jpeg/JpegReader.hxx
index 6c4f1dc3803b..84ad8c2a718c 100644
--- a/vcl/source/filter/jpeg/JpegReader.hxx
+++ b/vcl/source/filter/jpeg/JpegReader.hxx
@@ -64,7 +64,7 @@ public:
ReadState Read(Graphic& rGraphic, GraphicFilterImportFlags nImportFlags, Bitmap::ScopedWriteAccess* ppAccess);
- bool CreateBitmap(JPEGCreateBitmapParam& param);
+ bool CreateBitmap(JPEGCreateBitmapParam const & param);
Bitmap& GetBitmap() { return *mpBitmap; }
};
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 19e40cb6d61c..098d54b41b2d 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -1770,7 +1770,7 @@ int GetTTGlyphComponents(TrueTypeFont *ttf, sal_uInt32 glyphID, std::vector< sal
}
int CreateT3FromTTGlyphs(TrueTypeFont *ttf, FILE *outf, const char *fname,
- sal_uInt16 *glyphArray, sal_uInt8 *encoding, int nGlyphs,
+ sal_uInt16 const *glyphArray, sal_uInt8 *encoding, int nGlyphs,
int wmode)
{
ControlPoint *pa;
@@ -1923,8 +1923,8 @@ int CreateT3FromTTGlyphs(TrueTypeFont *ttf, FILE *outf, const char *fname,
int CreateTTFromTTGlyphs(TrueTypeFont *ttf,
const char *fname,
- sal_uInt16 *glyphArray,
- sal_uInt8 *encoding,
+ sal_uInt16 const *glyphArray,
+ sal_uInt8 const *encoding,
int nGlyphs,
int nNameRecs,
NameRecord const *nr)
@@ -2178,7 +2178,7 @@ static void DumpSfnts(FILE *outf, sal_uInt8 *sfntP, sal_uInt32 sfntLen)
int CreateT42FromTTGlyphs(TrueTypeFont *ttf,
FILE *outf,
const char *psname,
- sal_uInt16 *glyphArray,
+ sal_uInt16 const *glyphArray,
sal_uInt8 *encoding,
int nGlyphs)
{
diff --git a/vcl/source/fontsubset/ttcr.cxx b/vcl/source/fontsubset/ttcr.cxx
index 2b30cb35ebc5..6ea929cd728d 100644
--- a/vcl/source/fontsubset/ttcr.cxx
+++ b/vcl/source/fontsubset/ttcr.cxx
@@ -615,7 +615,7 @@ static sal_uInt8 *PackCmapType0(CmapSubTable const *s, sal_uInt32 *length)
return ptr;
}
-static sal_uInt8 *PackCmapType6(CmapSubTable *s, sal_uInt32 *length)
+static sal_uInt8 *PackCmapType6(CmapSubTable const *s, sal_uInt32 *length)
{
sal_uInt8* ptr = static_cast<sal_uInt8*>(smalloc(s->n*2 + 10));
sal_uInt8 *p = ptr + 10;
@@ -642,7 +642,7 @@ static sal_uInt8 *PackCmapType6(CmapSubTable *s, sal_uInt32 *length)
}
/* XXX it only handles Format 0 encoding tables */
-static sal_uInt8 *PackCmap(CmapSubTable *s, sal_uInt32 *length)
+static sal_uInt8 *PackCmap(CmapSubTable const *s, sal_uInt32 *length)
{
if( s->xg[s->n-1] > 0xff )
return PackCmapType6(s, length);
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index 4aef742fcc86..b509f6059737 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -2127,7 +2127,7 @@ bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
return bRet;
}
-bool Bitmap::ImplConvolutionPass(Bitmap& aNewBitmap, BitmapReadAccess const * pReadAcc, int aNumberOfContributions, const double* pWeights, int* pPixels, const int* pCount)
+bool Bitmap::ImplConvolutionPass(Bitmap& aNewBitmap, BitmapReadAccess const * pReadAcc, int aNumberOfContributions, const double* pWeights, int const * pPixels, const int* pCount)
{
if (!pReadAcc)
return false;
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 3592ae115504..db6d337c0c2e 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -3026,7 +3026,7 @@ static void appendSubsetName( int nSubsetID, const OUString& rPSName, OStringBuf
appendName( rPSName, rBuffer );
}
-sal_Int32 PDFWriterImpl::createToUnicodeCMap( sal_uInt8* pEncoding,
+sal_Int32 PDFWriterImpl::createToUnicodeCMap( sal_uInt8 const * pEncoding,
const sal_Ucs* pCodeUnits,
const sal_Int32* pCodeUnitsPerGlyph,
const sal_Int32* pEncToUnicodeIndex,
@@ -3136,7 +3136,7 @@ sal_Int32 PDFWriterImpl::createToUnicodeCMap( sal_uInt8* pEncoding,
return nStream;
}
-sal_Int32 PDFWriterImpl::emitFontDescriptor( const PhysicalFontFace* pFont, FontSubsetInfo& rInfo, sal_Int32 nSubsetID, sal_Int32 nFontStream )
+sal_Int32 PDFWriterImpl::emitFontDescriptor( const PhysicalFontFace* pFont, FontSubsetInfo const & rInfo, sal_Int32 nSubsetID, sal_Int32 nFontStream )
{
OStringBuffer aLine( 1024 );
// get font flags, see PDF reference 1.4 p. 358
@@ -8647,7 +8647,7 @@ void PDFWriterImpl::writeTransparentObject( TransparencyEmit& rObject )
CHECK_RETURN2( writeBuffer( aLine.getStr(), aLine.getLength() ) );
}
-bool PDFWriterImpl::writeGradientFunction( GradientEmit& rObject )
+bool PDFWriterImpl::writeGradientFunction( GradientEmit const & rObject )
{
// LO internal gradient -> PDF shading type:
// * GradientStyle::Linear: axial shading, using sampled-function with 2 samples
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index b9e02ee0a69d..7aba8c50d0e6 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -861,7 +861,7 @@ i12626
/* writes the Do operation inside the content stream */
void drawBitmap( const Point& rDestPt, const Size& rDestSize, const BitmapEmit& rBitmap, const Color& rFillColor );
/* write the function object for a Gradient */
- bool writeGradientFunction( GradientEmit& rObject );
+ bool writeGradientFunction( GradientEmit const & rObject );
/* creates a GradientEmit and returns its object number */
sal_Int32 createGradient( const Gradient& rGradient, const Size& rSize );
@@ -874,9 +874,9 @@ i12626
/* writes a type1 system font object and returns its mapping from font ids to object ids (or 0 in case of failure ) */
std::map< sal_Int32, sal_Int32 > emitSystemFont( const PhysicalFontFace*, EmbedFont const & );
/* writes a font descriptor and returns its object id (or 0) */
- sal_Int32 emitFontDescriptor( const PhysicalFontFace*, FontSubsetInfo&, sal_Int32 nSubsetID, sal_Int32 nStream );
+ sal_Int32 emitFontDescriptor( const PhysicalFontFace*, FontSubsetInfo const &, sal_Int32 nSubsetID, sal_Int32 nStream );
/* writes a ToUnicode cmap, returns the corresponding stream object */
- sal_Int32 createToUnicodeCMap( sal_uInt8* pEncoding, const sal_Ucs* pCodeUnits, const sal_Int32* pCodeUnitsPerGlyph,
+ sal_Int32 createToUnicodeCMap( sal_uInt8 const * pEncoding, const sal_Ucs* pCodeUnits, const sal_Int32* pCodeUnitsPerGlyph,
const sal_Int32* pEncToUnicodeIndex, int nGlyphs );
/* get resource dict object number */
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index a3b2d019c783..e277e661f61e 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -50,7 +50,7 @@
#define GF_DROPPED 0xFFFFFFFF
-std::ostream &operator <<(std::ostream& s, ImplLayoutArgs &rArgs)
+std::ostream &operator <<(std::ostream& s, ImplLayoutArgs const &rArgs)
{
#ifndef SAL_LOG_INFO
(void) rArgs;
diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx
index 0befbf6f3a93..174eda36c3a4 100644
--- a/vcl/source/gdi/salmisc.cxx
+++ b/vcl/source/gdi/salmisc.cxx
@@ -65,7 +65,7 @@ static long ImplIndexFromColor( const BitmapColor& rCol )
static void ImplPALToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer,
FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel,
- Scanline* pSrcScanMap, Scanline* pDstScanMap, long* pMapX, const long* pMapY )
+ Scanline* pSrcScanMap, Scanline* pDstScanMap, long const * pMapX, const long* pMapY )
{
const long nHeight1 = rDstBuffer.mnHeight - 1;
const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
@@ -96,9 +96,9 @@ static void ImplPALToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuff
}
}
-static void ImplPALToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer,
+static void ImplPALToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer const & rDstBuffer,
FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel,
- Scanline* pSrcScanMap, Scanline* pDstScanMap, long* pMapX, const long* pMapY )
+ Scanline* pSrcScanMap, Scanline* pDstScanMap, long const * pMapX, const long* pMapY )
{
const long nHeight1 = rDstBuffer.mnHeight - 1;
const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
@@ -175,9 +175,9 @@ static void ImplPALToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffe
}
}
-static void ImplTCToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer,
+static void ImplTCToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer const & rDstBuffer,
FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel,
- Scanline* pSrcScanMap, Scanline* pDstScanMap, long* pMapX, const long* pMapY )
+ Scanline* pSrcScanMap, Scanline* pDstScanMap, long const * pMapX, const long* pMapY )
{
const long nHeight1 = rDstBuffer.mnHeight - 1;
const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
@@ -219,9 +219,9 @@ static void ImplTCToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer
}
}
-static void ImplTCToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer,
+static void ImplTCToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer const & rDstBuffer,
FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel,
- Scanline* pSrcScanMap, Scanline* pDstScanMap, long* pMapX, const long* pMapY )
+ Scanline* pSrcScanMap, Scanline* pDstScanMap, long const * pMapX, const long* pMapY )
{
const long nHeight1 = rDstBuffer.mnHeight- 1;
const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index 23afab02edf2..a4c0187097e6 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -42,7 +42,7 @@ struct ImplCursorData
VclPtr<vcl::Window> mpWindow; // assigned window
};
-static void ImplCursorInvert( ImplCursorData* pData )
+static void ImplCursorInvert( ImplCursorData const * pData )
{
vcl::Window* pWindow = pData->mpWindow;
std::unique_ptr<PaintBufferGuard> pGuard;
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 4200cdbc02d0..8541bed438dd 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -145,7 +145,7 @@ int ToolBox::ImplGetDragWidth() const
return ToolBox::ImplGetDragWidth( *this, mbHorz );
}
-ButtonType determineButtonType( ImplToolItem* pItem, ButtonType defaultType )
+ButtonType determineButtonType( ImplToolItem const * pItem, ButtonType defaultType )
{
ButtonType tmpButtonType = defaultType;
if ( pItem->mnBits & (ToolBoxItemBits::TEXT_ONLY | ToolBoxItemBits::ICON_ONLY) ) // item has custom setting
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 3c56adc27733..fdc584eb7513 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -1955,7 +1955,7 @@ static MouseEventModifiers ImplGetMouseButtonMode( SalMouseEvent const * pEvent
return nMode;
}
-inline bool ImplHandleSalMouseLeave( vcl::Window* pWindow, SalMouseEvent* pEvent )
+inline bool ImplHandleSalMouseLeave( vcl::Window* pWindow, SalMouseEvent const * pEvent )
{
return ImplHandleMouseEvent( pWindow, MouseNotifyEvent::MOUSEMOVE, true,
pEvent->mnX, pEvent->mnY,
@@ -1963,7 +1963,7 @@ inline bool ImplHandleSalMouseLeave( vcl::Window* pWindow, SalMouseEvent* pEvent
ImplGetMouseMoveMode( pEvent ) );
}
-inline bool ImplHandleSalMouseMove( vcl::Window* pWindow, SalMouseEvent* pEvent )
+inline bool ImplHandleSalMouseMove( vcl::Window* pWindow, SalMouseEvent const * pEvent )
{
return ImplHandleMouseEvent( pWindow, MouseNotifyEvent::MOUSEMOVE, false,
pEvent->mnX, pEvent->mnY,
@@ -1971,7 +1971,7 @@ inline bool ImplHandleSalMouseMove( vcl::Window* pWindow, SalMouseEvent* pEvent
ImplGetMouseMoveMode( pEvent ) );
}
-inline bool ImplHandleSalMouseButtonDown( vcl::Window* pWindow, SalMouseEvent* pEvent )
+inline bool ImplHandleSalMouseButtonDown( vcl::Window* pWindow, SalMouseEvent const * pEvent )
{
return ImplHandleMouseEvent( pWindow, MouseNotifyEvent::MOUSEBUTTONDOWN, false,
pEvent->mnX, pEvent->mnY,
@@ -1984,7 +1984,7 @@ inline bool ImplHandleSalMouseButtonDown( vcl::Window* pWindow, SalMouseEvent* p
ImplGetMouseButtonMode( pEvent ) );
}
-inline bool ImplHandleSalMouseButtonUp( vcl::Window* pWindow, SalMouseEvent* pEvent )
+inline bool ImplHandleSalMouseButtonUp( vcl::Window* pWindow, SalMouseEvent const * pEvent )
{
return ImplHandleMouseEvent( pWindow, MouseNotifyEvent::MOUSEBUTTONUP, false,
pEvent->mnX, pEvent->mnY,
@@ -2038,7 +2038,7 @@ static bool ImplHandleMenuEvent( vcl::Window const * pWindow, SalMenuEvent* pEve
return bRet;
}
-static void ImplHandleSalKeyMod( vcl::Window* pWindow, SalKeyModEvent* pEvent )
+static void ImplHandleSalKeyMod( vcl::Window* pWindow, SalKeyModEvent const * pEvent )
{
ImplSVData* pSVData = ImplGetSVData();
vcl::Window* pTrackWin = pSVData->maWinData.mpTrackWin;
@@ -2283,7 +2283,7 @@ bool ImplWindowFrameProc( vcl::Window* _pWindow, SalEvent nEvent, const void* pE
switch ( nEvent )
{
case SalEvent::MouseMove:
- bRet = ImplHandleSalMouseMove( pWindow, const_cast<SalMouseEvent *>(static_cast<SalMouseEvent const *>(pEvent)) );
+ bRet = ImplHandleSalMouseMove( pWindow, static_cast<SalMouseEvent const *>(pEvent) );
break;
case SalEvent::ExternalMouseMove:
{
@@ -2300,10 +2300,10 @@ bool ImplWindowFrameProc( vcl::Window* _pWindow, SalEvent nEvent, const void* pE
}
break;
case SalEvent::MouseLeave:
- bRet = ImplHandleSalMouseLeave( pWindow, const_cast<SalMouseEvent *>(static_cast<SalMouseEvent const *>(pEvent)) );
+ bRet = ImplHandleSalMouseLeave( pWindow, static_cast<SalMouseEvent const *>(pEvent) );
break;
case SalEvent::MouseButtonDown:
- bRet = ImplHandleSalMouseButtonDown( pWindow, const_cast<SalMouseEvent *>(static_cast<SalMouseEvent const *>(pEvent)) );
+ bRet = ImplHandleSalMouseButtonDown( pWindow, static_cast<SalMouseEvent const *>(pEvent) );
break;
case SalEvent::ExternalMouseButtonDown:
{
@@ -2320,7 +2320,7 @@ bool ImplWindowFrameProc( vcl::Window* _pWindow, SalEvent nEvent, const void* pE
}
break;
case SalEvent::MouseButtonUp:
- bRet = ImplHandleSalMouseButtonUp( pWindow, const_cast<SalMouseEvent *>(static_cast<SalMouseEvent const *>(pEvent)) );
+ bRet = ImplHandleSalMouseButtonUp( pWindow, static_cast<SalMouseEvent const *>(pEvent) );
break;
case SalEvent::ExternalMouseButtonUp:
{
@@ -2368,7 +2368,7 @@ bool ImplWindowFrameProc( vcl::Window* _pWindow, SalEvent nEvent, const void* pE
}
break;
case SalEvent::KeyModChange:
- ImplHandleSalKeyMod( pWindow, const_cast<SalKeyModEvent *>(static_cast<SalKeyModEvent const *>(pEvent)) );
+ ImplHandleSalKeyMod( pWindow, static_cast<SalKeyModEvent const *>(pEvent) );
break;
case SalEvent::InputLanguageChange: