editeng/source/items/svxfont.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 19281c62b5e315da422318dbc9d4ba619a6eeab5
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Mon Aug 21 13:19:36 2023 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Mon Aug 21 16:14:29 2023 +0200

    character preview is drawing two overlines for Small Caps
    
    we already handle the underline and strikethrough case, so add
    the overline case here too
    
    Change-Id: I9ca0a5623a559e0cde07437439aa372e3c517159
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155894
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx
index 75359251fe56..544d80c7d4a9 100644
--- a/editeng/source/items/svxfont.cxx
+++ b/editeng/source/items/svxfont.cxx
@@ -825,8 +825,10 @@ void SvxDoDrawCapital::Do( const OUString &_rTxt, const 
sal_Int32 _nIdx,
 
     // Set the desired font
     FontLineStyle eUnder = pFont->GetUnderline();
+    FontLineStyle eOver = pFont->GetOverline();
     FontStrikeout eStrike = pFont->GetStrikeout();
     pFont->SetUnderline( LINESTYLE_NONE );
+    pFont->SetOverline( LINESTYLE_NONE );
     pFont->SetStrikeout( STRIKEOUT_NONE );
     if ( !bUpper )
     {
@@ -847,6 +849,7 @@ void SvxDoDrawCapital::Do( const OUString &_rTxt, const 
sal_Int32 _nIdx,
 
     // Restore Font
     pFont->SetUnderline( eUnder );
+    pFont->SetOverline( eOver );
     pFont->SetStrikeout( eStrike );
     if ( !bUpper )
         pFont->SetPropr( nProp );

Reply via email to