summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2020-05-03 11:32:25 +0200
committerTomaž Vajngerl <quikee@gmail.com>2020-05-04 08:43:21 +0200
commit2f844056c340ead941188fd1ea7ad2b1400586aa (patch)
treecab93817416baa62bcb20957bac66acb1c34453a /drawinglayer
parente4f72f84661fba50937891e28f73f6661edaa21e (diff)
drawinglayer: flatten renderWrongSpellPrimitive2D
Change-Id: I93ff19f9f54b6f14c660af554d697b9ba525f81c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93389 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/processor2d/helperwrongspellrenderer.cxx42
1 files changed, 21 insertions, 21 deletions
diff --git a/drawinglayer/source/processor2d/helperwrongspellrenderer.cxx b/drawinglayer/source/processor2d/helperwrongspellrenderer.cxx
index 83fdba7cc1f5..27df21201efe 100644
--- a/drawinglayer/source/processor2d/helperwrongspellrenderer.cxx
+++ b/drawinglayer/source/processor2d/helperwrongspellrenderer.cxx
@@ -40,30 +40,30 @@ bool renderWrongSpellPrimitive2D(const primitive2d::WrongSpellPrimitive2D& rWron
static const sal_uInt32 nMinimumFontHeight(5); // #define WRONG_SHOW_MIN 5
- if (nFontPixelHeight > nMinimumFontHeight)
- {
- const basegfx::B2DPoint aStart(aLocalTransform
- * basegfx::B2DPoint(rWrongSpellCandidate.getStart(), 0.0));
- const basegfx::B2DPoint aStop(aLocalTransform
- * basegfx::B2DPoint(rWrongSpellCandidate.getStop(), 0.0));
- const Point aVclStart(basegfx::fround(aStart.getX()), basegfx::fround(aStart.getY()));
- const Point aVclStop(basegfx::fround(aStop.getX()), basegfx::fround(aStop.getY()));
+ if (nFontPixelHeight <= nMinimumFontHeight)
+ return true;
- // #i101075# draw it. Do not forget to use the evtl. offsetted origin of the target device,
- // e.g. when used with mask/transparence buffer device
- const Point aOrigin(rOutputDevice.GetMapMode().GetOrigin());
+ const basegfx::B2DPoint aStart(aLocalTransform
+ * basegfx::B2DPoint(rWrongSpellCandidate.getStart(), 0.0));
+ const basegfx::B2DPoint aStop(aLocalTransform
+ * basegfx::B2DPoint(rWrongSpellCandidate.getStop(), 0.0));
+ const Point aVclStart(basegfx::fround(aStart.getX()), basegfx::fround(aStart.getY()));
+ const Point aVclStop(basegfx::fround(aStop.getX()), basegfx::fround(aStop.getY()));
- const basegfx::BColor aProcessedColor(
- rBColorModifierStack.getModifiedColor(rWrongSpellCandidate.getColor()));
- const bool bMapModeEnabledState(rOutputDevice.IsMapModeEnabled());
+ // #i101075# draw it. Do not forget to use the evtl. offsetted origin of the target device,
+ // e.g. when used with mask/transparence buffer device
+ const Point aOrigin(rOutputDevice.GetMapMode().GetOrigin());
- vcl::ScopedAntialiasing a(rOutputDevice, true);
- rOutputDevice.EnableMapMode(false);
- rOutputDevice.SetLineColor(Color(aProcessedColor));
- rOutputDevice.SetFillColor();
- rOutputDevice.DrawWaveLine(aOrigin + aVclStart, aOrigin + aVclStop);
- rOutputDevice.EnableMapMode(bMapModeEnabledState);
- }
+ const basegfx::BColor aProcessedColor(
+ rBColorModifierStack.getModifiedColor(rWrongSpellCandidate.getColor()));
+ const bool bMapModeEnabledState(rOutputDevice.IsMapModeEnabled());
+
+ vcl::ScopedAntialiasing a(rOutputDevice, true);
+ rOutputDevice.EnableMapMode(false);
+ rOutputDevice.SetLineColor(Color(aProcessedColor));
+ rOutputDevice.SetFillColor();
+ rOutputDevice.DrawWaveLine(aOrigin + aVclStart, aOrigin + aVclStop);
+ rOutputDevice.EnableMapMode(bMapModeEnabledState);
// cannot really go wrong
return true;