summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2006-06-19 12:52:57 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2006-06-19 12:52:57 +0000
commit09bd1e93adff9f173df8366e2ca064beb88e6d37 (patch)
treecbb3fa94610ecdd49a1f198cbffb4bcbbe359467 /tools
parent67ec441e5e05b090302704b524dabb0d2aa592ff (diff)
INTEGRATION: CWS warnings01 (1.7.8); FILE MERGED
2006/05/23 17:58:25 sb 1.7.8.3: RESYNC: (1.7-1.8); FILE MERGED 2006/02/24 14:48:55 sb 1.7.8.2: #i53898# Made code warning-free; removed dead code. 2005/10/27 12:29:17 sb 1.7.8.1: #i53898# Made code warning-free.
Diffstat (limited to 'tools')
-rw-r--r--tools/source/string/strcvt.cxx35
1 files changed, 17 insertions, 18 deletions
diff --git a/tools/source/string/strcvt.cxx b/tools/source/string/strcvt.cxx
index 34464da9a8bc..0cfbd093ca07 100644
--- a/tools/source/string/strcvt.cxx
+++ b/tools/source/string/strcvt.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: strcvt.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: rt $ $Date: 2006-05-04 14:51:58 $
+ * last change: $Author: hr $ $Date: 2006-06-19 13:52:57 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -35,16 +35,16 @@
// -----------------------------------------------------------------------
-static void ImplUpdateStringFromUniString( ByteString* pString,
- const sal_Unicode* pUniStr, sal_Size nUniLen,
- rtl_TextEncoding eTextEncoding, sal_uInt32 nCvtFlags )
+void ByteString::ImplUpdateStringFromUniString(
+ const sal_Unicode* pUniStr, sal_Size nUniLen,
+ rtl_TextEncoding eTextEncoding, sal_uInt32 nCvtFlags )
{
ByteStringData* pNewStringData = NULL;
rtl_uString2String( (rtl_String **)(&pNewStringData),
pUniStr, nUniLen,
eTextEncoding, nCvtFlags );
- STRING_RELEASE((STRING_TYPE *)pString->mpData);
- pString->mpData = pNewStringData;
+ STRING_RELEASE((STRING_TYPE *)mpData);
+ mpData = pNewStringData;
}
// =======================================================================
@@ -74,9 +74,9 @@ ByteString::ByteString( const UniString& rUniStr, xub_StrLen nPos, xub_StrLen nL
else
{
// Laenge korrigieren, wenn noetig
- xub_StrLen nMaxLen = rUniStr.mpData->mnLen-nPos;
+ sal_Int32 nMaxLen = rUniStr.mpData->mnLen-nPos;
if ( nLen > nMaxLen )
- nLen = nMaxLen;
+ nLen = static_cast< xub_StrLen >(nMaxLen);
}
mpData = NULL;
@@ -358,21 +358,20 @@ void ImplDeleteCharTabData()
// =======================================================================
-static void ImplStringConvert( ByteString* pString,
- rtl_TextEncoding eSource, rtl_TextEncoding eTarget,
- BOOL bReplace )
+void ByteString::ImplStringConvert(
+ rtl_TextEncoding eSource, rtl_TextEncoding eTarget, BOOL bReplace )
{
sal_uChar* pConvertTab = ImplGet1ByteConvertTab( eSource, eTarget, bReplace );
if ( pConvertTab )
{
- char* pStr = pString->mpData->maStr;
+ char* pStr = mpData->maStr;
while ( *pStr )
{
sal_uChar c = (sal_uChar)*pStr;
sal_uChar cConv = pConvertTab[c];
if ( c != cConv )
{
- pStr = ImplCopyStringData( pString, pStr );
+ pStr = ImplCopyStringData( pStr );
*pStr = (char)cConv;
}
@@ -387,10 +386,10 @@ static void ImplStringConvert( ByteString* pString,
sal_Size nDestChars;
sal_Size nTempLen;
sal_Unicode* pTempBuf;
- nTempLen = pString->mpData->mnLen;
+ nTempLen = mpData->mnLen;
pTempBuf = new sal_Unicode[nTempLen];
nDestChars = rtl_convertTextToUnicode( hSrcConverter, 0,
- pString->mpData->maStr, pString->mpData->mnLen,
+ mpData->maStr, mpData->mnLen,
pTempBuf, nTempLen,
RTL_TEXTTOUNICODE_FLAGS_FLUSH |
RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_MAPTOPRIVATE |
@@ -402,7 +401,7 @@ static void ImplStringConvert( ByteString* pString,
// sowieso keine Ersatzdarstellung moeglich ist. Da sich der String
// sowieso in der Laenge aendern kann, nehmen wir auch sonst keine
// Ruecksicht darauf, das die Laenge erhalten bleibt.
- ImplUpdateStringFromUniString( pString, pTempBuf, nDestChars, eTarget,
+ ImplUpdateStringFromUniString( pTempBuf, nDestChars, eTarget,
RTL_UNICODETOTEXT_FLAGS_UNDEFINED_DEFAULT |
RTL_UNICODETOTEXT_FLAGS_INVALID_DEFAULT |
RTL_UNICODETOTEXT_FLAGS_UNDEFINED_REPLACE |
@@ -440,7 +439,7 @@ ByteString& ByteString::Convert( rtl_TextEncoding eSource, rtl_TextEncoding eTar
return *this;
// Zeichensatz umwandeln
- ImplStringConvert( this, eSource, eTarget, bReplace );
+ ImplStringConvert( eSource, eTarget, bReplace );
return *this;
}