summaryrefslogtreecommitdiff
path: root/svtools/source/control/toolbarmenu.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-26 14:47:31 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-27 08:43:07 +0200
commitc937c6828784260f3536a37f8e297dc721a7d974 (patch)
treee04b2459294d785134cebca133bb324f07db14af /svtools/source/control/toolbarmenu.cxx
parent8dca2d5ac740f262b045f6529bd8e97af0ec9c47 (diff)
loplugin:oncevar in svtools
Change-Id: Ic97e75c81a0c00853d2f10aaf182ab476c466c86 Reviewed-on: https://gerrit.libreoffice.org/39281 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools/source/control/toolbarmenu.cxx')
-rw-r--r--svtools/source/control/toolbarmenu.cxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index 17c666288fc6..33df12a8b6d8 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -1142,12 +1142,12 @@ static void ImplPaintCheckBackground(vcl::RenderContext& rRenderContext, vcl::Wi
if (rRenderContext.IsNativeControlSupported(ControlType::Toolbar, ControlPart::Button))
{
ImplControlValue aControlValue;
- ControlState nState = ControlState::PRESSED | ControlState::ENABLED;
-
aControlValue.setTristateVal(ButtonValue::On);
bNativeOk = rRenderContext.DrawNativeControl(ControlType::Toolbar, ControlPart::Button,
- i_rRect, nState, aControlValue, OUString());
+ i_rRect,
+ ControlState::PRESSED | ControlState::ENABLED,
+ aControlValue, OUString());
}
if (!bNativeOk)
@@ -1160,8 +1160,6 @@ static void ImplPaintCheckBackground(vcl::RenderContext& rRenderContext, vcl::Wi
void ToolbarMenu::implPaint(vcl::RenderContext& rRenderContext, ToolbarMenuEntry* pThisOnly, bool bHighlighted)
{
- sal_uInt16 nBorder = 0; long nStartY = 0; // from Menu implementations, needed when we support native menu background & scrollable menu
-
long nFontHeight = GetTextHeight();
long nCheckHeight = 0, nRadioHeight = 0, nMaxCheckWidth = 0;
@@ -1178,8 +1176,6 @@ void ToolbarMenu::implPaint(vcl::RenderContext& rRenderContext, ToolbarMenuEntry
for (const auto& pEntry : mpImpl->maEntryVector)
{
Point aPos(aTopLeft);
- aPos.Y() += nBorder;
- aPos.Y() += nStartY;
if ((pEntry == nullptr) && !pThisOnly)
{