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 /include | |
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 'include')
-rw-r--r-- | include/vcl/font.hxx | 11 | ||||
-rw-r--r-- | include/vcl/outdev.hxx | 1 |
2 files changed, 11 insertions, 1 deletions
diff --git a/include/vcl/font.hxx b/include/vcl/font.hxx index 2dc0a5b326cd..02dab4d8b51e 100644 --- a/include/vcl/font.hxx +++ b/include/vcl/font.hxx @@ -163,10 +163,21 @@ public: typedef o3tl::cow_wrapper< ImplFont > ImplType; + inline bool IsUnderlineAbove() const; + private: ImplType mpImplFont; }; +inline bool Font::IsUnderlineAbove() const +{ + if (!IsVertical()) + return false; + // the underline is right for Japanese only + return (LANGUAGE_JAPANESE == GetLanguage()) || + (LANGUAGE_JAPANESE == GetCJKContextLanguage()); +} + } #endif // _VCL_FONT_HXX diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index f661bb377636..c9f9d06db17c 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -1201,7 +1201,6 @@ private: SAL_DLLPRIVATE void ImplDrawStrikeoutChar( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontStrikeout eStrikeout, Color aColor ); SAL_DLLPRIVATE void ImplDrawMnemonicLine( long nX, long nY, long nWidth ); - SAL_DLLPRIVATE static bool ImplIsUnderlineAbove( const vcl::Font& ); static SAL_DLLPRIVATE long ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, long nWidth, const OUString& rStr, DrawTextFlags nStyle, const vcl::ITextLayout& _rLayout ); |