From e5e7475febbca460c30eaf4959d3282688383ef2 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 2 Aug 2016 14:56:27 +0200 Subject: loplugin:countusersofdefaultparams in basctl..basic Change-Id: I16fac3317ebf55581cb9aaef676a9759de51d695 Reviewed-on: https://gerrit.libreoffice.org/27793 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basegfx/source/inc/stringconversiontools.hxx | 6 +++--- basegfx/source/tools/stringconversiontools.cxx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'basegfx') diff --git a/basegfx/source/inc/stringconversiontools.hxx b/basegfx/source/inc/stringconversiontools.hxx index c23fb5083a03..519bc2ce83e7 100644 --- a/basegfx/source/inc/stringconversiontools.hxx +++ b/basegfx/source/inc/stringconversiontools.hxx @@ -36,8 +36,8 @@ namespace basegfx const sal_Int32 nLen); inline bool isOnNumberChar(const sal_Unicode aChar, - bool bSignAllowed = true, - bool bDotAllowed = true) + bool bSignAllowed, + bool bDotAllowed) { const bool bPredicate( (sal_Unicode('0') <= aChar && sal_Unicode('9') >= aChar) || (bSignAllowed && sal_Unicode('+') == aChar) @@ -51,7 +51,7 @@ namespace basegfx const sal_Int32 nPos, bool bSignAllowed = true) { - return isOnNumberChar(rStr[nPos], bSignAllowed); + return isOnNumberChar(rStr[nPos], bSignAllowed, true); } bool getDoubleChar(double& o_fRetval, diff --git a/basegfx/source/tools/stringconversiontools.cxx b/basegfx/source/tools/stringconversiontools.cxx index 8ea862441ee4..6cae400bb3df 100644 --- a/basegfx/source/tools/stringconversiontools.cxx +++ b/basegfx/source/tools/stringconversiontools.cxx @@ -170,7 +170,7 @@ namespace basegfx const sal_Int32 aLen( rStr.getLength() ); if(aLen) { - if( isOnNumberChar(rStr[aLen - 1], false) && + if( isOnNumberChar(rStr[aLen - 1], false, true) && fValue >= 0.0 ) { rStr.append( ' ' ); -- cgit v1.2.3