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
{
namespace internal
{
void lcl_skipSpaces(sal_Int32& io_rPos,
const OUString& rStr,
const sal_Int32 nLen);
void skipSpaces(sal_Int32& io_rPos,
const OUString& rStr,
const sal_Int32 nLen);
void lcl_skipSpacesAndCommas(sal_Int32& io_rPos,
const OUString& rStr,
const sal_Int32 nLen);
void skipSpacesAndCommas(sal_Int32& io_rPos,
const OUString& rStr,
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)
|| (bSignAllowed && sal_Unicode('+') == aChar)
......@@ -45,40 +47,43 @@ namespace basegfx
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,
sal_Int32& io_rPos,
const OUString& rStr);
bool getDoubleChar(double& o_fRetval,
sal_Int32& io_rPos,
const OUString& rStr);
bool lcl_importDoubleAndSpaces( double& o_fRetval,
sal_Int32& io_rPos,
const OUString& rStr,
const sal_Int32 nLen );
bool importDoubleAndSpaces(double& o_fRetval,
sal_Int32& io_rPos,
const OUString& rStr,
const sal_Int32 nLen );
bool lcl_importFlagAndSpaces(sal_Int32& o_nRetval,
sal_Int32& io_rPos,
const OUString& rStr,
const sal_Int32 nLen);
bool importFlagAndSpaces(sal_Int32& o_nRetval,
sal_Int32& io_rPos,
const OUString& rStr,
const sal_Int32 nLen);
void lcl_skipNumber(sal_Int32& io_rPos,
const OUString& rStr,
const sal_Int32 nLen);
void skipNumber(sal_Int32& io_rPos,
const OUString& rStr,
const sal_Int32 nLen);
void lcl_skipDouble(sal_Int32& io_rPos,
const OUString& rStr);
void skipDouble(sal_Int32& io_rPos,
const OUString& rStr);
void lcl_putNumberCharWithSpace( OUStringBuffer& rStr,
double fValue,
double fOldValue,
bool bUseRelativeCoordinates );
void putNumberCharWithSpace(OUStringBuffer& rStr,
double fValue,
double fOldValue,
bool bUseRelativeCoordinates);
inline sal_Unicode lcl_getCommand( sal_Char cUpperCaseCommand,
sal_Char cLowerCaseCommand,
bool bUseRelativeCoordinates )
inline sal_Unicode getCommand(sal_Char cUpperCaseCommand,
sal_Char cLowerCaseCommand,
bool bUseRelativeCoordinates)
{
return bUseRelativeCoordinates ? cLowerCaseCommand : cUpperCaseCommand;
}
......
......@@ -24,9 +24,9 @@ namespace basegfx
{
namespace internal
{
void lcl_skipSpaces(sal_Int32& io_rPos,
const OUString& rStr,
const sal_Int32 nLen)
void skipSpaces(sal_Int32& io_rPos,
const OUString& rStr,
const sal_Int32 nLen)
{
while( io_rPos < nLen &&
' ' == rStr[io_rPos] )
......@@ -35,9 +35,9 @@ namespace basegfx
}
}
void lcl_skipSpacesAndCommas(sal_Int32& io_rPos,
const OUString& rStr,
const sal_Int32 nLen)
void skipSpacesAndCommas(sal_Int32& io_rPos,
const OUString& rStr,
const sal_Int32 nLen)
{
while(io_rPos < nLen
&& (' ' == rStr[io_rPos] || ',' == rStr[io_rPos]))
......@@ -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] );
OUStringBuffer sNumberString;
......@@ -120,23 +122,23 @@ namespace basegfx
return false;
}
bool lcl_importDoubleAndSpaces( double& o_fRetval,
sal_Int32& io_rPos,
const OUString& rStr,
const sal_Int32 nLen )
bool importDoubleAndSpaces(double& o_fRetval,
sal_Int32& io_rPos,
const OUString& rStr,
const sal_Int32 nLen )
{
if( !lcl_getDoubleChar(o_fRetval, io_rPos, rStr) )
if( !getDoubleChar(o_fRetval, io_rPos, rStr) )
return false;
lcl_skipSpacesAndCommas(io_rPos, rStr, nLen);
skipSpacesAndCommas(io_rPos, rStr, nLen);
return true;
}
bool lcl_importFlagAndSpaces(sal_Int32& o_nRetval,
sal_Int32& io_rPos,
const OUString& rStr,
const sal_Int32 nLen)
bool importFlagAndSpaces(sal_Int32& o_nRetval,
sal_Int32& io_rPos,
const OUString& rStr,
const sal_Int32 nLen)
{
sal_Unicode aChar( rStr[io_rPos] );
......@@ -153,15 +155,15 @@ namespace basegfx
else
return false;
lcl_skipSpacesAndCommas(io_rPos, rStr, nLen);
skipSpacesAndCommas(io_rPos, rStr, nLen);
return true;
}
void lcl_putNumberCharWithSpace( OUStringBuffer& rStr,
double fValue,
double fOldValue,
bool bUseRelativeCoordinates )
void putNumberCharWithSpace(OUStringBuffer& rStr,
double fValue,
double fOldValue,
bool bUseRelativeCoordinates )
{
if( bUseRelativeCoordinates )
fValue -= fOldValue;
......@@ -169,7 +171,7 @@ namespace basegfx
const sal_Int32 aLen( rStr.getLength() );
if(aLen)
{
if( lcl_isOnNumberChar(rStr[aLen - 1], false, true) &&
if( isOnNumberChar(rStr[aLen - 1], false, true) &&
fValue >= 0.0 )
{
rStr.append( ' ' );
......@@ -178,7 +180,6 @@ namespace basegfx
rStr.append(fValue);
}
} // 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