svtools: Drop unused ValueSet::{Format,ImpFormatItem} param

Now after

    Change-Id: I3593630b4758d0547264c0ed63fec7ac111ccfd7
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Tue Oct 6 17:30:24 2026 +0200

        svtools: Drop ValueSetItemType::ImageAndText and related logic

, the `rRendercontext` param for ValueSet::ImplFormatItem
is unused, so drop it, and also the then unused
corresponding ValueSet::Format param.

Change-Id: Ibc8afabf147974da1ed67ef903abc13c054c4c12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211911
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
This commit is contained in:
Michael Weghorn
2026-10-07 20:26:40 +02:00
parent f01db975cd
commit dc79823c7e
2 changed files with 8 additions and 10 deletions
+2 -3
View File
@@ -212,8 +212,7 @@ private:
friend class ValueSetAcc;
SVT_DLLPRIVATE void ImplDeleteItems();
SVT_DLLPRIVATE void ImplFormatItem(vcl::RenderContext const& rRenderContext,
ValueSetItem& rItem, tools::Rectangle aRect);
SVT_DLLPRIVATE void ImplFormatItem(ValueSetItem& rItem, tools::Rectangle aRect);
// nItemId is the item to draw selected, but if nothing is selected something else may be drawn as selected instead, the item to draw
// selected is returned
SVT_DLLPRIVATE ValueSetItem* ImplGetDrawSelectItem(sal_uInt16 nItemId, const bool bFocus, tools::Rectangle& rRect);
@@ -349,7 +348,7 @@ public:
void SetExtraSpacing( sal_uInt16 nNewSpacing );
void SetMargin( sal_uInt16 nNewMargin );
void Format(vcl::RenderContext const & rRenderContext);
void Format();
void SetFormat();
Size CalcWindowSizePixel(const Size& rItemSize,
+6 -7
View File
@@ -627,7 +627,7 @@ void ValueSet::ImplHighlightItem(sal_uInt16 nItemId)
void ValueSet::ImplDraw(vcl::RenderContext& rRenderContext)
{
if (mbFormat)
Format(rRenderContext);
Format();
Point aDefPos;
Size aSize = maVirDev->GetOutputSizePixel();
@@ -668,9 +668,9 @@ void ValueSet::SelectItem( sal_uInt16 nItemId )
bool bNewOut = !mbFormat && IsReallyVisible();
bool bNewLine = false;
if (weld::DrawingArea* pNeedsFormatToScroll = !mnCols ? GetDrawingArea() : nullptr)
if (!mnCols && GetDrawingArea())
{
Format(pNeedsFormatToScroll->get_ref_device());
Format();
// reset scrollbar so it's set to the later calculated mnFirstLine on
// the next Format
RecalcScrollBar();
@@ -774,7 +774,7 @@ void ValueSet::SetStyle(WinBits nStyle)
}
}
void ValueSet::Format(vcl::RenderContext const & rRenderContext)
void ValueSet::Format()
{
Size aWinSize(GetOutputSizePixel());
size_t nItemCount = mItemList.size();
@@ -972,7 +972,7 @@ void ValueSet::Format(vcl::RenderContext const & rRenderContext)
}
pItem->mbVisible = true;
ImplFormatItem(rRenderContext, *pItem,
ImplFormatItem(*pItem,
tools::Rectangle(Point(x, y), Size(mnItemWidth, mnItemHeight)));
if (!((i + 1) % mnCols))
@@ -1218,8 +1218,7 @@ void ValueSet::ImplDrawSelect(vcl::RenderContext& rRenderContext, const tools::R
}
}
void ValueSet::ImplFormatItem(vcl::RenderContext const&, ValueSetItem& rItem,
tools::Rectangle aRect)
void ValueSet::ImplFormatItem(ValueSetItem& rItem, tools::Rectangle aRect)
{
WinBits nStyle = GetStyle();
if (nStyle & WB_ITEMBORDER)