include/vcl/outdev.hxx              |    2 +-
 sw/source/core/txtnode/fntcache.cxx |    6 ++++--
 vcl/source/outdev/textline.cxx      |    4 +---
 3 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 4141c13da8245b5ed46be3b7034d014d75f433f9
Author:     Heiko Tietze <tietze.he...@gmail.com>
AuthorDate: Thu Nov 11 11:34:08 2021 +0100
Commit:     Heiko Tietze <heiko.tie...@documentfoundation.org>
CommitDate: Fri Nov 12 14:47:06 2021 +0100

    Resolves tdf#70519 - Make wavy lines depend on zoom factor
    
    Solves accessibility issue of too faint spellchecking indicators
    
    Change-Id: Ic5bc9e205981e90c8f4ee12aa52dde723da1e7aa
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125038
    Tested-by: Jenkins
    Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org>

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 8c0746215a50..a1c26747c882 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -910,7 +910,7 @@ public:
     void                        ImplDrawTextLines( SalLayout&, FontStrikeout 
eStrikeout, FontLineStyle eUnderline,
                                                    FontLineStyle eOverline, 
bool bWordLine, bool bUnderlineAbove );
 
-    void                        DrawWaveLine( const Point& rStartPos, const 
Point& rEndPos, tools::Long nLineWidth = 1 );
+    void                        DrawWaveLine( const Point& rStartPos, const 
Point& rEndPos, tools::Long nLineWidth = 1, tools::Long nWaveHeight = 3);
 
     bool                        ImplDrawRotateText( SalLayout& );
 
diff --git a/sw/source/core/txtnode/fntcache.cxx 
b/sw/source/core/txtnode/fntcache.cxx
index b23ba26a5d34..ccc25f50df9c 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -801,17 +801,19 @@ static void lcl_DrawLineForWrongListData(
             SwWrongArea const*const wrongArea = 
pWList->GetWrongElement(nNextStart + rInf.GetIdx());
             if (wrongArea != nullptr)
             {
+                const SwViewShell* pShell = rInf.GetShell();
+                sal_uInt16 nZoom = pShell ? 
round(pShell->GetViewOptions()->GetZoom()/100) : 1;
                 if (WRONGAREA_WAVE == wrongArea->mLineType)
                 {
                     vcl::ScopedAntialiasing a(rInf.GetOut(), true);
                     rInf.GetOut().SetLineColor( wrongArea->mColor );
-                    rInf.GetOut().DrawWaveLine( aStart, aEnd, 1 );
+                    rInf.GetOut().DrawWaveLine( aStart, aEnd, 1 + nZoom, 3 + 
nZoom );
                 }
                 else if (WRONGAREA_BOLDWAVE == wrongArea->mLineType)
                 {
                     vcl::ScopedAntialiasing a(rInf.GetOut(), true);
                     rInf.GetOut().SetLineColor( wrongArea->mColor );
-                    rInf.GetOut().DrawWaveLine( aStart, aEnd, 2 );
+                    rInf.GetOut().DrawWaveLine( aStart, aEnd, 2 + nZoom, 4 + 
nZoom  );
                 }
                 else if (WRONGAREA_BOLD == wrongArea->mLineType)
                 {
diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index 0b3ca866b37a..7015d768986c 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -969,7 +969,7 @@ void OutputDevice::DrawTextLine( const Point& rPos, 
tools::Long nWidth,
         mpAlphaVDev->DrawTextLine( rPos, nWidth, eStrikeout, eUnderline, 
eOverline, bUnderlineAbove );
 }
 
-void OutputDevice::DrawWaveLine(const Point& rStartPos, const Point& rEndPos, 
tools::Long nLineWidth)
+void OutputDevice::DrawWaveLine(const Point& rStartPos, const Point& rEndPos, 
tools::Long nLineWidth, tools::Long nWaveHeight)
 {
     assert(!is_double_buffered_window());
 
@@ -1008,8 +1008,6 @@ void OutputDevice::DrawWaveLine(const Point& rStartPos, 
const Point& rEndPos, to
         aStartPt.RotateAround(nEndX, nEndY, 
Degree10(static_cast<sal_Int16>(-fOrientation * 10.0)));
     }
 
-    tools::Long nWaveHeight = 3;
-
     // Handle HiDPI
     float fScaleFactor = GetDPIScaleFactor();
     if (fScaleFactor > 1.0f)

Reply via email to