Kaydet (Commit) 3363f828 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Drop misused lcl_ prefix

If used at all, lcl_ is supposed to be used for static functions truly local
to one source files. The functions here occur in several source files (well,
two, the one where they are defined and one other) so they are not "local" in
that sense. (But they could be local in the one file that uses them...) Also,
they are already in a basegfx::internal namespace.

While at it, drop the :: prefix eyesore from basegfx::internal, and align
parameter lists consistently.

Change-Id: I68b91075e0b1779ac0fa884d8f9e956f1ab7b308
üst 259820af
...@@ -27,15 +27,17 @@ namespace basegfx ...@@ -27,15 +27,17 @@ namespace basegfx
{ {
namespace internal namespace internal
{ {
void lcl_skipSpaces(sal_Int32& io_rPos, void skipSpaces(sal_Int32& io_rPos,
const OUString& rStr, const OUString& rStr,
const sal_Int32 nLen); const sal_Int32 nLen);
void lcl_skipSpacesAndCommas(sal_Int32& io_rPos, void skipSpacesAndCommas(sal_Int32& io_rPos,
const OUString& rStr, const OUString& rStr,
const sal_Int32 nLen); const sal_Int32 nLen);
inline bool lcl_isOnNumberChar(const sal_Unicode aChar, bool bSignAllowed = true, bool bDotAllowed = true) inline bool isOnNumberChar(const sal_Unicode aChar,
bool bSignAllowed = true,
bool bDotAllowed = true)
{ {
const bool bPredicate( (sal_Unicode('0') <= aChar && sal_Unicode('9') >= aChar) const bool bPredicate( (sal_Unicode('0') <= aChar && sal_Unicode('9') >= aChar)
|| (bSignAllowed && sal_Unicode('+') == aChar) || (bSignAllowed && sal_Unicode('+') == aChar)
...@@ -45,40 +47,43 @@ namespace basegfx ...@@ -45,40 +47,43 @@ namespace basegfx
return bPredicate; return bPredicate;
} }
inline bool lcl_isOnNumberChar(const OUString& rStr, const sal_Int32 nPos, bool bSignAllowed = true, bool bDotAllowed = true) inline bool isOnNumberChar(const OUString& rStr,
const sal_Int32 nPos,
bool bSignAllowed = true,
bool bDotAllowed = true)
{ {
return lcl_isOnNumberChar(rStr[nPos], bSignAllowed, bDotAllowed); return isOnNumberChar(rStr[nPos], bSignAllowed, bDotAllowed);
} }
bool lcl_getDoubleChar(double& o_fRetval, bool getDoubleChar(double& o_fRetval,
sal_Int32& io_rPos, sal_Int32& io_rPos,
const OUString& rStr); const OUString& rStr);
bool lcl_importDoubleAndSpaces( double& o_fRetval, bool importDoubleAndSpaces(double& o_fRetval,
sal_Int32& io_rPos, sal_Int32& io_rPos,
const OUString& rStr, const OUString& rStr,
const sal_Int32 nLen ); const sal_Int32 nLen );
bool lcl_importFlagAndSpaces(sal_Int32& o_nRetval, bool importFlagAndSpaces(sal_Int32& o_nRetval,
sal_Int32& io_rPos, sal_Int32& io_rPos,
const OUString& rStr, const OUString& rStr,
const sal_Int32 nLen); const sal_Int32 nLen);
void lcl_skipNumber(sal_Int32& io_rPos, void skipNumber(sal_Int32& io_rPos,
const OUString& rStr, const OUString& rStr,
const sal_Int32 nLen); const sal_Int32 nLen);
void lcl_skipDouble(sal_Int32& io_rPos, void skipDouble(sal_Int32& io_rPos,
const OUString& rStr); const OUString& rStr);
void lcl_putNumberCharWithSpace( OUStringBuffer& rStr, void putNumberCharWithSpace(OUStringBuffer& rStr,
double fValue, double fValue,
double fOldValue, double fOldValue,
bool bUseRelativeCoordinates ); bool bUseRelativeCoordinates);
inline sal_Unicode lcl_getCommand( sal_Char cUpperCaseCommand, inline sal_Unicode getCommand(sal_Char cUpperCaseCommand,
sal_Char cLowerCaseCommand, sal_Char cLowerCaseCommand,
bool bUseRelativeCoordinates ) bool bUseRelativeCoordinates)
{ {
return bUseRelativeCoordinates ? cLowerCaseCommand : cUpperCaseCommand; return bUseRelativeCoordinates ? cLowerCaseCommand : cUpperCaseCommand;
} }
......
...@@ -24,7 +24,7 @@ namespace basegfx ...@@ -24,7 +24,7 @@ namespace basegfx
{ {
namespace internal namespace internal
{ {
void lcl_skipSpaces(sal_Int32& io_rPos, void skipSpaces(sal_Int32& io_rPos,
const OUString& rStr, const OUString& rStr,
const sal_Int32 nLen) const sal_Int32 nLen)
{ {
...@@ -35,7 +35,7 @@ namespace basegfx ...@@ -35,7 +35,7 @@ namespace basegfx
} }
} }
void lcl_skipSpacesAndCommas(sal_Int32& io_rPos, void skipSpacesAndCommas(sal_Int32& io_rPos,
const OUString& rStr, const OUString& rStr,
const sal_Int32 nLen) const sal_Int32 nLen)
{ {
...@@ -46,7 +46,9 @@ namespace basegfx ...@@ -46,7 +46,9 @@ namespace basegfx
} }
} }
bool lcl_getDoubleChar(double& o_fRetval, sal_Int32& io_rPos, const OUString& rStr) bool getDoubleChar(double& o_fRetval,
sal_Int32& io_rPos,
const OUString& rStr)
{ {
sal_Unicode aChar( rStr[io_rPos] ); sal_Unicode aChar( rStr[io_rPos] );
OUStringBuffer sNumberString; OUStringBuffer sNumberString;
...@@ -120,20 +122,20 @@ namespace basegfx ...@@ -120,20 +122,20 @@ namespace basegfx
return false; return false;
} }
bool lcl_importDoubleAndSpaces( double& o_fRetval, bool importDoubleAndSpaces(double& o_fRetval,
sal_Int32& io_rPos, sal_Int32& io_rPos,
const OUString& rStr, const OUString& rStr,
const sal_Int32 nLen ) const sal_Int32 nLen )
{ {
if( !lcl_getDoubleChar(o_fRetval, io_rPos, rStr) ) if( !getDoubleChar(o_fRetval, io_rPos, rStr) )
return false; return false;
lcl_skipSpacesAndCommas(io_rPos, rStr, nLen); skipSpacesAndCommas(io_rPos, rStr, nLen);
return true; return true;
} }
bool lcl_importFlagAndSpaces(sal_Int32& o_nRetval, bool importFlagAndSpaces(sal_Int32& o_nRetval,
sal_Int32& io_rPos, sal_Int32& io_rPos,
const OUString& rStr, const OUString& rStr,
const sal_Int32 nLen) const sal_Int32 nLen)
...@@ -153,12 +155,12 @@ namespace basegfx ...@@ -153,12 +155,12 @@ namespace basegfx
else else
return false; return false;
lcl_skipSpacesAndCommas(io_rPos, rStr, nLen); skipSpacesAndCommas(io_rPos, rStr, nLen);
return true; return true;
} }
void lcl_putNumberCharWithSpace( OUStringBuffer& rStr, void putNumberCharWithSpace(OUStringBuffer& rStr,
double fValue, double fValue,
double fOldValue, double fOldValue,
bool bUseRelativeCoordinates ) bool bUseRelativeCoordinates )
...@@ -169,7 +171,7 @@ namespace basegfx ...@@ -169,7 +171,7 @@ namespace basegfx
const sal_Int32 aLen( rStr.getLength() ); const sal_Int32 aLen( rStr.getLength() );
if(aLen) if(aLen)
{ {
if( lcl_isOnNumberChar(rStr[aLen - 1], false, true) && if( isOnNumberChar(rStr[aLen - 1], false, true) &&
fValue >= 0.0 ) fValue >= 0.0 )
{ {
rStr.append( ' ' ); rStr.append( ' ' );
...@@ -178,7 +180,6 @@ namespace basegfx ...@@ -178,7 +180,6 @@ namespace basegfx
rStr.append(fValue); rStr.append(fValue);
} }
} // namespace internal } // namespace internal
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment