diff options
author | Tor Lillqvist <tml@collabora.com> | 2021-08-31 15:02:48 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2021-09-01 15:05:26 +0200 |
commit | 236bbbf7be3144ed469a36ba0690acee2f6fc2f3 (patch) | |
tree | ce92de7148532a32a5c5abf3c5a52b5f6e179665 | |
parent | 50371bd2beb3d881edfc666aac1145c9d870d8e7 (diff) |
Stopgap workaround for misspelling wavy underline drawing bug on iOS
Explicity make the rectangle white before drawing the red wavy line.
Sure, this means that it looks bad if the document background colour
is not white. Better than how it looks currently, though, with the
rectangle containing the wavy underline ending up (for unknown
reasons) black. And most documents have a white background.
Change-Id: I92b2246bbdbd1404e4c48292c3610d1582a56163
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121370
Tested-by: Tor Lillqvist <tml@collabora.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
-rw-r--r-- | vcl/source/outdev/textline.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx index 452a9dbfdfe9..4ec59e10c6a8 100644 --- a/vcl/source/outdev/textline.cxx +++ b/vcl/source/outdev/textline.cxx @@ -1079,6 +1079,11 @@ void OutputDevice::DrawWaveLine(const Point& rStartPos, const Point& rEndPos, lo pVirtDev->SetOutputSizePixel( Size( nWordLength, nWaveHeight * 2 ), false ); pVirtDev->SetLineColor( GetLineColor() ); pVirtDev->SetBackground( Wallpaper( COL_TRANSPARENT ) ); +#ifdef IOS + // Stopgap workaround for some bug in the iOS-specific vcl code. + pVirtDev->SetFillColor( COL_WHITE ); + pVirtDev->DrawRect( tools::Rectangle( 0, 0, pVirtDev->GetOutputSize().Width(), pVirtDev->GetOutputSize().Height() ) ); +#endif pVirtDev->ImplDrawWaveLineBezier( 0, 0, nWordLength, 0, nWaveHeight, fOrientation, nLineWidth ); rLineCache.insert( pVirtDev->GetBitmapEx( Point( 0, 0 ), pVirtDev->GetOutputSize() ), GetLineColor(), nLineWidth, nWaveHeight, nWordLength, aWavylinebmp ); } |