summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorOlivier R <olivier.dev@grammalecte.net>2019-06-03 20:33:21 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2019-06-05 13:58:23 +0200
commitcdd69ce780dc7758047a27ed3c76bdc01b5ffb89 (patch)
tree6694d1f9dd5521884f31cf2a4ebb2de12e9d9a3c /vcl
parente770bacc85a0eec96de77068d61b03f374b3cdec (diff)
Linguistic: new underlining styles for grammar checkers
This patch adds two new underlining styles: - BOLDWAVE: a thicker version of the default WAVE style - BOLD: a thick straight line No default setting changed. It's up to the grammar checkers to specify the underlining style they want. This contribution to LibreOffice is licensed under the MPLv2/LGPLv3+ dual license. modified : include/vcl/outdev.hxx modified : offapi/com/sun/star/text/TextMarkupDescriptor.idl modified : sw/source/core/inc/wrong.hxx modified : sw/source/core/txtnode/fntcache.cxx modified : vcl/source/outdev/textline.cxx modified : vcl/workben/outdevgrind.cxx Change-Id: I5629253905ba40c51cc748a7ceeb84170ef5d94c Reviewed-on: https://gerrit.libreoffice.org/73412 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/outdev/textline.cxx7
-rw-r--r--vcl/workben/outdevgrind.cxx9
2 files changed, 4 insertions, 12 deletions
diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index 2c88586618bf..67feda6c4030 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -936,7 +936,7 @@ void OutputDevice::DrawTextLine( const Point& rPos, long nWidth,
mpAlphaVDev->DrawTextLine( rPos, nWidth, eStrikeout, eUnderline, eOverline, bUnderlineAbove );
}
-void OutputDevice::DrawWaveLine( const Point& rStartPos, const Point& rEndPos )
+void OutputDevice::DrawWaveLine( const Point& rStartPos, const Point& rEndPos, long nLineWidth )
{
assert(!is_double_buffered_window());
@@ -998,13 +998,14 @@ void OutputDevice::DrawWaveLine( const Point& rStartPos, const Point& rEndPos )
if( nWaveHeight > pFontInstance->mxFontMetric->GetWavelineUnderlineSize() )
{
nWaveHeight = pFontInstance->mxFontMetric->GetWavelineUnderlineSize();
+ nLineWidth = 1;
}
ImplDrawWaveLine(nStartX, nStartY, 0, 0,
nEndX-nStartX, nWaveHeight,
- fScaleFactor, nOrientation, GetLineColor());
+ nLineWidth, nOrientation, GetLineColor());
if( mpAlphaVDev )
- mpAlphaVDev->DrawWaveLine( rStartPos, rEndPos );
+ mpAlphaVDev->DrawWaveLine( rStartPos, rEndPos, nLineWidth );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx
index 317762eaa861..ac6f12aaa373 100644
--- a/vcl/workben/outdevgrind.cxx
+++ b/vcl/workben/outdevgrind.cxx
@@ -550,15 +550,6 @@ void setupMethodStubs( functor_vector_type& res )
return pDev->DrawWallpaper(aRect2, aWallpaper);
});
-#ifdef FIXME_HAVE_WAVE_NORMAL
- /* void DrawWaveLine( const Point& rStartPos, const Point& rEndPos, sal_uInt16 nStyle ); */
- add(res,
- "DrawWaveLine",
- [&] (OutputDevice * pDev) {
- return pDev->DrawWaveLine(aPt1, aPt2, (sal_uInt16)WAVE_NORMAL);
- });
-#endif
-
/* void DrawGrid( const Rectangle& rRect, const Size& rDist, sal_uLong nFlags ); */
add(res,
"DrawGrid",