diff options
author | Noel <noelgrandin@gmail.com> | 2020-10-06 11:17:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-10-06 12:57:25 +0200 |
commit | 22d94ce0abef7cdd5e344a28e1b1ee4caf6cd8f8 (patch) | |
tree | 0e54d0721723336daf26493f85e7be8f07431286 /vcl | |
parent | d34e969c888219bd3739fc4a8ef330c77f7e7adf (diff) |
loplugin:const* make some params and methods const
Change-Id: If7fbb25037343e18081a8ee7064840d75e9a45a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104010
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
26 files changed, 57 insertions, 52 deletions
diff --git a/vcl/backendtest/outputdevice/bitmap.cxx b/vcl/backendtest/outputdevice/bitmap.cxx index 79cd3d3795cd..657f840ef178 100644 --- a/vcl/backendtest/outputdevice/bitmap.cxx +++ b/vcl/backendtest/outputdevice/bitmap.cxx @@ -175,7 +175,7 @@ TestResult OutputDeviceTestBitmap::checkMask(Bitmap& rBitmap) return checkRectangle(rBitmap); } -TestResult OutputDeviceTestBitmap::checkBlend(BitmapEx& rBitmapEx) +TestResult OutputDeviceTestBitmap::checkBlend(const BitmapEx& rBitmapEx) { const Color aBlendedColor(0xEE, 0xEE, 0x33); diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx index 9a82caade324..aee0d1839b31 100644 --- a/vcl/inc/impgraph.hxx +++ b/vcl/inc/impgraph.hxx @@ -159,7 +159,7 @@ private: const Size& rDestSize, long nExtraData, OutputDevice* pFirstFrameOutDev ); - void ImplStopAnimation( OutputDevice* pOutputDevice, + void ImplStopAnimation( const OutputDevice* pOutputDevice, long nExtraData ); void ImplSetAnimationNotifyHdl( const Link<Animation*,void>& rLink ); @@ -206,7 +206,7 @@ public: bool swapIn(); bool swapOut(); bool isSwappedOut() const { return mbSwapOut; } - OUString getSwapFileURL(); + OUString getSwapFileURL() const; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/sft.hxx b/vcl/inc/sft.hxx index 8711364ed46f..6a844002711d 100644 --- a/vcl/inc/sft.hxx +++ b/vcl/inc/sft.hxx @@ -680,7 +680,7 @@ class TrueTypeFont; * @return true, if table data could be decoded * @ingroup sft */ - VCL_DLLPUBLIC bool GetTTGlobalFontHeadInfo(AbstractTrueTypeFont *ttf, int& xMin, int& yMin, int& xMax, int& yMax, sal_uInt16& macStyle); + VCL_DLLPUBLIC bool GetTTGlobalFontHeadInfo(const AbstractTrueTypeFont *ttf, int& xMin, int& yMin, int& xMax, int& yMax, sal_uInt16& macStyle); /** * Returns fonts metrics. diff --git a/vcl/inc/skia/utils.hxx b/vcl/inc/skia/utils.hxx index 473edfdf0d3f..b3a2045eea96 100644 --- a/vcl/inc/skia/utils.hxx +++ b/vcl/inc/skia/utils.hxx @@ -64,7 +64,7 @@ void removeCachedImage(sk_sp<SkImage> image); constexpr int MAX_CACHE_SIZE = 4 * 2000 * 2000 * 4; // 4x 2000px 32bpp images, 64MiB #ifdef DBG_UTIL -void prefillSurface(sk_sp<SkSurface>& surface); +void prefillSurface(const sk_sp<SkSurface>& surface); VCL_DLLPUBLIC void dump(const SkBitmap& bitmap, const char* file); VCL_DLLPUBLIC void dump(const sk_sp<SkImage>& image, const char* file); VCL_DLLPUBLIC void dump(const sk_sp<SkSurface>& surface, const char* file); diff --git a/vcl/inc/svimpbox.hxx b/vcl/inc/svimpbox.hxx index 3def46700396..92d5754387c7 100644 --- a/vcl/inc/svimpbox.hxx +++ b/vcl/inc/svimpbox.hxx @@ -300,7 +300,7 @@ public: void ShowCursor( bool bShow ); bool RequestHelp( const HelpEvent& rHEvt ); - bool IsNodeButton( const Point& rPosPixel, SvTreeListEntry* pEntry ) const; + bool IsNodeButton( const Point& rPosPixel, const SvTreeListEntry* pEntry ) const; void SetUpdateMode( bool bMode ); bool GetUpdateMode() const { return m_bUpdateMode; } tools::Rectangle GetClipRegionRect() const; diff --git a/vcl/inc/test/outputdevice.hxx b/vcl/inc/test/outputdevice.hxx index 293e817d35e9..c0d9a61cdb10 100644 --- a/vcl/inc/test/outputdevice.hxx +++ b/vcl/inc/test/outputdevice.hxx @@ -102,7 +102,7 @@ public: static TestResult checkTransformedBitmap(Bitmap& rBitmap); static TestResult checkBitmapExWithAlpha(Bitmap& rBitmap); static TestResult checkMask(Bitmap& rBitmap); - static TestResult checkBlend(BitmapEx& rBitmap); + static TestResult checkBlend(const BitmapEx& rBitmap); }; class VCL_DLLPUBLIC OutputDeviceTestAnotherOutDev : public OutputDeviceTestCommon diff --git a/vcl/inc/unx/glyphcache.hxx b/vcl/inc/unx/glyphcache.hxx index 993a0cf49a22..4e409560a981 100644 --- a/vcl/inc/unx/glyphcache.hxx +++ b/vcl/inc/unx/glyphcache.hxx @@ -141,7 +141,7 @@ private: friend class FreetypeFontInstance; friend class FreetypeManager; - explicit FreetypeFont(FreetypeFontInstance&, std::shared_ptr<FreetypeFontInfo>& rFontInfo); + explicit FreetypeFont(FreetypeFontInstance&, const std::shared_ptr<FreetypeFontInfo>& rFontInfo); void ApplyGlyphTransform(bool bVertical, FT_Glyph) const; diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx index b5bed8e60b54..660a87ac47f7 100644 --- a/vcl/inc/unx/saldisp.hxx +++ b/vcl/inc/unx/saldisp.hxx @@ -325,7 +325,7 @@ public: #ifdef DBG_UTIL void PrintInfo() const; - void DbgPrintDisplayEvent(const char *pComment, XEvent *pEvent) const; + void DbgPrintDisplayEvent(const char *pComment, const XEvent *pEvent) const; #endif void Beep() const; diff --git a/vcl/skia/SkiaHelper.cxx b/vcl/skia/SkiaHelper.cxx index f9b231d87ce6..2d185bab149b 100644 --- a/vcl/skia/SkiaHelper.cxx +++ b/vcl/skia/SkiaHelper.cxx @@ -573,7 +573,7 @@ void prepareSkia(std::unique_ptr<sk_app::WindowContext> (*createVulkanWindowCont } #ifdef DBG_UTIL -void prefillSurface(sk_sp<SkSurface>& surface) +void prefillSurface(const sk_sp<SkSurface>& surface) { // Pre-fill the surface with deterministic garbage. SkBitmap bitmap; diff --git a/vcl/source/animate/Animation.cxx b/vcl/source/animate/Animation.cxx index 2b799dabf3af..f788c7be123f 100644 --- a/vcl/source/animate/Animation.cxx +++ b/vcl/source/animate/Animation.cxx @@ -215,7 +215,7 @@ bool Animation::Start(OutputDevice* pOut, const Point& rDestPt, const Size& rDes return bRet; } -void Animation::Stop(OutputDevice* pOut, long nExtraData) +void Animation::Stop(const OutputDevice* pOut, long nExtraData) { maViewList.erase(std::remove_if(maViewList.begin(), maViewList.end(), [=](const std::unique_ptr<ImplAnimView>& pAnimView) -> bool { diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 3670f5a1f709..40f5ef8be163 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -3424,7 +3424,7 @@ private: void do_insert(const weld::TreeIter* pParent, int pos, const OUString* pStr, const OUString* pId, const OUString* pIconName, - VirtualDevice* pImageSurface, bool bChildrenOnDemand, + const VirtualDevice* pImageSurface, bool bChildrenOnDemand, weld::TreeIter* pRet, bool bIsSeparator) { disable_notify_events(); diff --git a/vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx b/vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx index 5cf24ec2f101..9ee1ad3822b4 100644 --- a/vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx +++ b/vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx @@ -74,13 +74,13 @@ template <typename MorphologyOp, int nComponentWidth> struct Value bLookOutside ? rShared.mnOutsideVal : MorphologyOp::initVal); } - void apply(BitmapReadAccess* pReadAccess, long x, long y, sal_uInt8* pHint = nullptr) + void apply(const BitmapReadAccess* pReadAccess, long x, long y, sal_uInt8* pHint = nullptr) { sal_uInt8* pSource = (pHint ? pHint : pReadAccess->GetScanline(y)) + nWidthBytes * x; std::transform(pSource, pSource + nWidthBytes, aResult, aResult, MorphologyOp::apply); } - void copy(BitmapWriteAccess* pWriteAccess, long x, long y, sal_uInt8* pHint = nullptr) + void copy(const BitmapWriteAccess* pWriteAccess, long x, long y, sal_uInt8* pHint = nullptr) { sal_uInt8* pDest = (pHint ? pHint : pWriteAccess->GetScanline(y)) + nWidthBytes * x; std::copy_n(aResult, nWidthBytes, pDest); @@ -102,7 +102,7 @@ template <typename MorphologyOp> struct Value<MorphologyOp, 0> { } - void apply(BitmapReadAccess* pReadAccess, long x, long y, sal_uInt8* /*pHint*/ = nullptr) + void apply(const BitmapReadAccess* pReadAccess, long x, long y, sal_uInt8* /*pHint*/ = nullptr) { const auto& rSource = pReadAccess->GetColor(y, x); aResult = Color(MorphologyOp::apply(rSource.GetTransparency(), aResult.GetTransparency()), diff --git a/vcl/source/bitmap/BitmapFilterStackBlur.cxx b/vcl/source/bitmap/BitmapFilterStackBlur.cxx index a9e17eee2cd2..6883808ebe4a 100644 --- a/vcl/source/bitmap/BitmapFilterStackBlur.cxx +++ b/vcl/source/bitmap/BitmapFilterStackBlur.cxx @@ -101,9 +101,12 @@ struct BlurArrays } } - long getMultiplyValue() { return static_cast<long>(constMultiplyTable[maShared.mnRadius]); } + long getMultiplyValue() const + { + return static_cast<long>(constMultiplyTable[maShared.mnRadius]); + } - long getShiftValue() { return static_cast<long>(constShiftTable[maShared.mnRadius]); } + long getShiftValue() const { return static_cast<long>(constShiftTable[maShared.mnRadius]); } }; typedef void (*BlurRangeFn)(BlurSharedData const& rShared, long nStartY, long nEndY); @@ -145,42 +148,43 @@ struct SumFunction24 pValue1[2] = nConstant; } - static inline void add(long*& pValue1, sal_uInt8*& pValue2) + static inline void add(long*& pValue1, const sal_uInt8* pValue2) { pValue1[0] += pValue2[0]; pValue1[1] += pValue2[1]; pValue1[2] += pValue2[2]; } - static inline void add(long*& pValue1, long*& pValue2) + static inline void add(long*& pValue1, const long* pValue2) { pValue1[0] += pValue2[0]; pValue1[1] += pValue2[1]; pValue1[2] += pValue2[2]; } - static inline void sub(long*& pValue1, sal_uInt8*& pValue2) + static inline void sub(long*& pValue1, const sal_uInt8* pValue2) { pValue1[0] -= pValue2[0]; pValue1[1] -= pValue2[1]; pValue1[2] -= pValue2[2]; } - static inline void sub(long*& pValue1, long*& pValue2) + static inline void sub(long*& pValue1, const long* pValue2) { pValue1[0] -= pValue2[0]; pValue1[1] -= pValue2[1]; pValue1[2] -= pValue2[2]; } - static inline void assignPtr(sal_uInt8*& pValue1, sal_uInt8*& pValue2) + static inline void assignPtr(sal_uInt8*& pValue1, const sal_uInt8* pValue2) { pValue1[0] = pValue2[0]; pValue1[1] = pValue2[1]; pValue1[2] = pValue2[2]; } - static inline void assignMulAndShr(sal_uInt8*& result, long*& sum, long multiply, long shift) + static inline void assignMulAndShr(sal_uInt8*& result, const long* sum, long multiply, + long shift) { result[0] = (multiply * sum[0]) >> shift; result[1] = (multiply * sum[1]) >> shift; @@ -194,20 +198,21 @@ struct SumFunction8 static inline void set(long*& pValue1, long nConstant) { pValue1[0] = nConstant; } - static inline void add(long*& pValue1, sal_uInt8*& pValue2) { pValue1[0] += pValue2[0]; } + static inline void add(long*& pValue1, const sal_uInt8* pValue2) { pValue1[0] += pValue2[0]; } - static inline void add(long*& pValue1, long*& pValue2) { pValue1[0] += pValue2[0]; } + static inline void add(long*& pValue1, const long* pValue2) { pValue1[0] += pValue2[0]; } - static inline void sub(long*& pValue1, sal_uInt8*& pValue2) { pValue1[0] -= pValue2[0]; } + static inline void sub(long*& pValue1, const sal_uInt8* pValue2) { pValue1[0] -= pValue2[0]; } - static inline void sub(long*& pValue1, long*& pValue2) { pValue1[0] -= pValue2[0]; } + static inline void sub(long*& pValue1, const long* pValue2) { pValue1[0] -= pValue2[0]; } - static inline void assignPtr(sal_uInt8*& pValue1, sal_uInt8*& pValue2) + static inline void assignPtr(sal_uInt8*& pValue1, const sal_uInt8* pValue2) { pValue1[0] = pValue2[0]; } - static inline void assignMulAndShr(sal_uInt8*& result, long*& sum, long multiply, long shift) + static inline void assignMulAndShr(sal_uInt8*& result, const long* sum, long multiply, + long shift) { result[0] = (multiply * sum[0]) >> shift; } diff --git a/vcl/source/control/WeldedTabbedNotebookbar.cxx b/vcl/source/control/WeldedTabbedNotebookbar.cxx index 3f701d08109c..e0089c604271 100644 --- a/vcl/source/control/WeldedTabbedNotebookbar.cxx +++ b/vcl/source/control/WeldedTabbedNotebookbar.cxx @@ -12,7 +12,7 @@ #include <jsdialog/jsdialogbuilder.hxx> WeldedTabbedNotebookbar::WeldedTabbedNotebookbar( - VclPtr<vcl::Window>& pContainerWindow, const OUString& rUIFilePath, + const VclPtr<vcl::Window>& pContainerWindow, const OUString& rUIFilePath, const css::uno::Reference<css::frame::XFrame>& rFrame, sal_uInt64 nWindowId) : m_xBuilder(new JSInstanceBuilder(pContainerWindow, AllSettings::GetUIRootDir(), rUIFilePath, rFrame, nWindowId)) diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index 8df442fff60b..7fbeed108d99 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -785,7 +785,7 @@ static bool ImplPatternProcessKeyInput( IEditImplementation& rEdit, const KeyEve namespace { - bool ImplSetMask(OString& rEditMask, OUString& rLiteralMask) + bool ImplSetMask(const OString& rEditMask, OUString& rLiteralMask) { bool bSameMask = true; diff --git a/vcl/source/filter/ipdf/pdfread.cxx b/vcl/source/filter/ipdf/pdfread.cxx index a9b079a75bc3..5e113ff2aba8 100644 --- a/vcl/source/filter/ipdf/pdfread.cxx +++ b/vcl/source/filter/ipdf/pdfread.cxx @@ -244,8 +244,8 @@ bool ImportPDF(SvStream& rStream, Graphic& rGraphic) #if HAVE_FEATURE_PDFIUM namespace { -std::vector<PDFGraphicAnnotation> findAnnotations(std::unique_ptr<vcl::pdf::PDFiumPage>& pPage, - basegfx::B2DSize aPageSize) +std::vector<PDFGraphicAnnotation> +findAnnotations(const std::unique_ptr<vcl::pdf::PDFiumPage>& pPage, basegfx::B2DSize aPageSize) { std::vector<PDFGraphicAnnotation> aPDFGraphicAnnotations; for (int nAnnotation = 0; nAnnotation < pPage->getAnnotationCount(); nAnnotation++) diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index 6aba6d6d48d2..9fcf26f97d9c 100644 --- a/vcl/source/fontsubset/sft.cxx +++ b/vcl/source/fontsubset/sft.cxx @@ -2004,7 +2004,7 @@ void GetTTFontMetrics(const uint8_t *pHhea, size_t nHhea, } } -bool GetTTGlobalFontHeadInfo(AbstractTrueTypeFont *ttf, int& xMin, int& yMin, int& xMax, int& yMax, sal_uInt16& macStyle) +bool GetTTGlobalFontHeadInfo(const AbstractTrueTypeFont *ttf, int& xMin, int& yMin, int& xMax, int& yMax, sal_uInt16& macStyle) { sal_uInt32 table_size; const sal_uInt8* table = ttf->table(O_head, table_size); diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx index b88aaf0e9f3f..1fe6dac8cc10 100644 --- a/vcl/source/gdi/graph.cxx +++ b/vcl/source/gdi/graph.cxx @@ -448,7 +448,7 @@ void Graphic::StartAnimation( OutputDevice* pOutDev, const Point& rDestPt, mxImpGraphic->ImplStartAnimation( pOutDev, rDestPt, rDestSz, nExtraData, pFirstFrameOutDev ); } -void Graphic::StopAnimation( OutputDevice* pOutDev, long nExtraData ) +void Graphic::StopAnimation( const OutputDevice* pOutDev, long nExtraData ) { ImplTestRefCount(); mxImpGraphic->ImplStopAnimation( pOutDev, nExtraData ); diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index 979166f118aa..f9afa788973e 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -85,17 +85,17 @@ public: utl::UCBContentHelper::Kill(maSwapURL.GetMainURL(INetURLObject::DecodeMechanism::NONE)); } - INetURLObject getSwapURL() + INetURLObject getSwapURL() const { return maSwapURL; } - OUString getSwapURLString() + OUString getSwapURLString() const { return maSwapURL.GetMainURL(INetURLObject::DecodeMechanism::NONE); } - OUString const & getOriginURL() { return maOriginURL; } + OUString const & getOriginURL() const { return maOriginURL; } std::unique_ptr<SvStream> openOutputStream() { @@ -114,7 +114,7 @@ public: } }; -OUString ImpGraphic::getSwapFileURL() +OUString ImpGraphic::getSwapFileURL() const { if (mpSwapFile) return mpSwapFile->getSwapURL().GetMainURL(INetURLObject::DecodeMechanism::NONE); @@ -1091,7 +1091,7 @@ void ImpGraphic::ImplStartAnimation( OutputDevice* pOutDev, const Point& rDestPt mpAnimation->Start( pOutDev, rDestPt, rDestSize, nExtraData, pFirstFrameOutDev ); } -void ImpGraphic::ImplStopAnimation( OutputDevice* pOutDev, long nExtraData ) +void ImpGraphic::ImplStopAnimation( const OutputDevice* pOutDev, long nExtraData ) { ensureAvailable(); diff --git a/vcl/source/graphic/GraphicObject.cxx b/vcl/source/graphic/GraphicObject.cxx index 1e83722a559b..d44a4bdafe78 100644 --- a/vcl/source/graphic/GraphicObject.cxx +++ b/vcl/source/graphic/GraphicObject.cxx @@ -591,7 +591,7 @@ bool GraphicObject::StartAnimation( OutputDevice* pOut, const Point& rPt, const return bRet; } -void GraphicObject::StopAnimation( OutputDevice* pOut, long nExtraData ) +void GraphicObject::StopAnimation( const OutputDevice* pOut, long nExtraData ) { if (mxSimpleCache) mxSimpleCache->maGraphic.StopAnimation(pOut, nExtraData); diff --git a/vcl/source/pdf/PDFiumLibrary.cxx b/vcl/source/pdf/PDFiumLibrary.cxx index dc31eb4fb952..d790fb1b9c01 100644 --- a/vcl/source/pdf/PDFiumLibrary.cxx +++ b/vcl/source/pdf/PDFiumLibrary.cxx @@ -387,7 +387,7 @@ PDFiumPathSegment::PDFiumPathSegment(FPDF_PATHSEGMENT pPathSegment) PDFiumPathSegment::~PDFiumPathSegment() {} -basegfx::B2DPoint PDFiumPathSegment::getPoint() +basegfx::B2DPoint PDFiumPathSegment::getPoint() const { basegfx::B2DPoint aPoint; float fx, fy; @@ -396,9 +396,9 @@ basegfx::B2DPoint PDFiumPathSegment::getPoint() return aPoint; } -bool PDFiumPathSegment::isClosed() { return FPDFPathSegment_GetClose(mpPathSegment); } +bool PDFiumPathSegment::isClosed() const { return FPDFPathSegment_GetClose(mpPathSegment); } -int PDFiumPathSegment::getType() { return FPDFPathSegment_GetType(mpPathSegment); } +int PDFiumPathSegment::getType() const { return FPDFPathSegment_GetType(mpPathSegment); } PDFiumAnnotation::PDFiumAnnotation(FPDF_ANNOTATION pAnnotation) : mpAnnotation(pAnnotation) diff --git a/vcl/source/treelist/svimpbox.cxx b/vcl/source/treelist/svimpbox.cxx index eb69c9d5d295..689bce430dab 100644 --- a/vcl/source/treelist/svimpbox.cxx +++ b/vcl/source/treelist/svimpbox.cxx @@ -1894,7 +1894,7 @@ bool SvImpLBox::ButtonUpCheckCtrl( const MouseEvent& rMEvt ) // ******* Control plus/minus button for expanding/collapsing // false == no expand/collapse button hit -bool SvImpLBox::IsNodeButton( const Point& rPosPixel, SvTreeListEntry* pEntry ) const +bool SvImpLBox::IsNodeButton( const Point& rPosPixel, const SvTreeListEntry* pEntry ) const { if( !pEntry->HasChildren() && !pEntry->HasChildrenOnDemand() ) return false; diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx index 05b3d9d2a891..b3f9506f5839 100644 --- a/vcl/source/treelist/treelistbox.cxx +++ b/vcl/source/treelist/treelistbox.cxx @@ -507,7 +507,7 @@ bool SvTreeListBox::CheckDragAndDropMode( SvTreeListBox const * pSource, sal_Int */ TriState SvTreeListBox::NotifyMoving( SvTreeListEntry* pTarget, // D&D dropping position in GetModel() - SvTreeListEntry* pEntry, // entry that we want to move, from + const SvTreeListEntry* pEntry, // entry that we want to move, from // GetSourceListBox()->GetModel() SvTreeListEntry*& rpNewParent, // new target parent sal_uLong& rNewChildPos) // position in childlist of target parent @@ -541,7 +541,7 @@ TriState SvTreeListBox::NotifyMoving( TriState SvTreeListBox::NotifyCopying( SvTreeListEntry* pTarget, // D&D dropping position in GetModel() - SvTreeListEntry* pEntry, // entry that we want to move, from + const SvTreeListEntry* pEntry, // entry that we want to move, from // GetSourceListBox()->GetModel() SvTreeListEntry*& rpNewParent, // new target parent sal_uLong& rNewChildPos) // position in childlist of target parent @@ -1158,7 +1158,7 @@ void SvTreeListBox::StartDrag( sal_Int8, const Point& rPosPixel ) xContainer->StartDrag(this, mnDragAction, GetDragFinishedHdl()); } -void SvTreeListBox::SetDragHelper(rtl::Reference<TransferDataContainer>& rHelper, sal_uInt8 eDNDConstants) +void SvTreeListBox::SetDragHelper(const rtl::Reference<TransferDataContainer>& rHelper, sal_uInt8 eDNDConstants) { m_xTransferHelper = rHelper; mnDragAction = eDNDConstants; @@ -2941,7 +2941,7 @@ tools::Rectangle SvTreeListBox::GetFocusRect(const SvTreeListEntry* pEntry, long return aRect; } -sal_IntPtr SvTreeListBox::GetTabPos(const SvTreeListEntry* pEntry, SvLBoxTab* pTab) +sal_IntPtr SvTreeListBox::GetTabPos(const SvTreeListEntry* pEntry, const SvLBoxTab* pTab) { assert(pTab); sal_IntPtr nPos = pTab->GetPos(); diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 9e4831789f8d..ea9a0bb7f064 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -793,7 +793,7 @@ bool sortButtons::operator()(const vcl::Window *pA, const vcl::Window *pB) const return getButtonPriority(pA->GetHelpId()) < getButtonPriority(pB->GetHelpId()); } -void sort_native_button_order(VclBox& rContainer) +void sort_native_button_order(const VclBox& rContainer) { std::vector<vcl::Window*> aChilds; for (vcl::Window* pChild = rContainer.GetWindow(GetWindowType::FirstChild); pChild; diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index 1b029e031f64..29035742fd99 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -2044,7 +2044,7 @@ bool SalX11Display::Dispatch( XEvent *pEvent ) } #ifdef DBG_UTIL -void SalDisplay::DbgPrintDisplayEvent(const char *pComment, XEvent *pEvent) const +void SalDisplay::DbgPrintDisplayEvent(const char *pComment, const XEvent *pEvent) const { static const char* const EventNames[] = { diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx index 6d8fec490c11..9b3f8dc5c6f1 100644 --- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx +++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx @@ -399,7 +399,7 @@ rtl::Reference<LogicalFontInstance> FreetypeFontFace::CreateFontInstance(const F // FreetypeFont -FreetypeFont::FreetypeFont(FreetypeFontInstance& rFontInstance, std::shared_ptr<FreetypeFontInfo>& rFI) +FreetypeFont::FreetypeFont(FreetypeFontInstance& rFontInstance, const std::shared_ptr<FreetypeFontInfo>& rFI) : mrFontInstance(rFontInstance), mnCos( 0x10000), mnSin( 0 ), |