summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-06-30 11:01:14 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-06-30 11:35:57 +0100
commite93326d7d6053f0af0be28073ddb4852ca0278c6 (patch)
tree825539fd520379d86e820789f47aa0b72e8c5166 /sal
parente035836fb14a57b9386bbde990beaf5999a63ba2 (diff)
callcatcher: various unused foo
Diffstat (limited to 'sal')
-rw-r--r--sal/qa/OStringBuffer/rtl_String_Utils.cxx211
-rw-r--r--sal/qa/OStringBuffer/rtl_String_Utils.hxx32
-rw-r--r--sal/qa/rtl_strings/rtl_String_Utils.cxx213
-rw-r--r--sal/qa/rtl_strings/rtl_String_Utils.hxx38
4 files changed, 0 insertions, 494 deletions
diff --git a/sal/qa/OStringBuffer/rtl_String_Utils.cxx b/sal/qa/OStringBuffer/rtl_String_Utils.cxx
index 7a3da5a2e701..61bc11636b47 100644
--- a/sal/qa/OStringBuffer/rtl_String_Utils.cxx
+++ b/sal/qa/OStringBuffer/rtl_String_Utils.cxx
@@ -208,63 +208,8 @@ void makeComment( char *com, const char *str1, const char *str2,
com[str1Length + signLength + AStringLen(str2)] = 0;
}
-
//------------------------------------------------------------------------
-sal_Bool AStringToFloatCompare ( const sal_Char *pStr,
- const float nX,
- const float nEPS
- )
-{
- sal_Bool cmp = sal_False;
-
- if ( pStr != NULL )
- {
- ::rtl::OString aStr(pStr);
-
- float actNum = 0;
- float expNum = nX;
- float eps = nEPS;
-
- actNum = aStr.toFloat();
-
- if ( abs( (int)(actNum - expNum) ) <= eps )
- {
- cmp = sal_True;
- } // if
- } // if
-
- return cmp;
-} // AStringToFloatCompare
-
-//------------------------------------------------------------------------
-
-sal_Bool AStringToDoubleCompare ( const sal_Char *pStr,
- const double nX,
- const double nEPS
- )
-{
- sal_Bool cmp = sal_False;
-
- if ( pStr != NULL )
- {
- ::rtl::OString aStr(pStr);
-
- double actNum = 0;
- double expNum = nX;
- double eps = nEPS;
-
- actNum = aStr.toDouble();
-
- if ( abs( (int)(actNum - expNum) ) <= eps )
- {
- cmp = sal_True;
- } // if
- } // if
-
- return cmp;
-} // AStringToDoubleCompare
-
sal_uInt32 UStringLen( const sal_Unicode *pUStr )
{
sal_uInt32 nUStrLen = 0;
@@ -400,160 +345,4 @@ sal_Int32 AStringToUStringNCompare( const sal_Unicode *pUStr,
return nCmp;
} // AStringToUStringNCompare
-//------------------------------------------------------------------------
-
-sal_Int32 AStringToRTLUStringCompare( const rtl_uString *pRTLUStr,
- const sal_Char *pAStr
- )
-{
- sal_Int32 nCmp = kErrCompareAStringToRTLUString;
-
- if ( ( pRTLUStr != NULL ) && ( pAStr != NULL ) )
- {
- rtl_uString *pRTLUStrCopy = NULL;
-
- rtl_uString_newFromString( &pRTLUStrCopy, pRTLUStr );
-
- if ( pRTLUStrCopy != NULL )
- {
- const sal_Unicode *pUStr = rtl_uString_getStr( pRTLUStrCopy );
-
- if ( pUStr != NULL )
- {
- nCmp = AStringToUStringCompare( pUStr, pAStr );
- } // if
-
- rtl_uString_release( pRTLUStrCopy );
-
- pRTLUStrCopy = NULL;
- } // if
- } // if
-
- return nCmp;
-} // AStringToRTLUStringCompare
-
-//------------------------------------------------------------------------
-
-sal_Int32 AStringToRTLUStringNCompare( const rtl_uString *pRTLUStr,
- const sal_Char *pAStr,
- const sal_uInt32 nAStrCount
- )
-{
- sal_Int32 nCmp = kErrCompareNAStringToRTLUString;
-
- if ( ( pRTLUStr != NULL ) && ( pAStr != NULL ) )
- {
- rtl_uString *pRTLUStrCopy = NULL;
-
- rtl_uString_newFromString( &pRTLUStrCopy, pRTLUStr );
-
- if ( pRTLUStrCopy != NULL )
- {
- const sal_Unicode *pUStr = rtl_uString_getStr( pRTLUStrCopy );
-
- if ( pUStr != NULL )
- {
- nCmp = AStringToUStringNCompare( pUStr, pAStr, nAStrCount );
- } // if
-
- rtl_uString_release( pRTLUStrCopy );
-
- pRTLUStrCopy = NULL;
- } // if
- } // if
-
- return nCmp;
-} // AStringToRTLUStringNCompare
-
-//------------------------------------------------------------------------
-
-sal_Bool AStringToUStringCopy( sal_Unicode *pDest,
- const sal_Char *pSrc
- )
-{
- sal_Bool bCopied = sal_False;
- sal_uInt32 nCount = AStringLen( pSrc );
- sal_uInt32 nLen = nCount;
-
- if ( ( pDest != NULL )
- && ( pSrc != NULL )
- && ( AStringNIsValid( pSrc, nLen ) )
- )
- {
- for (;;)
- {
- *pDest = (unsigned char)*pSrc;
-
- pDest++;
- pSrc++;
-
- // Since we are dealing with unsigned integers
- // we want to make sure that the last number is
- // indeed zero.
-
- if ( nCount > 0 )
- {
- nCount--;
- } // if
- else
- {
- break;
- } // else
- } // while
-
- if ( nCount == 0 )
- {
- bCopied = sal_True;
- } // if
- } // if
-
- return bCopied;
-} // AStringToUStringCopy
-
-//------------------------------------------------------------------------
-
-sal_Bool AStringToUStringNCopy( sal_Unicode *pDest,
- const sal_Char *pSrc,
- const sal_uInt32 nSrcLen
- )
-{
- sal_Bool bCopied = sal_False;
- sal_uInt32 nCount = nSrcLen;
- sal_uInt32 nLen = nSrcLen;
-
- if ( ( pDest != NULL )
- && ( pSrc != NULL )
- && ( AStringNIsValid( pSrc, nLen ) )
- )
- {
- for (;;)
- {
- *pDest = (unsigned char)*pSrc;
-
- pDest++;
- pSrc++;
-
- // Since we are dealing with unsigned integers
- // we want to make sure that the last number is
- // indeed zero.
-
- if ( nCount > 0 )
- {
- nCount--;
- } // if
- else
- {
- break;
- } // else
- } // while
-
- if ( nCount == 0 )
- {
- bCopied = sal_True;
- } // if
- } // if
-
- return bCopied;
-} // AStringToUStringNCopy
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/qa/OStringBuffer/rtl_String_Utils.hxx b/sal/qa/OStringBuffer/rtl_String_Utils.hxx
index dc0f16d9d8b1..8f4e2ece4a96 100644
--- a/sal/qa/OStringBuffer/rtl_String_Utils.hxx
+++ b/sal/qa/OStringBuffer/rtl_String_Utils.hxx
@@ -64,18 +64,6 @@ sal_uInt32 UStringLen( const sal_Unicode *pUStr );
//------------------------------------------------------------------------
-sal_Bool AStringToFloatCompare ( const sal_Char *pStr,
- const float nX,
- const float nEPS
- );
-
-sal_Bool AStringToDoubleCompare ( const sal_Char *pStr,
- const double nX,
- const double nEPS
- );
-
-//------------------------------------------------------------------------
-
sal_Bool AStringNIsValid( const sal_Char *pAStr,
const sal_uInt32 nStrLen
);
@@ -91,26 +79,6 @@ sal_Int32 AStringToUStringNCompare( const sal_Unicode *pUStr,
const sal_uInt32 nAStrCount
);
-sal_Int32 AStringToRTLUStringCompare( const rtl_uString *pRTLUStr,
- const sal_Char *pAStr
- );
-
-sal_Int32 AStringToRTLUStringNCompare( const rtl_uString *pRTLUStr,
- const sal_Char *pAStr,
- const sal_uInt32 nAStrCount
- );
-
-//------------------------------------------------------------------------
-
-sal_Bool AStringToUStringCopy( sal_Unicode *pDest,
- const sal_Char *pSrc
- );
-
-sal_Bool AStringToUStringNCopy( sal_Unicode *pDest,
- const sal_Char *pSrc,
- const sal_uInt32 nSrcLen
- );
-
#endif /* __cplusplus */
#endif /* _RTL_STRING_UTILS_HXX */
diff --git a/sal/qa/rtl_strings/rtl_String_Utils.cxx b/sal/qa/rtl_strings/rtl_String_Utils.cxx
index b37cd2dc7ba3..8c4cdf6fc866 100644
--- a/sal/qa/rtl_strings/rtl_String_Utils.cxx
+++ b/sal/qa/rtl_strings/rtl_String_Utils.cxx
@@ -185,63 +185,6 @@ void makeComment( char *com, const char *str1, const char *str2,
com[str1Length + signLength + AStringLen(str2)] = 0;
}
-
-//------------------------------------------------------------------------
-
-sal_Bool AStringToFloatCompare ( const sal_Char *pStr,
- const float nX,
- const float nEPS
- )
-{
- sal_Bool cmp = sal_False;
-
- if ( pStr != NULL )
- {
- ::rtl::OString aStr(pStr);
-
- float actNum = 0;
- float expNum = nX;
- float eps = nEPS;
-
- actNum = aStr.toFloat();
-
- if ( abs( (int)(actNum - expNum) ) <= eps )
- {
- cmp = sal_True;
- } // if
- } // if
-
- return cmp;
-} // AStringToFloatCompare
-
-//------------------------------------------------------------------------
-
-sal_Bool AStringToDoubleCompare ( const sal_Char *pStr,
- const double nX,
- const double nEPS
- )
-{
- sal_Bool cmp = sal_False;
-
- if ( pStr != NULL )
- {
- ::rtl::OString aStr(pStr);
-
- double actNum = 0;
- double expNum = nX;
- double eps = nEPS;
-
- actNum = aStr.toDouble();
-
- if ( abs( (int)(actNum - expNum) ) <= eps )
- {
- cmp = sal_True;
- } // if
- } // if
-
- return cmp;
-} // AStringToDoubleCompare
-
sal_uInt32 UStringLen( const sal_Unicode *pUStr )
{
sal_uInt32 nUStrLen = 0;
@@ -377,160 +320,4 @@ sal_Int32 AStringToUStringNCompare( const sal_Unicode *pUStr,
return nCmp;
} // AStringToUStringNCompare
-//------------------------------------------------------------------------
-
-sal_Int32 AStringToRTLUStringCompare( const rtl_uString *pRTLUStr,
- const sal_Char *pAStr
- )
-{
- sal_Int32 nCmp = kErrCompareAStringToRTLUString;
-
- if ( ( pRTLUStr != NULL ) && ( pAStr != NULL ) )
- {
- rtl_uString *pRTLUStrCopy = NULL;
-
- rtl_uString_newFromString( &pRTLUStrCopy, pRTLUStr );
-
- if ( pRTLUStrCopy != NULL )
- {
- const sal_Unicode *pUStr = rtl_uString_getStr( pRTLUStrCopy );
-
- if ( pUStr != NULL )
- {
- nCmp = AStringToUStringCompare( pUStr, pAStr );
- } // if
-
- rtl_uString_release( pRTLUStrCopy );
-
- pRTLUStrCopy = NULL;
- } // if
- } // if
-
- return nCmp;
-} // AStringToRTLUStringCompare
-
-//------------------------------------------------------------------------
-
-sal_Int32 AStringToRTLUStringNCompare( const rtl_uString *pRTLUStr,
- const sal_Char *pAStr,
- const sal_uInt32 nAStrCount
- )
-{
- sal_Int32 nCmp = kErrCompareNAStringToRTLUString;
-
- if ( ( pRTLUStr != NULL ) && ( pAStr != NULL ) )
- {
- rtl_uString *pRTLUStrCopy = NULL;
-
- rtl_uString_newFromString( &pRTLUStrCopy, pRTLUStr );
-
- if ( pRTLUStrCopy != NULL )
- {
- const sal_Unicode *pUStr = rtl_uString_getStr( pRTLUStrCopy );
-
- if ( pUStr != NULL )
- {
- nCmp = AStringToUStringNCompare( pUStr, pAStr, nAStrCount );
- } // if
-
- rtl_uString_release( pRTLUStrCopy );
-
- pRTLUStrCopy = NULL;
- } // if
- } // if
-
- return nCmp;
-} // AStringToRTLUStringNCompare
-
-//------------------------------------------------------------------------
-
-sal_Bool AStringToUStringCopy( sal_Unicode *pDest,
- const sal_Char *pSrc
- )
-{
- sal_Bool bCopied = sal_False;
- sal_uInt32 nCount = AStringLen( pSrc );
- sal_uInt32 nLen = nCount;
-
- if ( ( pDest != NULL )
- && ( pSrc != NULL )
- && ( AStringNIsValid( pSrc, nLen ) )
- )
- {
- while ( nCount >= 0 )
- {
- *pDest = (unsigned char)*pSrc;
-
- pDest++;
- pSrc++;
-
- // Since we are dealing with unsigned integers
- // we want to make sure that the last number is
- // indeed zero.
-
- if ( nCount > 0 )
- {
- nCount--;
- } // if
- else
- {
- break;
- } // else
- } // while
-
- if ( nCount == 0 )
- {
- bCopied = sal_True;
- } // if
- } // if
-
- return bCopied;
-} // AStringToUStringCopy
-
-//------------------------------------------------------------------------
-
-sal_Bool AStringToUStringNCopy( sal_Unicode *pDest,
- const sal_Char *pSrc,
- const sal_uInt32 nSrcLen
- )
-{
- sal_Bool bCopied = sal_False;
- sal_uInt32 nCount = nSrcLen;
- sal_uInt32 nLen = nSrcLen;
-
- if ( ( pDest != NULL )
- && ( pSrc != NULL )
- && ( AStringNIsValid( pSrc, nLen ) )
- )
- {
- while ( nCount >= 0 )
- {
- *pDest = (unsigned char)*pSrc;
-
- pDest++;
- pSrc++;
-
- // Since we are dealing with unsigned integers
- // we want to make sure that the last number is
- // indeed zero.
-
- if ( nCount > 0 )
- {
- nCount--;
- } // if
- else
- {
- break;
- } // else
- } // while
-
- if ( nCount == 0 )
- {
- bCopied = sal_True;
- } // if
- } // if
-
- return bCopied;
-} // AStringToUStringNCopy
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/qa/rtl_strings/rtl_String_Utils.hxx b/sal/qa/rtl_strings/rtl_String_Utils.hxx
index d07e40e7af09..8da4490742ab 100644
--- a/sal/qa/rtl_strings/rtl_String_Utils.hxx
+++ b/sal/qa/rtl_strings/rtl_String_Utils.hxx
@@ -63,18 +63,6 @@ sal_uInt32 UStringLen( const sal_Unicode *pUStr );
//------------------------------------------------------------------------
-sal_Bool AStringToFloatCompare ( const sal_Char *pStr,
- const float nX,
- const float nEPS
- );
-
-sal_Bool AStringToDoubleCompare ( const sal_Char *pStr,
- const double nX,
- const double nEPS
- );
-
-//------------------------------------------------------------------------
-
sal_Bool AStringNIsValid( const sal_Char *pAStr,
const sal_uInt32 nStrLen
);
@@ -90,34 +78,8 @@ sal_Int32 AStringToUStringNCompare( const sal_Unicode *pUStr,
const sal_uInt32 nAStrCount
);
-sal_Int32 AStringToRTLUStringCompare( const rtl_uString *pRTLUStr,
- const sal_Char *pAStr
- );
-
-sal_Int32 AStringToRTLUStringNCompare( const rtl_uString *pRTLUStr,
- const sal_Char *pAStr,
- const sal_uInt32 nAStrCount
- );
-
-//------------------------------------------------------------------------
-
-sal_Bool AStringToUStringCopy( sal_Unicode *pDest,
- const sal_Char *pSrc
- );
-
-sal_Bool AStringToUStringNCopy( sal_Unicode *pDest,
- const sal_Char *pSrc,
- const sal_uInt32 nSrcLen
- );
-
#endif /* __cplusplus */
#endif /* _RTL_STRING_UTILS_HXX */
-
-
-
-
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */