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 /drawinglayer | |
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 'drawinglayer')
8 files changed, 10 insertions, 10 deletions
diff --git a/drawinglayer/source/primitive2d/controlprimitive2d.cxx b/drawinglayer/source/primitive2d/controlprimitive2d.cxx index 921c9837a8c0..6a638d04da09 100644 --- a/drawinglayer/source/primitive2d/controlprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/controlprimitive2d.cxx @@ -174,7 +174,7 @@ namespace drawinglayer basegfx::B2DVector aScreenZoom( basegfx::fTools::equalZero(aScale.getX()) ? 1.0 : aDiscreteSize.getX() / aScale.getX(), basegfx::fTools::equalZero(aScale.getY()) ? 1.0 : aDiscreteSize.getY() / aScale.getY()); - static double fZoomScale(28.0); // do not ask for this constant factor, but it gets the zoom right + static const double fZoomScale(28.0); // do not ask for this constant factor, but it gets the zoom right aScreenZoom *= fZoomScale; // set zoom at control view for text scaling diff --git a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx index 102097c791dc..8296554f5dc9 100644 --- a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx @@ -69,20 +69,20 @@ namespace drawinglayer if(fSquare > 0.0) { // check if less than a maximum square pixels is used - static sal_uInt32 fMaximumSquare(MAXIMUM_SQUARE_LENGTH * MAXIMUM_SQUARE_LENGTH); + static const sal_uInt32 fMaximumSquare(MAXIMUM_SQUARE_LENGTH * MAXIMUM_SQUARE_LENGTH); if(fSquare < fMaximumSquare) { // calculate needed number of tiles and check if used more than a minimum count const texture::GeoTexSvxTiled aTiling(getReferenceRange()); const sal_uInt32 nTiles(aTiling.getNumberOfTiles()); - static sal_uInt32 nMinimumTiles(MINIMUM_TILES_LENGTH * MINIMUM_TILES_LENGTH); + static const sal_uInt32 nMinimumTiles(MINIMUM_TILES_LENGTH * MINIMUM_TILES_LENGTH); if(nTiles >= nMinimumTiles) { rWidth = basegfx::fround(ceil(fW)); rHeight = basegfx::fround(ceil(fH)); - static sal_uInt32 fMinimumSquare(MINIMUM_SQUARE_LENGTH * MINIMUM_SQUARE_LENGTH); + static const sal_uInt32 fMinimumSquare(MINIMUM_SQUARE_LENGTH * MINIMUM_SQUARE_LENGTH); if(fSquare < fMinimumSquare) { diff --git a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx index 1b1052fd649c..400dd0f0310c 100644 --- a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx @@ -280,7 +280,7 @@ namespace drawinglayer } // determine the oversample value - static sal_uInt16 nDefaultOversampleValue(3); + static const sal_uInt16 nDefaultOversampleValue(3); const sal_uInt16 nOversampleValue(aDrawinglayerOpt.IsAntiAliasing() ? nDefaultOversampleValue : 0); geometry::ViewInformation3D aViewInformation3D(getViewInformation3D()); diff --git a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx index dbc19901001d..643482ac75d9 100644 --- a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx @@ -228,7 +228,7 @@ namespace drawinglayer // is constant, relative to font size, rotated with the text and has a // constant color. // shadow parameter values - static double fFactor(1.0 / 24.0); + static const double fFactor(1.0 / 24.0); const double fTextShadowOffset(aDecTrans.getScale().getY() * fFactor); static basegfx::BColor aShadowColor(0.3, 0.3, 0.3); diff --git a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx index af22b38ba958..db0cfeef49e1 100644 --- a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx @@ -29,7 +29,7 @@ namespace drawinglayer { namespace primitive2d { - static double fDiscreteSize(1.1); + static const double fDiscreteSize(1.1); void TextEffectPrimitive2D::create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const { diff --git a/drawinglayer/source/primitive2d/textprimitive2d.cxx b/drawinglayer/source/primitive2d/textprimitive2d.cxx index d5e8a23ddd47..94666e7cede4 100644 --- a/drawinglayer/source/primitive2d/textprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textprimitive2d.cxx @@ -46,7 +46,7 @@ namespace if(basegfx::fTools::equalZero(aFontScale.getY())) { // no font height; choose one and adapt scale to get back to original scaling - static double fDefaultFontScale(100.0); + static const double fDefaultFontScale(100.0); rScale.setY(1.0 / fDefaultFontScale); aFontScale.setY(fDefaultFontScale); } diff --git a/drawinglayer/source/primitive2d/wrongspellprimitive2d.cxx b/drawinglayer/source/primitive2d/wrongspellprimitive2d.cxx index cbb29d08f42b..f1271dd13069 100644 --- a/drawinglayer/source/primitive2d/wrongspellprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/wrongspellprimitive2d.cxx @@ -47,7 +47,7 @@ namespace drawinglayer getTransformation().decompose(aScale, aTranslate, fRotate, fShearX); // calculate distances based on a static default (to allow testing in debugger) - static double fDefaultDistance(0.03); + static const double fDefaultDistance(0.03); const double fFontHeight(aScale.getY()); const double fUnderlineDistance(fFontHeight * fDefaultDistance); const double fWaveWidth(2.0 * fUnderlineDistance); diff --git a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx index 5f2672edfd7c..1d8d0db3ff8e 100644 --- a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx @@ -548,7 +548,7 @@ namespace drawinglayer if(basegfx::fTools::more(getRadius(), 0.0)) { const attribute::MaterialAttribute3D aMaterial(getBColor()); - static sal_uInt32 nSegments(8); // default for 3d line segments, for more quality just raise this value (in even steps) + static const sal_uInt32 nSegments(8); // default for 3d line segments, for more quality just raise this value (in even steps) const bool bClosed(getB3DPolygon().isClosed()); const bool bNoLineJoin(basegfx::B2DLineJoin::NONE == getLineJoin()); const sal_uInt32 nLoopCount(bClosed ? nPointCount : nPointCount - 1); |