summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorKeith Curtis <keithcu@gmail.com>2014-02-22 05:30:00 -0500
committerCaolán McNamara <caolanm@redhat.com>2014-03-05 09:01:11 -0600
commitff6f3164dfc454354bee79eac30d6cc279b8a0ec (patch)
tree8eabd42240646136707fccfa46ec297b6230a3a3 /drawinglayer
parent9d4c3a2a217e02444601bea9e0eae7ae342fe0e8 (diff)
Simplify DrawWave
This patch simplifies the DrawWave logic. Callers of that code would try to figure out what size wave to draw and pass down a style integer to DrawWaveLine, but DrawWaveLine already has logic which trims the height of the wave so it doesn't need the hint. This doesn't change the UNO API (::com::sun::star::awt::FontUnderline::SMALLWAVE), but it does get rid of internal usages and maps those small waves to normal. Note that changing the zoom in Calc right now causes spelling underlines to disappear. That bug is not related to these changes. Conflicts: editeng/source/editeng/impedit3.cxx Change-Id: I3caa2a74a0f5228b924d4e1b0a77f96eaef5fa00 Reviewed-on: https://gerrit.libreoffice.org/8168 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/processor2d/helperwrongspellrenderer.cxx14
1 files changed, 1 insertions, 13 deletions
diff --git a/drawinglayer/source/processor2d/helperwrongspellrenderer.cxx b/drawinglayer/source/processor2d/helperwrongspellrenderer.cxx
index 8d1e69f34edf..13a015fbff33 100644
--- a/drawinglayer/source/processor2d/helperwrongspellrenderer.cxx
+++ b/drawinglayer/source/processor2d/helperwrongspellrenderer.cxx
@@ -42,8 +42,6 @@ namespace drawinglayer
const sal_uInt32 nFontPixelHeight(basegfx::fround(aFontVectorPixel.getLength()));
static const sal_uInt32 nMinimumFontHeight(5); // #define WRONG_SHOW_MIN 5
- static const sal_uInt32 nSmallFontHeight(11); // #define WRONG_SHOW_SMALL 11
- static const sal_uInt32 nMediumFontHeight(15); // #define WRONG_SHOW_MEDIUM 15
if(nFontPixelHeight > nMinimumFontHeight)
{
@@ -51,16 +49,6 @@ namespace drawinglayer
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()));
- sal_uInt16 nWaveStyle(WAVE_FLAT);
-
- if(nFontPixelHeight > nMediumFontHeight)
- {
- nWaveStyle = WAVE_NORMAL;
- }
- else if(nFontPixelHeight > nSmallFontHeight)
- {
- nWaveStyle = WAVE_SMALL;
- }
// #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
@@ -72,7 +60,7 @@ namespace drawinglayer
rOutputDevice.EnableMapMode(false);
rOutputDevice.SetLineColor(Color(aProcessedColor));
rOutputDevice.SetFillColor();
- rOutputDevice.DrawWaveLine(aOrigin + aVclStart, aOrigin + aVclStop, nWaveStyle);
+ rOutputDevice.DrawWaveLine(aOrigin + aVclStart, aOrigin + aVclStop);
rOutputDevice.EnableMapMode(bMapModeEnabledState);
}