summaryrefslogtreecommitdiff
path: root/svtools/source/control/valueset.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-13 08:40:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-13 09:02:09 +0100
commit630b5db9a10cd49d24d5e563374bd68f1fe670f5 (patch)
tree711cff6fd0fcf1c2648bcf358e976cba34c2affb /svtools/source/control/valueset.cxx
parentca0308797df86ebece19260f3ca438a0cb437208 (diff)
loplugin:singlevalfields in svtools
Change-Id: I6bb8a875f18df3cb7054fa65285eb3cafc1648ac Reviewed-on: https://gerrit.libreoffice.org/63316 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools/source/control/valueset.cxx')
-rw-r--r--svtools/source/control/valueset.cxx26
1 files changed, 4 insertions, 22 deletions
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index 407fcf3019f0..87f9a61993de 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -2286,7 +2286,6 @@ SvtValueSet::SvtValueSet(std::unique_ptr<weld::ScrolledWindow> pScrolledWindow)
mbBlackSel = false;
mbDoubleSel = false;
mbScroll = false;
- mbFullMode = true;
mbEdgeBlending = false;
mbHasVisibleItems = false;
@@ -3165,18 +3164,10 @@ void SvtValueSet::Format(vcl::RenderContext const & rRenderContext)
// calculate offsets
long nStartX;
long nStartY;
- if (mbFullMode)
- {
- long nAllItemWidth = (mnItemWidth * mnCols) + nColSpace;
- long nAllItemHeight = (mnItemHeight * mnVisLines) + nNoneHeight + nLineSpace;
- nStartX = (aWinSize.Width() - nAllItemWidth) / 2;
- nStartY = (aWinSize.Height() - nAllItemHeight) / 2;
- }
- else
- {
- nStartX = 0;
- nStartY = 0;
- }
+ long nAllItemWidth = (mnItemWidth * mnCols) + nColSpace;
+ long nAllItemHeight = (mnItemHeight * mnVisLines) + nNoneHeight + nLineSpace;
+ nStartX = (aWinSize.Width() - nAllItemWidth) / 2;
+ nStartY = (aWinSize.Height() - nAllItemHeight) / 2;
// calculate and draw items
maVirDev->SetLineColor();
@@ -3211,15 +3202,6 @@ void SvtValueSet::Format(vcl::RenderContext const & rRenderContext)
maItemListRect.SetRight( x + mnCols * (mnItemWidth + mnSpacing) - mnSpacing - 1 );
maItemListRect.SetBottom( y + mnVisLines * (mnItemHeight + mnSpacing) - mnSpacing - 1 );
- if (!mbFullMode)
- {
- // If want also draw parts of items in the last line,
- // then we add one more line if parts of these line are
- // visible
- if (y + (mnVisLines * (mnItemHeight + mnSpacing)) < aWinSize.Height())
- nLastItem += mnCols;
- maItemListRect.SetBottom( aWinSize.Height() - y );
- }
for (size_t i = 0; i < nItemCount; i++)
{
SvtValueSetItem* pItem = mItemList[i].get();