summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 b722a8242..e88d6dbc7 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 558c963f4..854737163 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 acc2dbfaa..29cede88b 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 7c7f02562..7ebce2ee8 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: */