From 38187ec15b6cbaedcadcbd8f3bcb632a5c6be88f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 6 Dec 2018 11:37:51 +0200 Subject: loplugin:singlevalfields extend to all static vars Change-Id: Ic238bb5291539fd1b7e98cb4afc9b25f37e7d528 Reviewed-on: https://gerrit.libreoffice.org/64710 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sw/source/core/fields/reffld.cxx | 2 +- sw/source/core/layout/paintfrm.cxx | 4 ++-- sw/source/uibase/docvw/AnchorOverlayObject.cxx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sw') diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index 40793345af65..dadce67ae675 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -277,7 +277,7 @@ static void lcl_formatReferenceLanguage( OUString& rRefText, // ASCII 1-letter numbering // az a), e), f) ... x) // az i., v. (but, a x.) - static OUString sLettersStartingWithVowels = "aefilmnorsuxyAEFILMNORSUXY"; + static const OUString sLettersStartingWithVowels = "aefilmnorsuxyAEFILMNORSUXY"; if (sLettersStartingWithVowels.indexOf(sNumbering[0]) != -1) { // x), X) are letters, but x. and X. etc. are Roman numbers diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 020ae12a4f3d..c20b483d225d 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -1714,8 +1714,8 @@ bool DrawFillAttributes( // is not full opacity but 0.75 opacity) we need some overlap here to avoid paint // artifacts. Checked experimentally - a little bit more in Y is needed, probably // due to still existing integer alignment and crunching in writer. - static double fExpandX = 0.55; - static double fExpandY = 0.70; + static const double fExpandX = 0.55; + static const double fExpandY = 0.70; const basegfx::B2DVector aSingleUnit(rOut.GetInverseViewTransformation() * basegfx::B2DVector(fExpandX, fExpandY)); aPaintRange.expand(aPaintRange.getMinimum() - aSingleUnit); diff --git a/sw/source/uibase/docvw/AnchorOverlayObject.cxx b/sw/source/uibase/docvw/AnchorOverlayObject.cxx index 73ce30f7a32e..7c693ebe5e48 100644 --- a/sw/source/uibase/docvw/AnchorOverlayObject.cxx +++ b/sw/source/uibase/docvw/AnchorOverlayObject.cxx @@ -274,7 +274,7 @@ drawinglayer::primitive2d::Primitive2DContainer AnchorOverlayObject::createOverl { implEnsureGeometry(); - static double aDiscreteLineWidth(1.6); + static const double aDiscreteLineWidth(1.6); const drawinglayer::primitive2d::Primitive2DReference aReference( new AnchorPrimitive( maTriangle, maLine, -- cgit