diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2018-05-12 02:21:28 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2018-05-12 16:41:43 +0200 |
commit | 5af60152d623aaa6e9c71c0cda0c2a8407e78fc9 (patch) | |
tree | d5fc65efb6c080c94b318a7873f0009f85931c8f | |
parent | 4680ce8790e1a3bd7da6800f4feb4e3a70aaa088 (diff) |
SalLayout::CalcAsianKerning() can be made local
Change-Id: Ieff9fda888112e98236d846aa6cf9140be8b355a
Reviewed-on: https://gerrit.libreoffice.org/54152
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
-rw-r--r-- | vcl/inc/sallayout.hxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/sallayout.cxx | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx index b3f02e969fff..ef5be707d85c 100644 --- a/vcl/inc/sallayout.hxx +++ b/vcl/inc/sallayout.hxx @@ -196,8 +196,6 @@ protected: // used by layout engines SalLayout(); - static int CalcAsianKerning( sal_UCS4, bool bLeft, bool bVertical ); - private: SalLayout( const SalLayout& ) = delete; SalLayout& operator=( const SalLayout& ) = delete; diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index 30a3240b628c..9cf26a6971cd 100644 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -596,7 +596,7 @@ Point SalLayout::GetDrawPosition( const Point& rRelative ) const // If the range doesn't match in 0x3000 and 0x30FB, please change // also ImplCalcKerning. -int SalLayout::CalcAsianKerning( sal_UCS4 c, bool bLeft, bool /*TODO:? bVertical*/ ) +static int lcl_CalcAsianKerning( sal_UCS4 c, bool bLeft, bool /*TODO:? bVertical*/ ) { // http://www.asahi-net.or.jp/~sd5a-ucd/freetexts/jis/x4051/1995/appendix.html static const signed char nTable[0x30] = @@ -821,8 +821,8 @@ void GenericSalLayout::ApplyAsianKerning(const OUString& rStr) // calculate compression values const bool bVertical = false; - long nKernFirst = +CalcAsianKerning( cHere, true, bVertical ); - long nKernNext = -CalcAsianKerning( cNext, false, bVertical ); + long nKernFirst = +lcl_CalcAsianKerning( cHere, true, bVertical ); + long nKernNext = -lcl_CalcAsianKerning( cNext, false, bVertical ); // apply punctuation compression to logical glyph widths long nDelta = (nKernFirst < nKernNext) ? nKernFirst : nKernNext; |