From d86d7829978b325b03450eec6e83f6e1935c90ab Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 25 May 2020 14:09:40 +0200 Subject: loplugin:constantparam Change-Id: I8961b5df1b3a7ea9b7dd83114fce1555b9e4ffcc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94787 Tested-by: Noel Grandin Reviewed-by: Noel Grandin --- vcl/inc/listbox.hxx | 2 +- vcl/inc/sallayout.hxx | 6 ++---- vcl/source/control/combobox.cxx | 2 +- vcl/source/control/imp_listbox.cxx | 6 +++--- vcl/source/gdi/sallayout.cxx | 9 ++------- 5 files changed, 9 insertions(+), 16 deletions(-) (limited to 'vcl') diff --git a/vcl/inc/listbox.hxx b/vcl/inc/listbox.hxx index 71612358be6e..1e4512eef338 100644 --- a/vcl/inc/listbox.hxx +++ b/vcl/inc/listbox.hxx @@ -275,7 +275,7 @@ public: sal_uInt16 GetDisplayLineCount() const; void SetEntryFlags( sal_Int32 nPos, ListBoxEntryFlags nFlags ); - void DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32 nPos, bool bDrawImage, bool bDrawText, bool bDrawTextAtImagePos); + void DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32 nPos, bool bDrawImage, bool bDrawText); void SelectEntry( sal_Int32 nPos, bool bSelect ); void DeselectAll(); diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx index e94b4c20531e..9ab526365ea7 100644 --- a/vcl/inc/sallayout.hxx +++ b/vcl/inc/sallayout.hxx @@ -130,8 +130,7 @@ public: DeviceCoordinate FillDXArray(DeviceCoordinate* pDXArray) const override; void GetCaretPositions(int nArraySize, long* pCaretXArray) const override; bool GetNextGlyph(const GlyphItem** pGlyph, Point& rPos, int& nStart, - const PhysicalFontFace** pFallbackFont = nullptr, - int* const pFallbackLevel = nullptr) const override; + const PhysicalFontFace** pFallbackFont = nullptr) const override; bool GetOutline(basegfx::B2DPolyPolygonVector&) const override; bool IsKashidaPosValid(int nCharPos) const override; @@ -184,8 +183,7 @@ public: { return m_GlyphItems.Impl()->GetFont(); } bool GetNextGlyph(const GlyphItem** pGlyph, Point& rPos, int& nStart, - const PhysicalFontFace** pFallbackFont = nullptr, - int* const pFallbackLevel = nullptr) const override; + const PhysicalFontFace** pFallbackFont = nullptr) const override; private: // for glyph+font+script fallback diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 18913f77eafd..13a3bc8dfeaa 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -1271,7 +1271,7 @@ void ComboBox::EnableUserDraw( bool bUserDraw ) void ComboBox::DrawEntry(const UserDrawEvent& rEvt) { SAL_WARN_IF(rEvt.GetWindow() != m_pImpl->m_pImplLB->GetMainWindow(), "vcl", "DrawEntry?!"); - m_pImpl->m_pImplLB->GetMainWindow()->DrawEntry(*rEvt.GetRenderContext(), rEvt.GetItemId(), /*bDrawImage*/false, /*bDrawText*/false, /*bDrawTextAtImagePos*/false); + m_pImpl->m_pImplLB->GetMainWindow()->DrawEntry(*rEvt.GetRenderContext(), rEvt.GetItemId(), /*bDrawImage*/false, /*bDrawText*/false); } void ComboBox::AddSeparator( sal_Int32 n ) diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx index 9a5963e0a8e0..b174d21c0f2e 100644 --- a/vcl/source/control/imp_listbox.cxx +++ b/vcl/source/control/imp_listbox.cxx @@ -1741,11 +1741,11 @@ void ImplListBoxWindow::ImplPaint(vcl::RenderContext& rRenderContext, sal_Int32 } else { - DrawEntry(rRenderContext, nPos, true, true, /*bDrawTextAtImagePos*/false); + DrawEntry(rRenderContext, nPos, true, true); } } -void ImplListBoxWindow::DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32 nPos, bool bDrawImage, bool bDrawText, bool bDrawTextAtImagePos) +void ImplListBoxWindow::DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32 nPos, bool bDrawImage, bool bDrawText) { const ImplEntryType* pEntry = mpEntryList->GetEntryPtr(nPos); if (!pEntry) @@ -1816,7 +1816,7 @@ void ImplListBoxWindow::DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32 tools::Rectangle aTextRect(Point(gnBorder - mnLeft, nY), Size(nMaxWidth, nEntryHeight)); - if (!bDrawTextAtImagePos && (mpEntryList->HasEntryImage(nPos) || IsUserDrawEnabled())) + if (mpEntryList->HasEntryImage(nPos) || IsUserDrawEnabled()) { long nImageWidth = std::max(mnMaxImgWidth, maUserItemSize.Width()); aTextRect.AdjustLeft(nImageWidth + IMG_TXT_DISTANCE ); diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index eaa016ed1927..55aa145095be 100644 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -895,7 +895,7 @@ sal_Int32 GenericSalLayout::GetTextBreak( DeviceCoordinate nMaxWidth, DeviceCoor bool GenericSalLayout::GetNextGlyph(const GlyphItem** pGlyph, Point& rPos, int& nStart, - const PhysicalFontFace**, int* const pFallbackLevel) const + const PhysicalFontFace**) const { std::vector::const_iterator pGlyphIter = m_GlyphItems.Impl()->begin(); std::vector::const_iterator pGlyphIterEnd = m_GlyphItems.Impl()->end(); @@ -918,8 +918,6 @@ bool GenericSalLayout::GetNextGlyph(const GlyphItem** pGlyph, // update return data with glyph info *pGlyph = &(*pGlyphIter); - if (pFallbackLevel) - *pFallbackLevel = 0; ++nStart; // calculate absolute position in pixel units @@ -1506,8 +1504,7 @@ void MultiSalLayout::GetCaretPositions( int nMaxIndex, long* pCaretXArray ) cons bool MultiSalLayout::GetNextGlyph(const GlyphItem** pGlyph, Point& rPos, int& nStart, - const PhysicalFontFace** pFallbackFont, - int* const pFallbackLevel) const + const PhysicalFontFace** pFallbackFont) const { // NOTE: nStart is tagged with current font index int nLevel = static_cast(nStart) >> GF_FONTSHIFT; @@ -1523,8 +1520,6 @@ bool MultiSalLayout::GetNextGlyph(const GlyphItem** pGlyph, nStart |= nFontTag; if (pFallbackFont) *pFallbackFont = pFontFace; - if (pFallbackLevel) - *pFallbackLevel = nLevel; rPos += maDrawBase; rPos += maDrawOffset; return true; -- cgit