diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-11-18 21:05:45 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-19 19:28:29 +0000 |
commit | 9b3d4aaf4fd25ee4866930b46d828f6aaec00d84 (patch) | |
tree | f50c6caef1370ec28233f780b4e169c70bc1956a | |
parent | fix XCalendar/2 issue following genetive-month patch series (diff) | |
download | binfilter-9b3d4aaf4fd25ee4866930b46d828f6aaec00d84.tar.gz binfilter-9b3d4aaf4fd25ee4866930b46d828f6aaec00d84.zip |
remove [Byte]String::EraseAllChars
10 files changed, 36 insertions, 34 deletions
diff --git a/binfilter/bf_sc/source/core/tool/sc_editutil.cxx b/binfilter/bf_sc/source/core/tool/sc_editutil.cxx index 294467dcf..355ee797a 100644 --- a/binfilter/bf_sc/source/core/tool/sc_editutil.cxx +++ b/binfilter/bf_sc/source/core/tool/sc_editutil.cxx @@ -49,9 +49,7 @@ #include <bf_svx/flditem.hxx> #include <bf_svtools/inethist.hxx> #include <bf_svtools/syslocale.hxx> -#ifndef _SVSTDARR_USHORTS -#define _SVSTDARR_USHORTS -#endif +#include <comphelper/string.hxx> #include "editutil.hxx" #include "docpool.hxx" @@ -70,8 +68,8 @@ const sal_Char ScEditUtil::pCalcDelimiters[] = "=();+-*/^&<>"; /*N*/ String ScEditUtil::ModifyDelimiters( const String& rOld ) /*N*/ { -/*N*/ String aRet = rOld; -/*N*/ aRet.EraseAllChars( '_' ); // underscore is used in function argument names +/*N*/ // underscore is used in function argument names +/*N*/ String aRet = comphelper::string::remove(rOld, '_'); /*N*/ aRet.AppendAscii( RTL_CONSTASCII_STRINGPARAM( pCalcDelimiters ) ); /*N*/ return aRet; /*N*/ } diff --git a/binfilter/bf_sfx2/source/doc/sfx2_docfac.cxx b/binfilter/bf_sfx2/source/doc/sfx2_docfac.cxx index 769e55a67..5f7d26266 100644 --- a/binfilter/bf_sfx2/source/doc/sfx2_docfac.cxx +++ b/binfilter/bf_sfx2/source/doc/sfx2_docfac.cxx @@ -29,6 +29,7 @@ #include <com/sun/star/registry/MergeConflictException.hpp> #include <com/sun/star/registry/XSimpleRegistry.hpp> #include <comphelper/processfactory.hxx> +#include <comphelper/string.hxx> #include <bf_so3/embobj.hxx> @@ -264,10 +265,10 @@ DECL_PTRARRAY( SfxViewFactoryArr_Impl, SfxViewFactory*, 2, 2 ) /*N*/ /*SfxApplication *pApp =*/ SFX_APP(); /*N*/ /*N*/ // "swriter4" durch "swriter" ersetzen, zum Vergleichen uppercase verwenden -/*N*/ WildCard aSearchedFac( aFact.EraseAllChars('4').ToUpperAscii() ); -/*N*/ for( sal_uInt16 n = GetObjectFactoryCount_Impl(); !pFactory && n--; ) +/*N*/ WildCard aSearchedFac( comphelper::string::remove(aFact, '4').toAsciiUpperCase() ); +/*N*/ for( sal_uInt16 n = GetObjectFactoryCount_Impl(); !pFactory && n--; ) /*N*/ { -/*N*/ pFactory = &GetObjectFactory_Impl( n ); +/*N*/ pFactory = &GetObjectFactory_Impl( n ); /*N*/ String aCompareTo = String::CreateFromAscii( pFactory->GetShortName() ); /*N*/ aCompareTo.ToUpperAscii(); /*N*/ if( !aSearchedFac.Matches( aCompareTo ) ) diff --git a/binfilter/bf_svtools/source/filter.vcl/filter/svt_sgvtext.cxx b/binfilter/bf_svtools/source/filter.vcl/filter/svt_sgvtext.cxx index 6571ed702..e7bff4764 100644 --- a/binfilter/bf_svtools/source/filter.vcl/filter/svt_sgvtext.cxx +++ b/binfilter/bf_svtools/source/filter.vcl/filter/svt_sgvtext.cxx @@ -1263,8 +1263,7 @@ void SgfFontLst::ReadList() for (i=0;i<Anz;i++) { - FID = aCfg.GetKeyName( i ); - FID = FID.EraseAllChars(); // Leerzeichen weg + FID = comphelper::string::remove(aCfg.GetKeyName(i), ' '); Dsc = aCfg.ReadKey( i ); if ( comphelper::string::isdigitAsciiString(FID) ) { diff --git a/binfilter/bf_svtools/source/numbers/svt_zforfind.cxx b/binfilter/bf_svtools/source/numbers/svt_zforfind.cxx index 880886cf9..a31abd673 100644 --- a/binfilter/bf_svtools/source/numbers/svt_zforfind.cxx +++ b/binfilter/bf_svtools/source/numbers/svt_zforfind.cxx @@ -33,6 +33,7 @@ #include <float.h> #include <errno.h> +#include <comphelper/string.hxx> #include <tools/date.hxx> #include <tools/debug.hxx> #include <rtl/math.hxx> @@ -2047,7 +2048,7 @@ BOOL ImpSvNumberInputScan::ScanStringNumFor( if ( !bDontDetectNegation && (nString == 0) && !bFirst && (nSign < 0) && pFormat->IsNegativeRealNegative() ) { // simply negated twice? --1 - aString.EraseAllChars( ' ' ); + aString = comphelper::string::remove(aString, ' '); if ( (aString.Len() == 1) && (aString.GetChar(0) == '-') ) { bFound = TRUE; diff --git a/binfilter/bf_svtools/source/numbers/svt_zformat.cxx b/binfilter/bf_svtools/source/numbers/svt_zformat.cxx index 6704c84bb..58431a666 100644 --- a/binfilter/bf_svtools/source/numbers/svt_zformat.cxx +++ b/binfilter/bf_svtools/source/numbers/svt_zformat.cxx @@ -34,6 +34,7 @@ #include <errno.h> #include <stdlib.h> +#include <comphelper/string.hxx> #include <tools/debug.hxx> #include <i18npool/mslangid.hxx> #include <rtl/math.hxx> @@ -1037,7 +1038,7 @@ short SvNumberformat::ImpNextSymbol(String& rString, case '>': case '=': { - sSymbol.EraseAllChars('['); + sSymbol = comphelper::string::remove(sSymbol, '['); sSymbol += cToken; cLetter = cToken; eState = SsGetCon; @@ -1061,7 +1062,7 @@ short SvNumberformat::ImpNextSymbol(String& rString, { if ( rString.GetChar(nPos) == '-' ) { // [$-xxx] locale - sSymbol.EraseAllChars('['); + sSymbol = comphelper::string::remove(sSymbol, '['); eSymbolType = BRACKET_SYMBOLTYPE_LOCALE; eState = SsGetPrefix; } @@ -1091,7 +1092,7 @@ short SvNumberformat::ImpNextSymbol(String& rString, sal_Unicode cDBNum = rString.GetChar( nPos-1+aDBNum.Len() ); if ( aUpperNatNum == aNatNum && 0 <= nNatNumNum && nNatNumNum <= 19 ) { - sSymbol.EraseAllChars('['); + sSymbol = comphelper::string::remove(sSymbol, '['); sSymbol += rString.Copy( --nPos, aNatNum.Len()+1 ); nPos += aNatNum.Len()+1; //! SymbolType is negative @@ -1100,7 +1101,7 @@ short SvNumberformat::ImpNextSymbol(String& rString, } else if ( aUpperDBNum == aDBNum && '1' <= cDBNum && cDBNum <= '9' ) { - sSymbol.EraseAllChars('['); + sSymbol = comphelper::string::remove(sSymbol, '['); sSymbol += rString.Copy( --nPos, aDBNum.Len()+1 ); nPos += aDBNum.Len()+1; //! SymbolType is negative @@ -1118,7 +1119,7 @@ short SvNumberformat::ImpNextSymbol(String& rString, } else { - sSymbol.EraseAllChars('['); + sSymbol = comphelper::string::remove(sSymbol, '['); sSymbol += cToken; eSymbolType = BRACKET_SYMBOLTYPE_COLOR; eState = SsGetPrefix; @@ -1158,14 +1159,14 @@ short SvNumberformat::ImpNextSymbol(String& rString, } else { - sSymbol.EraseAllChars('['); + sSymbol = comphelper::string::remove(sSymbol, '['); sSymbol += cToken; eState = SsGetPrefix; } } else { - sSymbol.EraseAllChars('['); + sSymbol = comphelper::string::remove(sSymbol, '['); sSymbol += cToken; eSymbolType = BRACKET_SYMBOLTYPE_COLOR; eState = SsGetPrefix; @@ -2088,7 +2089,8 @@ BOOL SvNumberformat::GetOutputString(double fNumber, } ExpStr = sStr.Copy( nExpStart ); // part following the "E+" sStr.Erase( nExPos ); - sStr.EraseAllChars('.'); // cut any decimal delimiter + // cut any decimal delimiter + sStr = comphelper::string::remove(sStr, '.'); if ( rInfo.nCntPre != 1 ) // rescale Exp { sal_Int32 nExp = ExpStr.ToInt32() * nExpSign; diff --git a/binfilter/bf_svtools/source/svdde/svt_ddesvr.cxx b/binfilter/bf_svtools/source/svdde/svt_ddesvr.cxx index a714c9685..8dfa2c4b6 100644 --- a/binfilter/bf_svtools/source/svdde/svt_ddesvr.cxx +++ b/binfilter/bf_svtools/source/svdde/svt_ddesvr.cxx @@ -33,6 +33,7 @@ #include "ddeimp.hxx" #include <bf_svtools/svdde.hxx> #include <bf_svtools/svarray.hxx> +#include <comphelper/string.hxx> #include <tools/debug.hxx> @@ -137,7 +138,8 @@ HDDEDATA CALLBACK _export DdeInternal::SvrCallback( while( STRING_NOTFOUND != n ) { String s( sTopics.GetToken( 0, '\t', n )); - s.EraseAllChars( '\n' ).EraseAllChars( '\r' ); + s = comphelper::string::remove(s, '\n'); + s = comphelper::string::remove(s, '\r'); if( !hText1 || s == reinterpret_cast<const sal_Unicode*>(chTopicBuf) ) { DdeString aDStr( pInst->hDdeInstSvr, s ); diff --git a/binfilter/bf_sw/source/core/fields/sw_ddefld.cxx b/binfilter/bf_sw/source/core/fields/sw_ddefld.cxx index d693bf361..5fc5697b9 100644 --- a/binfilter/bf_sw/source/core/fields/sw_ddefld.cxx +++ b/binfilter/bf_sw/source/core/fields/sw_ddefld.cxx @@ -32,9 +32,9 @@ #endif #include <bf_svx/linkmgr.hxx> +#include <comphelper/string.hxx> #include <horiornt.hxx> - #include <doc.hxx> #include <osl/diagnose.h> #include <ddefld.hxx> @@ -217,9 +217,8 @@ BOOL SwDDEFieldType::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMId /*N*/ String SwDDEField::Expand() const /*N*/ { /*N*/ xub_StrLen nPos; -/*N*/ String aStr( ((SwDDEFieldType*)GetTyp())->GetExpansion() ); +/*N*/ String aStr(comphelper::string::remove(((SwDDEFieldType*)GetTyp())->GetExpansion(), '\r')); /*N*/ -/*N*/ aStr.EraseAllChars( '\r' ); /*N*/ while( (nPos = aStr.Search( '\t' )) != STRING_NOTFOUND ) /*?*/ aStr.SetChar( nPos, ' ' ); /*N*/ while( (nPos = aStr.Search( '\n' )) != STRING_NOTFOUND ) diff --git a/binfilter/bf_sw/source/core/fields/sw_reffld.cxx b/binfilter/bf_sw/source/core/fields/sw_reffld.cxx index 287365ff9..e8a398a8c 100644 --- a/binfilter/bf_sw/source/core/fields/sw_reffld.cxx +++ b/binfilter/bf_sw/source/core/fields/sw_reffld.cxx @@ -31,11 +31,9 @@ #pragma hdrstop #endif -#define _SVSTDARR_USHORTSSORT -#define _SVSTDARR_USHORTS - #include <com/sun/star/text/ReferenceFieldPart.hpp> #include <com/sun/star/text/ReferenceFieldSource.hpp> +#include <comphelper/string.hxx> #include <unotools/localedatawrapper.hxx> #include <bf_svx/unolingu.hxx> @@ -347,16 +345,16 @@ void SwGetRefField::SetSubType( USHORT n ) /*N*/ /*N*/ // alle Sonderzeichen entfernen (durch Blanks ersetzen): /*N*/ if( sTxt.Len() ) -/*N*/ { -/*N*/ sTxt.EraseAllChars( 0xad ); -/*N*/ for( sal_Unicode* p = sTxt.GetBufferAccess(); *p; ++p ) +/*N*/ { +/*N*/ sTxt = comphelper::string::remove(sTxt, 0xad); +/*N*/ for( sal_Unicode* p = sTxt.GetBufferAccess(); *p; ++p ) /*N*/ { /*N*/ if( *p < 0x20 ) /*N*/ *p = 0x20; /*N*/ else if(*p == 0x2011) /*N*/ *p = '-'; /*N*/ } -/*N*/ } +/*N*/ } /*N*/ } /*N*/ } /*N*/ break; diff --git a/binfilter/bf_sw/source/core/tox/sw_tox.cxx b/binfilter/bf_sw/source/core/tox/sw_tox.cxx index 49aa5444e..786c2abf9 100644 --- a/binfilter/bf_sw/source/core/tox/sw_tox.cxx +++ b/binfilter/bf_sw/source/core/tox/sw_tox.cxx @@ -31,6 +31,7 @@ #pragma hdrstop #endif +#include <comphelper/string.hxx> #include <tools/resid.hxx> #include <txtatr.hxx> #include <ndtxt.hxx> @@ -971,8 +972,7 @@ void SwForm::SetFirstTabPos( USHORT n ) //{ nFirstTabPos = n; } /*?*/ if( sText.Len() ) /*?*/ { /*?*/ sRet += TOX_STYLE_DELIMITER; -/*?*/ String sTmp( sText ); -/*?*/ sTmp.EraseAllChars( TOX_STYLE_DELIMITER ); +/*?*/ String sTmp( comphelper::string::remove(sText, TOX_STYLE_DELIMITER) ); /*?*/ sRet += sTmp; /*?*/ sRet += TOX_STYLE_DELIMITER; /*?*/ } diff --git a/binfilter/bf_sw/source/ui/fldui/sw_fldmgr.cxx b/binfilter/bf_sw/source/ui/fldui/sw_fldmgr.cxx index 33bc29e84..4b6bbcf59 100644 --- a/binfilter/bf_sw/source/ui/fldui/sw_fldmgr.cxx +++ b/binfilter/bf_sw/source/ui/fldui/sw_fldmgr.cxx @@ -31,6 +31,8 @@ #pragma hdrstop #endif +#include <comphelper/string.hxx> + #include <cmdid.h> #include <hintids.hxx> @@ -259,8 +261,8 @@ String* SwFldMgr::pTime = 0; /*N*/ SwFieldType::pFldNames = new SvStringsDtor( (BYTE)coFldCnt, 2 ); /*N*/ for( USHORT nIdx = 0; nIdx < coFldCnt; ++nIdx ) /*N*/ { -/*N*/ String* pTmp = new SW_RESSTR( coFldNms[ nIdx ] ); -/*N*/ pTmp->EraseAllChars('~'); +/*N*/ rtl::OUString sTmp(SW_RESSTR(coFldNms[nIdx])); +/*N*/ String* pTmp = new String(comphelper::string::remove(sTmp, '~')); /*N*/ SwFieldType::pFldNames->Insert(pTmp, nIdx ); /*N*/ } /*N*/ } |