From 5af60152d623aaa6e9c71c0cda0c2a8407e78fc9 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Sat, 12 May 2018 02:21:28 +0200 Subject: SalLayout::CalcAsianKerning() can be made local Change-Id: Ieff9fda888112e98236d846aa6cf9140be8b355a Reviewed-on: https://gerrit.libreoffice.org/54152 Tested-by: Jenkins Reviewed-by: Khaled Hosny --- vcl/inc/sallayout.hxx | 2 -- 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; -- cgit