diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-01-23 09:08:24 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-01-23 10:43:50 +0100 |
commit | d010dd58e8afd7e135c7479dcabd6986eadb664f (patch) | |
tree | 7cace5b4bead0d676f0bc569e32f6902ecdf7f94 /vcl/source | |
parent | 8f7c35072a6bbb33f6582c8c9a37a275c8d3cb14 (diff) |
loplugin:constparams in vcl
Change-Id: Icf1a952fbe190fd6c4efd89364136aa2b48050e3
Reviewed-on: https://gerrit.libreoffice.org/66767
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/app/salvtables.cxx | 4 | ||||
-rw-r--r-- | vcl/source/bitmap/BitmapGaussianSeparableBlurFilter.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/imp_listbox.cxx | 2 | ||||
-rw-r--r-- | vcl/source/edit/textdoc.cxx | 2 | ||||
-rw-r--r-- | vcl/source/edit/textdoc.hxx | 2 | ||||
-rw-r--r-- | vcl/source/font/fontmetric.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/CommonSalLayout.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/impvect.cxx | 2 | ||||
-rw-r--r-- | vcl/source/graphic/Manager.cxx | 2 | ||||
-rw-r--r-- | vcl/source/image/ImplImageTree.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/dialog.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/menuitemlist.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/menuitemlist.hxx | 2 | ||||
-rw-r--r-- | vcl/source/window/splitwin.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/syswin.cxx | 6 | ||||
-rw-r--r-- | vcl/source/window/winproc.cxx | 4 |
16 files changed, 20 insertions, 20 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 4c343f85d53d..e1087b4f311c 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -591,13 +591,13 @@ namespace return Image(StockImage::Yes, rImage); } - Image createImage(VirtualDevice& rDevice) + Image createImage(const VirtualDevice& rDevice) { return Image(rDevice.GetBitmapEx(Point(), rDevice.GetOutputSizePixel())); } void insert_to_menu(PopupMenu* pMenu, int pos, const OUString& rId, const OUString& rStr, - const OUString* pIconName, VirtualDevice* pImageSurface, bool bCheck) + const OUString* pIconName, const VirtualDevice* pImageSurface, bool bCheck) { const auto nCount = pMenu->GetItemCount(); const sal_uInt16 nLastId = nCount ? pMenu->GetItemId(nCount-1) : 0; diff --git a/vcl/source/bitmap/BitmapGaussianSeparableBlurFilter.cxx b/vcl/source/bitmap/BitmapGaussianSeparableBlurFilter.cxx index 990a3f090056..71888f43ca25 100644 --- a/vcl/source/bitmap/BitmapGaussianSeparableBlurFilter.cxx +++ b/vcl/source/bitmap/BitmapGaussianSeparableBlurFilter.cxx @@ -83,7 +83,7 @@ BitmapEx BitmapGaussianSeparableBlurFilter::execute(BitmapEx const& rBitmapEx) c return BitmapEx(); } -bool BitmapGaussianSeparableBlurFilter::convolutionPass(Bitmap& rBitmap, Bitmap& aNewBitmap, +bool BitmapGaussianSeparableBlurFilter::convolutionPass(const Bitmap& rBitmap, Bitmap& aNewBitmap, BitmapReadAccess const* pReadAcc, int aNumberOfContributions, const double* pWeights, int const* pPixels, diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx index 41750ae91eca..1a059785994a 100644 --- a/vcl/source/control/imp_listbox.cxx +++ b/vcl/source/control/imp_listbox.cxx @@ -604,7 +604,7 @@ struct ImplEntryMetrics long nImgHeight; }; -SalLayoutGlyphs* ImplEntryType::GetTextGlyphs(OutputDevice* pOutputDevice) +SalLayoutGlyphs* ImplEntryType::GetTextGlyphs(const OutputDevice* pOutputDevice) { if (maStrGlyphs.IsValid()) // Use pre-calculated result. diff --git a/vcl/source/edit/textdoc.cxx b/vcl/source/edit/textdoc.cxx index b8908f0ee6c7..bca776388ee0 100644 --- a/vcl/source/edit/textdoc.cxx +++ b/vcl/source/edit/textdoc.cxx @@ -495,7 +495,7 @@ TextPaM TextDoc::InsertParaBreak( const TextPaM& rPaM ) return aPaM; } -TextPaM TextDoc::ConnectParagraphs( TextNode* pLeft, TextNode* pRight ) +TextPaM TextDoc::ConnectParagraphs( TextNode* pLeft, const TextNode* pRight ) { sal_Int32 nPrevLen = pLeft->GetText().getLength(); pLeft->Append( *pRight ); diff --git a/vcl/source/edit/textdoc.hxx b/vcl/source/edit/textdoc.hxx index 0130a2377f43..4bd67fc5e25d 100644 --- a/vcl/source/edit/textdoc.hxx +++ b/vcl/source/edit/textdoc.hxx @@ -112,7 +112,7 @@ public: TextPaM InsertText( const TextPaM& rPaM, const OUString& rStr ); TextPaM InsertParaBreak( const TextPaM& rPaM ); - TextPaM ConnectParagraphs( TextNode* pLeft, TextNode* pRight ); + TextPaM ConnectParagraphs( TextNode* pLeft, const TextNode* pRight ); sal_Int32 GetTextLen( const sal_Unicode* pSep, const TextSelection* pSel = nullptr ) const; OUString GetText( const sal_Unicode* pSep ) const; diff --git a/vcl/source/font/fontmetric.cxx b/vcl/source/font/fontmetric.cxx index 5a5dec974c9f..36d9f7d727eb 100644 --- a/vcl/source/font/fontmetric.cxx +++ b/vcl/source/font/fontmetric.cxx @@ -395,7 +395,7 @@ void ImplFontMetricData::ImplInitFlags( const OutputDevice* pDev ) SetFullstopCenteredFlag( bCentered ); } -bool ImplFontMetricData::ShouldUseWinMetrics(vcl::TTGlobalFontInfo& rInfo) +bool ImplFontMetricData::ShouldUseWinMetrics(const vcl::TTGlobalFontInfo& rInfo) { if (utl::ConfigManager::IsFuzzing()) return false; diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx index 21d4d1c22ad3..291178af2c6e 100644 --- a/vcl/source/gdi/CommonSalLayout.cxx +++ b/vcl/source/gdi/CommonSalLayout.cxx @@ -616,7 +616,7 @@ void GenericSalLayout::GetCharWidths(DeviceCoordinate* pCharWidths) const // * For any RTL glyph that has DX adjustment, insert enough Kashidas to // fill in the added space. -void GenericSalLayout::ApplyDXArray(ImplLayoutArgs& rArgs) +void GenericSalLayout::ApplyDXArray(const ImplLayoutArgs& rArgs) { if (rArgs.mpDXArray == nullptr) return; diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx index 2b959aee204b..896182663dca 100644 --- a/vcl/source/gdi/impvect.cxx +++ b/vcl/source/gdi/impvect.cxx @@ -44,7 +44,7 @@ #define VECT_POLY_OUTLINE_INNER 4UL #define VECT_POLY_OUTLINE_OUTER 8UL -static void VECT_MAP( std::unique_ptr<long []> & pMapIn, std::unique_ptr<long []>& pMapOut, long nVal ) +static void VECT_MAP( const std::unique_ptr<long []> & pMapIn, const std::unique_ptr<long []>& pMapOut, long nVal ) { pMapIn[nVal] = (nVal * 4) + 1; pMapOut[nVal] = pMapIn[nVal] + 5; diff --git a/vcl/source/graphic/Manager.cxx b/vcl/source/graphic/Manager.cxx index 98ef80eebddc..c5408a62bce0 100644 --- a/vcl/source/graphic/Manager.cxx +++ b/vcl/source/graphic/Manager.cxx @@ -108,7 +108,7 @@ IMPL_LINK(Manager, SwapOutTimerHandler, Timer*, pTimer, void) pTimer->Start(); } -void Manager::registerGraphic(std::shared_ptr<ImpGraphic>& pImpGraphic, +void Manager::registerGraphic(const std::shared_ptr<ImpGraphic>& pImpGraphic, OUString const& /*rsContext*/) { // make some space first diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx index b6ea1196c054..ae8e29e353eb 100644 --- a/vcl/source/image/ImplImageTree.cxx +++ b/vcl/source/image/ImplImageTree.cxx @@ -485,7 +485,7 @@ void ImplImageTree::createStyle() } /// Find an icon cache for the right scale factor -ImplImageTree::IconCache &ImplImageTree::getIconCache(ImageRequestParameters& rParameters) +ImplImageTree::IconCache &ImplImageTree::getIconCache(const ImageRequestParameters& rParameters) { IconSet &rSet = getCurrentIconSet(); auto it = rSet.maScaledIconCaches.find(rParameters.mnScalePercentage); diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 312608347af9..af49c58ba7f7 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -199,7 +199,7 @@ vcl::Window * lastLogicalChildOfParent(const vcl::Window *pTopLevel) return const_cast<vcl::Window *>(pChild); } -void Accelerator::GenerateAutoMnemonicsOnHierarchy(vcl::Window* pWindow) +void Accelerator::GenerateAutoMnemonicsOnHierarchy(const vcl::Window* pWindow) { MnemonicGenerator aMnemonicGenerator; vcl::Window* pGetChild; diff --git a/vcl/source/window/menuitemlist.cxx b/vcl/source/window/menuitemlist.cxx index 62127940e4e1..e05672510b7a 100644 --- a/vcl/source/window/menuitemlist.cxx +++ b/vcl/source/window/menuitemlist.cxx @@ -39,7 +39,7 @@ MenuItemData::~MenuItemData() pSubMenu.disposeAndClear(); } -SalLayoutGlyphs* MenuItemData::GetTextGlyphs(OutputDevice* pOutputDevice) +SalLayoutGlyphs* MenuItemData::GetTextGlyphs(const OutputDevice* pOutputDevice) { if (aTextGlyphs.IsValid()) // Use pre-calculated result. diff --git a/vcl/source/window/menuitemlist.hxx b/vcl/source/window/menuitemlist.hxx index 3d91ef498489..a41dc9eaef2c 100644 --- a/vcl/source/window/menuitemlist.hxx +++ b/vcl/source/window/menuitemlist.hxx @@ -92,7 +92,7 @@ struct MenuItemData ~MenuItemData(); /// Computes aText's text layout (glyphs), cached in aTextGlyphs. - SalLayoutGlyphs* GetTextGlyphs(OutputDevice* pOutputDevice); + SalLayoutGlyphs* GetTextGlyphs(const OutputDevice* pOutputDevice); bool HasCheck() const { diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index ed5b9621990a..f2201341d781 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -1033,7 +1033,7 @@ sal_uInt16 SplitWindow::ImplTestSplit( ImplSplitSet* pSet, const Point& rPos, return 0; } -sal_uInt16 SplitWindow::ImplTestSplit( SplitWindow* pWindow, const Point& rPos, +sal_uInt16 SplitWindow::ImplTestSplit( const SplitWindow* pWindow, const Point& rPos, long& rMouseOff, ImplSplitSet** ppFoundSet, sal_uInt16& rFoundPos ) { // Resizable SplitWindow should be treated different diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index 7869b92a08a0..f743186ebebf 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -113,7 +113,7 @@ void SystemWindow::dispose() Window::dispose(); } -static void ImplHandleControlAccelerator( vcl::Window* pWindow, bool bShow ) +static void ImplHandleControlAccelerator( const vcl::Window* pWindow, bool bShow ) { Control *pControl = dynamic_cast<Control*>(pWindow->ImplGetWindow()); if (pControl && pControl->GetText().indexOf('~') != -1) @@ -125,7 +125,7 @@ static void ImplHandleControlAccelerator( vcl::Window* pWindow, bool bShow ) namespace { - void processChildren(vcl::Window *pParent, bool bShowAccel) + void processChildren(const vcl::Window *pParent, bool bShowAccel) { // go through its children vcl::Window* pChild = firstLogicalChildOfParent(pParent); @@ -157,7 +157,7 @@ namespace } } -bool Accelerator::ToggleMnemonicsOnHierarchy(const CommandEvent& rCEvent, vcl::Window *pWindow) +bool Accelerator::ToggleMnemonicsOnHierarchy(const CommandEvent& rCEvent, const vcl::Window *pWindow) { if (rCEvent.GetCommand() == CommandEventId::ModKeyChange && ImplGetSVData()->maNWFData.mbAutoAccel) { diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index f58ea591b922..8fdfdede0bcd 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -1869,13 +1869,13 @@ static void DelayedCloseEventLink( void* pCEvent, void* ) delete pEv; } -static void ImplHandleClose( vcl::Window* pWindow ) +static void ImplHandleClose( const vcl::Window* pWindow ) { ImplSVData* pSVData = ImplGetSVData(); bool bWasPopup = false; if( pWindow->ImplIsFloatingWindow() && - static_cast<FloatingWindow*>(pWindow)->ImplIsInPrivatePopupMode() ) + static_cast<const FloatingWindow*>(pWindow)->ImplIsInPrivatePopupMode() ) { bWasPopup = true; } |