From 2dd493c86e532eea636b1ca8aed35fb1214eb750 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 19 Mar 2025 21:28:33 +0200 Subject: [PATCH] loplugin:constparams Change-Id: I90c5d427914931d8efa93d3a4efbea55a9475e44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183140 Tested-by: Jenkins Reviewed-by: Noel Grandin --- include/vcl/BitmapReadAccess.hxx | 2 +- include/vcl/BitmapTools.hxx | 4 ++-- include/vcl/jsdialog/executor.hxx | 10 +++++----- include/vcl/outdev.hxx | 2 +- include/vcl/vcllayout.hxx | 2 +- include/vcl/window.hxx | 4 ++-- vcl/inc/BitmapSymmetryCheck.hxx | 2 +- vcl/inc/font/OpenTypeFeatureDefinitionList.hxx | 2 +- vcl/inc/impfontcache.hxx | 2 +- vcl/inc/pdf/COSWriter.hxx | 4 ++-- vcl/inc/pdf/PDFEncryptorR6.hxx | 5 +++-- vcl/inc/sft.hxx | 2 +- vcl/inc/skia/gdiimpl.hxx | 2 +- vcl/skia/gdiimpl.cxx | 2 +- vcl/source/bitmap/BitmapScaleConvolutionFilter.cxx | 4 ++-- vcl/source/bitmap/BitmapSymmetryCheck.cxx | 2 +- vcl/source/bitmap/BitmapTools.cxx | 4 ++-- vcl/source/bitmap/dibtools.cxx | 6 +++--- vcl/source/control/imivctl.hxx | 6 +++--- vcl/source/control/imivctl1.cxx | 2 +- vcl/source/control/imivctl2.cxx | 4 ++-- vcl/source/font/OpenTypeFeatureDefinitionList.cxx | 3 ++- vcl/source/font/fontcache.cxx | 2 +- vcl/source/fontsubset/sft.cxx | 4 ++-- vcl/source/gdi/sallayout.cxx | 2 +- vcl/source/outdev/EmphasisMarks.cxx | 2 +- vcl/source/pdf/PDFEncryptorR6.cxx | 4 ++-- vcl/source/window/dlgctrl.cxx | 6 +++--- vcl/source/window/layout.cxx | 2 +- vcl/unx/generic/printer/cupsmgr.cxx | 2 +- 30 files changed, 51 insertions(+), 49 deletions(-) diff --git a/include/vcl/BitmapReadAccess.hxx b/include/vcl/BitmapReadAccess.hxx index 3d6a47b33535..32a9dd023952 100644 --- a/include/vcl/BitmapReadAccess.hxx +++ b/include/vcl/BitmapReadAccess.hxx @@ -85,7 +85,7 @@ public: BitmapColor GetPixel(const Point& point) const { return GetPixel(point.Y(), point.X()); } - BitmapColor GetColorFromData(sal_uInt8* pData, tools::Long nX) const + BitmapColor GetColorFromData(const sal_uInt8* pData, tools::Long nX) const { if (HasPalette()) return GetPaletteColor(GetIndexFromData(pData, nX)); diff --git a/include/vcl/BitmapTools.hxx b/include/vcl/BitmapTools.hxx index 5e5a48ad6fae..c3bc9cf3bf96 100644 --- a/include/vcl/BitmapTools.hxx +++ b/include/vcl/BitmapTools.hxx @@ -68,7 +68,7 @@ VCL_DLLPUBLIC BitmapEx CanvasTransformBitmap( const BitmapEx& rBitmap, ::basegfx::B2DRectangle const & rDestRect, ::basegfx::B2DHomMatrix const & rLocalTransform ); -VCL_DLLPUBLIC void DrawAlphaBitmapAndAlphaGradient(BitmapEx & rBitmapEx, bool bFixedTransparence, float fTransparence, AlphaMask & rNewMask); +VCL_DLLPUBLIC void DrawAlphaBitmapAndAlphaGradient(BitmapEx & rBitmapEx, bool bFixedTransparence, float fTransparence, const AlphaMask & rNewMask); VCL_DLLPUBLIC void DrawAndClipBitmap(const Point& rPos, const Size& rSize, const BitmapEx& rBitmap, BitmapEx & aBmpEx, basegfx::B2DPolyPolygon const & rClipPath); @@ -78,7 +78,7 @@ VCL_DLLPUBLIC css::uno::Sequence< sal_Int8 > GetMaskDIB(BitmapEx const & aBmpEx) * @param data will be filled with alpha data, if xBitmap is alpha/transparent image * @param bHasAlpha will be set to true if resulting surface has alpha **/ -VCL_DLLPUBLIC void CanvasCairoExtractBitmapData( BitmapEx const & rBmpEx, Bitmap & rBitmap, unsigned char*& data, bool& bHasAlpha, tools::Long& rnWidth, tools::Long& rnHeight ); +VCL_DLLPUBLIC void CanvasCairoExtractBitmapData( BitmapEx const & rBmpEx, Bitmap const & rBitmap, unsigned char*& data, bool& bHasAlpha, tools::Long& rnWidth, tools::Long& rnHeight ); VCL_DLLPUBLIC css::uno::Sequence< sal_Int8 > CanvasExtractBitmapData(BitmapEx const & rBitmapEx, const css::geometry::IntegerRectangle2D& rect); diff --git a/include/vcl/jsdialog/executor.hxx b/include/vcl/jsdialog/executor.hxx index 83515ca65ef1..957d7c864bb4 100644 --- a/include/vcl/jsdialog/executor.hxx +++ b/include/vcl/jsdialog/executor.hxx @@ -112,27 +112,27 @@ public: static void trigger_closed(weld::Popover& rPopover) { rPopover.popdown(); } - static void trigger_key_press(weld::Widget& rWidget, const KeyEvent& rEvent) + static void trigger_key_press(const weld::Widget& rWidget, const KeyEvent& rEvent) { rWidget.m_aKeyPressHdl.Call(rEvent); } - static void trigger_key_release(weld::Widget& rWidget, const KeyEvent& rEvent) + static void trigger_key_release(const weld::Widget& rWidget, const KeyEvent& rEvent) { rWidget.m_aKeyReleaseHdl.Call(rEvent); } - static void command(weld::DrawingArea& rArea, const CommandEvent& rCmd) + static void command(const weld::DrawingArea& rArea, const CommandEvent& rCmd) { rArea.m_aCommandHdl.Call(rCmd); } - static void enter_page(weld::Notebook& rNotebook, const OUString& rPage) + static void enter_page(const weld::Notebook& rNotebook, const OUString& rPage) { rNotebook.m_aEnterPageHdl.Call(rPage); } - static void leave_page(weld::Notebook& rNotebook, const OUString& rPage) + static void leave_page(const weld::Notebook& rNotebook, const OUString& rPage) { rNotebook.m_aLeavePageHdl.Call(rPage); } diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 67208d9ad55e..1fcd408b950d 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -1230,7 +1230,7 @@ public: void createEmphasisMarks( FontEmphasisMark nFontEmphasisMark, tools::Long nEmphasisHeight, - SalLayout& rSalLayout, + const SalLayout& rSalLayout, const std::function& rCallback) const; diff --git a/include/vcl/vcllayout.hxx b/include/vcl/vcllayout.hxx index 0bb529402202..23daba62693a 100644 --- a/include/vcl/vcllayout.hxx +++ b/include/vcl/vcllayout.hxx @@ -116,7 +116,7 @@ public: virtual bool GetOutline(basegfx::B2DPolyPolygonVector&) const; bool GetBoundRect(basegfx::B2DRectangle&) const; - static tools::Rectangle BoundRect2Rectangle(basegfx::B2DRectangle&); + static tools::Rectangle BoundRect2Rectangle(const basegfx::B2DRectangle&); virtual SalLayoutGlyphs GetGlyphs() const; diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index 791baf025abd..c8f4491caa6a 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -666,8 +666,8 @@ private: SAL_DLLPRIVATE bool ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput ); SAL_DLLPRIVATE bool ImplHasDlgCtrl() const; SAL_DLLPRIVATE void ImplDlgCtrlNextWindow(); - SAL_DLLPRIVATE void ImplDlgCtrlFocusChanged( vcl::Window* pWindow, bool bGetFocus ); - SAL_DLLPRIVATE vcl::Window* ImplFindDlgCtrlWindow( vcl::Window* pWindow ); + SAL_DLLPRIVATE void ImplDlgCtrlFocusChanged( const vcl::Window* pWindow, bool bGetFocus ); + SAL_DLLPRIVATE vcl::Window* ImplFindDlgCtrlWindow( const vcl::Window* pWindow ); SAL_DLLPRIVATE static void ImplNewInputContext(); diff --git a/vcl/inc/BitmapSymmetryCheck.hxx b/vcl/inc/BitmapSymmetryCheck.hxx index f23a7832d277..f690803ddecd 100644 --- a/vcl/inc/BitmapSymmetryCheck.hxx +++ b/vcl/inc/BitmapSymmetryCheck.hxx @@ -19,7 +19,7 @@ class VCL_DLLPUBLIC BitmapSymmetryCheck final public: BitmapSymmetryCheck(); - static bool check(Bitmap& rBitmap); + static bool check(const Bitmap& rBitmap); private: static bool checkImpl(BitmapReadAccess const* pReadAccess); diff --git a/vcl/inc/font/OpenTypeFeatureDefinitionList.hxx b/vcl/inc/font/OpenTypeFeatureDefinitionList.hxx index 1ae634deabe8..56409d59152e 100644 --- a/vcl/inc/font/OpenTypeFeatureDefinitionList.hxx +++ b/vcl/inc/font/OpenTypeFeatureDefinitionList.hxx @@ -27,7 +27,7 @@ private: public: OpenTypeFeatureDefinitionListPrivate(); - FeatureDefinition getDefinition(vcl::font::Feature& rFeature); + FeatureDefinition getDefinition(const vcl::font::Feature& rFeature); bool isRequired(sal_uInt32 nFeatureCode); }; diff --git a/vcl/inc/impfontcache.hxx b/vcl/inc/impfontcache.hxx index 4d197003b279..195cb5ad584c 100644 --- a/vcl/inc/impfontcache.hxx +++ b/vcl/inc/impfontcache.hxx @@ -87,7 +87,7 @@ public: int nFallbackLevel, OUString& rMissingCodes ); bool GetCachedGlyphBoundRect(const LogicalFontInstance*, sal_GlyphId, basegfx::B2DRectangle&); - void CacheGlyphBoundRect(const LogicalFontInstance*, sal_GlyphId, basegfx::B2DRectangle&); + void CacheGlyphBoundRect(const LogicalFontInstance*, sal_GlyphId, const basegfx::B2DRectangle&); void Invalidate(); }; diff --git a/vcl/inc/pdf/COSWriter.hxx b/vcl/inc/pdf/COSWriter.hxx index 18b8ccdeedcb..178d154f0770 100644 --- a/vcl/inc/pdf/COSWriter.hxx +++ b/vcl/inc/pdf/COSWriter.hxx @@ -142,7 +142,7 @@ public: writeLiteralEncrypt(value, nObject); } - void writeHexArray(std::string_view key, sal_uInt8* pData, size_t nSize) + void writeHexArray(std::string_view key, const sal_uInt8* pData, size_t nSize) { mrBuffer.append(key); mrBuffer.append("<"); @@ -158,7 +158,7 @@ public: rBuffer.append(constHexDigits[nValue & 15]); } - static void appendHexArray(sal_uInt8* pArray, size_t nSize, OStringBuffer& rBuffer) + static void appendHexArray(const sal_uInt8* pArray, size_t nSize, OStringBuffer& rBuffer) { for (size_t i = 0; i < nSize; i++) appendHex(pArray[i], rBuffer); diff --git a/vcl/inc/pdf/PDFEncryptorR6.hxx b/vcl/inc/pdf/PDFEncryptorR6.hxx index ca7a6e388b2d..39f009a30aa6 100644 --- a/vcl/inc/pdf/PDFEncryptorR6.hxx +++ b/vcl/inc/pdf/PDFEncryptorR6.hxx @@ -40,7 +40,8 @@ VCL_DLLPUBLIC bool validateUserPassword(const sal_uInt8* pUserPass, size_t nPass * Described in ISO 32000-2:2020(E) - 7.6.4.4.11 */ VCL_DLLPUBLIC bool validateOwnerPassword(const sal_uInt8* pUserPass, size_t nPasswordLength, - std::vector& U, std::vector& O); + const std::vector& U, + std::vector& O); /** Generates the encryption key - random data 32-byte */ VCL_DLLPUBLIC std::vector generateKey(); @@ -65,7 +66,7 @@ VCL_DLLPUBLIC void generateUandUE(const sal_uInt8* pUserPass, size_t nPasswordLe */ VCL_DLLPUBLIC void generateOandOE(const sal_uInt8* pUserPass, size_t nPasswordLength, std::vector& rFileEncryptionKey, - std::vector& U, std::vector& O, + const std::vector& U, std::vector& O, std::vector& OE); /** Algorithm 8 step b) in reverse diff --git a/vcl/inc/sft.hxx b/vcl/inc/sft.hxx index 9d9898872f88..d262a0787ab6 100644 --- a/vcl/inc/sft.hxx +++ b/vcl/inc/sft.hxx @@ -605,7 +605,7 @@ class TrueTypeFont; * @ingroup sft * */ -void GetTTGlobalFontInfo(AbstractTrueTypeFont *ttf, TTGlobalFontInfo *info); +void GetTTGlobalFontInfo(const AbstractTrueTypeFont *ttf, TTGlobalFontInfo *info); /** * Returns part of the head table info, normally collected by GetTTGlobalFontInfo. diff --git a/vcl/inc/skia/gdiimpl.hxx b/vcl/inc/skia/gdiimpl.hxx index 9ed245e7c696..9389e8426f94 100644 --- a/vcl/inc/skia/gdiimpl.hxx +++ b/vcl/inc/skia/gdiimpl.hxx @@ -236,7 +236,7 @@ protected: void privateDrawAlphaRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, double nTransparency, bool blockAA = false); - void privateCopyBits(const SalTwoRect& rPosAry, SkiaSalGraphicsImpl* src); + void privateCopyBits(const SalTwoRect& rPosAry, const SkiaSalGraphicsImpl* src); void setProvider(SalGeometryProvider* provider) { mProvider = provider; } diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx index de46b67ef073..ee25f385ceca 100644 --- a/vcl/skia/gdiimpl.cxx +++ b/vcl/skia/gdiimpl.cxx @@ -1283,7 +1283,7 @@ void SkiaSalGraphicsImpl::copyBits(const SalTwoRect& rPosAry, SalGraphics* pSrcG postDraw(); } -void SkiaSalGraphicsImpl::privateCopyBits(const SalTwoRect& rPosAry, SkiaSalGraphicsImpl* src) +void SkiaSalGraphicsImpl::privateCopyBits(const SalTwoRect& rPosAry, const SkiaSalGraphicsImpl* src) { assert(mXorMode == XorMode::None); addUpdateRegion(SkRect::MakeXYWH(rPosAry.mnDestX, rPosAry.mnDestY, rPosAry.mnDestWidth, diff --git a/vcl/source/bitmap/BitmapScaleConvolutionFilter.cxx b/vcl/source/bitmap/BitmapScaleConvolutionFilter.cxx index 19bd391ad9c5..02dbc6daa6cc 100644 --- a/vcl/source/bitmap/BitmapScaleConvolutionFilter.cxx +++ b/vcl/source/bitmap/BitmapScaleConvolutionFilter.cxx @@ -79,7 +79,7 @@ void ImplCalculateContributions(const sal_Int32 nSoureSize, const sal_Int32 nDes } } -bool ImplScaleConvolutionHor(Bitmap& rSource, Bitmap& rTarget, const double& rScaleX, const Kernel& rKernel) +bool ImplScaleConvolutionHor(const Bitmap& rSource, Bitmap& rTarget, const double& rScaleX, const Kernel& rKernel) { // Do horizontal filtering OSL_ENSURE(rScaleX > 0.0, "Error in scaling: Mirror given in non-mirror-capable method (!)"); @@ -154,7 +154,7 @@ bool ImplScaleConvolutionHor(Bitmap& rSource, Bitmap& rTarget, const double& rSc return true; } -bool ImplScaleConvolutionVer(Bitmap& rSource, Bitmap& rTarget, const double& rScaleY, const Kernel& rKernel) +bool ImplScaleConvolutionVer(const Bitmap& rSource, Bitmap& rTarget, const double& rScaleY, const Kernel& rKernel) { // Do vertical filtering OSL_ENSURE(rScaleY > 0.0, "Error in scaling: Mirror given in non-mirror-capable method (!)"); diff --git a/vcl/source/bitmap/BitmapSymmetryCheck.cxx b/vcl/source/bitmap/BitmapSymmetryCheck.cxx index 26e035e8dabc..ef841dd57ac9 100644 --- a/vcl/source/bitmap/BitmapSymmetryCheck.cxx +++ b/vcl/source/bitmap/BitmapSymmetryCheck.cxx @@ -15,7 +15,7 @@ BitmapSymmetryCheck::BitmapSymmetryCheck() {} -bool BitmapSymmetryCheck::check(Bitmap& rBitmap) +bool BitmapSymmetryCheck::check(const Bitmap& rBitmap) { BitmapScopedReadAccess aReadAccess(rBitmap); return checkImpl(aReadAccess.get()); diff --git a/vcl/source/bitmap/BitmapTools.cxx b/vcl/source/bitmap/BitmapTools.cxx index 1faa619f8efc..127458a5c28a 100644 --- a/vcl/source/bitmap/BitmapTools.cxx +++ b/vcl/source/bitmap/BitmapTools.cxx @@ -542,7 +542,7 @@ BitmapEx CanvasTransformBitmap( const BitmapEx& rBitmap, return BitmapEx(aDstBitmap, AlphaMask(aDstAlpha)); } -void DrawAlphaBitmapAndAlphaGradient(BitmapEx & rBitmapEx, bool bFixedTransparence, float fTransparence, AlphaMask & rNewMask) +void DrawAlphaBitmapAndAlphaGradient(BitmapEx & rBitmapEx, bool bFixedTransparence, float fTransparence, const AlphaMask & rNewMask) { // mix existing and new alpha mask AlphaMask aOldMask; @@ -729,7 +729,7 @@ static bool readAlpha( BitmapReadAccess const * pAlphaReadAcc, tools::Long nY, c * @param data will be filled with alpha data, if xBitmap is alpha/transparent image * @param bHasAlpha will be set to true if resulting surface has alpha **/ -void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, unsigned char*& data, bool& bHasAlpha, tools::Long& rnWidth, tools::Long& rnHeight ) +void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, const Bitmap & aBitmap, unsigned char*& data, bool& bHasAlpha, tools::Long& rnWidth, tools::Long& rnHeight ) { const AlphaMask& aAlpha = aBmpEx.GetAlphaMask(); diff --git a/vcl/source/bitmap/dibtools.cxx b/vcl/source/bitmap/dibtools.cxx index e7a0d4ed8c7f..febcab971b86 100644 --- a/vcl/source/bitmap/dibtools.cxx +++ b/vcl/source/bitmap/dibtools.cxx @@ -326,7 +326,7 @@ bool ImplReadDIBPalette(SvStream& rIStm, BitmapPalette& rPal, bool bQuad) return rIStm.GetError() == ERRCODE_NONE; } -BitmapColor SanitizePaletteIndex(sal_uInt8 nIndex, BitmapPalette& rPalette) +BitmapColor SanitizePaletteIndex(sal_uInt8 nIndex, const BitmapPalette& rPalette) { const sal_uInt16 nPaletteEntryCount = rPalette.GetEntryCount(); if (nPaletteEntryCount && nIndex >= nPaletteEntryCount) @@ -340,7 +340,7 @@ BitmapColor SanitizePaletteIndex(sal_uInt8 nIndex, BitmapPalette& rPalette) return BitmapColor(nIndex); } -bool ImplDecodeRLE(sal_uInt8* pBuffer, DIBV5Header const & rHeader, BitmapWriteAccess& rAcc, BitmapPalette& rPalette, bool bRLE4) +bool ImplDecodeRLE(sal_uInt8* pBuffer, DIBV5Header const & rHeader, BitmapWriteAccess& rAcc, const BitmapPalette& rPalette, bool bRLE4) { Scanline pRLE = pBuffer; Scanline pEndRLE = pBuffer + rHeader.nSizeImage; @@ -477,7 +477,7 @@ bool ImplDecodeRLE(sal_uInt8* pBuffer, DIBV5Header const & rHeader, BitmapWriteA return true; } -bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& rAcc, BitmapPalette& rPalette, BitmapWriteAccess* pAccAlpha, +bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& rAcc, const BitmapPalette& rPalette, BitmapWriteAccess* pAccAlpha, bool bTopDown, bool& rAlphaUsed, const sal_uInt64 nAlignedWidth) { sal_uInt32 nRMask(( rHeader.nBitCount == 16 ) ? 0x00007c00UL : 0x00ff0000UL); diff --git a/vcl/source/control/imivctl.hxx b/vcl/source/control/imivctl.hxx index 3fd3503a6448..7c6a822d5743 100644 --- a/vcl/source/control/imivctl.hxx +++ b/vcl/source/control/imivctl.hxx @@ -253,7 +253,7 @@ public: static void PaintEmphasis(const tools::Rectangle& rRect1, vcl::RenderContext& rRenderContext); - void PaintItem(const tools::Rectangle& rRect, IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry, + void PaintItem(const tools::Rectangle& rRect, IcnViewFieldType eItem, const SvxIconChoiceCtrlEntry* pEntry, sal_uInt16 nPaintFlags, vcl::RenderContext& rRenderContext); // recalculates all BoundingRects if bMustRecalcBoundingRects == true @@ -334,8 +334,8 @@ public: // for Cursortravelling etc. SvxIconChoiceCtrlEntry* GoLeftRight( SvxIconChoiceCtrlEntry*, bool bRight ); - SvxIconChoiceCtrlEntry* GoUpDown( SvxIconChoiceCtrlEntry*, bool bDown ); - SvxIconChoiceCtrlEntry* GoPageUpDown( SvxIconChoiceCtrlEntry*, bool bDown ); + SvxIconChoiceCtrlEntry* GoUpDown( const SvxIconChoiceCtrlEntry*, bool bDown ); + SvxIconChoiceCtrlEntry* GoPageUpDown( const SvxIconChoiceCtrlEntry*, bool bDown ); }; class IcnGridMap_Impl diff --git a/vcl/source/control/imivctl1.cxx b/vcl/source/control/imivctl1.cxx index c62e9124a08e..f85bcf9be57c 100644 --- a/vcl/source/control/imivctl1.cxx +++ b/vcl/source/control/imivctl1.cxx @@ -908,7 +908,7 @@ void SvxIconChoiceCtrl_Impl::PaintEmphasis(const tools::Rectangle& rTextRect, void SvxIconChoiceCtrl_Impl::PaintItem(const tools::Rectangle& rRect, - IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry, sal_uInt16 nPaintFlags, + IcnViewFieldType eItem, const SvxIconChoiceCtrlEntry* pEntry, sal_uInt16 nPaintFlags, vcl::RenderContext& rRenderContext ) { if (eItem == IcnViewFieldType::Text) diff --git a/vcl/source/control/imivctl2.cxx b/vcl/source/control/imivctl2.cxx index d56a30782d13..989343d5fdbb 100644 --- a/vcl/source/control/imivctl2.cxx +++ b/vcl/source/control/imivctl2.cxx @@ -329,7 +329,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoLeftRight( SvxIconChoiceCtrlEntry* pCt return nullptr; } -SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoPageUpDown( SvxIconChoiceCtrlEntry* pStart, bool bDown) +SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoPageUpDown( const SvxIconChoiceCtrlEntry* pStart, bool bDown) { const tools::Long nPos = static_cast(pView->GetEntryListPos( pStart )); tools::Long nEntriesInView = pView->aOutputSize.Height() / pView->nGridDY; @@ -353,7 +353,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoPageUpDown( SvxIconChoiceCtrlEntry* pS return nullptr; } -SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoUpDown( SvxIconChoiceCtrlEntry* pCtrlEntry, bool bDown) +SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoUpDown( const SvxIconChoiceCtrlEntry* pCtrlEntry, bool bDown) { sal_uLong nPos = pView->GetEntryListPos( pCtrlEntry ); if( bDown && nPos < (pView->maEntries.size() - 1) ) diff --git a/vcl/source/font/OpenTypeFeatureDefinitionList.cxx b/vcl/source/font/OpenTypeFeatureDefinitionList.cxx index 0400833937af..1018790d29ce 100644 --- a/vcl/source/font/OpenTypeFeatureDefinitionList.cxx +++ b/vcl/source/font/OpenTypeFeatureDefinitionList.cxx @@ -125,7 +125,8 @@ void OpenTypeFeatureDefinitionListPrivate::init() }); } -FeatureDefinition OpenTypeFeatureDefinitionListPrivate::getDefinition(vcl::font::Feature& rFeature) +FeatureDefinition +OpenTypeFeatureDefinitionListPrivate::getDefinition(const vcl::font::Feature& rFeature) { if (rFeature.isCharacterVariant() || rFeature.isStylisticSet()) { diff --git a/vcl/source/font/fontcache.cxx b/vcl/source/font/fontcache.cxx index 70f29d37074a..b3e926719b66 100644 --- a/vcl/source/font/fontcache.cxx +++ b/vcl/source/font/fontcache.cxx @@ -270,7 +270,7 @@ bool ImplFontCache::GetCachedGlyphBoundRect(const LogicalFontInstance *pFont, sa return false; } -void ImplFontCache::CacheGlyphBoundRect(const LogicalFontInstance *pFont, sal_GlyphId nID, basegfx::B2DRectangle &rRect) +void ImplFontCache::CacheGlyphBoundRect(const LogicalFontInstance *pFont, sal_GlyphId nID, const basegfx::B2DRectangle &rRect) { if (!pFont->GetFontCache()) return; diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index 8c1040bf279e..4d8a316feb20 100644 --- a/vcl/source/fontsubset/sft.cxx +++ b/vcl/source/fontsubset/sft.cxx @@ -1428,7 +1428,7 @@ SFErrCodes CreateTTFromTTGlyphs(AbstractTrueTypeFont *ttf, namespace { -void FillFontSubsetInfo(AbstractTrueTypeFont* ttf, FontSubsetInfo& rInfo) +void FillFontSubsetInfo(const AbstractTrueTypeFont* ttf, FontSubsetInfo& rInfo) { TTGlobalFontInfo aTTInfo; GetTTGlobalFontInfo(ttf, &aTTInfo); @@ -1568,7 +1568,7 @@ bool GetTTGlobalFontHeadInfo(const AbstractTrueTypeFont *ttf, int& xMin, int& yM return true; } -void GetTTGlobalFontInfo(AbstractTrueTypeFont *ttf, TTGlobalFontInfo *info) +void GetTTGlobalFontInfo(const AbstractTrueTypeFont *ttf, TTGlobalFontInfo *info) { int UPEm = ttf->unitsPerEm(); diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index e8dc3999e216..0513156c3eb3 100644 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -247,7 +247,7 @@ bool SalLayout::GetBoundRect(basegfx::B2DRectangle& rRect) const return bRet; } -tools::Rectangle SalLayout::BoundRect2Rectangle(basegfx::B2DRectangle& rRect) +tools::Rectangle SalLayout::BoundRect2Rectangle(const basegfx::B2DRectangle& rRect) { if (rRect.isEmpty()) return {}; diff --git a/vcl/source/outdev/EmphasisMarks.cxx b/vcl/source/outdev/EmphasisMarks.cxx index 5e3ab5694bb2..1295984f86e6 100644 --- a/vcl/source/outdev/EmphasisMarks.cxx +++ b/vcl/source/outdev/EmphasisMarks.cxx @@ -24,7 +24,7 @@ #include void OutputDevice::createEmphasisMarks( - FontEmphasisMark nEmphasisMark, tools::Long nEmphasisHeight, SalLayout& rSalLayout, + FontEmphasisMark nEmphasisMark, tools::Long nEmphasisHeight, const SalLayout& rSalLayout, const std::function& rCallback) const { diff --git a/vcl/source/pdf/PDFEncryptorR6.cxx b/vcl/source/pdf/PDFEncryptorR6.cxx index 6363ace090a8..71e2b6e9f16a 100644 --- a/vcl/source/pdf/PDFEncryptorR6.cxx +++ b/vcl/source/pdf/PDFEncryptorR6.cxx @@ -60,7 +60,7 @@ bool validateUserPassword(const sal_uInt8* pPass, size_t nLength, std::vector& U, +bool validateOwnerPassword(const sal_uInt8* pPass, size_t nLength, const std::vector& U, std::vector& O) { std::vector aHash(O.begin(), O.begin() + KEY_SIZE); @@ -93,7 +93,7 @@ void generateUandUE(const sal_uInt8* pPass, size_t nLength, /** Algorithm 9 */ void generateOandOE(const sal_uInt8* pPass, size_t nLength, - std::vector& rFileEncryptionKey, std::vector& U, + std::vector& rFileEncryptionKey, const std::vector& U, std::vector& O, std::vector& OE) { std::vector aValidationSalt; diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx index 338b676257f6..d96e5cf0b0c0 100644 --- a/vcl/source/window/dlgctrl.cxx +++ b/vcl/source/window/dlgctrl.cxx @@ -1040,7 +1040,7 @@ void Window::ImplDlgCtrlNextWindow() pWindow->ImplControlFocus(); } -static void ImplDlgCtrlUpdateDefButton( vcl::Window* pParent, vcl::Window* pFocusWindow, +static void ImplDlgCtrlUpdateDefButton( vcl::Window* pParent, const vcl::Window* pFocusWindow, bool bGetFocus ) { PushButton* pOldDefButton = nullptr; @@ -1097,7 +1097,7 @@ static void ImplDlgCtrlUpdateDefButton( vcl::Window* pParent, vcl::Window* pFocu } } -void Window::ImplDlgCtrlFocusChanged( vcl::Window* pWindow, bool bGetFocus ) +void Window::ImplDlgCtrlFocusChanged( const vcl::Window* pWindow, bool bGetFocus ) { if ( mpWindowImpl->mpDlgCtrlDownWindow && !bGetFocus ) { @@ -1108,7 +1108,7 @@ void Window::ImplDlgCtrlFocusChanged( vcl::Window* pWindow, bool bGetFocus ) ImplDlgCtrlUpdateDefButton( this, pWindow, bGetFocus ); } -vcl::Window* Window::ImplFindDlgCtrlWindow( vcl::Window* pWindow ) +vcl::Window* Window::ImplFindDlgCtrlWindow( const vcl::Window* pWindow ) { sal_uInt16 nIndex; sal_uInt16 nFormStart; diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 9fce7dc8f2ea..a662f4602bb0 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -2195,7 +2195,7 @@ void VclScrolledWindow::Paint(vcl::RenderContext& rRenderContext, const tools::R } namespace { -void lcl_dumpScrollbar(::tools::JsonWriter& rJsonWriter, ScrollBar& rScrollBar) +void lcl_dumpScrollbar(::tools::JsonWriter& rJsonWriter, const ScrollBar& rScrollBar) { rJsonWriter.put("lower", rScrollBar.GetRangeMin()); rJsonWriter.put("upper", rScrollBar.GetRangeMax()); diff --git a/vcl/unx/generic/printer/cupsmgr.cxx b/vcl/unx/generic/printer/cupsmgr.cxx index 59b6d21aa1e4..124ee6f6f99e 100644 --- a/vcl/unx/generic/printer/cupsmgr.cxx +++ b/vcl/unx/generic/printer/cupsmgr.cxx @@ -244,7 +244,7 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH SAL_WNODEPRECATED_DECLARATIONS_POP } -static void SetIfCustomOption(PPDContext& rContext, const cups_option_t& rOption, rtl_TextEncoding aEncoding) +static void SetIfCustomOption(const PPDContext& rContext, const cups_option_t& rOption, rtl_TextEncoding aEncoding) { if (strncmp(rOption.value, RTL_CONSTASCII_STRINGPARAM("Custom.")) == 0) {