summaryrefslogtreecommitdiff
path: root/tools/source/string
diff options
context:
space:
mode:
authorPhilipp Riemer <ruderphilipp@gmail.com>2012-08-18 18:12:35 +0200
committerPhilipp Riemer <ruderphilipp@gmail.com>2012-08-18 18:33:50 +0200
commit42352dff5a8dc4c89fccf399359876aea7dc7d2d (patch)
tree7747642c5ee1c7465e8a684a35713f5dbd90dc82 /tools/source/string
parent0700d6a1f3524ab79b5114559fb2d15c7ba85112 (diff)
removed ascii-art and blank lines in tools/source
Change-Id: I3f95d12a8c325c96c586253b5d9bb7dce24c0858
Diffstat (limited to 'tools/source/string')
-rw-r--r--tools/source/string/reversemap.cxx1
-rw-r--r--tools/source/string/strascii.cxx44
-rw-r--r--tools/source/string/strimp.cxx47
-rw-r--r--tools/source/string/strucvt.cxx13
-rw-r--r--tools/source/string/tenccvt.cxx10
-rw-r--r--tools/source/string/tustring.cxx86
6 files changed, 2 insertions, 199 deletions
diff --git a/tools/source/string/reversemap.cxx b/tools/source/string/reversemap.cxx
index 2bec63cc2c94..9e51ffdaece5 100644
--- a/tools/source/string/reversemap.cxx
+++ b/tools/source/string/reversemap.cxx
@@ -26,7 +26,6 @@
* instead of those above.
*/
-
#include <rtl/textenc.h>
#include <tools/tenccvt.hxx>
diff --git a/tools/source/string/strascii.cxx b/tools/source/string/strascii.cxx
index f0fd961b0a7a..2a080e6e5d4a 100644
--- a/tools/source/string/strascii.cxx
+++ b/tools/source/string/strascii.cxx
@@ -18,7 +18,6 @@
*/
#ifdef DBG_UTIL
-
static sal_Bool ImplDbgCheckAsciiStr( const sal_Char* pAsciiStr, sal_Int32 nLen )
{
while ( nLen && *pAsciiStr )
@@ -31,11 +30,8 @@ static sal_Bool ImplDbgCheckAsciiStr( const sal_Char* pAsciiStr, sal_Int32 nLen
return sal_True;
}
-
#endif
-// =======================================================================
-
static void ImplCopyAsciiStr( sal_Unicode* pDest, const sal_Char* pSrc,
sal_Int32 nLen )
{
@@ -51,8 +47,6 @@ static void ImplCopyAsciiStr( sal_Unicode* pDest, const sal_Char* pSrc,
}
}
-// =======================================================================
-
static sal_Int32 ImplStringCompareAscii( const sal_Unicode* pStr1, const sal_Char* pStr2 )
{
sal_Int32 nRet;
@@ -66,8 +60,6 @@ static sal_Int32 ImplStringCompareAscii( const sal_Unicode* pStr1, const sal_Cha
return nRet;
}
-// -----------------------------------------------------------------------
-
static sal_Int32 ImplStringCompareAscii( const sal_Unicode* pStr1, const sal_Char* pStr2,
xub_StrLen nCount )
{
@@ -84,8 +76,6 @@ static sal_Int32 ImplStringCompareAscii( const sal_Unicode* pStr1, const sal_Cha
return nRet;
}
-// -----------------------------------------------------------------------
-
static sal_Int32 ImplStringCompareWithoutZeroAscii( const sal_Unicode* pStr1, const sal_Char* pStr2,
xub_StrLen nCount )
{
@@ -101,8 +91,6 @@ static sal_Int32 ImplStringCompareWithoutZeroAscii( const sal_Unicode* pStr1, co
return nRet;
}
-// -----------------------------------------------------------------------
-
static sal_Int32 ImplStringICompareAscii( const sal_Unicode* pStr1, const sal_Char* pStr2 )
{
sal_Int32 nRet;
@@ -129,8 +117,6 @@ static sal_Int32 ImplStringICompareAscii( const sal_Unicode* pStr1, const sal_Ch
return nRet;
}
-// -----------------------------------------------------------------------
-
static sal_Int32 ImplStringICompareAscii( const sal_Unicode* pStr1, const sal_Char* pStr2,
xub_StrLen nCount )
{
@@ -162,8 +148,6 @@ static sal_Int32 ImplStringICompareAscii( const sal_Unicode* pStr1, const sal_Ch
return nRet;
}
-// -----------------------------------------------------------------------
-
UniString& UniString::AssignAscii( const sal_Char* pAsciiStr )
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
@@ -195,8 +179,6 @@ UniString& UniString::AssignAscii( const sal_Char* pAsciiStr )
return *this;
}
-// -----------------------------------------------------------------------
-
UniString& UniString::AssignAscii( const sal_Char* pAsciiStr, xub_StrLen nLen )
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
@@ -241,8 +223,6 @@ UniString& UniString::AssignAscii( const sal_Char* pAsciiStr, xub_StrLen nLen )
return *this;
}
-// -----------------------------------------------------------------------
-
UniString& UniString::AppendAscii( const sal_Char* pAsciiStr )
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
@@ -272,8 +252,6 @@ UniString& UniString::AppendAscii( const sal_Char* pAsciiStr )
return *this;
}
-// -----------------------------------------------------------------------
-
UniString& UniString::AppendAscii( const sal_Char* pAsciiStr, xub_StrLen nLen )
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
@@ -316,8 +294,6 @@ UniString& UniString::AppendAscii( const sal_Char* pAsciiStr, xub_StrLen nLen )
return *this;
}
-// -----------------------------------------------------------------------
-
UniString& UniString::InsertAscii( const char* pAsciiStr, xub_StrLen nIndex )
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
@@ -353,8 +329,6 @@ UniString& UniString::InsertAscii( const char* pAsciiStr, xub_StrLen nIndex )
return *this;
}
-// -----------------------------------------------------------------------
-
UniString& UniString::ReplaceAscii( xub_StrLen nIndex, xub_StrLen nCount,
const sal_Char* pAsciiStr, xub_StrLen nStrLen )
{
@@ -412,8 +386,6 @@ UniString& UniString::ReplaceAscii( xub_StrLen nIndex, xub_StrLen nCount,
return *this;
}
-// -----------------------------------------------------------------------
-
StringCompare UniString::CompareToAscii( const sal_Char* pAsciiStr,
xub_StrLen nLen ) const
{
@@ -433,8 +405,6 @@ StringCompare UniString::CompareToAscii( const sal_Char* pAsciiStr,
return COMPARE_GREATER;
}
-// -----------------------------------------------------------------------
-
StringCompare UniString::CompareIgnoreCaseToAscii( const sal_Char* pAsciiStr,
xub_StrLen nLen ) const
{
@@ -454,8 +424,6 @@ StringCompare UniString::CompareIgnoreCaseToAscii( const sal_Char* pAsciiStr,
return COMPARE_GREATER;
}
-// -----------------------------------------------------------------------
-
sal_Bool UniString::EqualsAscii( const sal_Char* pAsciiStr ) const
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
@@ -465,8 +433,6 @@ sal_Bool UniString::EqualsAscii( const sal_Char* pAsciiStr ) const
return (ImplStringCompareAscii( mpData->maStr, pAsciiStr ) == 0);
}
-// -----------------------------------------------------------------------
-
sal_Bool UniString::EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr ) const
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
@@ -476,8 +442,6 @@ sal_Bool UniString::EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr ) const
return (ImplStringICompareAscii( mpData->maStr, pAsciiStr ) == 0);
}
-// -----------------------------------------------------------------------
-
sal_Bool UniString::EqualsAscii( const sal_Char* pAsciiStr,
xub_StrLen nIndex, xub_StrLen nLen ) const
{
@@ -492,8 +456,6 @@ sal_Bool UniString::EqualsAscii( const sal_Char* pAsciiStr,
return (ImplStringCompareAscii( mpData->maStr+nIndex, pAsciiStr, nLen ) == 0);
}
-// -----------------------------------------------------------------------
-
sal_Bool UniString::EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr,
xub_StrLen nIndex, xub_StrLen nLen ) const
{
@@ -508,8 +470,6 @@ sal_Bool UniString::EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr,
return (ImplStringICompareAscii( mpData->maStr+nIndex, pAsciiStr, nLen ) == 0);
}
-// -----------------------------------------------------------------------
-
xub_StrLen UniString::SearchAscii( const sal_Char* pAsciiStr, xub_StrLen nIndex ) const
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
@@ -554,8 +514,6 @@ xub_StrLen UniString::SearchAscii( const sal_Char* pAsciiStr, xub_StrLen nIndex
return STRING_NOTFOUND;
}
-// -----------------------------------------------------------------------
-
xub_StrLen UniString::SearchAndReplaceAscii( const sal_Char* pAsciiStr, const UniString& rRepStr,
xub_StrLen nIndex )
{
@@ -570,8 +528,6 @@ xub_StrLen UniString::SearchAndReplaceAscii( const sal_Char* pAsciiStr, const Un
return nSPos;
}
-// -----------------------------------------------------------------------
-
void UniString::SearchAndReplaceAllAscii( const sal_Char* pAsciiStr, const UniString& rRepStr )
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
diff --git a/tools/source/string/strimp.cxx b/tools/source/string/strimp.cxx
index 6717d93209ad..5c36af8d53f2 100644
--- a/tools/source/string/strimp.cxx
+++ b/tools/source/string/strimp.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
static sal_Int32 ImplStringCompare( const STRCODE* pStr1, const STRCODE* pStr2,
xub_StrLen nCount )
{
@@ -34,8 +33,6 @@ static sal_Int32 ImplStringCompare( const STRCODE* pStr1, const STRCODE* pStr2,
return nRet;
}
-// -----------------------------------------------------------------------
-
static sal_Int32 ImplStringCompareWithoutZero( const STRCODE* pStr1, const STRCODE* pStr2,
sal_Int32 nCount )
{
@@ -51,8 +48,6 @@ static sal_Int32 ImplStringCompareWithoutZero( const STRCODE* pStr1, const STRCO
return nRet;
}
-// =======================================================================
-
#ifdef DBG_UTIL
const char* DBGCHECKSTRING( const void* pString )
{
@@ -65,8 +60,6 @@ const char* DBGCHECKSTRING( const void* pString )
}
#endif
-// =======================================================================
-
static STRINGDATA* ImplAllocData( sal_Int32 nLen )
{
// Dann kopiere die Daten
@@ -77,8 +70,6 @@ static STRINGDATA* ImplAllocData( sal_Int32 nLen )
return pData;
}
-// -----------------------------------------------------------------------
-
static STRINGDATA* _ImplCopyData( STRINGDATA* pData )
{
unsigned int nSize = sizeof(STRINGDATA)+(pData->mnLen*sizeof( STRCODE ));
@@ -89,8 +80,6 @@ static STRINGDATA* _ImplCopyData( STRINGDATA* pData )
return pNewData;
}
-// -----------------------------------------------------------------------
-
inline void STRING::ImplCopyData()
{
DBG_ASSERT( (mpData->mnRefCount != 0), "String::ImplCopyData() - RefCount == 0" );
@@ -100,8 +89,6 @@ inline void STRING::ImplCopyData()
mpData = _ImplCopyData( mpData );
}
-// -----------------------------------------------------------------------
-
inline STRCODE* STRING::ImplCopyStringData( STRCODE* pStr )
{
// Ist der Referenzzaehler groesser 0
@@ -116,8 +103,6 @@ inline STRCODE* STRING::ImplCopyStringData( STRCODE* pStr )
return pStr;
}
-// -----------------------------------------------------------------------
-
inline sal_Int32 ImplGetCopyLen( sal_Int32 nStrLen, sal_Int32 nCopyLen )
{
OSL_ASSERT(nStrLen <= STRING_MAXLEN && nCopyLen <= STRING_MAXLEN);
@@ -126,8 +111,6 @@ inline sal_Int32 ImplGetCopyLen( sal_Int32 nStrLen, sal_Int32 nCopyLen )
return nCopyLen;
}
-// =======================================================================
-
STRING::STRING()
: mpData(NULL)
{
@@ -136,8 +119,6 @@ STRING::STRING()
STRING_NEW((STRING_TYPE **)&mpData);
}
-// -----------------------------------------------------------------------
-
STRING::STRING( const STRING& rStr )
{
DBG_CTOR( STRING, DBGCHECKSTRING );
@@ -149,8 +130,6 @@ STRING::STRING( const STRING& rStr )
mpData = rStr.mpData;
}
-// -----------------------------------------------------------------------
-
STRING::STRING( const STRING& rStr, xub_StrLen nPos, xub_StrLen nLen )
: mpData( NULL )
{
@@ -190,8 +169,6 @@ STRING::STRING( const STRING& rStr, xub_StrLen nPos, xub_StrLen nLen )
}
}
-// -----------------------------------------------------------------------
-
STRING::~STRING()
{
DBG_DTOR( STRING, DBGCHECKSTRING );
@@ -200,8 +177,6 @@ STRING::~STRING()
STRING_RELEASE((STRING_TYPE *)mpData);
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Assign( const STRING& rStr )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -213,8 +188,6 @@ STRING& STRING::Assign( const STRING& rStr )
return *this;
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Append( const STRING& rStr )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -252,8 +225,6 @@ STRING& STRING::Append( const STRING& rStr )
return *this;
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Append( const STRCODE* pCharStr )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -284,8 +255,6 @@ STRING& STRING::Append( const STRCODE* pCharStr )
return *this;
}
-// -----------------------------------------------------------------------
-
void STRING::SetChar( xub_StrLen nIndex, STRCODE c )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -296,8 +265,6 @@ void STRING::SetChar( xub_StrLen nIndex, STRCODE c )
mpData->maStr[nIndex] = c;
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Insert( const STRING& rStr, xub_StrLen nIndex )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -330,8 +297,6 @@ STRING& STRING::Insert( const STRING& rStr, xub_StrLen nIndex )
return *this;
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Replace( xub_StrLen nIndex, xub_StrLen nCount, const STRING& rStr )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -391,8 +356,6 @@ STRING& STRING::Replace( xub_StrLen nIndex, xub_StrLen nCount, const STRING& rSt
return *this;
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Erase( xub_StrLen nIndex, xub_StrLen nCount )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -428,8 +391,6 @@ STRING& STRING::Erase( xub_StrLen nIndex, xub_StrLen nCount )
return *this;
}
-// -----------------------------------------------------------------------
-
STRING& STRING::ToLowerAscii()
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -454,8 +415,6 @@ STRING& STRING::ToLowerAscii()
return *this;
}
-// -----------------------------------------------------------------------
-
xub_StrLen STRING::Search( STRCODE c, xub_StrLen nIndex ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -474,8 +433,6 @@ xub_StrLen STRING::Search( STRCODE c, xub_StrLen nIndex ) const
return STRING_NOTFOUND;
}
-// -----------------------------------------------------------------------
-
xub_StrLen STRING::Search( const STRING& rStr, xub_StrLen nIndex ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -521,8 +478,6 @@ xub_StrLen STRING::Search( const STRING& rStr, xub_StrLen nIndex ) const
return STRING_NOTFOUND;
}
-// -----------------------------------------------------------------------
-
xub_StrLen STRING::Search( const STRCODE* pCharStr, xub_StrLen nIndex ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -565,8 +520,6 @@ xub_StrLen STRING::Search( const STRCODE* pCharStr, xub_StrLen nIndex ) const
return STRING_NOTFOUND;
}
-// -----------------------------------------------------------------------
-
void STRING::SearchAndReplaceAll( STRCODE c, STRCODE cRep )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
diff --git a/tools/source/string/strucvt.cxx b/tools/source/string/strucvt.cxx
index 6642ac0eee7c..759da6304cab 100644
--- a/tools/source/string/strucvt.cxx
+++ b/tools/source/string/strucvt.cxx
@@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-// =======================================================================
-
UniString::UniString( const char* pByteStr,
rtl_TextEncoding eTextEncoding, sal_uInt32 nCvtFlags )
{
@@ -31,8 +29,6 @@ UniString::UniString( const char* pByteStr,
eTextEncoding, nCvtFlags );
}
-// -----------------------------------------------------------------------
-
UniString::UniString( const char* pByteStr, xub_StrLen nLen,
rtl_TextEncoding eTextEncoding, sal_uInt32 nCvtFlags )
{
@@ -48,8 +44,6 @@ UniString::UniString( const char* pByteStr, xub_StrLen nLen,
eTextEncoding, nCvtFlags );
}
-// =======================================================================
-
UniString::UniString( const rtl::OUString& rStr )
: mpData(NULL)
{
@@ -70,8 +64,6 @@ UniString::UniString( const rtl::OUString& rStr )
}
}
-// -----------------------------------------------------------------------
-
UniString& UniString::Assign( const rtl::OUString& rStr )
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
@@ -79,7 +71,6 @@ UniString& UniString::Assign( const rtl::OUString& rStr )
OSL_ENSURE(rStr.pData->length < STRING_MAXLEN,
"Overflowing rtl::OUString -> UniString cut to zero length");
-
if (rStr.pData->length < STRING_MAXLEN)
{
STRING_RELEASE((STRING_TYPE *)mpData);
@@ -94,8 +85,6 @@ UniString& UniString::Assign( const rtl::OUString& rStr )
return *this;
}
-// =======================================================================
-
#include <rtl/ustrbuf.hxx>
#include <tools/rc.hxx>
#include <tools/rcid.h>
@@ -119,8 +108,6 @@ UniString::UniString( const ResId& rResId )
{
STRING_NEW((STRING_TYPE **)&mpData);
}
-
-
}
rtl::OUString ResId::toString() const
diff --git a/tools/source/string/tenccvt.cxx b/tools/source/string/tenccvt.cxx
index e31a5e250ad9..528608eceef1 100644
--- a/tools/source/string/tenccvt.cxx
+++ b/tools/source/string/tenccvt.cxx
@@ -20,8 +20,6 @@
#include <rtl/tencinfo.h>
#include <tools/tenccvt.hxx>
-// =======================================================================
-
rtl_TextEncoding GetExtendedCompatibilityTextEncoding( rtl_TextEncoding eEncoding )
{
// Latin1
@@ -34,8 +32,6 @@ rtl_TextEncoding GetExtendedCompatibilityTextEncoding( rtl_TextEncoding eEncodin
return eEncoding;
}
-// -----------------------------------------------------------------------
-
rtl_TextEncoding GetExtendedTextEncoding( rtl_TextEncoding eEncoding )
{
// Cyr
@@ -55,8 +51,6 @@ rtl_TextEncoding GetExtendedTextEncoding( rtl_TextEncoding eEncoding )
return GetExtendedCompatibilityTextEncoding( eEncoding );
}
-// -----------------------------------------------------------------------
-
rtl_TextEncoding GetOneByteTextEncoding( rtl_TextEncoding eEncoding )
{
rtl_TextEncodingInfo aTextEncInfo;
@@ -72,15 +66,11 @@ rtl_TextEncoding GetOneByteTextEncoding( rtl_TextEncoding eEncoding )
return RTL_TEXTENCODING_MS_1252;
}
-// -----------------------------------------------------------------------
-
rtl_TextEncoding GetSOLoadTextEncoding( rtl_TextEncoding eEncoding )
{
return GetExtendedCompatibilityTextEncoding( GetOneByteTextEncoding( eEncoding ) );
}
-// -----------------------------------------------------------------------
-
rtl_TextEncoding GetSOStoreTextEncoding( rtl_TextEncoding eEncoding )
{
return GetExtendedTextEncoding( GetOneByteTextEncoding( eEncoding ) );
diff --git a/tools/source/string/tustring.cxx b/tools/source/string/tustring.cxx
index e21b2d018eb3..eb04784e474f 100644
--- a/tools/source/string/tustring.cxx
+++ b/tools/source/string/tustring.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <string.h>
#include "boost/static_assert.hpp"
@@ -27,18 +26,14 @@
#include <rtl/memory.h>
#include <rtl/tencinfo.h>
#include <rtl/instance.hxx>
-
#include <tools/string.hxx>
+
#include <impstrg.hxx>
#include <tools/debug.hxx>
-// =======================================================================
-
DBG_NAME( UniString )
-// -----------------------------------------------------------------------
-
#define STRCODE sal_Unicode
#define STRCODEU sal_Unicode
#define STRING UniString
@@ -49,31 +44,24 @@ DBG_NAME( UniString )
#define STRING_RELEASE rtl_uString_release
#define STRING_NEW rtl_uString_new
-// -----------------------------------------------------------------------
-
#include <strimp.cxx>
#include <strucvt.cxx>
#include <strascii.cxx>
UniString::UniString(char c): mpData(ImplAllocData(1)) { mpData->maStr[0] = c; }
-// -----------------------------------------------------------------------
-
UniString UniString::CreateFromInt32( sal_Int32 n, sal_Int16 nRadix )
{
return rtl::OUString::valueOf(n, nRadix);
}
-// -----------------------------------------------------------------------
-
namespace { struct Empty : public rtl::Static< const UniString, Empty> {}; }
+
const UniString& UniString::EmptyString()
{
return Empty::get();
}
-// -----------------------------------------------------------------------
-
sal_Int32 UniString::ToInt32() const
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
@@ -81,8 +69,6 @@ sal_Int32 UniString::ToInt32() const
return rtl_ustr_toInt32( mpData->maStr, 10 );
}
-// -----------------------------------------------------------------------
-
sal_Int64 UniString::ToInt64() const
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
@@ -90,8 +76,6 @@ sal_Int64 UniString::ToInt64() const
return rtl_ustr_toInt64( mpData->maStr, 10 );
}
-// -----------------------------------------------------------------------
-
xub_StrLen STRING::SearchChar( const STRCODE* pChars, xub_StrLen nIndex ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -116,8 +100,6 @@ xub_StrLen STRING::SearchChar( const STRCODE* pChars, xub_StrLen nIndex ) const
return STRING_NOTFOUND;
}
-// -----------------------------------------------------------------------
-
xub_StrLen STRING::SearchAndReplace( STRCODE c, STRCODE cRep, xub_StrLen nIndex )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -140,8 +122,6 @@ xub_StrLen STRING::SearchAndReplace( STRCODE c, STRCODE cRep, xub_StrLen nIndex
return STRING_NOTFOUND;
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Insert( const STRING& rStr, xub_StrLen nPos, xub_StrLen nLen,
xub_StrLen nIndex )
{
@@ -186,8 +166,6 @@ STRING& STRING::Insert( const STRING& rStr, xub_StrLen nPos, xub_StrLen nLen,
return *this;
}
-// -----------------------------------------------------------------------
-
static sal_Int32 ImplStringICompareWithoutZero( const STRCODE* pStr1, const STRCODE* pStr2,
sal_Int32 nCount )
{
@@ -217,8 +195,6 @@ static sal_Int32 ImplStringICompareWithoutZero( const STRCODE* pStr1, const STRC
return nRet;
}
-// -----------------------------------------------------------------------
-
sal_Bool STRING::EqualsIgnoreCaseAscii( const STRING& rStr, xub_StrLen nIndex, xub_StrLen nLen ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -239,8 +215,6 @@ sal_Bool STRING::EqualsIgnoreCaseAscii( const STRING& rStr, xub_StrLen nIndex, x
return (ImplStringICompareWithoutZero( mpData->maStr+nIndex, rStr.mpData->maStr, nLen ) == 0);
}
-// -----------------------------------------------------------------------
-
StringCompare STRING::CompareIgnoreCaseToAscii( const STRING& rStr,
xub_StrLen nLen ) const
{
@@ -269,8 +243,6 @@ StringCompare STRING::CompareIgnoreCaseToAscii( const STRING& rStr,
return COMPARE_GREATER;
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Fill( xub_StrLen nCount, STRCODE cFillChar )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -301,8 +273,6 @@ STRING& STRING::Fill( xub_StrLen nCount, STRCODE cFillChar )
return *this;
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Expand( xub_StrLen nCount, STRCODE cExpandChar )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -332,8 +302,6 @@ STRING& STRING::Expand( xub_StrLen nCount, STRCODE cExpandChar )
return *this;
}
-// -----------------------------------------------------------------------
-
STRCODE* STRING::GetBufferAccess()
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -346,8 +314,6 @@ STRCODE* STRING::GetBufferAccess()
return mpData->maStr;
}
-// -----------------------------------------------------------------------
-
void STRING::ReleaseBufferAccess( xub_StrLen nLen )
{
// Hier ohne Funktionstest, da String nicht konsistent
@@ -373,8 +339,6 @@ void STRING::ReleaseBufferAccess( xub_StrLen nLen )
mpData->mnLen = nLen;
}
-// -----------------------------------------------------------------------
-
STRCODE* STRING::AllocBuffer( xub_StrLen nLen )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -391,8 +355,6 @@ STRCODE* STRING::AllocBuffer( xub_StrLen nLen )
return mpData->maStr;
}
-// -----------------------------------------------------------------------
-
STRING::STRING( STRCODE c )
{
DBG_CTOR( STRING, DBGCHECKSTRING );
@@ -403,8 +365,6 @@ STRING::STRING( STRCODE c )
mpData->maStr[0] = c;
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Insert( STRCODE c, xub_StrLen nIndex )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -433,8 +393,6 @@ STRING& STRING::Insert( STRCODE c, xub_StrLen nIndex )
return *this;
}
-// -----------------------------------------------------------------------
-
STRING& STRING::ToUpperAscii()
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -459,8 +417,6 @@ STRING& STRING::ToUpperAscii()
return *this;
}
-// -----------------------------------------------------------------------
-
StringCompare STRING::CompareTo( const STRING& rStr, xub_StrLen nLen ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -488,8 +444,6 @@ StringCompare STRING::CompareTo( const STRING& rStr, xub_StrLen nLen ) const
return COMPARE_GREATER;
}
-// -----------------------------------------------------------------------
-
sal_Bool STRING::Equals( const STRING& rStr ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -507,8 +461,6 @@ sal_Bool STRING::Equals( const STRING& rStr ) const
return (ImplStringCompareWithoutZero( mpData->maStr, rStr.mpData->maStr, mpData->mnLen ) == 0);
}
-// -----------------------------------------------------------------------
-
sal_Bool STRING::EqualsIgnoreCaseAscii( const STRING& rStr ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -526,8 +478,6 @@ sal_Bool STRING::EqualsIgnoreCaseAscii( const STRING& rStr ) const
return (ImplStringICompareWithoutZero( mpData->maStr, rStr.mpData->maStr, mpData->mnLen ) == 0);
}
-// -----------------------------------------------------------------------
-
sal_Bool STRING::Equals( const STRING& rStr, xub_StrLen nIndex, xub_StrLen nLen ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -548,8 +498,6 @@ sal_Bool STRING::Equals( const STRING& rStr, xub_StrLen nIndex, xub_StrLen nLen
return (ImplStringCompareWithoutZero( mpData->maStr+nIndex, rStr.mpData->maStr, nLen ) == 0);
}
-// -----------------------------------------------------------------------
-
sal_Bool STRING::Equals( const STRCODE* pCharStr, xub_StrLen nIndex, xub_StrLen nLen ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -561,8 +509,6 @@ sal_Bool STRING::Equals( const STRCODE* pCharStr, xub_StrLen nIndex, xub_StrLen
return (ImplStringCompare( mpData->maStr+nIndex, pCharStr, nLen ) == 0);
}
-// -----------------------------------------------------------------------
-
xub_StrLen STRING::Match( const STRING& rStr ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -589,8 +535,6 @@ xub_StrLen STRING::Match( const STRING& rStr ) const
return STRING_MATCH;
}
-// -----------------------------------------------------------------------
-
xub_StrLen STRING::SearchBackward( STRCODE c, xub_StrLen nIndex ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -612,8 +556,6 @@ xub_StrLen STRING::SearchBackward( STRCODE c, xub_StrLen nIndex ) const
return STRING_NOTFOUND;
}
-// -----------------------------------------------------------------------
-
void STRING::SearchAndReplaceAll( const STRING& rStr, const STRING& rRepStr )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -629,8 +571,6 @@ void STRING::SearchAndReplaceAll( const STRING& rStr, const STRING& rRepStr )
}
}
-// -----------------------------------------------------------------------
-
void STRING::SetToken( xub_StrLen nToken, STRCODE cTok, const STRING& rStr,
xub_StrLen nIndex )
{
@@ -669,8 +609,6 @@ void STRING::SetToken( xub_StrLen nToken, STRCODE cTok, const STRING& rStr,
Replace( nFirstChar, i-nFirstChar, rStr );
}
-// -----------------------------------------------------------------------
-
STRING STRING::GetToken( xub_StrLen nToken, STRCODE cTok, xub_StrLen& rIndex ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -718,8 +656,6 @@ STRING STRING::GetToken( xub_StrLen nToken, STRCODE cTok, xub_StrLen& rIndex ) c
}
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Append( const STRCODE* pCharStr, xub_StrLen nCharLen )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -763,8 +699,6 @@ STRING& STRING::Append( const STRCODE* pCharStr, xub_StrLen nCharLen )
return *this;
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Append( STRCODE c )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -788,8 +722,6 @@ STRING& STRING::Append( STRCODE c )
return *this;
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Assign( const STRCODE* pCharStr, xub_StrLen nLen )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -834,8 +766,6 @@ STRING& STRING::Assign( const STRCODE* pCharStr, xub_StrLen nLen )
return *this;
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Assign( STRCODE c )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -848,8 +778,6 @@ STRING& STRING::Assign( STRCODE c )
return *this;
}
-// -----------------------------------------------------------------------
-
xub_StrLen STRING::SearchAndReplace( const STRING& rStr, const STRING& rRepStr,
xub_StrLen nIndex )
{
@@ -864,8 +792,6 @@ xub_StrLen STRING::SearchAndReplace( const STRING& rStr, const STRING& rRepStr,
return nSPos;
}
-// -----------------------------------------------------------------------
-
static sal_Int32 ImplStringICompare( const STRCODE* pStr1, const STRCODE* pStr2 )
{
sal_Int32 nRet;
@@ -892,8 +818,6 @@ static sal_Int32 ImplStringICompare( const STRCODE* pStr1, const STRCODE* pStr2
return nRet;
}
-// -----------------------------------------------------------------------
-
sal_Bool STRING::EqualsIgnoreCaseAscii( const STRCODE* pCharStr ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -901,8 +825,6 @@ sal_Bool STRING::EqualsIgnoreCaseAscii( const STRCODE* pCharStr ) const
return (ImplStringICompare( mpData->maStr, pCharStr ) == 0);
}
-// -----------------------------------------------------------------------
-
STRING& STRING::Assign( const STRCODE* pCharStr )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -934,8 +856,6 @@ STRING& STRING::Assign( const STRCODE* pCharStr )
return *this;
}
-// -----------------------------------------------------------------------
-
xub_StrLen ImplStringLen( const sal_Char* pStr )
{
const sal_Char* pTempStr = pStr;
@@ -944,8 +864,6 @@ xub_StrLen ImplStringLen( const sal_Char* pStr )
return (xub_StrLen)(pTempStr-pStr);
}
-// -----------------------------------------------------------------------
-
xub_StrLen ImplStringLen( const sal_Unicode* pStr )
{
const sal_Unicode* pTempStr = pStr;