diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-10-22 18:25:35 +0000 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-10-23 00:18:55 +0200 |
commit | 6d3843a415bb74a00a40f312b7771db27060cf0b (patch) | |
tree | 38f2991232cc04f50ed23484885c42fee622f289 /vcl | |
parent | c816cb847da9a3302f23e113171c81fed6b319c0 (diff) |
Implement IsUnderlineAbove in vcl::Font
There was even a duplicate implementation...
Change-Id: I192ac2ec8e5b8dd0e6b3ab9b9ddf0bf53df546ab
Reviewed-on: https://gerrit.libreoffice.org/62199
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 2 | ||||
-rw-r--r-- | vcl/source/outdev/text.cxx | 2 | ||||
-rw-r--r-- | vcl/source/outdev/textline.cxx | 10 |
3 files changed, 2 insertions, 12 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 48475a52fba8..badc1af9a11c 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -6839,7 +6839,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool ) ) { - bool bUnderlineAbove = OutputDevice::ImplIsUnderlineAbove( m_aCurrentPDFState.m_aFont ); + bool bUnderlineAbove = m_aCurrentPDFState.m_aFont.IsUnderlineAbove(); if( m_aCurrentPDFState.m_aFont.IsWordLineMode() ) { Point aStartPt; diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index cd9ba5e628e3..3bc2ced9a3b5 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -300,7 +300,7 @@ void OutputDevice::ImplDrawTextDirect( SalLayout& rSalLayout, if( bTextLines ) ImplDrawTextLines( rSalLayout, maFont.GetStrikeout(), maFont.GetUnderline(), maFont.GetOverline(), - maFont.IsWordLineMode(), ImplIsUnderlineAbove( maFont ) ); + maFont.IsWordLineMode(), maFont.IsUnderlineAbove() ); // emphasis marks if( maFont.GetEmphasisMark() & FontEmphasisMark::Style ) diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx index de65574e1ac9..e35f4bb259af 100644 --- a/vcl/source/outdev/textline.cxx +++ b/vcl/source/outdev/textline.cxx @@ -36,16 +36,6 @@ #define UNDERLINE_LAST LINESTYLE_BOLDWAVE #define STRIKEOUT_LAST STRIKEOUT_X -bool OutputDevice::ImplIsUnderlineAbove( const vcl::Font& rFont ) -{ - if ( !rFont.IsVertical() ) - return false; - - // the underline is right for Japanese only - return (LANGUAGE_JAPANESE == rFont.GetLanguage()) || - (LANGUAGE_JAPANESE == rFont.GetCJKContextLanguage()); -} - void OutputDevice::ImplInitTextLineSize() { mpFontInstance->mxFontMetric->ImplInitTextLineSize( this ); |