svtools: Drop always false ValueSet::InsertItem bLegend param
No single caller passes any explicit value for that param, so the default of `false` is always used. Drop the param and simplify the implementation a bit. This will also allow for further cleanup in an upcoming commit. Change-Id: I0d2f691eecfac013bc8ad3e506484d958d18ce0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211909 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
@@ -278,9 +278,9 @@ public:
|
||||
|
||||
/// Insert @rImage item.
|
||||
void InsertItem(sal_uInt16 nItemId, const Image& rImage);
|
||||
/// Insert @rImage item with @rStr as either a legend or tooltip depending on @bShowLegend.
|
||||
/// Insert @rImage item with @rStr as tooltip.
|
||||
void InsertItem(sal_uInt16 nItemId, const Image& rImage,
|
||||
const OUString& rStr, size_t nPos = VALUESET_APPEND, bool bShowLegend = false);
|
||||
const OUString& rStr, size_t nPos = VALUESET_APPEND);
|
||||
/// Insert an @rColor item with @rStr tooltip.
|
||||
void InsertItem(sal_uInt16 nItemId, const Color& rColor,
|
||||
const OUString& rStr);
|
||||
|
||||
@@ -1455,12 +1455,11 @@ void ValueSet::InsertItem( sal_uInt16 nItemId, const Image& rImage )
|
||||
}
|
||||
|
||||
void ValueSet::InsertItem( sal_uInt16 nItemId, const Image& rImage,
|
||||
const OUString& rText, size_t nPos,
|
||||
bool bShowLegend )
|
||||
const OUString& rText, size_t nPos)
|
||||
{
|
||||
std::unique_ptr<ValueSetItem> pItem(new ValueSetItem( *this ));
|
||||
pItem->mnId = nItemId;
|
||||
pItem->meType = bShowLegend ? ValueSetItemType::ImageAndText : ValueSetItemType::Image;
|
||||
pItem->meType = ValueSetItemType::Image;
|
||||
pItem->maImage = rImage;
|
||||
pItem->maText = rText;
|
||||
ImplInsertItem( std::move(pItem), nPos );
|
||||
|
||||
Reference in New Issue
Block a user