summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-04 14:34:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-11 09:48:10 +0200
commit49eb02f07a5af44da59008a238e828b4a9532bef (patch)
tree43c4b4eaacd79fe0bff784a4ef71f4c1080c3912 /vcl
parent5823ecd54b16974ffe8821a5ae061cd0ecc4cf84 (diff)
new loplugin:unusedvariablemore
collection of heuristics to look for local variables that are never read from i.e. do not contribute to the surrounding logic This is an expensive plugin, since it walks up the parent tree, so it is off by default. Change-Id: Ib8ba292241bd16adf299e8bba4502cb473513a06 Reviewed-on: https://gerrit.libreoffice.org/52450 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/edit.cxx8
-rw-r--r--vcl/source/window/splitwin.cxx3
2 files changed, 2 insertions, 9 deletions
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 8d3bfa665596..a1671d70bb59 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -532,7 +532,7 @@ void Edit::ImplRepaint(vcl::RenderContext& rRenderContext, const tools::Rectangl
else
rRenderContext.SetTextFillColor(IsControlBackground() ? GetControlBackground() : rStyleSettings.GetFieldColor());
- ImplPaintBorder(rRenderContext, 0, GetOutputSizePixel().Width());
+ ImplPaintBorder(rRenderContext);
bool bDrawSelection = maSelection.Len() && (HasFocus() || (GetStyle() & WB_NOHIDESELECTION) || mbActivePopup);
@@ -1000,16 +1000,12 @@ void Edit::ImplClearBackground(vcl::RenderContext& rRenderContext, const tools::
}
}
-void Edit::ImplPaintBorder(vcl::RenderContext const & rRenderContext, long nXStart, long nXEnd)
+void Edit::ImplPaintBorder(vcl::RenderContext const & rRenderContext)
{
// this is not needed when double-buffering
if (SupportsDoubleBuffering())
return;
- tools::Rectangle aRect(Point(), GetOutputSizePixel());
- aRect.SetLeft( nXStart );
- aRect.SetRight( nXEnd );
-
if (ImplUseNativeBorder(rRenderContext, GetStyle()) || IsPaintTransparent())
{
// draw the inner part by painting the whole control using its border window
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 42479871c8a4..a0a2be3fb4e7 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -1390,7 +1390,6 @@ Size SplitWindow::CalcLayoutSizePixel( const Size& aNewSize )
if ( i == mpMainSet->mvItems.size() )
{
long nDelta = 0;
- Point aPos = GetPosPixel();
long nCurSize;
if ( mbHorz )
@@ -1410,7 +1409,6 @@ Size SplitWindow::CalcLayoutSizePixel( const Size& aNewSize )
aSize.AdjustHeight(nDelta );
break;
case WindowAlign::Bottom:
- aPos.AdjustY( -nDelta );
aSize.AdjustHeight(nDelta );
break;
case WindowAlign::Left:
@@ -1418,7 +1416,6 @@ Size SplitWindow::CalcLayoutSizePixel( const Size& aNewSize )
break;
case WindowAlign::Right:
default:
- aPos.AdjustX( -nDelta );
aSize.AdjustWidth(nDelta );
break;
}