loplugin:unnecessaryreturn in SvxColorValueSet::layoutToGivenHeight

Change-Id: Ia42158597588fe802a2f06a6e8e59f372c62c022
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117031
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2021-06-10 12:17:15 +02:00
parent eea9224017
commit 4fbc246c70
2 changed files with 2 additions and 7 deletions

View File

@@ -41,7 +41,7 @@ public:
void addEntriesForXColorList(const XColorList& rXColorList, sal_uInt32 nStartIndex = 1);
void addEntriesForColorSet(const std::set<Color>& rColorSet, const OUString& rNamePrefix);
Size layoutAllVisible(sal_uInt32 nEntryCount);
Size layoutToGivenHeight(sal_uInt32 nHeight, sal_uInt32 nEntryCount);
void layoutToGivenHeight(sal_uInt32 nHeight, sal_uInt32 nEntryCount);
virtual FactoryFunction GetUITestFactory() const override;
};

View File

@@ -124,7 +124,7 @@ void SvxColorValueSet::Resize()
ValueSet::Resize();
}
Size SvxColorValueSet::layoutToGivenHeight(sal_uInt32 nHeight, sal_uInt32 nEntryCount)
void SvxColorValueSet::layoutToGivenHeight(sal_uInt32 nHeight, sal_uInt32 nEntryCount)
{
if(!nEntryCount)
{
@@ -157,15 +157,10 @@ Size SvxColorValueSet::layoutToGivenHeight(sal_uInt32 nHeight, sal_uInt32 nEntry
SetStyle(aWinBits|WB_VSCROLL);
}
// set height to wanted height
aNewSize.setHeight( nHeight );
SetItemWidth(aItemSize.Width());
SetItemHeight(aItemSize.Height());
SetColCount(SvxColorValueSet::getColumnCount());
SetLineCount(nLineCount);
return aNewSize;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */