diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-07 17:49:38 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-10-08 10:03:17 +0200 |
commit | 43a3611347c1f49cf6053bf7e8904d56254d8761 (patch) | |
tree | 7e6b64d5e03763e75e4394bf3f63cfc18009b638 | |
parent | 0ae8101ac5f74a77d3e1b47b0137d139fc91f2aa (diff) |
convert sc/source/core/tool/*.cxx from String to OUString
Change-Id: Iaefd1108c4bbb953b711b3e87ab24c733035274c
-rw-r--r-- | sc/source/core/inc/cellkeytranslator.hxx | 1 | ||||
-rw-r--r-- | sc/source/core/tool/autoform.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/callform.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/tool/cellkeytranslator.cxx | 13 | ||||
-rw-r--r-- | sc/source/core/tool/charthelper.cxx | 6 | ||||
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 52 | ||||
-rw-r--r-- | sc/source/core/tool/consoli.cxx | 18 | ||||
-rw-r--r-- | sc/source/core/tool/ddelink.cxx | 10 | ||||
-rw-r--r-- | sc/source/core/tool/detfunc.cxx | 16 | ||||
-rw-r--r-- | sc/source/core/tool/doubleref.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/tool/editutil.cxx | 6 | ||||
-rw-r--r-- | sc/source/core/tool/interpr1.cxx | 122 | ||||
-rw-r--r-- | sc/source/core/tool/interpr2.cxx | 22 | ||||
-rw-r--r-- | sc/source/core/tool/interpr4.cxx | 32 | ||||
-rw-r--r-- | sc/source/core/tool/interpr5.cxx | 26 | ||||
-rw-r--r-- | sc/source/core/tool/interpr6.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/tool/queryparam.cxx | 28 | ||||
-rw-r--r-- | sc/source/core/tool/rangelst.cxx | 10 | ||||
-rw-r--r-- | sc/source/core/tool/rangeseq.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/tool/rangeutl.cxx | 52 | ||||
-rw-r--r-- | sc/source/core/tool/userlist.cxx | 6 |
21 files changed, 213 insertions, 225 deletions
diff --git a/sc/source/core/inc/cellkeytranslator.hxx b/sc/source/core/inc/cellkeytranslator.hxx index b687e0e46d9c..8cddc2b72215 100644 --- a/sc/source/core/inc/cellkeytranslator.hxx +++ b/sc/source/core/inc/cellkeytranslator.hxx @@ -63,7 +63,6 @@ typedef ::boost::unordered_map< OUString, ::std::list<ScCellKeyword>, OUStringHa class ScCellKeywordTranslator { public: - static void transKeyword(String& rName, const ::com::sun::star::lang::Locale* pLocale = NULL, OpCode eOpCode = ocNone); static void transKeyword(OUString& rName, const ::com::sun::star::lang::Locale* pLocale = NULL, OpCode eOpCode = ocNone); ~ScCellKeywordTranslator(); diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx index dc0b231afb18..e04762a7f798 100644 --- a/sc/source/core/tool/autoform.cxx +++ b/sc/source/core/tool/autoform.cxx @@ -819,7 +819,7 @@ ScAutoFormat::ScAutoFormat() : { // create default autoformat ScAutoFormatData* pData = new ScAutoFormatData; - String aName(ScGlobal::GetRscString(STR_STYLENAME_STANDARD)); + OUString aName(ScGlobal::GetRscString(STR_STYLENAME_STANDARD)); pData->SetName(aName); // default font, default height diff --git a/sc/source/core/tool/callform.cxx b/sc/source/core/tool/callform.cxx index 13f011c5b947..7e3d5af94922 100644 --- a/sc/source/core/tool/callform.cxx +++ b/sc/source/core/tool/callform.cxx @@ -229,8 +229,8 @@ bool InitExternalFunc(const OUString& rModuleName) if ( fpAdvice && eAsyncType != NONE ) (*((Advice)fpAdvice))( i, pfCallBack ); } - String aInternalName( cInternalName, osl_getThreadTextEncoding() ); - String aFuncName( cFuncName, osl_getThreadTextEncoding() ); + OUString aInternalName( cInternalName, strlen(cInternalName), osl_getThreadTextEncoding() ); + OUString aFuncName( cFuncName, strlen(cFuncName), osl_getThreadTextEncoding() ); pFuncData = new FuncData( pModuleData, aInternalName, aFuncName, diff --git a/sc/source/core/tool/cellkeytranslator.cxx b/sc/source/core/tool/cellkeytranslator.cxx index e7f8ba0d82f1..af13cbeab1f7 100644 --- a/sc/source/core/tool/cellkeytranslator.cxx +++ b/sc/source/core/tool/cellkeytranslator.cxx @@ -77,7 +77,7 @@ ScCellKeyword::ScCellKeyword(const sal_Char* pName, OpCode eOpCode, const Locale ::std::auto_ptr<ScCellKeywordTranslator> ScCellKeywordTranslator::spInstance(NULL); -static void lclMatchKeyword(String& rName, const ScCellKeywordHashMap& aMap, +static void lclMatchKeyword(OUString& rName, const ScCellKeywordHashMap& aMap, OpCode eOpCode = ocNone, const Locale* pLocale = NULL) { ScCellKeywordHashMap::const_iterator itrEnd = aMap.end(); @@ -159,24 +159,17 @@ static void lclMatchKeyword(String& rName, const ScCellKeywordHashMap& aMap, rName = OUString::createFromAscii(aBestMatchName); } -void ScCellKeywordTranslator::transKeyword(String& rName, const Locale* pLocale, OpCode eOpCode) +void ScCellKeywordTranslator::transKeyword(OUString& rName, const Locale* pLocale, OpCode eOpCode) { if ( !spInstance.get() ) spInstance.reset( new ScCellKeywordTranslator ); LanguageType eLang = pLocale ? LanguageTag(*pLocale).makeFallback().getLanguageType() : LANGUAGE_SYSTEM; Sequence<sal_Int32> aOffsets; - rName = spInstance->maTransWrapper.transliterate(rName, eLang, 0, rName.Len(), &aOffsets); + rName = spInstance->maTransWrapper.transliterate(rName, eLang, 0, rName.getLength(), &aOffsets); lclMatchKeyword(rName, spInstance->maStringNameMap, eOpCode, pLocale); } -void ScCellKeywordTranslator::transKeyword(OUString& rName, const Locale* pLocale, OpCode eOpCode) -{ - String aName = rName; - transKeyword(aName, pLocale, eOpCode); - rName = aName; -} - ScCellKeywordTranslator::ScCellKeywordTranslator() : maTransWrapper( ::comphelper::getProcessComponentContext(), i18n::TransliterationModules_LOWERCASE_UPPERCASE ) diff --git a/sc/source/core/tool/charthelper.cxx b/sc/source/core/tool/charthelper.cxx index cb2d152041bd..2f8c9f751cd1 100644 --- a/sc/source/core/tool/charthelper.cxx +++ b/sc/source/core/tool/charthelper.cxx @@ -57,7 +57,7 @@ sal_uInt16 lcl_DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, bool bAl { if ( pObject->GetObjIdentifier() == OBJ_OLE2 && pDoc->IsChart( pObject ) ) { - String aName = ((SdrOle2Obj*)pObject)->GetPersistName(); + OUString aName = ((SdrOle2Obj*)pObject)->GetPersistName(); bool bHit = true; if ( !bAllCharts ) { @@ -135,7 +135,7 @@ void ScChartHelper::AdjustRangesOfChartsOnDestinationPage( ScDocument* pSrcDoc, { if( pObject->GetObjIdentifier() == OBJ_OLE2 && ((SdrOle2Obj*)pObject)->IsChart() ) { - String aChartName = ((SdrOle2Obj*)pObject)->GetPersistName(); + OUString aChartName = ((SdrOle2Obj*)pObject)->GetPersistName(); Reference< chart2::XChartDocument > xChartDoc( pDestDoc->GetChartByName( aChartName ) ); Reference< chart2::data::XDataReceiver > xReceiver( xChartDoc, uno::UNO_QUERY ); @@ -175,7 +175,7 @@ void ScChartHelper::UpdateChartsOnDestinationPage( ScDocument* pDestDoc, const S { if( pObject->GetObjIdentifier() == OBJ_OLE2 && ((SdrOle2Obj*)pObject)->IsChart() ) { - String aChartName = ((SdrOle2Obj*)pObject)->GetPersistName(); + OUString aChartName = ((SdrOle2Obj*)pObject)->GetPersistName(); Reference< chart2::XChartDocument > xChartDoc( pDestDoc->GetChartByName( aChartName ) ); Reference< util::XModifiable > xModif(xChartDoc, uno::UNO_QUERY_THROW); xModif->setModified( sal_True); diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 8a1e0117173c..ac8b6480d88d 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -408,20 +408,20 @@ ScCompiler::Convention::Convention( FormulaGrammar::AddressConvention eConv ) } } -static bool lcl_isValidQuotedText( const String& rFormula, xub_StrLen nSrcPos, ParseResult& rRes ) +static bool lcl_isValidQuotedText( const OUString& rFormula, xub_StrLen nSrcPos, ParseResult& rRes ) { // Tokens that start at ' can have anything in them until a final ' // but '' marks an escaped ' // We've earlier guaranteed that a string containing '' will be // surrounded by ' - if (rFormula.GetChar(nSrcPos) == '\'') + if (rFormula[nSrcPos] == '\'') { xub_StrLen nPos = nSrcPos+1; - while (nPos < rFormula.Len()) + while (nPos < rFormula.getLength()) { - if (rFormula.GetChar(nPos) == '\'') + if (rFormula[nPos] == '\'') { - if ( (nPos+1 == rFormula.Len()) || (rFormula.GetChar(nPos+1) != '\'') ) + if ( (nPos+1 == rFormula.getLength()) || (rFormula[nPos+1] != '\'') ) { rRes.TokenType = KParseType::SINGLE_QUOTE_NAME; rRes.EndPos = nPos+1; @@ -687,7 +687,7 @@ struct Convention_A1 : public ScCompiler::Convention KParseTokens::ASC_UNDERSCORE | KParseTokens::ASC_DOLLAR; static const sal_Int32 nContFlags = nStartFlags | KParseTokens::ASC_DOT; // '?' allowed in range names because of Xcl :-/ - static const String aAddAllowed(OUString("?#")); + static const OUString aAddAllowed("?#"); return pCharClass->parseAnyToken( rFormula, nSrcPos, nStartFlags, aAddAllowed, nContFlags, aAddAllowed ); } @@ -718,7 +718,7 @@ struct ConventionOOO_A1 : public Convention_A1 { ConventionOOO_A1() : Convention_A1 (FormulaGrammar::CONV_OOO) { } ConventionOOO_A1( FormulaGrammar::AddressConvention eConv ) : Convention_A1 (eConv) { } - static String MakeTabStr( const ScCompiler& rComp, SCTAB nTab, String& aDoc ) + static OUString MakeTabStr( const ScCompiler& rComp, SCTAB nTab, OUString& aDoc ) { OUString aString; OUString aTmp; @@ -737,7 +737,7 @@ struct ConventionOOO_A1 : public Convention_A1 INetURLObject::DECODE_UNAMBIGUOUS ); } else - aDoc.Erase(); + aDoc = ""; ScCompiler::CheckTabQuotes( aString, FormulaGrammar::CONV_OOO ); } aString += "."; @@ -760,8 +760,8 @@ struct ConventionOOO_A1 : public Convention_A1 } else { - String aDoc; - String aRefStr(MakeTabStr(rComp, rAbsRef.Tab(), aDoc)); + OUString aDoc; + OUString aRefStr(MakeTabStr(rComp, rAbsRef.Tab(), aDoc)); rBuffer.append(aDoc); if (!rRef.IsTabRel()) rBuffer.append(sal_Unicode('$')); @@ -855,7 +855,7 @@ struct ConventionOOO_A1 : public Convention_A1 bool makeExternalSingleRefStr( OUStringBuffer& rBuffer, sal_uInt16 nFileId, - const String& rTabName, const ScSingleRefData& rRef, const ScAddress& rPos, + const OUString& rTabName, const ScSingleRefData& rRef, const ScAddress& rPos, ScExternalRefManager* pRefMgr, bool bDisplayTabName, bool bEncodeUrl ) const { ScAddress aAbsRef = rRef.toAbs(rPos); @@ -1128,12 +1128,12 @@ struct ConventionXL return lcl_parseExternalName( rSymbol, rFile, rName, sal_Unicode('!'), pDoc, pExternalLinks); } - static String makeExternalNameStr( const String& rFile, const String& rName ) + static OUString makeExternalNameStr( const OUString& rFile, const OUString& rName ) { return lcl_makeExternalNameStr( rFile, rName, sal_Unicode('!'), false); } - static void makeExternalDocStr( OUStringBuffer& rBuffer, const String& rFullName, bool bEncodeUrl ) + static void makeExternalDocStr( OUStringBuffer& rBuffer, const OUString& rFullName, bool bEncodeUrl ) { // Format that is easier to deal with inside OOo, because we use file // URL, and all characetrs are allowed. Check if it makes sense to do @@ -2759,7 +2759,7 @@ bool ScCompiler::IsReference( const OUString& rName ) // and would produce wrong formulas if the conditions here are met. // If you can live with these restrictions you may remove the // check and return an unconditional FALSE. - String aTabName( rName.copy( 0, nPos ) ); + OUString aTabName( rName.copy( 0, nPos ) ); SCTAB nTab; if ( !pDoc->GetTable( aTabName, nTab ) ) return false; @@ -3284,7 +3284,7 @@ void ScCompiler::AutoCorrectParsedSymbol() else { OUString aSymbol( aCorrectedSymbol ); - String aDoc; + OUString aDoc; sal_Int32 nPosition; if ( aSymbol[0] == '\'' && ((nPosition = aSymbol.indexOf( "'#" )) != -1) ) @@ -3298,9 +3298,9 @@ void ScCompiler::AutoCorrectParsedSymbol() { // duplicated or too many ':'? B:2::C10 => B2:C10 bColons = true; sal_Int32 nIndex = 0; - String aTmp1( aSymbol.getToken( 0, ':', nIndex ) ); - xub_StrLen nLen1 = aTmp1.Len(); - String aSym, aTmp2; + OUString aTmp1( aSymbol.getToken( 0, ':', nIndex ) ); + xub_StrLen nLen1 = aTmp1.getLength(); + OUString aSym, aTmp2; bool bLastAlp, bNextNum; bLastAlp = bNextNum = true; xub_StrLen nStrip = 0; @@ -3308,7 +3308,7 @@ void ScCompiler::AutoCorrectParsedSymbol() for ( xub_StrLen j=1; j<nCount; j++ ) { aTmp2 = aSymbol.getToken( 0, ':', nIndex ); - xub_StrLen nLen2 = aTmp2.Len(); + xub_StrLen nLen2 = aTmp2.getLength(); if ( nLen1 || nLen2 ) { if ( nLen1 ) @@ -3328,10 +3328,10 @@ void ScCompiler::AutoCorrectParsedSymbol() } else { - xub_StrLen nSymLen = aSym.Len(); + xub_StrLen nSymLen = aSym.getLength(); if ( nSymLen - && (aSym.GetChar( nSymLen - 1 ) != ':') ) - aSym += ':'; + && (aSym[ nSymLen - 1 ] != ':') ) + aSym += ":"; nStrip = 0; } bLastAlp = !bNextNum; @@ -3383,11 +3383,11 @@ void ScCompiler::AutoCorrectParsedSymbol() aTab[j] = aRef[j].copy( 0, nDotPos + 1 ); // with '.' aRef[j] = aRef[j].copy( nDotPos + 1 ); } - String aOld( aRef[j] ); - String aStr2; + OUString aOld( aRef[j] ); + OUString aStr2; const sal_Unicode* p = aRef[j].getStr(); while ( *p && CharClass::isAsciiNumeric( OUString(*p) ) ) - aStr2 += *p++; + aStr2 += OUString(*p++); aRef[j] = OUString( p ); aRef[j] += aStr2; if ( bColons || aRef[j] != aOld ) @@ -3985,7 +3985,7 @@ bool ScCompiler::HandleExternalReference(const FormulaToken& _aToken) return true; } - const String& rName = _aToken.GetString(); + const OUString& rName = _aToken.GetString(); ScExternalRefCache::TokenArrayRef xNew = pRefMgr->getRangeNameTokens( _aToken.GetIndex(), rName, &aPos); diff --git a/sc/source/core/tool/consoli.cxx b/sc/source/core/tool/consoli.cxx index bf4329cd0727..87d5b1a71852 100644 --- a/sc/source/core/tool/consoli.cxx +++ b/sc/source/core/tool/consoli.cxx @@ -240,7 +240,7 @@ void ScConsData::AddFields( ScDocument* pSrcDoc, SCTAB nTab, { ++nDataCount; - String aTitle; + OUString aTitle; SCCOL nStartCol = nCol1; SCROW nStartRow = nRow1; @@ -252,7 +252,7 @@ void ScConsData::AddFields( ScDocument* pSrcDoc, SCTAB nTab, for (SCCOL nCol=nStartCol; nCol<=nCol2; nCol++) { aTitle = pSrcDoc->GetString(nCol, nRow1, nTab); - if (aTitle.Len()) + if (!aTitle.isEmpty()) { bool bFound = false; for (SCSIZE i=0; i<nColCount && !bFound; i++) @@ -269,7 +269,7 @@ void ScConsData::AddFields( ScDocument* pSrcDoc, SCTAB nTab, for (SCROW nRow=nStartRow; nRow<=nRow2; nRow++) { aTitle = pSrcDoc->GetString(nCol1, nRow, nTab); - if (aTitle.Len()) + if (!aTitle.isEmpty()) { bool bFound = false; for (SCSIZE i=0; i<nRowCount && !bFound; i++) @@ -495,7 +495,7 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab, if ( bColByName && bRowByName ) { - String aThisCorner = pSrcDoc->GetString(nCol1, nRow1, nTab); + OUString aThisCorner = pSrcDoc->GetString(nCol1, nRow1, nTab); if (bCornerUsed) { if (aCornerText != aThisCorner) @@ -514,7 +514,7 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab, SCROW nStartRow = nRow1; if (bColByName) ++nStartRow; if (bRowByName) ++nStartCol; - String aTitle; + OUString aTitle; SCCOL* pDestCols = NULL; SCROW* pDestRows = NULL; if (bColByName) @@ -524,7 +524,7 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab, { aTitle = pSrcDoc->GetString(nCol, nRow1, nTab); SCCOL nPos = SC_CONS_NOTFOUND; - if (aTitle.Len()) + if (!aTitle.isEmpty()) { bool bFound = false; for (SCSIZE i=0; i<nColCount && !bFound; i++) @@ -545,7 +545,7 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab, { aTitle = pSrcDoc->GetString(nCol1, nRow, nTab); SCROW nPos = SC_CONS_NOTFOUND; - if (aTitle.Len()) + if (!aTitle.isEmpty()) { bool bFound = false; for (SCSIZE i=0; i<nRowCount && !bFound; i++) @@ -692,7 +692,7 @@ void ScConsData::OutputToDocument( ScDocument* pDestDoc, SCCOL nCol, SCROW nRow, if ( ppRefs && ppUsed ) // Referenzen einfuegen { //! unterscheiden, ob nach Kategorien aufgeteilt - String aString; + OUString aString; ScSingleRefData aSRef; // Daten fuer Referenz-Formelzellen aSRef.InitFlags(); // This reference is absolute at all times. @@ -777,7 +777,7 @@ void ScConsData::OutputToDocument( ScDocument* pDestDoc, SCCOL nCol, SCROW nRow, if (ppTitlePos && mpTitles && mpRowHeaders) { - String aDelim( " / " ); + OUString aDelim( " / " ); for (SCSIZE nPos=0; nPos<nDataCount; nPos++) { SCSIZE nTPos = ppTitlePos[nArrY][nPos]; diff --git a/sc/source/core/tool/ddelink.cxx b/sc/source/core/tool/ddelink.cxx index 96a9a2571a31..e4426015893f 100644 --- a/sc/source/core/tool/ddelink.cxx +++ b/sc/source/core/tool/ddelink.cxx @@ -136,14 +136,14 @@ sfx2::SvBaseLink::UpdateResult ScDdeLink::DataChanged( if (nLen && aLinkStr[nLen-1] == '\n') aLinkStr = aLinkStr.copy(0, nLen-1); - String aLine; + OUString aLine; SCSIZE nCols = 1; // Leerstring -> eine leere Zelle SCSIZE nRows = 1; if (!aLinkStr.isEmpty()) { nRows = static_cast<SCSIZE>(comphelper::string::getTokenCount(aLinkStr, '\n')); aLine = aLinkStr.getToken( 0, '\n' ); - if (aLine.Len()) + if (!aLine.isEmpty()) nCols = static_cast<SCSIZE>(comphelper::string::getTokenCount(aLine, '\t')); } @@ -172,18 +172,18 @@ sfx2::SvBaseLink::UpdateResult ScDdeLink::DataChanged( else if ( nMode == SC_DDE_ENGLISH ) nStdFormat = pFormatter->GetStandardIndex(LANGUAGE_ENGLISH_US); - String aEntry; + OUString aEntry; for (SCSIZE nR=0; nR<nRows; nR++) { aLine = aLinkStr.getToken( (sal_Int32) nR, '\n' ); for (SCSIZE nC=0; nC<nCols; nC++) { - aEntry = aLine.GetToken( (xub_StrLen) nC, '\t' ); + aEntry = aLine.getToken( (xub_StrLen) nC, '\t' ); sal_uInt32 nIndex = nStdFormat; double fVal = double(); if ( nMode != SC_DDE_TEXT && pFormatter->IsNumberFormat( aEntry, nIndex, fVal ) ) pResult->PutDouble( fVal, nC, nR ); - else if (aEntry.Len() == 0) + else if (aEntry.isEmpty()) // empty cell pResult->PutEmpty(nC, nR); else diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx index 198dba51d45a..fa2c809854b6 100644 --- a/sc/source/core/tool/detfunc.cxx +++ b/sc/source/core/tool/detfunc.cxx @@ -161,7 +161,7 @@ ScDetectiveData::ScDetectiveData( SdrModel* pModel ) : basegfx::B2DPolygon aCircle(basegfx::tools::createPolygonFromEllipse(basegfx::B2DPoint(0.0, 0.0), 100.0, 100.0)); aCircle.setClosed(true); - String aName = SC_LINEEND_NAME; + OUString aName = SC_LINEEND_NAME; aArrowSet.Put( XLineStartItem( aName, basegfx::B2DPolyPolygon(aCircle) ) ); aArrowSet.Put( XLineStartWidthItem( 200 ) ); @@ -184,7 +184,7 @@ ScDetectiveData::ScDetectiveData( SdrModel* pModel ) : aFromTabSet.Put( XLineEndWidthItem( 200 ) ); aFromTabSet.Put( XLineEndCenterItem( false ) ); - aCircleSet.Put( XLineColorItem( String(), Color( ScDetectiveFunc::GetErrorColor() ) ) ); + aCircleSet.Put( XLineColorItem( OUString(), Color( ScDetectiveFunc::GetErrorColor() ) ) ); aCircleSet.Put( XFillStyleItem( XFILL_NONE ) ); sal_uInt16 nWidth = 55; // 54 = 1 Pixel aCircleSet.Put( XLineWidthItem( nWidth ) ); @@ -199,14 +199,14 @@ ScCommentData::ScCommentData( ScDocument& rDoc, SdrModel* pModel ) : aTriangle.append(basegfx::B2DPoint(20.0, 30.0)); aTriangle.setClosed(true); - String aName = SC_LINEEND_NAME; + OUString aName = SC_LINEEND_NAME; aCaptionSet.Put( XLineStartItem( aName, basegfx::B2DPolyPolygon(aTriangle) ) ); aCaptionSet.Put( XLineStartWidthItem( 200 ) ); aCaptionSet.Put( XLineStartCenterItem( false ) ); aCaptionSet.Put( XFillStyleItem( XFILL_SOLID ) ); Color aYellow( ScDetectiveFunc::GetCommentColor() ); - aCaptionSet.Put( XFillColorItem( String(), aYellow ) ); + aCaptionSet.Put( XFillColorItem( OUString(), aYellow ) ); // shadow // SdrShadowItem has sal_False, instead the shadow is set for the rectangle @@ -503,7 +503,7 @@ sal_Bool ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow, rAttrSet.Put( XLineWidthItem( 0 ) ); // einzelne Referenz ColorData nColorData = ( bRed ? GetErrorColor() : GetArrowColor() ); - rAttrSet.Put( XLineColorItem( String(), Color( nColorData ) ) ); + rAttrSet.Put( XLineColorItem( OUString(), Color( nColorData ) ) ); basegfx::B2DPolygon aTempPoly; aTempPoly.append(basegfx::B2DPoint(aStartPos.X(), aStartPos.Y())); @@ -568,7 +568,7 @@ sal_Bool ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow, rAttrSet.Put( XLineWidthItem( 0 ) ); // einzelne Referenz ColorData nColorData = ( bRed ? GetErrorColor() : GetArrowColor() ); - rAttrSet.Put( XLineColorItem( String(), Color( nColorData ) ) ); + rAttrSet.Put( XLineColorItem( OUString(), Color( nColorData ) ) ); basegfx::B2DPolygon aTempPoly; aTempPoly.append(basegfx::B2DPoint(aStartPos.X(), aStartPos.Y())); @@ -1439,7 +1439,7 @@ void ScDetectiveFunc::UpdateAllComments( ScDocument& rDoc ) { ScCommentData aData( rDoc, pModel ); SfxItemSet aAttrColorSet = pObject->GetMergedItemSet(); - aAttrColorSet.Put( XFillColorItem( String(), GetCommentColor() ) ); + aAttrColorSet.Put( XFillColorItem( OUString(), GetCommentColor() ) ); aData.UpdateCaptionSet( aAttrColorSet ); pObject->SetMergedItemSetAndBroadcast( aData.GetCaptionSet() ); if( SdrCaptionObj* pCaption = dynamic_cast< SdrCaptionObj* >( pObject ) ) @@ -1521,7 +1521,7 @@ void ScDetectiveFunc::UpdateAllArrowColors() if ( bArrow || bError ) { ColorData nColorData = ( bError ? GetErrorColor() : GetArrowColor() ); - pObject->SetMergedItem( XLineColorItem( String(), Color( nColorData ) ) ); + pObject->SetMergedItem( XLineColorItem( OUString(), Color( nColorData ) ) ); // repaint only pObject->ActionChanged(); diff --git a/sc/source/core/tool/doubleref.cxx b/sc/source/core/tool/doubleref.cxx index 86fb5d51ec5a..68f930dbd08f 100644 --- a/sc/source/core/tool/doubleref.cxx +++ b/sc/source/core/tool/doubleref.cxx @@ -173,7 +173,7 @@ bool lcl_createExcelQuery( SCSIZE nIndex = 0; SCROW nRow = 1; - String aCellStr; + OUString aCellStr; while (nRow < nRows) { nCol = 0; @@ -181,7 +181,7 @@ bool lcl_createExcelQuery( { aCellStr = pQueryRef->getString(nCol, nRow); aCellStr = ScGlobal::pCharClass->uppercase( aCellStr ); - if (aCellStr.Len() > 0) + if (!aCellStr.isEmpty()) { if (nIndex < nNewEntries) { diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx index 7afa142f52d4..27fdf8911862 100644 --- a/sc/source/core/tool/editutil.cxx +++ b/sc/source/core/tool/editutil.cxx @@ -726,10 +726,10 @@ void ScTabEditEngine::Init( const ScPatternAttr& rPattern ) // Zahlen aus \sw\source\core\doc\numbers.cxx // -static String lcl_GetCharStr( sal_Int32 nNo ) +static OUString lcl_GetCharStr( sal_Int32 nNo ) { OSL_ENSURE( nNo, "0 is an invalid number !!" ); - String aStr; + OUString aStr; const sal_Int32 coDiff = 'Z' - 'A' +1; sal_Int32 nCalc; @@ -738,7 +738,7 @@ static String lcl_GetCharStr( sal_Int32 nNo ) nCalc = nNo % coDiff; if( !nCalc ) nCalc = coDiff; - aStr.Insert( (sal_Unicode)('a' - 1 + nCalc ), 0 ); + aStr = OUString( (sal_Unicode)('a' - 1 + nCalc ) ) + aStr; nNo = sal::static_int_cast<sal_Int32>( nNo - nCalc ); if( nNo ) nNo /= coDiff; diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index c2e81c598924..617ed167c8af 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -84,10 +84,10 @@ using ::std::auto_ptr; struct ScCompare { double nVal[2]; - String* pVal[2]; + OUString* pVal[2]; bool bVal[2]; bool bEmpty[2]; - ScCompare( String* p1, String* p2 ) + ScCompare( OUString* p1, OUString* p2 ) { pVal[ 0 ] = p1; pVal[ 1 ] = p2; @@ -261,7 +261,7 @@ static void lcl_storeJumpMatResult( const ScMatrix* pMat, ScMatrix* pResMat, SCS } else { - const String& rStr = pMat->GetString( nC, nR ); + const OUString& rStr = pMat->GetString( nC, nR ); pResMat->PutString( rStr, nC, nR ); } } @@ -865,7 +865,7 @@ double ScInterpreter::CompareFunc( const ScCompare& rComp, ScCompareOptions* pOp } else { - if ( rComp.pVal[ 1 ]->Len() ) + if ( !rComp.pVal[ 1 ]->isEmpty() ) fRes = -1; // empty cell < "..." // else: empty cell == "" } @@ -885,7 +885,7 @@ double ScInterpreter::CompareFunc( const ScCompare& rComp, ScCompareOptions* pOp } else { - if ( rComp.pVal[ 0 ]->Len() ) + if ( !rComp.pVal[ 0 ]->isEmpty() ) fRes = 1; // "..." > empty cell // else: "" == empty cell } @@ -926,11 +926,11 @@ double ScInterpreter::CompareFunc( const ScCompare& rComp, ScCompareOptions* pOp if (pOptions->bRegEx) { sal_Int32 nStart = 0; - sal_Int32 nStop = rComp.pVal[0]->Len(); + sal_Int32 nStop = rComp.pVal[0]->getLength(); bool bMatch = rEntry.GetSearchTextPtr( !pOptions->bIgnoreCase)->SearchForward( *rComp.pVal[0], &nStart, &nStop); - if (bMatch && pOptions->bMatchWholeCell && (nStart != 0 || nStop != rComp.pVal[0]->Len())) + if (bMatch && pOptions->bMatchWholeCell && (nStart != 0 || nStop != rComp.pVal[0]->getLength())) bMatch = false; // RegEx must match entire string. fRes = (bMatch ? 0 : 1); } @@ -944,13 +944,13 @@ double ScInterpreter::CompareFunc( const ScCompare& rComp, ScCompareOptions* pOp bMatch = pTransliteration->isEqual( *rComp.pVal[0], *rComp.pVal[1]); else { - String aCell( pTransliteration->transliterate( + OUString aCell( pTransliteration->transliterate( *rComp.pVal[0], ScGlobal::eLnge, 0, - rComp.pVal[0]->Len(), NULL)); - String aQuer( pTransliteration->transliterate( + rComp.pVal[0]->getLength(), NULL)); + OUString aQuer( pTransliteration->transliterate( *rComp.pVal[1], ScGlobal::eLnge, 0, - rComp.pVal[1]->Len(), NULL)); - bMatch = (aCell.Search( aQuer ) != STRING_NOTFOUND); + rComp.pVal[1]->getLength(), NULL)); + bMatch = (aCell.indexOf( aQuer ) != -1); } fRes = (bMatch ? 0 : 1); } @@ -982,7 +982,7 @@ double ScInterpreter::CompareFunc( const ScCompare& rComp, ScCompareOptions* pOp // As in ScTable::ValidQuery() match a numeric string for a // number query that originated from a string, e.g. in SUMIF // and COUNTIF. Transliteration is not needed here. - bool bEqual = rComp.pVal[nStringQuery-1]->Equals(rItem.maString); + bool bEqual = (*rComp.pVal[nStringQuery-1]) == rItem.maString; // match => fRes=0, else fRes=1 fRes = (rEntry.eOp == SC_NOT_EQUAL) ? bEqual : !bEqual; } @@ -995,7 +995,7 @@ double ScInterpreter::CompareFunc( const ScCompare& rComp, ScCompareOptions* pOp double ScInterpreter::Compare() { - String aVal1, aVal2; + OUString aVal1, aVal2; ScCompare aComp( &aVal1, &aVal2 ); for( short i = 1; i >= 0; i-- ) { @@ -1084,7 +1084,7 @@ double ScInterpreter::Compare() sc::RangeMatrix ScInterpreter::CompareMat( ScCompareOptions* pOptions ) { - String aVal1, aVal2; + OUString aVal1, aVal2; ScCompare aComp( &aVal1, &aVal2 ); sc::RangeMatrix aMat[2]; ScAddress aAdr; @@ -2401,7 +2401,7 @@ void ScInterpreter::ScCell() } bError = !PopDoubleRefOrSingleRef( aCellPos ); } - String aInfoType( GetString() ); + OUString aInfoType( GetString() ); if( bError || nGlobalError ) PushIllegalParameter(); else @@ -2412,25 +2412,25 @@ void ScInterpreter::ScCell() ScCellKeywordTranslator::transKeyword(aInfoType, ScGlobal::GetLocale(), ocCell); // *** ADDRESS INFO *** - if( aInfoType.EqualsAscii( "COL" ) ) + if( aInfoType.equalsAscii( "COL" ) ) { // column number (1-based) PushInt( aCellPos.Col() + 1 ); } - else if( aInfoType.EqualsAscii( "ROW" ) ) + else if( aInfoType.equalsAscii( "ROW" ) ) { // row number (1-based) PushInt( aCellPos.Row() + 1 ); } - else if( aInfoType.EqualsAscii( "SHEET" ) ) + else if( aInfoType.equalsAscii( "SHEET" ) ) { // table number (1-based) PushInt( aCellPos.Tab() + 1 ); } - else if( aInfoType.EqualsAscii( "ADDRESS" ) ) + else if( aInfoType.equalsAscii( "ADDRESS" ) ) { // address formatted as [['FILENAME'#]$TABLE.]$COL$ROW sal_uInt16 nFlags = (aCellPos.Tab() == aPos.Tab()) ? (SCA_ABS) : (SCA_ABS_3D); OUString aStr(aCellPos.Format(nFlags, pDok, pDok->GetAddressConvention())); PushString(aStr); } - else if( aInfoType.EqualsAscii( "FILENAME" ) ) + else if( aInfoType.equalsAscii( "FILENAME" ) ) { // file name and table name: 'FILENAME'#$TABLE SCTAB nTab = aCellPos.Tab(); OUString aFuncResult; @@ -2457,7 +2457,7 @@ void ScInterpreter::ScCell() } PushString( aFuncResult ); } - else if( aInfoType.EqualsAscii( "COORD" ) ) + else if( aInfoType.equalsAscii( "COORD" ) ) { // address, lotus 1-2-3 formatted: $TABLE:$COL$ROW // Yes, passing tab as col is intentional! OUStringBuffer aFuncResult; @@ -2473,7 +2473,7 @@ void ScInterpreter::ScCell() } // *** CELL PROPERTIES *** - else if( aInfoType.EqualsAscii( "CONTENTS" ) ) + else if( aInfoType.equalsAscii( "CONTENTS" ) ) { // contents of the cell, no formatting if (aCell.hasString()) { @@ -2484,7 +2484,7 @@ void ScInterpreter::ScCell() else PushDouble(GetCellValue(aCellPos, aCell)); } - else if( aInfoType.EqualsAscii( "TYPE" ) ) + else if( aInfoType.equalsAscii( "TYPE" ) ) { // b = blank; l = string (label); v = otherwise (value) sal_Unicode c; if (aCell.hasString()) @@ -2493,7 +2493,7 @@ void ScInterpreter::ScCell() c = aCell.hasNumeric() ? 'v' : 'b'; PushString( OUString(c) ); } - else if( aInfoType.EqualsAscii( "WIDTH" ) ) + else if( aInfoType.equalsAscii( "WIDTH" ) ) { // column width (rounded off as count of zero characters in standard font and size) Printer* pPrinter = pDok->GetPrinter(); MapMode aOldMode( pPrinter->GetMapMode() ); @@ -2510,7 +2510,7 @@ void ScInterpreter::ScCell() int nZeroCount = (int)(pDok->GetColWidth( aCellPos.Col(), aCellPos.Tab() ) / nZeroWidth); PushInt( nZeroCount ); } - else if( aInfoType.EqualsAscii( "PREFIX" ) ) + else if( aInfoType.equalsAscii( "PREFIX" ) ) { // ' = left; " = right; ^ = centered sal_Unicode c = 0; if (aCell.hasString()) @@ -2529,7 +2529,7 @@ void ScInterpreter::ScCell() } PushString( OUString(c) ); } - else if( aInfoType.EqualsAscii( "PROTECT" ) ) + else if( aInfoType.equalsAscii( "PROTECT" ) ) { // 1 = cell locked const ScProtectionAttr* pProtAttr = (const ScProtectionAttr*) pDok->GetAttr( aCellPos.Col(), aCellPos.Row(), aCellPos.Tab(), ATTR_PROTECTION ); @@ -2537,19 +2537,19 @@ void ScInterpreter::ScCell() } // *** FORMATTING *** - else if( aInfoType.EqualsAscii( "FORMAT" ) ) + else if( aInfoType.equalsAscii( "FORMAT" ) ) { // specific format code for standard formats OUString aFuncResult; sal_uLong nFormat = pDok->GetNumberFormat( aCellPos ); getFormatString(pFormatter, nFormat, aFuncResult); PushString( aFuncResult ); } - else if( aInfoType.EqualsAscii( "COLOR" ) ) + else if( aInfoType.equalsAscii( "COLOR" ) ) { // 1 = negative values are colored, otherwise 0 const SvNumberformat* pFormat = pFormatter->GetEntry( pDok->GetNumberFormat( aCellPos ) ); PushInt( lcl_FormatHasNegColor( pFormat ) ? 1 : 0 ); } - else if( aInfoType.EqualsAscii( "PARENTHESES" ) ) + else if( aInfoType.equalsAscii( "PARENTHESES" ) ) { // 1 = format string contains a '(' character, otherwise 0 const SvNumberformat* pFormat = pFormatter->GetEntry( pDok->GetNumberFormat( aCellPos ) ); PushInt( lcl_FormatHasOpenPar( pFormat ) ? 1 : 0 ); @@ -3444,11 +3444,11 @@ static inline bool lcl_ScInterpreter_IsPrintable( sal_Unicode c ) void ScInterpreter::ScClean() { - String aStr( GetString() ); - for ( xub_StrLen i = 0; i < aStr.Len(); i++ ) + OUString aStr( GetString() ); + for ( xub_StrLen i = 0; i < aStr.getLength(); i++ ) { - if ( !lcl_ScInterpreter_IsPrintable( aStr.GetChar( i ) ) ) - aStr.Erase(i,1); + if ( !lcl_ScInterpreter_IsPrintable( aStr[i] ) ) + aStr = aStr.replaceAt(i,1,""); } PushString(aStr); } @@ -3457,7 +3457,7 @@ void ScInterpreter::ScClean() void ScInterpreter::ScCode() { //2do: make it full range unicode? - String aStr = GetString(); + OUString aStr = GetString(); //"classic" ByteString conversion flags const sal_uInt32 convertFlags = RTL_UNICODETOTEXT_FLAGS_NONSPACING_IGNORE | @@ -3466,7 +3466,7 @@ void ScInterpreter::ScCode() RTL_UNICODETOTEXT_FLAGS_UNDEFINED_DEFAULT | RTL_UNICODETOTEXT_FLAGS_INVALID_DEFAULT | RTL_UNICODETOTEXT_FLAGS_UNDEFINED_REPLACE; - PushInt( (sal_uChar) OUStringToOString(OUString(aStr.GetChar(0)), osl_getThreadTextEncoding(), convertFlags).toChar() ); + PushInt( (sal_uChar) OUStringToOString(OUString(aStr[0]), osl_getThreadTextEncoding(), convertFlags).toChar() ); } @@ -4299,7 +4299,7 @@ void ScInterpreter::ScTable() { case svString : { - String aStr( PopString() ); + OUString aStr( PopString() ); if ( pDok->GetTable( aStr, nVal ) ) ++nVal; else @@ -5901,7 +5901,7 @@ void ScInterpreter::ScLookup() // The third parameter, result array, for double, string and single reference. double fResVal = 0.0; - String aResStr; + OUString aResStr; ScAddress aResAdr; StackVar eResArrayType = svUnknown; @@ -7295,7 +7295,7 @@ void ScInterpreter::ScIndirect() } const ScAddress::Details aDetails( eConv, aPos ); SCTAB nTab = aPos.Tab(); - String sRefStr( GetString() ); + OUString sRefStr( GetString() ); ScRefAddress aRefAd, aRefAd2; ScAddress::ExternalInfo aExtInfo; if (ConvertDoubleRef(pDok, sRefStr, nTab, aRefAd, aRefAd2, aDetails, &aExtInfo)) @@ -7421,7 +7421,7 @@ void ScInterpreter::ScAddressFunc() if( nParamCount >= 5 && !sTabStr.isEmpty() ) { - String aDoc; + OUString aDoc; if (eConv == FormulaGrammar::CONV_OOO) { // Isolate Tab from 'Doc'#Tab @@ -7438,7 +7438,7 @@ void ScInterpreter::ScAddressFunc() * need some extra handling to isolate Tab from Doc. */ if (sTabStr[0] != '\'' || sTabStr[sTabStr.getLength()-1] != '\'') ScCompiler::CheckTabQuotes( sTabStr, eConv); - if (aDoc.Len()) + if (!aDoc.isEmpty()) sTabStr = aDoc + sTabStr; sTabStr += eConv == FormulaGrammar::CONV_XL_R1C1 ? OUString("!") : OUString("."); sTabStr += aRefStr; @@ -8011,13 +8011,13 @@ void ScInterpreter::ScFind() fAnz = GetDouble(); else fAnz = 1.0; - String sStr = GetString(); - if( fAnz < 1.0 || fAnz > (double) sStr.Len() ) + OUString sStr = GetString(); + if( fAnz < 1.0 || fAnz > (double) sStr.getLength() ) PushNoValue(); else { - xub_StrLen nPos = sStr.Search( GetString(), (xub_StrLen) fAnz - 1 ); - if (nPos == STRING_NOTFOUND) + sal_Int32 nPos = sStr.indexOf( GetString(), (xub_StrLen) fAnz - 1 ); + if (nPos == -1) PushNoValue(); else PushDouble((double)(nPos + 1)); @@ -8031,8 +8031,8 @@ void ScInterpreter::ScExact() nFuncFmtType = NUMBERFORMAT_LOGICAL; if ( MustHaveParamCount( GetByte(), 2 ) ) { - String s1( GetString() ); - String s2( GetString() ); + OUString s1( GetString() ); + OUString s2( GetString() ); PushInt( s1 == s2 ); } } @@ -8057,8 +8057,8 @@ void ScInterpreter::ScLeft() } else n = 1; - String aStr( GetString() ); - aStr.Erase( n ); + OUString aStr( GetString() ); + aStr = aStr.copy( 0, n ); PushString( aStr ); } } @@ -8258,9 +8258,9 @@ void ScInterpreter::ScRight() } else n = 1; - String aStr( GetString() ); - if( n < aStr.Len() ) - aStr.Erase( 0, aStr.Len() - n ); + OUString aStr( GetString() ); + if( n < aStr.getLength() ) + aStr = aStr.copy( aStr.getLength() - n ); PushString( aStr ); } } @@ -8312,11 +8312,11 @@ void ScInterpreter::ScMid() { double fAnz = ::rtl::math::approxFloor(GetDouble()); double fAnfang = ::rtl::math::approxFloor(GetDouble()); - String aStr = GetString(); + OUString aStr = GetString(); if (fAnfang < 1.0 || fAnz < 0.0 || fAnfang > double(STRING_MAXLEN) || fAnz > double(STRING_MAXLEN)) PushIllegalArgument(); else - PushString(aStr.Copy( (xub_StrLen) fAnfang - 1, (xub_StrLen) fAnz )); + PushString(aStr.copy( (xub_StrLen) fAnfang - 1, (xub_StrLen) fAnz )); } } @@ -8415,12 +8415,12 @@ void ScInterpreter::ScSubstitute() else nAnz = 0; OUString sNewStr = GetString(); - String sOldStr = GetString(); + OUString sOldStr = GetString(); OUString sStr = GetString(); sal_Int32 nPos = 0; xub_StrLen nCount = 0; xub_StrLen nNewLen = sNewStr.getLength(); - xub_StrLen nOldLen = sOldStr.Len(); + xub_StrLen nOldLen = sOldStr.getLength(); while( true ) { nPos = sStr.indexOf( sOldStr, nPos ); @@ -8454,10 +8454,10 @@ void ScInterpreter::ScRept() if ( MustHaveParamCount( GetByte(), 2 ) ) { double fAnz = ::rtl::math::approxFloor(GetDouble()); - String aStr( GetString() ); + OUString aStr( GetString() ); if ( fAnz < 0.0 ) PushIllegalArgument(); - else if ( fAnz * aStr.Len() > STRING_MAXLEN ) + else if ( fAnz * aStr.getLength() > STRING_MAXLEN ) { PushError( errStringOverflow ); } @@ -8465,7 +8465,7 @@ void ScInterpreter::ScRept() PushString( EMPTY_STRING ); else { - const xub_StrLen nLen = aStr.Len(); + const xub_StrLen nLen = aStr.getLength(); xub_StrLen n = (xub_StrLen) fAnz; OUStringBuffer aRes(n*nLen); while( n-- ) @@ -8479,11 +8479,11 @@ void ScInterpreter::ScRept() void ScInterpreter::ScConcat() { sal_uInt8 nParamCount = GetByte(); - String aRes; + OUString aRes; while( nParamCount-- > 0) { const OUString& rStr = GetString(); - aRes.Insert( rStr, 0 ); + aRes = rStr + aRes; } PushString( aRes ); } diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx index 6f08958ec618..ddaf4c589abc 100644 --- a/sc/source/core/tool/interpr2.cxx +++ b/sc/source/core/tool/interpr2.cxx @@ -531,7 +531,7 @@ void ScInterpreter::ScGetDateDif() void ScInterpreter::ScGetTimeValue() { - String aInputString = GetString(); + OUString aInputString = GetString(); sal_uInt32 nFIndex = 0; // damit default Land/Spr. double fVal; if (pFormatter->IsNumberFormat(aInputString, nFIndex, fVal)) @@ -1938,13 +1938,13 @@ void ScInterpreter::ScStyle() sal_uInt8 nParamCount = GetByte(); if (nParamCount >= 1 && nParamCount <= 3) { - String aStyle2; // Vorlage nach Timer + OUString aStyle2; // Vorlage nach Timer if (nParamCount >= 3) aStyle2 = GetString(); long nTimeOut = 0; // Timeout if (nParamCount >= 2) nTimeOut = (long)(GetDouble()*1000.0); - String aStyle1 = GetString(); // Vorlage fuer sofort + OUString aStyle1 = GetString(); // Vorlage fuer sofort if (nTimeOut < 0) nTimeOut = 0; @@ -2280,8 +2280,8 @@ void ScInterpreter::ScConvert() { // Value, FromUnit, ToUnit if ( MustHaveParamCount( GetByte(), 3 ) ) { - String aToUnit( GetString() ); - String aFromUnit( GetString() ); + OUString aToUnit( GetString() ); + OUString aFromUnit( GetString() ); double fVal = GetDouble(); if ( nGlobalError ) PushError( nGlobalError); @@ -2313,7 +2313,7 @@ void ScInterpreter::ScRoman() static const sal_uInt16 pValues[] = { 1000, 500, 100, 50, 10, 5, 1 }; static const sal_uInt16 nMaxIndex = (sal_uInt16)((sizeof(pValues)/sizeof(pValues[0])) - 1); - String aRoman; + OUString aRoman; sal_uInt16 nVal = (sal_uInt16) fVal; sal_uInt16 nMode = (sal_uInt16) fMode; @@ -2337,8 +2337,8 @@ void ScInterpreter::ScRoman() else nSteps = nMode; } - aRoman += pChars[ nIndex ]; - aRoman += pChars[ nIndex2 ]; + aRoman += OUString( pChars[ nIndex ] ); + aRoman += OUString( pChars[ nIndex2 ] ); nVal = sal::static_int_cast<sal_uInt16>( nVal + pValues[ nIndex ] ); nVal = sal::static_int_cast<sal_uInt16>( nVal - pValues[ nIndex2 ] ); } @@ -2348,7 +2348,7 @@ void ScInterpreter::ScRoman() { // assert can't happen with nVal<4000 precondition assert( nIndex >= 1 ); - aRoman += pChars[ nIndex - 1 ]; + aRoman += OUString( pChars[ nIndex - 1 ] ); } sal_Int32 nPad = nDigit % 5; if (nPad) @@ -2503,7 +2503,7 @@ void ScInterpreter::ScHyperLink() SetError( errIllegalArgument); } } - String aUrl = GetString(); + OUString aUrl = GetString(); ScMatrixRef pResMat = GetNewMat( 1, 2); if (nGlobalError) { @@ -2595,7 +2595,7 @@ void ScInterpreter::ScEuroConvert() double fToRate; int nFromDec; int nToDec; - String aEur( "EUR"); + OUString aEur( "EUR"); if ( lclConvertMoney( aFromUnit, fFromRate, nFromDec ) && lclConvertMoney( aToUnit, fToRate, nToDec ) ) { diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index fedda317d553..8a6652ddce8b 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -460,7 +460,7 @@ double ScInterpreter::GetCellValueOrZero( const ScAddress& rPos, ScRefCellValue& } else { - String aStr = pFCell->GetString(); + OUString aStr = pFCell->GetString(); fValue = ConvertStringToValue( aStr ); } } @@ -662,7 +662,7 @@ bool ScInterpreter::CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, aCell.assign(*pDok, ScAddress(nCol, nRow, nTab)); if (!aCell.isEmpty()) { - String aStr; + OUString aStr; sal_uInt16 nErr = 0; bool bOk = true; switch (aCell.meType) @@ -767,7 +767,7 @@ bool ScInterpreter::CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, sal_uInt16 nErr = 0; sal_uInt16 nType = 0; // 0 = Zahl; 1 = String double nVal = 0.0; - String aStr; + OUString aStr; bool bOk = true; switch (aCell.meType) { @@ -1688,7 +1688,7 @@ bool ScInterpreter::ConvertMatrixParameters() if (eType == ScParameterClassification::Array) { sal_uInt16 nFileId = p->GetIndex(); - const String& rTabName = p->GetString(); + const OUString& rTabName = p->GetString(); const ScComplexRefData& rRef = static_cast<ScToken*>(p)->GetDoubleRef(); ScExternalRefCache::TokenArrayRef pArray; GetExternalDoubleRef(nFileId, rTabName, rRef, pArray); @@ -1851,7 +1851,7 @@ void ScInterpreter::QueryMatrixType(ScMatrixRef& xMat, short& rRetTypeExpr, sal_ } else { - String aStr( nMatVal.GetString()); + OUString aStr( nMatVal.GetString()); FormulaTokenRef xRes = new FormulaStringToken( aStr); PushTempToken( new ScMatrixCellResultToken( xMat, xRes.get())); rRetTypeExpr = NUMBERFORMAT_TEXT; @@ -2478,8 +2478,8 @@ void ScInterpreter::ScDBGet() void ScInterpreter::ScExternal() { sal_uInt8 nParamCount = GetByte(); - String aUnoName; - String aFuncName( ScGlobal::pCharClass->uppercase( pCur->GetExternal() ) ); + OUString aUnoName; + OUString aFuncName( ScGlobal::pCharClass->uppercase( pCur->GetExternal() ) ); FuncData* pFuncData = ScGlobal::GetFuncCollection()->findByName(aFuncName); if (pFuncData) { @@ -2604,7 +2604,7 @@ void ScInterpreter::ScExternal() sal_Char* pcErg = new sal_Char[ADDIN_MAXSTRLEN]; ppParam[0] = pcErg; pFuncData->Call(ppParam); - String aUni( pcErg, osl_getThreadTextEncoding() ); + OUString aUni( pcErg, strlen(pcErg), osl_getThreadTextEncoding() ); PushString( aUni ); delete[] pcErg; } @@ -2675,7 +2675,7 @@ void ScInterpreter::ScExternal() PushIllegalParameter(); } } - else if ( ( aUnoName = ScGlobal::GetAddInCollection()->FindFunction(aFuncName, false) ).Len() ) + else if ( !( aUnoName = ScGlobal::GetAddInCollection()->FindFunction(aFuncName, false) ).isEmpty() ) { // bLocalFirst=false in FindFunction, cFunc should be the stored // internal name @@ -3066,7 +3066,7 @@ static uno::Any lcl_getSheetModule( const uno::Reference<table::XCellRange>& xCe uno::Reference< uno::XInterface > xIf; if ( pBasMgr && !pBasMgr->GetName().isEmpty() ) { - String sProj = String( "Standard" ); + OUString sProj( "Standard" ); if ( !pDok->GetDocumentShell()->GetBasicManager()->GetName().isEmpty() ) { sProj = pDok->GetDocumentShell()->GetBasicManager()->GetName(); @@ -3097,7 +3097,7 @@ static bool lcl_setVBARange( ScRange& aRange, ScDocument* pDok, SbxVariable* pPa xVBARange = ooo::vba::createVBAUnoAPIServiceWithArgs( pDok->GetDocumentShell(), "ooo.vba.excel.Range", aArgs ); if ( xVBARange.is() ) { - String sDummy("A-Range"); + OUString sDummy("A-Range"); SbxObjectRef aObj = GetSbUnoObject( sDummy, uno::Any( xVBARange ) ); SetSbUnoObjectDfltPropName( aObj ); bOk = pPar->PutObject( aObj ); @@ -3121,7 +3121,7 @@ void ScInterpreter::ScMacro() SbxBase::ResetError(); sal_uInt8 nParamCount = GetByte(); - String aMacro( pCur->GetExternal() ); + OUString aMacro( pCur->GetExternal() ); SfxObjectShell* pDocSh = pDok->GetDocumentShell(); if ( !pDocSh || !pDok->CheckMacroWarn() ) @@ -3154,12 +3154,8 @@ void ScInterpreter::ScMacro() bool bUseVBAObjects = pModule->IsVBACompat(); SbxObject* pObject = pModule->GetParent(); OSL_ENSURE(pObject->IsA(TYPE(StarBASIC)), "No Basic found!"); - String aMacroStr = pObject->GetName(); - aMacroStr += '.'; - aMacroStr += pModule->GetName(); - aMacroStr += '.'; - aMacroStr += pMethod->GetName(); - String aBasicStr; + OUString aMacroStr = pObject->GetName() + "." + pModule->GetName() + "." + pMethod->GetName(); + OUString aBasicStr; if (pObject->GetParent()) { aBasicStr = pObject->GetParent()->GetName(); // Dokumentenbasic diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx index 0f52e433beb6..dc6d71cc21c4 100644 --- a/sc/source/core/tool/interpr5.cxx +++ b/sc/source/core/tool/interpr5.cxx @@ -439,7 +439,7 @@ ScMatrixRef ScInterpreter::GetMatrix() break; case svString : { - String aStr = GetString(); + OUString aStr = GetString(); pMat = GetNewMat( 1, 1); if ( pMat ) { @@ -1083,7 +1083,7 @@ ScMatrixRef ScInterpreter::MatConcat(const ScMatrixRef& pMat1, const ScMatrixRef xResMat->PutError( nErr, i, j); else { - String aTmp( pMat1->GetString( *pFormatter, i, j)); + OUString aTmp( pMat1->GetString( *pFormatter, i, j)); aTmp += pMat2->GetString( *pFormatter, i, j); xResMat->PutString( aTmp, i, j); } @@ -1279,7 +1279,7 @@ void ScInterpreter::ScAmpersand() } else if (pMat1 || pMat2) { - String sStr; + OUString sStr; bool bFlag; ScMatrixRef pMat = pMat1; if (!pMat) @@ -1314,7 +1314,7 @@ void ScInterpreter::ScAmpersand() pResMat->PutError( nErr, i, j); else { - String aTmp( sStr); + OUString aTmp( sStr); aTmp += pMat->GetString( *pFormatter, i, j); pResMat->PutString( aTmp, i, j); } @@ -1330,7 +1330,7 @@ void ScInterpreter::ScAmpersand() pResMat->PutError( nErr, i, j); else { - String aTmp( pMat->GetString( *pFormatter, i, j)); + OUString aTmp( pMat->GetString( *pFormatter, i, j)); aTmp += sStr; pResMat->PutString( aTmp, i, j); } @@ -3185,17 +3185,17 @@ void ScInterpreter::ScInfo() { if( MustHaveParamCount( GetByte(), 1 ) ) { - String aStr = GetString(); + OUString aStr = GetString(); ScCellKeywordTranslator::transKeyword(aStr, ScGlobal::GetLocale(), ocInfo); - if( aStr.EqualsAscii( "SYSTEM" ) ) - PushString( String( SC_INFO_OSVERSION ) ); - else if( aStr.EqualsAscii( "OSVERSION" ) ) - PushString( String( "Windows (32-bit) NT 5.01" ) ); - else if( aStr.EqualsAscii( "RELEASE" ) ) + if( aStr.equalsAscii( "SYSTEM" ) ) + PushString( OUString( SC_INFO_OSVERSION ) ); + else if( aStr.equalsAscii( "OSVERSION" ) ) + PushString( OUString( "Windows (32-bit) NT 5.01" ) ); + else if( aStr.equalsAscii( "RELEASE" ) ) PushString( ::utl::Bootstrap::getBuildIdData( OUString() ) ); - else if( aStr.EqualsAscii( "NUMFILE" ) ) + else if( aStr.equalsAscii( "NUMFILE" ) ) PushDouble( 1 ); - else if( aStr.EqualsAscii( "RECALC" ) ) + else if( aStr.equalsAscii( "RECALC" ) ) PushString( ScGlobal::GetRscString( pDok->GetAutoCalc() ? STR_RECALC_AUTO : STR_RECALC_MANUAL ) ); else PushIllegalArgument(); diff --git a/sc/source/core/tool/interpr6.cxx b/sc/source/core/tool/interpr6.cxx index 470c8d8ef809..efde90ff9105 100644 --- a/sc/source/core/tool/interpr6.cxx +++ b/sc/source/core/tool/interpr6.cxx @@ -398,7 +398,7 @@ double ScInterpreter::IterateParameters( ScIterFunc eFunc, bool bTextAsZero ) { if( eFunc == ifCOUNT ) { - String aStr( PopString() ); + OUString aStr( PopString() ); sal_uInt32 nFIndex = 0; // damit default Land/Spr. if ( bTextAsZero || pFormatter->IsNumberFormat(aStr, nFIndex, fVal)) nCount++; @@ -884,7 +884,7 @@ void ScInterpreter::ScCount() { case svString: { - String aStr( PopString() ); + OUString aStr( PopString() ); sal_uInt32 nFIndex = 0; // damit default Land/Spr. if (pFormatter->IsNumberFormat(aStr, nFIndex, fVal)) nCount++; diff --git a/sc/source/core/tool/queryparam.cxx b/sc/source/core/tool/queryparam.cxx index b35e1a411731..5ce8f89e3505 100644 --- a/sc/source/core/tool/queryparam.cxx +++ b/sc/source/core/tool/queryparam.cxx @@ -168,8 +168,8 @@ void ScQueryParamBase::Resize(size_t nNew) void ScQueryParamBase::FillInExcelSyntax(const OUString& rStr, SCSIZE nIndex) { - const String aCellStr = rStr; - if (aCellStr.Len() > 0) + const OUString aCellStr = rStr; + if (!aCellStr.isEmpty()) { if ( nIndex >= maEntries.size() ) Resize( nIndex+1 ); @@ -179,41 +179,41 @@ void ScQueryParamBase::FillInExcelSyntax(const OUString& rStr, SCSIZE nIndex) rEntry.bDoQuery = sal_True; // Operatoren herausfiltern - if (aCellStr.GetChar(0) == '<') + if (aCellStr[0] == '<') { - if (aCellStr.GetChar(1) == '>') + if (aCellStr[1] == '>') { - rItem.maString = aCellStr.Copy(2); + rItem.maString = aCellStr.copy(2); rEntry.eOp = SC_NOT_EQUAL; } - else if (aCellStr.GetChar(1) == '=') + else if (aCellStr[1] == '=') { - rItem.maString = aCellStr.Copy(2); + rItem.maString = aCellStr.copy(2); rEntry.eOp = SC_LESS_EQUAL; } else { - rItem.maString = aCellStr.Copy(1); + rItem.maString = aCellStr.copy(1); rEntry.eOp = SC_LESS; } } - else if (aCellStr.GetChar(0) == '>') + else if (aCellStr[0]== '>') { - if (aCellStr.GetChar(1) == '=') + if (aCellStr[1] == '=') { - rItem.maString = aCellStr.Copy(2); + rItem.maString = aCellStr.copy(2); rEntry.eOp = SC_GREATER_EQUAL; } else { - rItem.maString = aCellStr.Copy(1); + rItem.maString = aCellStr.copy(1); rEntry.eOp = SC_GREATER; } } else { - if (aCellStr.GetChar(0) == '=') - rItem.maString = aCellStr.Copy(1); + if (aCellStr[0] == '=') + rItem.maString = aCellStr.copy(1); else rItem.maString = aCellStr; rEntry.eOp = SC_EQUAL; diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx index e1b6e5403525..ee48e0fa36e7 100644 --- a/sc/source/core/tool/rangelst.cxx +++ b/sc/source/core/tool/rangelst.cxx @@ -114,7 +114,7 @@ private: class FormatString : public ::std::unary_function<const ScRange*, void> { public: - FormatString(String& rStr, sal_uInt16 nFlags, ScDocument* pDoc, FormulaGrammar::AddressConvention eConv, sal_Unicode cDelim) : + FormatString(OUString& rStr, sal_uInt16 nFlags, ScDocument* pDoc, FormulaGrammar::AddressConvention eConv, sal_Unicode cDelim) : mrStr(rStr), mnFlags(nFlags), mpDoc(pDoc), @@ -136,11 +136,11 @@ public: if (mbFirst) mbFirst = false; else - mrStr += mcDelim; + mrStr += OUString(mcDelim); mrStr += aStr; } private: - String& mrStr; + OUString& mrStr; sal_uInt16 mnFlags; ScDocument* mpDoc; FormulaGrammar::AddressConvention meConv; @@ -191,7 +191,7 @@ sal_uInt16 ScRangeList::Parse( const OUString& rStr, ScDocument* pDoc, sal_uInt1 nMask |= SCA_VALID; // falls das jemand vergessen sollte sal_uInt16 nResult = (sal_uInt16)~0; // alle Bits setzen ScRange aRange; - String aOne; + OUString aOne; SCTAB nTab = 0; if ( pDoc ) { @@ -232,7 +232,7 @@ void ScRangeList::Format( OUString& rStr, sal_uInt16 nFlags, ScDocument* pDoc, if (!cDelimiter) cDelimiter = ScCompiler::GetNativeSymbolChar(ocSep); - String aStr; + OUString aStr; FormatString func(aStr, nFlags, pDoc, eConv, cDelimiter); for_each(maRanges.begin(), maRanges.end(), func); rStr = aStr; diff --git a/sc/source/core/tool/rangeseq.cxx b/sc/source/core/tool/rangeseq.cxx index 39ef81288224..85ba791452fa 100644 --- a/sc/source/core/tool/rangeseq.cxx +++ b/sc/source/core/tool/rangeseq.cxx @@ -301,7 +301,7 @@ sal_Bool ScRangeToSequence::FillMixedArray( uno::Any& rAny, const ScMatrix* pMat { if ( pMatrix->IsString( nCol, nRow ) ) { - String aStr; + OUString aStr; if ( !pMatrix->IsEmpty( nCol, nRow ) ) aStr = pMatrix->GetString( nCol, nRow ); pColAry[nCol] <<= OUString( aStr ); @@ -406,7 +406,7 @@ ScMatrixRef ScSequenceToMatrix::CreateMixedMatrix( const com::sun::star::uno::An // Try string, else use empty as last resort. if ( pColArr[nCol] >>= aUStr ) - xMatrix->PutString( String( aUStr ), + xMatrix->PutString( aUStr, static_cast<SCSIZE>(nCol), static_cast<SCSIZE>(nRow) ); else diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx index 5761ad67cf5d..1395a63715b5 100644 --- a/sc/source/core/tool/rangeutl.cxx +++ b/sc/source/core/tool/rangeutl.cxx @@ -45,13 +45,13 @@ sal_Bool ScRangeUtil::MakeArea( const OUString& rAreaStr, sal_Bool nSuccess = false; sal_Int32 nPointPos = rAreaStr.indexOf('.'); sal_Int32 nColonPos = rAreaStr.indexOf(':'); - String aStrArea( rAreaStr ); + OUString aStrArea( rAreaStr ); ScRefAddress startPos; ScRefAddress endPos; if ( nColonPos == -1 && nPointPos != -1 ) { - aStrArea += ':'; + aStrArea += ":"; aStrArea += rAreaStr.copy( nPointPos+1 ); // do not include '.' in copy } @@ -68,7 +68,7 @@ sal_Bool ScRangeUtil::MakeArea( const OUString& rAreaStr, void ScRangeUtil::CutPosString( const OUString& theAreaStr, OUString& thePosStr ) const { - String aPosStr; + OUString aPosStr; // BROKEN BROKEN BROKEN // but it is only used in the consolidate dialog. Ignore for now. @@ -107,26 +107,26 @@ sal_Bool ScRangeUtil::IsAbsTabArea( const OUString& rAreaStr, */ sal_Bool bStrOk = false; - String aTempAreaStr(rAreaStr); - String aStartPosStr; - String aEndPosStr; + OUString aTempAreaStr(rAreaStr); + OUString aStartPosStr; + OUString aEndPosStr; - if ( STRING_NOTFOUND == aTempAreaStr.Search(':') ) + if ( -1 == aTempAreaStr.indexOf(':') ) { - aTempAreaStr.Append(':'); - aTempAreaStr.Append(rAreaStr); + aTempAreaStr += ":"; + aTempAreaStr += rAreaStr; } - sal_uInt16 nColonPos = aTempAreaStr.Search(':'); + sal_Int32 nColonPos = aTempAreaStr.indexOf(':'); - if ( STRING_NOTFOUND != nColonPos - && STRING_NOTFOUND != aTempAreaStr.Search('.') ) + if ( -1 != nColonPos + && -1 != aTempAreaStr.indexOf('.') ) { ScRefAddress aStartPos; ScRefAddress aEndPos; - aStartPosStr = aTempAreaStr.Copy( 0, nColonPos ); - aEndPosStr = aTempAreaStr.Copy( nColonPos+1, STRING_LEN ); + aStartPosStr = aTempAreaStr.copy( 0, nColonPos ); + aEndPosStr = aTempAreaStr.copy( nColonPos+1, STRING_LEN ); if ( ConvertSingleRef( pDoc, aStartPosStr, 0, aStartPos, rDetails ) ) { @@ -472,12 +472,12 @@ sal_Bool ScRangeStringConverter::GetRangeFromString( if( nOffset >= 0 ) { sal_Int32 nIndex = IndexOf( sToken, ':', 0, cQuote ); - String aUIString(sToken); + OUString aUIString(sToken); if( nIndex < 0 ) { - if ( aUIString.GetChar(0) == (sal_Unicode) '.' ) - aUIString.Erase( 0, 1 ); + if ( aUIString[0] == '.' ) + aUIString = aUIString.copy( 1 ); bResult = ((rRange.aStart.Parse( aUIString, const_cast<ScDocument*> (pDocument), eConv) & SCA_VALID) == SCA_VALID); ::formula::FormulaGrammar::AddressConvention eConvUI = pDocument->GetAddressConvention(); if (!bResult && eConv != eConvUI) @@ -487,15 +487,15 @@ sal_Bool ScRangeStringConverter::GetRangeFromString( } else { - if ( aUIString.GetChar(0) == (sal_Unicode) '.' ) + if ( aUIString[0] == '.' ) { - aUIString.Erase( 0, 1 ); + aUIString = aUIString.copy( 1 ); --nIndex; } - if ( nIndex < aUIString.Len() - 1 && - aUIString.GetChar((xub_StrLen)nIndex + 1) == (sal_Unicode) '.' ) - aUIString.Erase( (xub_StrLen)nIndex + 1, 1 ); + if ( nIndex < aUIString.getLength() - 1 && + aUIString[ nIndex + 1 ] == '.' ) + aUIString = aUIString.replaceAt( nIndex + 1, 1, "" ); bResult = ((rRange.Parse(aUIString, const_cast<ScDocument*> (pDocument), eConv) & SCA_VALID) == SCA_VALID); @@ -503,17 +503,17 @@ sal_Bool ScRangeStringConverter::GetRangeFromString( // This isn't parsed by ScRange, so try to parse the two Addresses then. if (!bResult) { - bResult = ((rRange.aStart.Parse( aUIString.Copy(0, (xub_StrLen)nIndex), const_cast<ScDocument*>(pDocument), + bResult = ((rRange.aStart.Parse( aUIString.copy(0, (xub_StrLen)nIndex), const_cast<ScDocument*>(pDocument), eConv) & SCA_VALID) == SCA_VALID) && - ((rRange.aEnd.Parse( aUIString.Copy((xub_StrLen)nIndex+1), const_cast<ScDocument*>(pDocument), + ((rRange.aEnd.Parse( aUIString.copy((xub_StrLen)nIndex+1), const_cast<ScDocument*>(pDocument), eConv) & SCA_VALID) == SCA_VALID); ::formula::FormulaGrammar::AddressConvention eConvUI = pDocument->GetAddressConvention(); if (!bResult && eConv != eConvUI) { - bResult = ((rRange.aStart.Parse( aUIString.Copy(0, (xub_StrLen)nIndex), const_cast<ScDocument*>(pDocument), + bResult = ((rRange.aStart.Parse( aUIString.copy(0, (xub_StrLen)nIndex), const_cast<ScDocument*>(pDocument), eConvUI) & SCA_VALID) == SCA_VALID) && - ((rRange.aEnd.Parse( aUIString.Copy((xub_StrLen)nIndex+1), const_cast<ScDocument*>(pDocument), + ((rRange.aEnd.Parse( aUIString.copy((xub_StrLen)nIndex+1), const_cast<ScDocument*>(pDocument), eConvUI) & SCA_VALID) == SCA_VALID); } } diff --git a/sc/source/core/tool/userlist.cxx b/sc/source/core/tool/userlist.cxx index 5d8c7691c9ae..4d5ed081f978 100644 --- a/sc/source/core/tool/userlist.cxx +++ b/sc/source/core/tool/userlist.cxx @@ -69,7 +69,7 @@ void ScUserListData::InitTokens() if (nLen) { OUString aSub(p0, nLen); - String aUpStr = ScGlobal::pCharClass->uppercase(aSub); + OUString aUpStr = ScGlobal::pCharClass->uppercase(aSub); maSubStrings.push_back(new SubStr(aSub, aUpStr)); } bFirst = true; @@ -79,7 +79,7 @@ void ScUserListData::InitTokens() if (nLen) { OUString aSub(p0, nLen); - String aUpStr = ScGlobal::pCharClass->uppercase(aSub); + OUString aUpStr = ScGlobal::pCharClass->uppercase(aSub); maSubStrings.push_back(new SubStr(aSub, aUpStr)); } } @@ -123,7 +123,7 @@ bool ScUserListData::GetSubIndex(const OUString& rSubStr, sal_uInt16& rIndex) co } // When that fails, do a case insensitive search. - String aTmp = ScGlobal::pCharClass->uppercase(rSubStr); + OUString aTmp = ScGlobal::pCharClass->uppercase(rSubStr); OUString aUpStr = aTmp; itr = ::std::find_if( maSubStrings.begin(), maSubStrings.end(), FindByName(aUpStr, true)); |