[Libreoffice-commits] .: 2 commits - sal/qa
Caolán McNamara
caolan at kemper.freedesktop.org
Mon Jul 11 01:29:33 PDT 2011
sal/qa/OStringBuffer/rtl_String_Utils.cxx | 137 ------------------------------
sal/qa/OStringBuffer/rtl_String_Utils.hxx | 3
sal/qa/rtl_strings/rtl_String_Utils.cxx | 135 -----------------------------
sal/qa/rtl_strings/rtl_String_Utils.hxx | 3
4 files changed, 278 deletions(-)
New commits:
commit 27a81bb077daa5491761762ac18d3970ce1a7bb2
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 10 01:45:26 2011 +0100
unused methods
diff --git a/sal/qa/OStringBuffer/rtl_String_Utils.cxx b/sal/qa/OStringBuffer/rtl_String_Utils.cxx
index a7e2dc7..f6c5bb3 100644
--- a/sal/qa/OStringBuffer/rtl_String_Utils.cxx
+++ b/sal/qa/OStringBuffer/rtl_String_Utils.cxx
@@ -194,42 +194,6 @@ sal_Char* createName( sal_Char* dst, const sal_Char* meth, sal_uInt32 cnt )
}
//------------------------------------------------------------------------
-// testing the method compareTo( const OString & aStr )
-//------------------------------------------------------------------------
-void makeComment( char *com, const char *str1, const char *str2,
- sal_Int32 sgn )
-{
- cpystr(com, str1);
- int str1Length = AStringLen( str1 );
- const char *sign = (sgn == 0) ? " == " : (sgn > 0) ? " > " : " < " ;
- cpystr(com + str1Length, sign);
- int signLength = AStringLen(sign);
- cpystr(com + str1Length + signLength, str2);
- com[str1Length + signLength + AStringLen(str2)] = 0;
-}
-
-//------------------------------------------------------------------------
-
-sal_uInt32 UStringLen( const sal_Unicode *pUStr )
-{
- sal_uInt32 nUStrLen = 0;
-
- if ( pUStr != NULL )
- {
- const sal_Unicode *pTempUStr = pUStr;
-
- while( *pTempUStr )
- {
- pTempUStr++;
- } // while
-
- nUStrLen = (sal_uInt32)( pTempUStr - pUStr );
- } // if
-
- return nUStrLen;
-} // UStringLen
-
-//------------------------------------------------------------------------
static inline sal_Int32 ACharToUCharCompare( const sal_Unicode *pUStr,
const sal_Char *pAStr
diff --git a/sal/qa/OStringBuffer/rtl_String_Utils.hxx b/sal/qa/OStringBuffer/rtl_String_Utils.hxx
index 8547371..3eb160d 100644
--- a/sal/qa/OStringBuffer/rtl_String_Utils.hxx
+++ b/sal/qa/OStringBuffer/rtl_String_Utils.hxx
@@ -55,13 +55,10 @@ sal_Bool cmpustr( const sal_Unicode* str1, const sal_Unicode* str2, sal_uInt32 l
sal_Bool cmpustr( const sal_Unicode* str1, const sal_Unicode* str2 );
sal_Char* createName( sal_Char* dst, const sal_Char* src, sal_uInt32 cnt );
-void makeComment(char *com, const char *str1, const char *str2, sal_Int32 sgn);
sal_uInt32 AStringLen( const sal_Char *pAStr );
-sal_uInt32 UStringLen( const sal_Unicode *pUStr );
-
//------------------------------------------------------------------------
sal_Bool AStringNIsValid( const sal_Char *pAStr,
diff --git a/sal/qa/rtl_strings/rtl_String_Utils.cxx b/sal/qa/rtl_strings/rtl_String_Utils.cxx
index c921ac7..6230244 100644
--- a/sal/qa/rtl_strings/rtl_String_Utils.cxx
+++ b/sal/qa/rtl_strings/rtl_String_Utils.cxx
@@ -171,40 +171,6 @@ sal_Char* createName( sal_Char* dst, const sal_Char* meth, sal_uInt32 cnt )
}
//------------------------------------------------------------------------
-// testing the method compareTo( const OString & aStr )
-//------------------------------------------------------------------------
-void makeComment( char *com, const char *str1, const char *str2,
- sal_Int32 sgn )
-{
- cpystr(com, str1);
- int str1Length = AStringLen( str1 );
- const char *sign = (sgn == 0) ? " == " : (sgn > 0) ? " > " : " < " ;
- cpystr(com + str1Length, sign);
- int signLength = AStringLen(sign);
- cpystr(com + str1Length + signLength, str2);
- com[str1Length + signLength + AStringLen(str2)] = 0;
-}
-
-sal_uInt32 UStringLen( const sal_Unicode *pUStr )
-{
- sal_uInt32 nUStrLen = 0;
-
- if ( pUStr != NULL )
- {
- const sal_Unicode *pTempUStr = pUStr;
-
- while( *pTempUStr )
- {
- pTempUStr++;
- } // while
-
- nUStrLen = (sal_uInt32)( pTempUStr - pUStr );
- } // if
-
- return nUStrLen;
-} // UStringLen
-
-//------------------------------------------------------------------------
static inline sal_Int32 ACharToUCharCompare( const sal_Unicode *pUStr,
const sal_Char *pAStr
diff --git a/sal/qa/rtl_strings/rtl_String_Utils.hxx b/sal/qa/rtl_strings/rtl_String_Utils.hxx
index 7ebce2e..fc0e29b 100644
--- a/sal/qa/rtl_strings/rtl_String_Utils.hxx
+++ b/sal/qa/rtl_strings/rtl_String_Utils.hxx
@@ -54,13 +54,10 @@ sal_Bool cmpustr( const sal_Unicode* str1, const sal_Unicode* str2, sal_uInt32 l
sal_Bool cmpustr( const sal_Unicode* str1, const sal_Unicode* str2 );
sal_Char* createName( sal_Char* dst, const sal_Char* src, sal_uInt32 cnt );
-void makeComment(char *com, const char *str1, const char *str2, sal_Int32 sgn);
sal_uInt32 AStringLen( const sal_Char *pAStr );
-sal_uInt32 UStringLen( const sal_Unicode *pUStr );
-
//------------------------------------------------------------------------
sal_Bool AStringNIsValid( const sal_Char *pAStr,
commit 28023e936e58bd4f438a2caa6b9d167e039f928c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Jul 9 23:54:48 2011 +0100
callcatcher: unused methods
diff --git a/sal/qa/OStringBuffer/rtl_String_Utils.cxx b/sal/qa/OStringBuffer/rtl_String_Utils.cxx
index e88d6db..a7e2dc7 100644
--- a/sal/qa/OStringBuffer/rtl_String_Utils.cxx
+++ b/sal/qa/OStringBuffer/rtl_String_Utils.cxx
@@ -231,43 +231,6 @@ sal_uInt32 UStringLen( const sal_Unicode *pUStr )
//------------------------------------------------------------------------
-sal_Bool AStringNIsValid( const sal_Char *pAStr,
- const sal_uInt32 nStrLen
- )
-{
- sal_uInt32 nLen = nStrLen;
- sal_uChar uChar = 0;
-
- while ( *pAStr )
- {
- uChar = (unsigned char)*pAStr;
-
- if ( uChar > 127 )
- {
- return sal_False;
- } // if
-
- pAStr++;
-
- // Since we are dealing with unsigned integers
- // we want to make sure that the last number is
- // indeed zero.
-
- if ( nLen > 0 )
- {
- nLen--;
- } // if
- else
- {
- break;
- } // else
- } // while
-
- return sal_True;
-} // AStringNIsValid
-
-//------------------------------------------------------------------------
-
static inline sal_Int32 ACharToUCharCompare( const sal_Unicode *pUStr,
const sal_Char *pAStr
)
@@ -281,68 +244,4 @@ static inline sal_Int32 ACharToUCharCompare( const sal_Unicode *pUStr,
return nCmp;
} // ACharToUCharCompare
-//------------------------------------------------------------------------
-
-sal_Int32 AStringToUStringCompare( const sal_Unicode *pUStr,
- const sal_Char *pAStr
- )
-{
- sal_Int32 nCmp = kErrCompareAStringToUString;
-
- if ( ( pUStr != NULL ) && ( pAStr != NULL ) )
- {
- nCmp = ACharToUCharCompare( pUStr, pAStr );
-
- while ( ( nCmp == 0 ) && ( *pAStr ) )
- {
- pUStr++;
- pAStr++;
-
- nCmp = ACharToUCharCompare( pUStr, pAStr );
- } // while
- } // if
-
- return nCmp;
-} // AStringToUStringCompare
-
-//------------------------------------------------------------------------
-
-sal_Int32 AStringToUStringNCompare( const sal_Unicode *pUStr,
- const sal_Char *pAStr,
- const sal_uInt32 nAStrCount
- )
-{
- sal_Int32 nCmp = kErrCompareNAStringToUString;
-
- if ( ( pUStr != NULL ) && ( pAStr != NULL ) )
- {
- sal_uInt32 nCount = nAStrCount;
-
- nCmp = ACharToUCharCompare( pUStr, pAStr );
-
- while ( ( nCmp == 0 ) && ( *pAStr ) && ( nCount ) )
- {
- pUStr++;
- pAStr++;
-
- nCmp = ACharToUCharCompare( pUStr, pAStr );
-
- // 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
-
- return nCmp;
-} // AStringToUStringNCompare
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/qa/rtl_strings/rtl_String_Utils.cxx b/sal/qa/rtl_strings/rtl_String_Utils.cxx
index 29cede8..c921ac7 100644
--- a/sal/qa/rtl_strings/rtl_String_Utils.cxx
+++ b/sal/qa/rtl_strings/rtl_String_Utils.cxx
@@ -206,43 +206,6 @@ sal_uInt32 UStringLen( const sal_Unicode *pUStr )
//------------------------------------------------------------------------
-sal_Bool AStringNIsValid( const sal_Char *pAStr,
- const sal_uInt32 nStrLen
- )
-{
- sal_uInt32 nLen = nStrLen;
- sal_uChar uChar = 0;
-
- while ( ( nLen >= 0 ) && ( *pAStr ) )
- {
- uChar = (unsigned char)*pAStr;
-
- if ( uChar > 127 )
- {
- return sal_False;
- } // if
-
- pAStr++;
-
- // Since we are dealing with unsigned integers
- // we want to make sure that the last number is
- // indeed zero.
-
- if ( nLen > 0 )
- {
- nLen--;
- } // if
- else
- {
- break;
- } // else
- } // while
-
- return sal_True;
-} // AStringNIsValid
-
-//------------------------------------------------------------------------
-
static inline sal_Int32 ACharToUCharCompare( const sal_Unicode *pUStr,
const sal_Char *pAStr
)
@@ -256,68 +219,4 @@ static inline sal_Int32 ACharToUCharCompare( const sal_Unicode *pUStr,
return nCmp;
} // ACharToUCharCompare
-//------------------------------------------------------------------------
-
-sal_Int32 AStringToUStringCompare( const sal_Unicode *pUStr,
- const sal_Char *pAStr
- )
-{
- sal_Int32 nCmp = kErrCompareAStringToUString;
-
- if ( ( pUStr != NULL ) && ( pAStr != NULL ) )
- {
- nCmp = ACharToUCharCompare( pUStr, pAStr );
-
- while ( ( nCmp == 0 ) && ( *pAStr ) )
- {
- pUStr++;
- pAStr++;
-
- nCmp = ACharToUCharCompare( pUStr, pAStr );
- } // while
- } // if
-
- return nCmp;
-} // AStringToUStringCompare
-
-//------------------------------------------------------------------------
-
-sal_Int32 AStringToUStringNCompare( const sal_Unicode *pUStr,
- const sal_Char *pAStr,
- const sal_uInt32 nAStrCount
- )
-{
- sal_Int32 nCmp = kErrCompareNAStringToUString;
-
- if ( ( pUStr != NULL ) && ( pAStr != NULL ) )
- {
- sal_uInt32 nCount = nAStrCount;
-
- nCmp = ACharToUCharCompare( pUStr, pAStr );
-
- while ( ( nCmp == 0 ) && ( *pAStr ) && ( nCount ) )
- {
- pUStr++;
- pAStr++;
-
- nCmp = ACharToUCharCompare( pUStr, pAStr );
-
- // 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
-
- return nCmp;
-} // AStringToUStringNCompare
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list