diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-06 11:37:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-07 07:38:24 +0100 |
commit | 38187ec15b6cbaedcadcbd8f3bcb632a5c6be88f (patch) | |
tree | ac3de03a8c2944371ce43443750f6eeb8d318046 /vcl | |
parent | 60714a814847f6d10f00aa6809a3896a48741e0b (diff) |
loplugin:singlevalfields extend to all static vars
Change-Id: Ic238bb5291539fd1b7e98cb4afc9b25f37e7d528
Reviewed-on: https://gerrit.libreoffice.org/64710
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/app/svapp.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/printdlg.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/window/FWS.cxx | 9 |
3 files changed, 3 insertions, 12 deletions
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index f4d2080849de..41a342635437 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -1533,7 +1533,7 @@ const OUString& Application::GetDesktopEnvironment() { if (IsHeadlessModeEnabled()) { - static OUString aNone("none"); + static const OUString aNone("none"); return aNone; } else diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 6a038106fd23..05db90085456 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -346,7 +346,7 @@ void PrintDialog::PrintPreviewWindow::preparePreviewBitmap() // what may look awkward and pixelated (again). This means // to use a percentage value - if we have at least // that value of required pixels, we are good. - static double fPreventAwkwardFactor(1.35); // 35% + static const double fPreventAwkwardFactor(1.35); // 35% if(nCurrentSquarePixels >= static_cast<sal_uInt32>(nRequiredSquarePixels * fPreventAwkwardFactor)) { // at this place we also could add a mechanism to let the preview @@ -366,7 +366,7 @@ void PrintDialog::PrintPreviewWindow::preparePreviewBitmap() // Calculate nPlannedSquarePixels which is the required size // expanded by a percentage (with max value of MaxSquarePixels) - static double fExtraSpaceFactor(1.65); // 65% + static const double fExtraSpaceFactor(1.65); // 65% const sal_uInt32 nPlannedSquarePixels( std::min( nMaxSquarePixels, diff --git a/vcl/unx/generic/window/FWS.cxx b/vcl/unx/generic/window/FWS.cxx index 5a470babf6cc..96ef09fdd111 100644 --- a/vcl/unx/generic/window/FWS.cxx +++ b/vcl/unx/generic/window/FWS.cxx @@ -45,11 +45,6 @@ static Atom FWS_NORMAL_STATE; static Atom WM_PROTOCOLS; static Atom WM_CHANGE_STATE; -static Bool fwsStackUnder; -static Bool fwsParkIcons; -static Bool fwsPassesInput; -static Bool fwsHandlesFocus; - static Window fwsCommWindow; // Initialize our atoms and determine if the current window manager is @@ -131,7 +126,6 @@ WMSupportsFWS (Display *display, int screen) protocol = reinterpret_cast<Atom *>(propData)[i]; if (protocol == FWS_STACK_UNDER) { - fwsStackUnder = True; #if OSL_DEBUG_LEVEL > 1 fprintf (stderr, "Using fwsStackUnder.\n"); #endif @@ -139,7 +133,6 @@ WMSupportsFWS (Display *display, int screen) else if (protocol == FWS_PARK_ICONS) { - fwsParkIcons = True; #if OSL_DEBUG_LEVEL > 1 fprintf (stderr, "Using fwsParkIcons.\n"); #endif @@ -147,7 +140,6 @@ WMSupportsFWS (Display *display, int screen) else if (protocol == FWS_PASSES_INPUT) { - fwsPassesInput = True; #if OSL_DEBUG_LEVEL > 1 fprintf (stderr, "Using fwsPassesInput.\n"); #endif @@ -155,7 +147,6 @@ WMSupportsFWS (Display *display, int screen) else if (protocol == FWS_HANDLES_FOCUS) { - fwsHandlesFocus = True; #if OSL_DEBUG_LEVEL > 1 fprintf (stderr, "Using fwsHandlesFocus.\n"); #endif |