summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2020-05-03 11:34:51 +0200
committerTomaž Vajngerl <quikee@gmail.com>2020-05-04 08:43:35 +0200
commit029194643d0ba7d76df28bc21eec4a27492eea99 (patch)
tree3e8f65bd789a126a01b5557382d873f95dc72546 /drawinglayer
parent2f844056c340ead941188fd1ea7ad2b1400586aa (diff)
drawinglayer: extract constant in renderWrongSpellPrimitive2D
Change-Id: I131e2d5620d027f32dc2929cd12fedb168e30e9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93390 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/processor2d/helperwrongspellrenderer.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/drawinglayer/source/processor2d/helperwrongspellrenderer.cxx b/drawinglayer/source/processor2d/helperwrongspellrenderer.cxx
index 27df21201efe..9f838a7e1b61 100644
--- a/drawinglayer/source/processor2d/helperwrongspellrenderer.cxx
+++ b/drawinglayer/source/processor2d/helperwrongspellrenderer.cxx
@@ -28,6 +28,11 @@ using namespace css;
namespace drawinglayer
{
+namespace
+{
+constexpr sal_uInt32 constMinimumFontHeight = 5; // #define WRONG_SHOW_MIN 5
+}
+
bool renderWrongSpellPrimitive2D(const primitive2d::WrongSpellPrimitive2D& rWrongSpellCandidate,
OutputDevice& rOutputDevice,
const basegfx::B2DHomMatrix& rObjectToViewTransformation,
@@ -38,9 +43,7 @@ bool renderWrongSpellPrimitive2D(const primitive2d::WrongSpellPrimitive2D& rWron
const basegfx::B2DVector aFontVectorPixel(aLocalTransform * basegfx::B2DVector(0.0, 1.0));
const sal_uInt32 nFontPixelHeight(basegfx::fround(aFontVectorPixel.getLength()));
- static const sal_uInt32 nMinimumFontHeight(5); // #define WRONG_SHOW_MIN 5
-
- if (nFontPixelHeight <= nMinimumFontHeight)
+ if (nFontPixelHeight <= constMinimumFontHeight)
return true;
const basegfx::B2DPoint aStart(aLocalTransform