[Libreoffice-commits] core.git: drawinglayer/source
Tomaž Vajngerl (via logerrit)
logerrit at kemper.freedesktop.org
Mon May 4 06:43:58 UTC 2020
drawinglayer/source/processor2d/helperwrongspellrenderer.cxx | 42 +++++------
1 file changed, 21 insertions(+), 21 deletions(-)
New commits:
commit 2f844056c340ead941188fd1ea7ad2b1400586aa
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sun May 3 11:32:25 2020 +0200
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Mon May 4 08:43:21 2020 +0200
drawinglayer: flatten renderWrongSpellPrimitive2D
Change-Id: I93ff19f9f54b6f14c660af554d697b9ba525f81c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93389
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
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;
More information about the Libreoffice-commits
mailing list