diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-08 12:39:25 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-08 15:01:13 +0200 |
commit | 516bdf7989dc2e2650490893e1ead054d40eaf37 (patch) | |
tree | 8eb2dab616ea6e73696ca6d8a32dca0bb2881621 /sc/source/ui/app | |
parent | fe977ec07087b103de8c809597fdaea8dd629837 (diff) |
loplugin:singlevalfields
Change-Id: I7c00b7d932bf96a0725eac5482580461baea6977
Reviewed-on: https://gerrit.libreoffice.org/73697
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/app')
-rw-r--r-- | sc/source/ui/app/inputwin.cxx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index e206a3506669..14cd3595c5be 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -991,16 +991,17 @@ void ScInputBarGroup::TextGrabFocus() maTextWndGroup->TextGrabFocus(); } +constexpr long gnBorderWidth = INPUTLINE_INSET_MARGIN + 1; +constexpr long gnBorderHeight = INPUTLINE_INSET_MARGIN + 1; + ScTextWndGroup::ScTextWndGroup(vcl::Window* pParent, ScTabViewShell* pViewSh) : ScTextWndBase(pParent, WinBits(WB_TABSTOP)), maTextWnd(VclPtr<ScTextWnd>::Create(this, pViewSh)), maScrollBar(VclPtr<ScrollBar>::Create(this, WB_TABSTOP | WB_VERT | WB_DRAG)) { - mnBorderWidth = INPUTLINE_INSET_MARGIN + 1; - mnBorderHeight = INPUTLINE_INSET_MARGIN + 1; - maTextWnd->SetPosPixel(Point(mnBorderWidth, mnBorderHeight)); + maTextWnd->SetPosPixel(Point(gnBorderWidth, gnBorderHeight)); Size aSize = GetSizePixel(); - maTextWnd->SetSizePixel(Size(aSize.Width() - 2 * mnBorderWidth, aSize.Height() - 2 * mnBorderHeight)); + maTextWnd->SetSizePixel(Size(aSize.Width() - 2 * gnBorderWidth, aSize.Height() - 2 * gnBorderHeight)); maTextWnd->Show(); maTextWnd->SetQuickHelpText(ScResId(SCSTR_QHELP_INPUTWND)); maTextWnd->SetHelpId(HID_INSWIN_INPUT); @@ -1044,7 +1045,7 @@ long ScTextWndGroup::GetNumLines() long ScTextWndGroup::GetPixelHeightForLines(long nLines) { - return maTextWnd->GetPixelHeightForLines(nLines) + 2 * mnBorderHeight; + return maTextWnd->GetPixelHeightForLines(nLines) + 2 * gnBorderHeight; } ScrollBar& ScTextWndGroup::GetScrollBar() @@ -1110,13 +1111,13 @@ void ScTextWndGroup::Resize() maScrollBar->SetLineSize(maTextWnd->GetTextHeight()); maScrollBar->Resize(); maScrollBar->Show(); - maTextWnd->SetSizePixel(Size(aSize.Width() - aScrollBarSize.Width() - mnBorderWidth - 1, - aSize.Height() - 2 * mnBorderHeight)); + maTextWnd->SetSizePixel(Size(aSize.Width() - aScrollBarSize.Width() - gnBorderWidth - 1, + aSize.Height() - 2 * gnBorderHeight)); } else { maScrollBar->Hide(); - maTextWnd->SetSizePixel(Size(aSize.Width() - 2 * mnBorderWidth, aSize.Height() - 2 * mnBorderHeight)); + maTextWnd->SetSizePixel(Size(aSize.Width() - 2 * gnBorderWidth, aSize.Height() - 2 * gnBorderHeight)); } maTextWnd->Resize(); Invalidate(); |