diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-13 15:03:52 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-14 08:17:29 +0200 |
commit | 15113ea855baab1f8319a7125cec90d203904cb7 (patch) | |
tree | 73d86eab424567cc5faa21dbb69d7937466c65f7 | |
parent | 39c8da8c86decbe3443a786ad445a18b0078daa3 (diff) |
remove unnecessary sal_Unicode casts in SC module
Change-Id: Iee7688ea60b4d45d3e6725afd46e9cbb5ebe26c5
52 files changed, 201 insertions, 203 deletions
diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx index 5ef3adada7a2..ab7643d62e07 100644 --- a/sc/source/core/data/dpcache.cxx +++ b/sc/source/core/data/dpcache.cxx @@ -111,7 +111,7 @@ OUString createLabelString(ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab) // Replace an empty label string with column name. OUStringBuffer aBuf; aBuf.append(ScGlobal::GetRscString(STR_COLUMN)); - aBuf.append(sal_Unicode(' ')); + aBuf.append(' '); ScAddress aColAddr(nCol, 0, 0); aBuf.append(aColAddr.Format(SCA_VALID_COL, NULL)); diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx index 5e1f1c978e09..3c17edcdc7db 100644 --- a/sc/source/core/data/dptabres.cxx +++ b/sc/source/core/data/dptabres.cxx @@ -1328,13 +1328,13 @@ static OUString lcl_parseSubtotalName(const OUString& rSubStr, const OUString& r for (sal_Int32 i = 0; i < n; ++i) { sal_Unicode c = rSubStr[i]; - if (!bEscaped && c == sal_Unicode('\\')) + if (!bEscaped && c == '\\') { bEscaped = true; continue; } - if (!bEscaped && c == sal_Unicode('?')) + if (!bEscaped && c == '?') aNewStr.append(rCaption); else aNewStr.append(c); diff --git a/sc/source/core/data/dputil.cxx b/sc/source/core/data/dputil.cxx index fd15d4e1e888..b2171f1e4643 100644 --- a/sc/source/core/data/dputil.cxx +++ b/sc/source/core/data/dputil.cxx @@ -71,7 +71,7 @@ OUString ScDPUtil::createDuplicateDimensionName(const OUString& rOriginal, size_ OUStringBuffer aBuf(rOriginal); for (size_t i = 0; i < nDupCount; ++i) - aBuf.append(sal_Unicode('*')); + aBuf.append('*'); return aBuf.makeStringAndClear(); } @@ -231,7 +231,7 @@ OUString lcl_GetNumGroupName( { rtl::math::doubleToUStringBuffer( aBuffer, fStartValue, rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max, cDecSep, true ); - aBuffer.append( (sal_Unicode) '-' ); + aBuffer.append( '-' ); rtl::math::doubleToUStringBuffer( aBuffer, fEndValue, rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max, cDecSep, true ); } diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 07f865681f66..c067976a7418 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -807,13 +807,11 @@ void ScFormulaCell::GetFormula( OUStringBuffer& rBuffer, aComp.CreateStringFromTokenArray( rBuffer ); } - sal_Unicode ch('='); - rBuffer.insert( 0, &ch, 1 ); + rBuffer.insert( 0, '='); if( cMatrixFlag ) { - sal_Unicode ch2('{'); - rBuffer.insert( 0, &ch2, 1); - rBuffer.append( sal_Unicode('}')); + rBuffer.insert( 0, '{'); + rBuffer.append( '}'); } } diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx index c8c0b24064f1..66c323485769 100644 --- a/sc/source/core/data/funcdesc.cxx +++ b/sc/source/core/data/funcdesc.cxx @@ -167,11 +167,11 @@ OUString ScFuncDesc::GetParamList() const * parameters. For now parameters are always added, so no special * treatment of a trailing "; " necessary. */ aSig.append(*(ppDefArgNames[nFix])); - aSig.append(sal_Unicode('1')); + aSig.append('1'); aSig.append(sep); - aSig.append(sal_Unicode(' ')); + aSig.append(' '); aSig.append(*(ppDefArgNames[nFix])); - aSig.append(sal_Unicode('2')); + aSig.append('2'); aSig.append(sep); aSig.appendAscii(" ... "); } @@ -189,17 +189,17 @@ OUString ScFuncDesc::GetParamList() const } aSig.append(*(ppDefArgNames[nFix])); - aSig.append(sal_Unicode('1')); + aSig.append('1'); aSig.appendAscii( ", " ); aSig.append(*(ppDefArgNames[nFix+1])); - aSig.append(sal_Unicode('1')); + aSig.append('1'); aSig.append(sep); aSig.appendAscii( " " ); aSig.append(*(ppDefArgNames[nFix])); - aSig.append(sal_Unicode('2')); + aSig.append('2'); aSig.appendAscii( ", " ); aSig.append(*(ppDefArgNames[nFix+1])); - aSig.append(sal_Unicode('2')); + aSig.append('2'); aSig.append(sep); aSig.appendAscii( " ... " ); } @@ -480,7 +480,7 @@ ScFunctionList::ScFunctionList() : pDesc->pFuncName = new OUString(pAddInFuncData->GetInternalName().toAsciiUpperCase()); OUStringBuffer aBuf(aArgDesc); - aBuf.append(sal_Unicode('\n')); + aBuf.append('\n'); aBuf.appendAscii("( AddIn: "); aBuf.append(pAddInFuncData->GetModuleName()); aBuf.appendAscii(" )"); diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx index dfd143dfd803..1cf598c8c081 100644 --- a/sc/source/core/data/postit.cxx +++ b/sc/source/core/data/postit.cxx @@ -585,7 +585,7 @@ OUString ScPostIt::GetText() const for( sal_Int32 nPara = 0, nParaCount = pEditObj->GetParagraphCount(); nPara < nParaCount; ++nPara ) { if( nPara > 0 ) - aBuffer.append( sal_Unicode( '\n' ) ); + aBuffer.append( '\n' ); aBuffer.append( pEditObj->GetText( nPara ) ); } return aBuffer.makeStringAndClear(); diff --git a/sc/source/core/tool/chartarr.cxx b/sc/source/core/tool/chartarr.cxx index 8631823a79b4..a60e361e8fdd 100644 --- a/sc/source/core/tool/chartarr.cxx +++ b/sc/source/core/tool/chartarr.cxx @@ -282,7 +282,7 @@ ScMemChart* ScChartArray::CreateMemChartSingle() { OUStringBuffer aBuf; aBuf.append(ScGlobal::GetRscString(STR_COLUMN)); - aBuf.append(sal_Unicode(' ')); + aBuf.append(' '); ScAddress aPos( aCols[ nCol ], 0, 0 ); aBuf.append(aPos.Format(SCA_VALID_COL, NULL)); @@ -308,7 +308,7 @@ ScMemChart* ScChartArray::CreateMemChartSingle() { OUStringBuffer aBuf; aBuf.append(ScGlobal::GetRscString(STR_ROW)); - aBuf.append(sal_Unicode(' ')); + aBuf.append(' '); aBuf.append(static_cast<sal_Int32>(aRows[nRow]+1)); aString = aBuf.makeStringAndClear(); } @@ -402,7 +402,7 @@ ScMemChart* ScChartArray::CreateMemChartMulti() if (aString.isEmpty()) { OUStringBuffer aBuf(ScGlobal::GetRscString(STR_COLUMN)); - aBuf.append(sal_Unicode(' ')); + aBuf.append(' '); if ( pPos ) nPosCol = pPos->Col() + 1; else @@ -429,7 +429,7 @@ ScMemChart* ScChartArray::CreateMemChartMulti() if (aString.isEmpty()) { OUStringBuffer aBuf(ScGlobal::GetRscString(STR_ROW)); - aBuf.append(sal_Unicode(' ')); + aBuf.append(' '); if ( pPos ) nPosRow = pPos->Row() + 1; else diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx index b5a2e3c38093..901ca52f898f 100644 --- a/sc/source/core/tool/chgtrack.cxx +++ b/sc/source/core/tool/chgtrack.cxx @@ -455,7 +455,7 @@ void ScChangeAction::GetDescription( { aBuf.append( ScGlobal::GetRscString(STR_CHANGED_MOVE_REJECTION_WARNING)); - aBuf.append(sal_Unicode(' ')); + aBuf.append(' '); rStr = aBuf.makeStringAndClear(); return; } @@ -464,7 +464,7 @@ void ScChangeAction::GetDescription( { aBuf.append( ScGlobal::GetRscString(STR_CHANGED_DELETE_REJECTION_WARNING)); - aBuf.append(sal_Unicode(' ')); + aBuf.append(' '); rStr = aBuf.makeStringAndClear(); return; } @@ -480,7 +480,7 @@ void ScChangeAction::GetDescription( { aBuf.append( ScGlobal::GetRscString(STR_CHANGED_MOVE_REJECTION_WARNING)); - aBuf.append(sal_Unicode(' ')); + aBuf.append(' '); rStr = aBuf.makeStringAndClear(); return; } @@ -489,7 +489,7 @@ void ScChangeAction::GetDescription( { aBuf.append( ScGlobal::GetRscString(STR_CHANGED_DELETE_REJECTION_WARNING)); - aBuf.append(sal_Unicode(' ')); + aBuf.append(' '); rStr = aBuf.makeStringAndClear(); return; } @@ -516,10 +516,10 @@ OUString ScChangeAction::GetRefString( OUString aTmp; pDoc->GetName( aTmpRange.aStart.Tab(), aTmp ); aBuf.append(aTmp); - aBuf.append(sal_Unicode('.')); + aBuf.append('.'); } aBuf.append(ScColToAlpha(aTmpRange.aStart.Col())); - aBuf.append(sal_Unicode(':')); + aBuf.append(':'); aBuf.append(ScColToAlpha(aTmpRange.aEnd.Col())); break; case SC_CAT_INSERT_ROWS : @@ -529,10 +529,10 @@ OUString ScChangeAction::GetRefString( OUString aTmp; pDoc->GetName( aTmpRange.aStart.Tab(), aTmp ); aBuf.append(aTmp); - aBuf.append(sal_Unicode('.')); + aBuf.append('.'); } aBuf.append(static_cast<sal_Int32>(aTmpRange.aStart.Row()+1)); - aBuf.append(sal_Unicode(':')); + aBuf.append(':'); aBuf.append(static_cast<sal_Int32>(aTmpRange.aEnd.Row()+1)); break; default: @@ -545,8 +545,8 @@ OUString ScChangeAction::GetRefString( } if ( (bFlag3D && IsDeleteType()) || IsDeletedIn() ) { - aBuf.insert(0, sal_Unicode('(')); - aBuf.append(sal_Unicode(')')); + aBuf.insert(0, '('); + aBuf.append(')'); } } return aBuf.makeStringAndClear(); @@ -724,7 +724,7 @@ void ScChangeActionIns::GetDescription( { // Construct a range string to replace '#1' first. OUStringBuffer aBuf(ScGlobal::GetRscString(nWhatId)); - aBuf.append(sal_Unicode(' ')); + aBuf.append(' '); aBuf.append(GetRefString(GetBigRange(), pDoc)); OUString aRangeStr = aBuf.makeStringAndClear(); @@ -972,7 +972,7 @@ void ScChangeActionDel::GetDescription( // Build a string to replace with. OUStringBuffer aBuf; aBuf.append(ScGlobal::GetRscString(nWhatId)); - aBuf.append(sal_Unicode(' ')); + aBuf.append(' '); aBuf.append(GetRefString(aTmpRange, pDoc)); OUString aRangeStr = aBuf.makeStringAndClear(); aRsc = aRsc.replaceAt(nPos, 2, aRangeStr); // replace '#1' with the string. @@ -1532,9 +1532,9 @@ void ScChangeActionContent::GetRefString( { // Insert the parentheses. OUStringBuffer aBuf; - aBuf.append(sal_Unicode('(')); + aBuf.append('('); aBuf.append(rStr); - aBuf.append(sal_Unicode(')')); + aBuf.append(')'); rStr = aBuf.makeStringAndClear(); } } @@ -2151,7 +2151,7 @@ void ScChangeTrack::Init() const SvtUserOptions& rUserOpt = SC_MOD()->GetUserOptions(); OUStringBuffer aBuf; aBuf.append(rUserOpt.GetFirstName()); - aBuf.append(sal_Unicode(' ')); + aBuf.append(' '); aBuf.append(rUserOpt.GetLastName()); maUser = aBuf.makeStringAndClear(); maUserCollection.insert(maUser); @@ -2230,7 +2230,7 @@ void ScChangeTrack::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uI OUStringBuffer aBuf; aBuf.append(rUserOptions.GetFirstName()); - aBuf.append(sal_Unicode(' ')); + aBuf.append(' '); aBuf.append(rUserOptions.GetLastName()); SetUser(aBuf.makeStringAndClear()); diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index bcff41e05661..ebc31967177c 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -637,7 +637,7 @@ static OUString lcl_makeExternalNameStr(const OUString& rFile, const OUString& r aName = aName.replaceAll("'", aEscQuote); OUStringBuffer aBuf(aFile.getLength() + aName.getLength() + 9); if (bODF) - aBuf.append( sal_Unicode( '[')); + aBuf.append( '['); aBuf.append( "'" + aFile + "'" + OUString(cSep)); if (bODF) aBuf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "$$'")); @@ -762,9 +762,9 @@ struct ConventionOOO_A1 : public Convention_A1 if (!ValidTab(rAbsRef.Tab()) || rRef.IsTabDeleted()) { if (!rRef.IsTabRel()) - rBuffer.append(sal_Unicode('$')); + rBuffer.append('$'); rBuffer.append( rComp.GetCurrentOpCodeMap()->getSymbol( ocErrRef)); - rBuffer.append(sal_Unicode('.')); + rBuffer.append('.'); } else { @@ -772,20 +772,20 @@ struct ConventionOOO_A1 : public Convention_A1 OUString aRefStr(MakeTabStr(rComp, rAbsRef.Tab(), aDoc)); rBuffer.append(aDoc); if (!rRef.IsTabRel()) - rBuffer.append(sal_Unicode('$')); + rBuffer.append('$'); rBuffer.append(aRefStr); } } else if (bODF) - rBuffer.append(sal_Unicode('.')); + rBuffer.append('.'); if (!rRef.IsColRel()) - rBuffer.append(sal_Unicode('$')); + rBuffer.append('$'); if (!ValidCol(rAbsRef.Col())) rBuffer.append( rComp.GetCurrentOpCodeMap()->getSymbol( ocErrRef)); else MakeColStr(rBuffer, rAbsRef.Col()); if (!rRef.IsRowRel()) - rBuffer.append(sal_Unicode('$')); + rBuffer.append('$'); if (!ValidRow(rAbsRef.Row())) rBuffer.append( rComp.GetCurrentOpCodeMap()->getSymbol( ocErrRef)); else @@ -799,7 +799,7 @@ struct ConventionOOO_A1 : public Convention_A1 bool bODF ) const { if (bODF) - rBuffer.append(sal_Unicode('[')); + rBuffer.append('['); ScComplexRefData aRef( rRef ); // In case absolute/relative positions weren't separately available: // transform relative to absolute! @@ -819,12 +819,12 @@ struct ConventionOOO_A1 : public Convention_A1 MakeOneRefStrImpl(rBuffer, rComp, aRef.Ref1, aAbs1, false, bODF); if (!bSingleRef) { - rBuffer.append(sal_Unicode(':')); + rBuffer.append(':'); MakeOneRefStrImpl(rBuffer, rComp, aRef.Ref2, aAbs2, aAbs1.Tab() != aAbs2.Tab(), bODF); } } if (bODF) - rBuffer.append(sal_Unicode(']')); + rBuffer.append(']'); } void MakeRefStr( OUStringBuffer& rBuffer, @@ -853,12 +853,12 @@ struct ConventionOOO_A1 : public Convention_A1 const ::com::sun::star::uno::Sequence< const ::com::sun::star::sheet::ExternalLinkInfo > * pExternalLinks ) const { - return lcl_parseExternalName(rSymbol, rFile, rName, sal_Unicode('#'), pDoc, pExternalLinks); + return lcl_parseExternalName(rSymbol, rFile, rName, '#', pDoc, pExternalLinks); } virtual OUString makeExternalNameStr( const OUString& rFile, const OUString& rName ) const { - return lcl_makeExternalNameStr( rFile, rName, sal_Unicode('#'), false); + return lcl_makeExternalNameStr( rFile, rName, '#', false); } bool makeExternalSingleRefStr( @@ -882,17 +882,17 @@ struct ConventionOOO_A1 : public Convention_A1 rBuffer.append("'" + aFile.replaceAll("'", "''") + "'#"); if (!rRef.IsTabRel()) - rBuffer.append(sal_Unicode('$')); + rBuffer.append('$'); ScRangeStringConverter::AppendTableName(rBuffer, rTabName); - rBuffer.append(sal_Unicode('.')); + rBuffer.append('.'); } if (!rRef.IsColRel()) - rBuffer.append(sal_Unicode('$')); + rBuffer.append('$'); MakeColStr( rBuffer, aAbsRef.Col()); if (!rRef.IsRowRel()) - rBuffer.append(sal_Unicode('$')); + rBuffer.append('$'); MakeRowStr( rBuffer, aAbsRef.Row()); return true; @@ -903,7 +903,7 @@ struct ConventionOOO_A1 : public Convention_A1 ScExternalRefManager* pRefMgr, bool bODF ) const { if (bODF) - rBuffer.append( sal_Unicode('[')); + rBuffer.append( '['); bool bEncodeUrl = true; switch (rCompiler.GetEncodeUrlMode()) @@ -922,7 +922,7 @@ struct ConventionOOO_A1 : public Convention_A1 } makeExternalSingleRefStr(rBuffer, nFileId, rTabName, rRef, rCompiler.GetPos(), pRefMgr, true, bEncodeUrl); if (bODF) - rBuffer.append( sal_Unicode(']')); + rBuffer.append( ']'); } virtual void makeExternalRefStr( OUStringBuffer& rBuffer, const ScCompiler& rCompiler, @@ -939,7 +939,7 @@ struct ConventionOOO_A1 : public Convention_A1 ScRange aAbsRange = rRef.toAbs(rCompiler.GetPos()); if (bODF) - rBuffer.append( sal_Unicode('[')); + rBuffer.append( '['); // Ensure that there's always a closing bracket, no premature returns. bool bEncodeUrl = true; switch (rCompiler.GetEncodeUrlMode()) @@ -962,7 +962,7 @@ struct ConventionOOO_A1 : public Convention_A1 if (!makeExternalSingleRefStr(rBuffer, nFileId, rTabName, rRef.Ref1, rCompiler.GetPos(), pRefMgr, true, bEncodeUrl)) break; - rBuffer.append(sal_Unicode(':')); + rBuffer.append(':'); OUString aLastTabName; bool bDisplayTabName = (aAbsRange.aStart.Tab() != aAbsRange.aEnd.Tab()); @@ -983,12 +983,12 @@ struct ConventionOOO_A1 : public Convention_A1 } } else if (bODF) - rBuffer.append( sal_Unicode('.')); // need at least the sheet separator in ODF + rBuffer.append( '.'); // need at least the sheet separator in ODF makeExternalSingleRefStr( rBuffer, nFileId, aLastTabName, rRef.Ref2, rCompiler.GetPos(), pRefMgr, bDisplayTabName, bEncodeUrl); } while (0); if (bODF) - rBuffer.append( sal_Unicode(']')); + rBuffer.append( ']'); } virtual void makeExternalRefStr( OUStringBuffer& rBuffer, const ScCompiler& rCompiler, @@ -1015,7 +1015,7 @@ struct ConventionOOO_A1_ODF : public ConventionOOO_A1 virtual OUString makeExternalNameStr( const OUString& rFile, const OUString& rName ) const { - return lcl_makeExternalNameStr( rFile, rName, sal_Unicode('#'), true); + return lcl_makeExternalNameStr( rFile, rName, '#', true); } virtual void makeExternalRefStr( OUStringBuffer& rBuffer, const ScCompiler& rCompiler, @@ -1100,19 +1100,19 @@ struct ConventionXL if( !bEndHasDoc ) return; - rBuf.append( sal_Unicode( '[' ) ); + rBuf.append( '[' ); rBuf.append( aStartDocName ); - rBuf.append( sal_Unicode( ']' ) ); + rBuf.append( ']' ); } rBuf.append( aStartTabName ); if( !bSingleRef && rRef.Ref2.IsFlag3D() && aStartTabName != aEndTabName ) { - rBuf.append( sal_Unicode( ':' ) ); + rBuf.append( ':' ); rBuf.append( aEndTabName ); } - rBuf.append( sal_Unicode( '!' ) ); + rBuf.append( '!' ); } } @@ -1133,12 +1133,12 @@ struct ConventionXL const ::com::sun::star::uno::Sequence< const ::com::sun::star::sheet::ExternalLinkInfo > * pExternalLinks ) { - return lcl_parseExternalName( rSymbol, rFile, rName, sal_Unicode('!'), pDoc, pExternalLinks); + return lcl_parseExternalName( rSymbol, rFile, rName, '!', pDoc, pExternalLinks); } static OUString makeExternalNameStr( const OUString& rFile, const OUString& rName ) { - return lcl_makeExternalNameStr( rFile, rName, sal_Unicode('!'), false); + return lcl_makeExternalNameStr( rFile, rName, '!', false); } static void makeExternalDocStr( OUStringBuffer& rBuffer, const OUString& rFullName, bool bEncodeUrl ) @@ -1150,8 +1150,8 @@ struct ConventionXL // // ['file:///path/to/source/filename.xls'] - rBuffer.append(sal_Unicode('[')); - rBuffer.append(sal_Unicode('\'')); + rBuffer.append('['); + rBuffer.append('\''); OUString aFullName; if (bEncodeUrl) aFullName = rFullName; @@ -1163,12 +1163,12 @@ struct ConventionXL for (sal_Int32 i = 0; i < nLen; ++i) { const sal_Unicode c = pBuf[i]; - if (c == sal_Unicode('\'')) + if (c == '\'') rBuffer.append(c); rBuffer.append(c); } - rBuffer.append(sal_Unicode('\'')); - rBuffer.append(sal_Unicode(']')); + rBuffer.append('\''); + rBuffer.append(']'); } static void makeExternalTabNameRange( OUStringBuffer& rBuf, const OUString& rTabName, @@ -1185,7 +1185,7 @@ struct ConventionXL ScRangeStringConverter::AppendTableName(rBuf, rTabName); if (rTabName != aLastTabName) { - rBuf.append(sal_Unicode(':')); + rBuf.append(':'); ScRangeStringConverter::AppendTableName(rBuf, rTabName); } } @@ -1252,10 +1252,10 @@ struct ConventionXL_A1 : public Convention_A1, public ConventionXL void makeSingleCellStr( OUStringBuffer& rBuf, const ScSingleRefData& rRef, const ScAddress& rAbs ) const { if (!rRef.IsColRel()) - rBuf.append(sal_Unicode('$')); + rBuf.append('$'); MakeColStr(rBuf, rAbs.Col()); if (!rRef.IsRowRel()) - rBuf.append(sal_Unicode('$')); + rBuf.append('$'); MakeRowStr(rBuf, rAbs.Row()); } @@ -1290,11 +1290,11 @@ struct ConventionXL_A1 : public Convention_A1, public ConventionXL if (aAbs1.Col() == 0 && aAbs2.Col() >= MAXCOL) { if (!aRef.Ref1.IsRowRel()) - rBuf.append(sal_Unicode( '$' )); + rBuf.append( '$' ); MakeRowStr(rBuf, aAbs1.Row()); - rBuf.append(sal_Unicode( ':' )); + rBuf.append( ':' ); if (!aRef.Ref2.IsRowRel()) - rBuf.append(sal_Unicode( '$' )); + rBuf.append( '$' ); MakeRowStr(rBuf, aAbs2.Row()); return; } @@ -1302,11 +1302,11 @@ struct ConventionXL_A1 : public Convention_A1, public ConventionXL if (aAbs1.Row() == 0 && aAbs2.Row() >= MAXROW) { if (!aRef.Ref1.IsColRel()) - rBuf.append(sal_Unicode( '$' )); + rBuf.append( '$' ); MakeColStr(rBuf, aAbs1.Col()); - rBuf.append(sal_Unicode( ':' )); + rBuf.append( ':' ); if (!aRef.Ref2.IsColRel()) - rBuf.append(sal_Unicode( '$' )); + rBuf.append( '$' ); MakeColStr(rBuf, aAbs2.Col()); return; } @@ -1315,7 +1315,7 @@ struct ConventionXL_A1 : public Convention_A1, public ConventionXL makeSingleCellStr(rBuf, aRef.Ref1, aAbs1); if (!bSingleRef) { - rBuf.append(sal_Unicode( ':' )); + rBuf.append( ':' ); makeSingleCellStr(rBuf, aRef.Ref2, aAbs2); } } @@ -1372,7 +1372,7 @@ struct ConventionXL_A1 : public Convention_A1, public ConventionXL ConventionXL::makeExternalDocStr( rBuffer, *pFullName, rCompiler.GetEncodeUrlMode() == ScCompiler::ENCODE_ALWAYS); ScRangeStringConverter::AppendTableName(rBuffer, rTabName); - rBuffer.append(sal_Unicode('!')); + rBuffer.append('!'); makeSingleCellStr(rBuffer, rRef, rRef.toAbs(rCompiler.GetPos())); } @@ -1395,12 +1395,12 @@ struct ConventionXL_A1 : public Convention_A1, public ConventionXL ConventionXL::makeExternalDocStr( rBuffer, *pFullName, rCompiler.GetEncodeUrlMode() == ScCompiler::ENCODE_ALWAYS); ConventionXL::makeExternalTabNameRange(rBuffer, rTabName, aTabNames, aAbsRef); - rBuffer.append(sal_Unicode('!')); + rBuffer.append('!'); makeSingleCellStr(rBuffer, rRef.Ref1, aAbsRef.aStart); if (aAbsRef.aStart != aAbsRef.aEnd) { - rBuffer.append(sal_Unicode(':')); + rBuffer.append(':'); makeSingleCellStr(rBuffer, rRef.Ref2, aAbsRef.aEnd); } } @@ -1420,7 +1420,7 @@ const ScCompiler::Convention * const ScCompiler::pConvXL_OOX = &ConvXL_OOX; static void r1c1_add_col( OUStringBuffer &rBuf, const ScSingleRefData& rRef, const ScAddress& rAbsRef ) { - rBuf.append( sal_Unicode( 'C' ) ); + rBuf.append( 'C' ); if( rRef.IsColRel() ) { SCCOL nCol = rRef.Col(); @@ -1433,7 +1433,7 @@ r1c1_add_col( OUStringBuffer &rBuf, const ScSingleRefData& rRef, const ScAddress static void r1c1_add_row( OUStringBuffer &rBuf, const ScSingleRefData& rRef, const ScAddress& rAbsRef ) { - rBuf.append( sal_Unicode( 'R' ) ); + rBuf.append( 'R' ); if( rRef.IsRowRel() ) { if (rRef.Row() != 0) @@ -1480,7 +1480,7 @@ struct ConventionXL_R1C1 : public ScCompiler::Convention, public ConventionXL if (aAbsRef.aStart.Row() != aAbsRef.aEnd.Row() || rRef.Ref1.IsRowRel() != rRef.Ref2.IsRowRel() ) { - rBuf.append (sal_Unicode ( ':' ) ); + rBuf.append( ':' ); r1c1_add_row(rBuf, rRef.Ref2, aAbsRef.aEnd); } return; @@ -1493,7 +1493,7 @@ struct ConventionXL_R1C1 : public ScCompiler::Convention, public ConventionXL if (aAbsRef.aStart.Col() != aAbsRef.aEnd.Col() || rRef.Ref1.IsColRel() != rRef.Ref2.IsColRel()) { - rBuf.append (sal_Unicode ( ':' ) ); + rBuf.append( ':' ); r1c1_add_col(rBuf, rRef.Ref2, aAbsRef.aEnd); } return; @@ -1504,7 +1504,7 @@ struct ConventionXL_R1C1 : public ScCompiler::Convention, public ConventionXL r1c1_add_col(rBuf, rRef.Ref1, aAbsRef.aStart); if (!bSingleRef) { - rBuf.append (sal_Unicode ( ':' ) ); + rBuf.append( ':' ); r1c1_add_row(rBuf, rRef.Ref2, aAbsRef.aEnd); r1c1_add_col(rBuf, rRef.Ref2, aAbsRef.aEnd); } @@ -1567,7 +1567,7 @@ struct ConventionXL_R1C1 : public ScCompiler::Convention, public ConventionXL ConventionXL::makeExternalDocStr( rBuffer, *pFullName, rCompiler.GetEncodeUrlMode() == ScCompiler::ENCODE_ALWAYS); ScRangeStringConverter::AppendTableName(rBuffer, rTabName); - rBuffer.append(sal_Unicode('!')); + rBuffer.append('!'); r1c1_add_row(rBuffer, rRef, aAbsRef); r1c1_add_col(rBuffer, rRef, aAbsRef); @@ -1591,7 +1591,7 @@ struct ConventionXL_R1C1 : public ScCompiler::Convention, public ConventionXL ConventionXL::makeExternalDocStr( rBuffer, *pFullName, rCompiler.GetEncodeUrlMode() == ScCompiler::ENCODE_ALWAYS); ConventionXL::makeExternalTabNameRange(rBuffer, rTabName, aTabNames, aAbsRef); - rBuffer.append(sal_Unicode('!')); + rBuffer.append('!'); if (!ValidCol(aAbsRef.aEnd.Col()) || !ValidRow(aAbsRef.aEnd.Row())) { @@ -1604,7 +1604,7 @@ struct ConventionXL_R1C1 : public ScCompiler::Convention, public ConventionXL r1c1_add_row(rBuffer, rRef.Ref1, aAbsRef.aStart); if (aAbsRef.aStart.Row() != aAbsRef.aEnd.Row() || rRef.Ref1.IsRowRel() != rRef.Ref2.IsRowRel()) { - rBuffer.append (sal_Unicode(':')); + rBuffer.append(':'); r1c1_add_row(rBuffer, rRef.Ref2, aAbsRef.aEnd); } return; @@ -1615,7 +1615,7 @@ struct ConventionXL_R1C1 : public ScCompiler::Convention, public ConventionXL r1c1_add_col(rBuffer, rRef.Ref1, aAbsRef.aStart); if (aAbsRef.aStart.Col() != aAbsRef.aEnd.Col() || rRef.Ref1.IsColRel() != rRef.Ref2.IsColRel()) { - rBuffer.append (sal_Unicode(':')); + rBuffer.append(':'); r1c1_add_col(rBuffer, rRef.Ref2, aAbsRef.aEnd); } return; @@ -1623,7 +1623,7 @@ struct ConventionXL_R1C1 : public ScCompiler::Convention, public ConventionXL r1c1_add_row(rBuffer, rRef.Ref1, aAbsRef.aStart); r1c1_add_col(rBuffer, rRef.Ref1, aAbsRef.aStart); - rBuffer.append (sal_Unicode (':')); + rBuffer.append(':'); r1c1_add_row(rBuffer, rRef.Ref2, aAbsRef.aEnd); r1c1_add_col(rBuffer, rRef.Ref2, aAbsRef.aEnd); } @@ -1696,7 +1696,7 @@ void ScCompiler::CheckTabQuotes( OUString& rString, case FormulaGrammar::CONV_XL_OOX : if( bNeedsQuote ) { - const OUString one_quote(static_cast<sal_Unicode>('\'')); + const OUString one_quote('\''); const OUString two_quote("''"); // escape embedded quotes rString = rString.replaceAll( one_quote, two_quote ); diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx index 86015fa2a62b..97e24b047d67 100644 --- a/sc/source/core/tool/dbdata.cxx +++ b/sc/source/core/tool/dbdata.cxx @@ -212,7 +212,7 @@ OUString ScDBData::GetSourceString() const if (mpImportParam->bImport) { aBuf.append(mpImportParam->aDBName); - aBuf.append(sal_Unicode('/')); + aBuf.append('/'); aBuf.append(mpImportParam->aStatement); } return aBuf.makeStringAndClear(); diff --git a/sc/source/core/tool/doubleref.cxx b/sc/source/core/tool/doubleref.cxx index 0c1d5e6b4b6c..ce6d45cad0be 100644 --- a/sc/source/core/tool/doubleref.cxx +++ b/sc/source/core/tool/doubleref.cxx @@ -107,23 +107,23 @@ bool lcl_createStarQuery( aCellStr = pQueryRef->getString(2, nRow); lcl_uppercase(aCellStr); const sal_Unicode* p = aCellStr.getStr(); - if (p[0] == sal_Unicode('<')) + if (p[0] == '<') { - if (p[1] == sal_Unicode('>')) + if (p[1] == '>') rEntry.eOp = SC_NOT_EQUAL; - else if (p[1] == sal_Unicode('=')) + else if (p[1] == '=') rEntry.eOp = SC_LESS_EQUAL; else rEntry.eOp = SC_LESS; } - else if (p[0] == sal_Unicode('>')) + else if (p[0] == '>') { - if (p[1] == sal_Unicode('=')) + if (p[1] == '=') rEntry.eOp = SC_GREATER_EQUAL; else rEntry.eOp = SC_GREATER; } - else if (p[0] == sal_Unicode('=')) + else if (p[0] == '=') rEntry.eOp = SC_EQUAL; } diff --git a/sc/source/core/tool/formulaopt.cxx b/sc/source/core/tool/formulaopt.cxx index 79d84a63bcb2..e6cc71fc26b5 100644 --- a/sc/source/core/tool/formulaopt.cxx +++ b/sc/source/core/tool/formulaopt.cxx @@ -93,25 +93,25 @@ void ScFormulaOptions::GetDefaultFormulaSeparators( // separator, which in English locales is a comma. However, OOo's list // separator value is set to ';' for all English locales. Because of this // discrepancy, we will hardcode the separator value here, for now. - if (cDecSep == sal_Unicode('.')) - cListSep = sal_Unicode(','); + if (cDecSep == '.') + cListSep = ','; // Special case for de_CH locale. if (rLocale.Language.equalsAsciiL("de", 2) && rLocale.Country.equalsAsciiL("CH", 2)) - cListSep = sal_Unicode(';'); + cListSep = ';'; // by default, the parameter separator equals the locale-specific // list separator. rSepArg = OUString(cListSep); - if (cDecSep == cListSep && cDecSep != sal_Unicode(';')) + if (cDecSep == cListSep && cDecSep != ';') // if the decimal and list separators are equal, set the // parameter separator to be ';', unless they are both // semicolon in which case don't change the decimal separator. rSepArg = ";"; rSepArrayCol = ","; - if (cDecSep == sal_Unicode(',')) + if (cDecSep == ',') rSepArrayCol = "."; rSepArrayRow = ";"; } diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index cda08eb429b8..9bd56805d277 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -2230,7 +2230,7 @@ void ScInterpreter::ScCell() if( pShell && pShell->GetMedium() ) { OUStringBuffer aBuf; - aBuf.append(sal_Unicode('\'')); + aBuf.append('\''); const INetURLObject& rURLObj = pShell->GetMedium()->GetURLObject(); aBuf.append(rURLObj.GetMainURL(INetURLObject::DECODE_UNAMBIGUOUS)); aBuf.appendAscii("'#$"); @@ -2251,7 +2251,7 @@ void ScInterpreter::ScCell() ScAddress( static_cast<SCCOL>(aCellPos.Tab()), 0, 0 ).Format( (SCA_COL_ABSOLUTE|SCA_VALID_COL), NULL, pDok->GetAddressConvention() ); aFuncResult.append(aCellStr); - aFuncResult.append(sal_Unicode(':')); + aFuncResult.append(':'); aCellStr = aCellPos.Format((SCA_COL_ABSOLUTE|SCA_VALID_COL|SCA_ROW_ABSOLUTE|SCA_VALID_ROW), NULL, pDok->GetAddressConvention()); aFuncResult.append(aCellStr); @@ -2420,7 +2420,7 @@ void ScInterpreter::ScCellExternal() } OUStringBuffer aBuf; - aBuf.append(sal_Unicode('\'')); + aBuf.append('\''); aBuf.append(*p); aBuf.appendAscii("'#$"); aBuf.append(aTabName); diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx index e5a8acbf9525..9e2ce6b947ba 100644 --- a/sc/source/core/tool/rangeutl.cxx +++ b/sc/source/core/tool/rangeutl.cxx @@ -771,10 +771,10 @@ static void lcl_appendCellAddress( rBuf.append(cQuote); rBuf.append(*pFilePath); rBuf.append(cQuote); - rBuf.append(sal_Unicode('#')); - rBuf.append(sal_Unicode('$')); + rBuf.append('#'); + rBuf.append('$'); ScRangeStringConverter::AppendTableName(rBuf, rExtInfo.maTabName); - rBuf.append(sal_Unicode('.')); + rBuf.append('.'); OUString aAddr(rCell.Format(SCA_ABS, NULL, pDoc->GetAddressConvention())); rBuf.append(aAddr); @@ -804,10 +804,10 @@ static void lcl_appendCellRangeAddress( rBuf.append(cQuote); rBuf.append(*pFilePath); rBuf.append(cQuote); - rBuf.append(sal_Unicode('#')); - rBuf.append(sal_Unicode('$')); + rBuf.append('#'); + rBuf.append('$'); ScRangeStringConverter::AppendTableName(rBuf, rExtInfo1.maTabName); - rBuf.append(sal_Unicode('.')); + rBuf.append('.'); OUString aAddr(rCell1.Format(SCA_ABS, NULL, pDoc->GetAddressConvention())); rBuf.append(aAddr); @@ -816,9 +816,9 @@ static void lcl_appendCellRangeAddress( if (rExtInfo1.maTabName != rExtInfo2.maTabName) { - rBuf.append(sal_Unicode('$')); + rBuf.append('$'); ScRangeStringConverter::AppendTableName(rBuf, rExtInfo2.maTabName); - rBuf.append(sal_Unicode('.')); + rBuf.append('.'); } aAddr = rCell2.Format(SCA_ABS, NULL, pDoc->GetAddressConvention()); @@ -867,7 +867,7 @@ void ScRangeStringConverter::GetStringFromXMLRangeString( OUString& rString, con if (nEndCellDotPos <= 0) { // initialize buffer with table name... - sal_Int32 nDotPos = IndexOf(aBeginCell, sal_Unicode('.'), 0, cQuote); + sal_Int32 nDotPos = IndexOf(aBeginCell, '.', 0, cQuote); OUStringBuffer aBuf = aBeginCell.copy(0, nDotPos); if (nEndCellDotPos == 0) @@ -879,7 +879,7 @@ void ScRangeStringConverter::GetStringFromXMLRangeString( OUString& rString, con else if (nEndCellDotPos < 0) { // sheet name in the end cell is omitted (e.g. Sheet2.A1:B2). - aBuf.append(sal_Unicode('.')); + aBuf.append('.'); aBuf.append(aEndCell); } aEndCell = aBuf.makeStringAndClear(); diff --git a/sc/source/core/tool/stringutil.cxx b/sc/source/core/tool/stringutil.cxx index 2a65642a990f..e711bcba40d4 100644 --- a/sc/source/core/tool/stringutil.cxx +++ b/sc/source/core/tool/stringutil.cxx @@ -99,7 +99,7 @@ bool ScStringUtil::parseSimpleNumber( // ascii space to unicode space if that is group separator c = 0x00A0; - if (sal_Unicode('0') <= c && c <= sal_Unicode('9')) + if ('0' <= c && c <= '9') { // this is a digit. aBuf.append(c); @@ -146,7 +146,7 @@ bool ScStringUtil::parseSimpleNumber( nPosGSep = i; nDigitCount = 0; } - else if (c == sal_Unicode('-') || c == sal_Unicode('+')) + else if (c == '-' || c == '+') { // A sign must be the first character if it's given, or immediately // follow the exponent character if present. @@ -155,7 +155,7 @@ bool ScStringUtil::parseSimpleNumber( else return false; } - else if (c == sal_Unicode('E') || c == sal_Unicode('e')) + else if (c == 'E' || c == 'e') { // this is an exponent designator. diff --git a/sc/source/filter/dif/difexp.cxx b/sc/source/filter/dif/difexp.cxx index de90f1d1926c..f34750e01f4f 100644 --- a/sc/source/filter/dif/difexp.cxx +++ b/sc/source/filter/dif/difexp.cxx @@ -124,7 +124,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc aOS.append(pKeyVECTORS); aOS.appendAscii("\n0,"); aOS.append(static_cast<sal_Int32>(nNumCols)); - aOS.append(sal_Unicode('\n')); + aOS.append('\n'); aOS.appendAscii(p2DoubleQuotes_LF); rOut.WriteUnicodeOrByteText(aOS.makeStringAndClear()); @@ -132,7 +132,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc aOS.append(pKeyTUPLES); aOS.appendAscii("\n0,"); aOS.append(static_cast<sal_Int32>(nNumRows)); - aOS.append(sal_Unicode('\n')); + aOS.append('\n'); aOS.appendAscii(p2DoubleQuotes_LF); rOut.WriteUnicodeOrByteText(aOS.makeStringAndClear()); @@ -152,7 +152,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc OSL_ASSERT(aOS.getLength() == 0); aOS.appendAscii(pSpecDataType_LF); aOS.append(pKeyBOT); - aOS.append(sal_Unicode('\n')); + aOS.append('\n'); rOut.WriteUnicodeOrByteText(aOS.makeStringAndClear()); for( nColCnt = rRange.aStart.Col() ; nColCnt <= nEndCol ; nColCnt++ ) { @@ -287,7 +287,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc OSL_ASSERT(aOS.getLength() == 0); aOS.appendAscii(pSpecDataType_LF); aOS.append(pKeyEOD); - aOS.append(sal_Unicode('\n')); + aOS.append('\n'); rOut.WriteUnicodeOrByteText(aOS.makeStringAndClear()); // restore original value diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx index fd2fad955cab..c64006a67642 100644 --- a/sc/source/filter/excel/xehelper.cxx +++ b/sc/source/filter/excel/xehelper.cxx @@ -898,7 +898,7 @@ OUString lclEncodeDosUrl( if ( aOldUrl.getLength() > 2 && aOldUrl.copy(0,2) == "\\\\" ) { // UNC - aBuf.append(EXC_URL_DOSDRIVE).append(sal_Unicode('@')); + aBuf.append(EXC_URL_DOSDRIVE).append('@'); aOldUrl = aOldUrl.copy(2); } else if ( aOldUrl.getLength() > 2 && aOldUrl.copy(1,2) == ":\\" ) @@ -930,7 +930,7 @@ OUString lclEncodeDosUrl( // file name if (pTableName) // enclose file name in brackets if table name follows - aBuf.append(sal_Unicode('[')).append(aOldUrl).append(sal_Unicode(']')); + aBuf.append('[').append(aOldUrl).append(']'); else aBuf.append(aOldUrl); } diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx index 5a8a2fed0234..f29cc2479631 100644 --- a/sc/source/filter/excel/xepivot.cxx +++ b/sc/source/filter/excel/xepivot.cxx @@ -1052,7 +1052,7 @@ static OUString lcl_convertCalcSubtotalName(const OUString& rName) for (sal_Int32 i = 0; i < n; ++i) { const sal_Unicode c = p[i]; - if (!bEscaped && c == sal_Unicode('\\')) + if (!bEscaped && c == '\\') { bEscaped = true; continue; diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx index 39557bda18cd..09a9c5c474a3 100644 --- a/sc/source/filter/excel/xicontent.cxx +++ b/sc/source/filter/excel/xicontent.cxx @@ -360,7 +360,7 @@ void XclImpHyperlink::ConvertToValidTabName(OUString& rUrl) sal_Unicode c = rUrl[i]; if (c == '\'') { - if (bInQuote && i+1 < n && rUrl[i+1] == sal_Unicode('\'')) + if (bInQuote && i+1 < n && rUrl[i+1] == '\'') { // Two consecutive single quotes ('') signify a single literal // quite. When this occurs, the whole table name needs to be diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx index 30af343dc070..3309449ef9e4 100644 --- a/sc/source/filter/excel/xipivot.cxx +++ b/sc/source/filter/excel/xipivot.cxx @@ -1061,7 +1061,7 @@ static OUString lcl_convertExcelSubtotalName(const OUString& rName) for (sal_Int32 i = 0; i < n; ++i) { const sal_Unicode c = p[i]; - if (c == sal_Unicode('\\')) + if (c == '\\') { aBuf.append(c); aBuf.append(c); diff --git a/sc/source/filter/excel/xltools.cxx b/sc/source/filter/excel/xltools.cxx index e0713e4902b0..7da57ce532b4 100644 --- a/sc/source/filter/excel/xltools.cxx +++ b/sc/source/filter/excel/xltools.cxx @@ -654,9 +654,9 @@ OUString XclTools::GetCondFormatStyleName( SCTAB nScTab, sal_Int32 nFormat, sal_ { OUStringBuffer aBuf(maCFStyleNamePrefix1); aBuf.append(static_cast<sal_Int32>(nScTab+1)); - aBuf.append(sal_Unicode('_')); + aBuf.append('_'); aBuf.append(static_cast<sal_Int32>(nFormat+1)); - aBuf.append(sal_Unicode('_')); + aBuf.append('_'); aBuf.append(static_cast<sal_Int32>(nCondition+1)); return aBuf.makeStringAndClear(); } diff --git a/sc/source/filter/oox/autofilterbuffer.cxx b/sc/source/filter/oox/autofilterbuffer.cxx index 18ffc0847fa3..3b98ba7a591e 100644 --- a/sc/source/filter/oox/autofilterbuffer.cxx +++ b/sc/source/filter/oox/autofilterbuffer.cxx @@ -124,14 +124,14 @@ bool lclConvertWildcardsToRegExp( OUString& rValue ) switch( *pcChar ) { case '?': - aBuffer.append( sal_Unicode( '.' ) ); + aBuffer.append( '.' ); break; case '*': - aBuffer.append( sal_Unicode( '.' ) ).append( sal_Unicode( '*' ) ); + aBuffer.append( '.' ).append( '*' ); break; case '\\': case '.': case '|': case '(': case ')': case '^': case '$': // quote RE meta characters - aBuffer.append( sal_Unicode( '\\' ) ).append( *pcChar ); + aBuffer.append( '\\' ).append( *pcChar ); break; default: aBuffer.append( *pcChar ); diff --git a/sc/source/filter/oox/commentsbuffer.cxx b/sc/source/filter/oox/commentsbuffer.cxx index cee629d28efb..e9489d7a320d 100644 --- a/sc/source/filter/oox/commentsbuffer.cxx +++ b/sc/source/filter/oox/commentsbuffer.cxx @@ -143,7 +143,7 @@ void Comment::finalizeImport() Reference< XSheetAnnotationsSupplier > xAnnosSupp( getSheet(), UNO_QUERY_THROW ); Reference< XSheetAnnotations > xAnnos( xAnnosSupp->getAnnotations(), UNO_SET_THROW ); // non-empty string required by note implementation (real text will be added below) - xAnnos->insertNew( aNotePos, OUString( sal_Unicode( ' ' ) ) ); + xAnnos->insertNew( aNotePos, OUString( ' ' ) ); // receive created note from cell (insertNew does not return the note) Reference< XSheetAnnotationAnchor > xAnnoAnchor( getCell( aNotePos ), UNO_QUERY_THROW ); diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx index 582ea145e328..9ffda5b3129f 100644 --- a/sc/source/filter/oox/formulabase.cxx +++ b/sc/source/filter/oox/formulabase.cxx @@ -1567,10 +1567,10 @@ OUString FormulaProcessorBase::generateAddress2dString( const BinAddress& rAddre for( sal_Int32 nTemp = rAddress.mnCol; nTemp >= 0; (nTemp /= 26) -= 1 ) aBuffer.insert( 0, sal_Unicode( 'A' + (nTemp % 26) ) ); if( bAbsolute ) - aBuffer.insert( 0, sal_Unicode( '$' ) ); + aBuffer.insert( 0, '$' ); // row if( bAbsolute ) - aBuffer.append( sal_Unicode( '$' ) ); + aBuffer.append( '$' ); aBuffer.append( static_cast< sal_Int32 >( rAddress.mnRow + 1 ) ); return aBuffer.makeStringAndClear(); } @@ -1583,7 +1583,7 @@ OUString FormulaProcessorBase::generateApiString( const OUString& rString ) sal_Int32 nQuotePos = aRetString.getLength(); while( (nQuotePos = aRetString.lastIndexOf( '"', nQuotePos )) >= 0 ) aRetString = aRetString.replaceAt( nQuotePos, 1, OUString( "\"\"" ) ); - return OUStringBuffer().append( sal_Unicode( '"' ) ).append( aRetString ).append( sal_Unicode( '"' ) ).makeStringAndClear(); + return OUStringBuffer().append( '"' ).append( aRetString ).append( '"' ).makeStringAndClear(); } OUString FormulaProcessorBase::generateApiArray( const Matrix< Any >& rMatrix ) diff --git a/sc/source/filter/oox/pagesettings.cxx b/sc/source/filter/oox/pagesettings.cxx index 8ada6680b679..90dc156b0fa7 100644 --- a/sc/source/filter/oox/pagesettings.cxx +++ b/sc/source/filter/oox/pagesettings.cxx @@ -785,7 +785,7 @@ void HeaderFooterParser::appendText() void HeaderFooterParser::appendLineBreak() { getEndPos()->gotoEnd( sal_False ); - getEndPos()->setString( OUString( sal_Unicode( '\n' ) ) ); + getEndPos()->setString( OUString( '\n' ) ); getPortion().mfTotalHeight += getCurrHeight(); getPortion().mfCurrHeight = 0; } diff --git a/sc/source/filter/oox/querytablebuffer.cxx b/sc/source/filter/oox/querytablebuffer.cxx index bc7f6915d12c..5b2e9b10d5d1 100644 --- a/sc/source/filter/oox/querytablebuffer.cxx +++ b/sc/source/filter/oox/querytablebuffer.cxx @@ -71,7 +71,7 @@ void lclAppendWebQueryTableName( OUStringBuffer& rTables, const OUString& rTable if( !rTableName.isEmpty() ) { if( !rTables.isEmpty() ) - rTables.append( sal_Unicode( ';' ) ); + rTables.append( ';' ); rTables.appendAscii( RTL_CONSTASCII_STRINGPARAM( "HTML__" ) ).append( rTableName ); } } @@ -81,7 +81,7 @@ void lclAppendWebQueryTableIndex( OUStringBuffer& rTables, sal_Int32 nTableIndex if( nTableIndex > 0 ) { if( !rTables.isEmpty() ) - rTables.append( sal_Unicode( ';' ) ); + rTables.append( ';' ); rTables.appendAscii( RTL_CONSTASCII_STRINGPARAM( "HTML_" ) ).append( nTableIndex ); } } diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx b/sc/source/filter/oox/sheetdatabuffer.cxx index c4dcc2d7e2b0..70787add172f 100644 --- a/sc/source/filter/oox/sheetdatabuffer.cxx +++ b/sc/source/filter/oox/sheetdatabuffer.cxx @@ -215,9 +215,9 @@ void SheetDataBuffer::setErrorCell( const CellModel& rModel, const OUString& rEr void SheetDataBuffer::setErrorCell( const CellModel& rModel, sal_uInt8 nErrorCode ) { OUStringBuffer aBuf; - aBuf.append(sal_Unicode('{')); + aBuf.append('{'); aBuf.append(BiffHelper::calcDoubleFromError(nErrorCode)); - aBuf.append(sal_Unicode('}')); + aBuf.append('}'); getFormulaBuffer().setCellFormula(rModel.maCellAddr, aBuf.makeStringAndClear()); setCellFormat( rModel ); diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx index 02ca85104d12..f1b65110bf10 100644 --- a/sc/source/filter/oox/stylesbuffer.cxx +++ b/sc/source/filter/oox/stylesbuffer.cxx @@ -872,7 +872,7 @@ void Font::finalizeImport() // Western fonts bool bHasLatin = (!bHasAsian && !bHasCmplx) || - xFont->hasGlyphs( OUString( sal_Unicode( 'A' ) ) ); + xFont->hasGlyphs( OUString( 'A' ) ); lclSetFontName( maApiData.maLatinFont, maApiData.maDesc, bHasLatin ); lclSetFontName( maApiData.maAsianFont, maApiData.maDesc, bHasAsian ); @@ -2784,7 +2784,7 @@ void CellStyleBuffer::finalizeImport() sal_Int32 nIndex = 0; do { - aUnusedName = OUStringBuffer( aStyleName ).append( sal_Unicode( ' ' ) ).append( ++nIndex ).makeStringAndClear(); + aUnusedName = OUStringBuffer( aStyleName ).append( ' ' ).append( ++nIndex ).makeStringAndClear(); } while( aCellStyles.count( aUnusedName ) > 0 ); aCellStyles[ aUnusedName ] = *aIt; diff --git a/sc/source/filter/oox/worksheetbuffer.cxx b/sc/source/filter/oox/worksheetbuffer.cxx index b589f849e041..c9e5e57f153c 100644 --- a/sc/source/filter/oox/worksheetbuffer.cxx +++ b/sc/source/filter/oox/worksheetbuffer.cxx @@ -117,7 +117,7 @@ void WorksheetBuffer::convertSheetNameRef( OUString& sSheetNameRef ) const if( nSepPos > 0 ) { // replace the exclamation mark with a period - sSheetNameRef = sSheetNameRef.replaceAt( nSepPos, 1, OUString( sal_Unicode( '.' ) ) ); + sSheetNameRef = sSheetNameRef.replaceAt( nSepPos, 1, OUString( '.' ) ); // #i66592# convert sheet names that have been renamed on import OUString aSheetName = sSheetNameRef.copy( 1, nSepPos - 1 ); OUString aCalcName = getCalcSheetName( aSheetName ); @@ -153,9 +153,9 @@ OUString lclQuoteName( const OUString& rName ) // duplicate all quote characters for( sal_Int32 nPos = aBuffer.getLength() - 1; nPos >= 0; --nPos ) if( aBuffer[nPos] == '\'' ) - aBuffer.insert( nPos, sal_Unicode( '\'' ) ); + aBuffer.insert( nPos, '\'' ); // add outer quotes and return - return aBuffer.insert( 0, sal_Unicode( '\'' ) ).append( sal_Unicode( '\'' ) ).makeStringAndClear(); + return aBuffer.insert( 0, '\'' ).append( '\'' ).makeStringAndClear(); } } // namespace diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx index 148118b953de..0ff929302cd6 100644 --- a/sc/source/filter/oox/worksheethelper.cxx +++ b/sc/source/filter/oox/worksheethelper.cxx @@ -997,7 +997,7 @@ OUString WorksheetGlobals::getHyperlinkUrl( const HyperlinkModel& rHyperlink ) c if( !rHyperlink.maTarget.isEmpty() ) aUrlBuffer.append( getBaseFilter().getAbsoluteUrl( rHyperlink.maTarget ) ); if( !rHyperlink.maLocation.isEmpty() ) - aUrlBuffer.append( sal_Unicode( '#' ) ).append( rHyperlink.maLocation ); + aUrlBuffer.append( '#' ).append( rHyperlink.maLocation ); OUString aUrl = aUrlBuffer.makeStringAndClear(); // convert '#SheetName!A1' to '#SheetName.A1' @@ -1007,7 +1007,7 @@ OUString WorksheetGlobals::getHyperlinkUrl( const HyperlinkModel& rHyperlink ) c if( nSepPos > 0 ) { // replace the exclamation mark with a period - aUrl = aUrl.replaceAt( nSepPos, 1, OUString( sal_Unicode( '.' ) ) ); + aUrl = aUrl.replaceAt( nSepPos, 1, OUString( '.' ) ); // #i66592# convert sheet names that have been renamed on import OUString aSheetName = aUrl.copy( 1, nSepPos - 1 ); OUString aCalcName = getWorksheets().getCalcSheetName( aSheetName ); diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index 39fe09357d10..e9f7d5b0e8c5 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -358,7 +358,7 @@ void ScXMLTableRowCellContext::PushParagraphField(SvxFieldData* pData, const OUS Field& rField = maFields.back(); sal_Int32 nPos = maParagraph.getLength(); - maParagraph.append(sal_Unicode('\1')); // Placeholder text for inserted field item. + maParagraph.append('\1'); // Placeholder text for inserted field item. rField.maSelection.nStartPara = mnCurParagraph; rField.maSelection.nEndPara = mnCurParagraph; rField.maSelection.nStartPos = nPos; diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index cb0b63dfb284..2067f195b2dc 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -188,7 +188,7 @@ OUString lcl_RangeSequenceToString( { OUStringBuffer aResult; const sal_Int32 nMaxIndex( rRanges.getLength() - 1 ); - const sal_Unicode cSep( sal_Char(' ')); + const sal_Unicode cSep(' '); for( sal_Int32 i=0; i<=nMaxIndex; ++i ) { OUString aRange( rRanges[i] ); @@ -3088,15 +3088,15 @@ void writeContent( OUStringBuffer aBuf; sal_Int32 nVal = aDate.GetYear(); aBuf.append(nVal); - aBuf.append(sal_Unicode('-')); + aBuf.append('-'); nVal = aDate.GetMonth(); if (nVal < 10) - aBuf.append(sal_Unicode('0')); + aBuf.append('0'); aBuf.append(nVal); - aBuf.append(sal_Unicode('-')); + aBuf.append('-'); nVal = aDate.GetDay(); if (nVal < 10) - aBuf.append(sal_Unicode('0')); + aBuf.append('0'); aBuf.append(nVal); rExport.AddAttribute(XML_NAMESPACE_STYLE, XML_DATA_STYLE_NAME, "N2"); rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_DATE_VALUE, aBuf.makeStringAndClear()); diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 26d16f18467c..ad51f493ce89 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -185,7 +185,7 @@ void removeChars(OUString& rStr, sal_Unicode c) for (sal_Int32 i = 0, n = aBuf.getLength(); i < n; ++i) { if (aBuf[i] == c) - aBuf[i] = sal_Unicode(' '); + aBuf[i] = ' '; } rStr = aBuf.makeStringAndClear(); } @@ -386,13 +386,13 @@ inline OUString GetEditText(EditEngine* pEng) static void lcl_RemoveTabs(OUString& rStr) { - removeChars(rStr, sal_Unicode('\t')); + removeChars(rStr, '\t'); } static void lcl_RemoveLineEnd(OUString& rStr) { rStr = convertLineEnd(rStr, LINEEND_LF); - removeChars(rStr, sal_Unicode('\n')); + removeChars(rStr, '\n'); } static sal_Int32 lcl_MatchParenthesis( const OUString& rStr, xub_StrLen nPos ) diff --git a/sc/source/ui/collab/sendfunc.cxx b/sc/source/ui/collab/sendfunc.cxx index 68d17754d466..fb45e9d5ac3b 100644 --- a/sc/source/ui/collab/sendfunc.cxx +++ b/sc/source/ui/collab/sendfunc.cxx @@ -170,7 +170,7 @@ class ScChangeOpWriter OUStringBuffer aMessage; void appendSeparator() { - aMessage.append( sal_Unicode( ';' ) ); + aMessage.append( ';' ); } public: @@ -182,11 +182,11 @@ public: void appendString( const OUString &rStr ) { - if ( rStr.indexOf( sal_Unicode( '"' ) ) >= 0 || - rStr.indexOf( sal_Unicode( ';' ) ) >= 0 ) + if ( rStr.indexOf( '"' ) >= 0 || + rStr.indexOf( ';' ) >= 0 ) { OUString aQuoted( rStr ); - ScGlobal::AddQuotes( aQuoted, sal_Unicode( '"' ) ); + ScGlobal::AddQuotes( aQuoted, '"' ); aMessage.append( aQuoted ); } else diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx index 5e783b67b5d6..7182ebe289ae 100644 --- a/sc/source/ui/dbgui/dbnamdlg.cxx +++ b/sc/source/ui/dbgui/dbnamdlg.cxx @@ -252,7 +252,7 @@ void ScDbNameDlg::SetInfoStrings( const ScDBData* pDBData ) aBuf.append(aStrSource); if (pDBData) { - aBuf.append(sal_Unicode(' ')); + aBuf.append(' '); aBuf.append(pDBData->GetSourceString()); } m_pFTSource->SetText(aBuf.makeStringAndClear()); @@ -260,7 +260,7 @@ void ScDbNameDlg::SetInfoStrings( const ScDBData* pDBData ) aBuf.append(aStrOperations); if (pDBData) { - aBuf.append(sal_Unicode(' ')); + aBuf.append(' '); aBuf.append(pDBData->GetOperations()); } m_pFTOperations->SetText(aBuf.makeStringAndClear()); diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx index 8b0e3f629cc6..a71c97a7d130 100644 --- a/sc/source/ui/dbgui/pfiltdlg.cxx +++ b/sc/source/ui/dbgui/pfiltdlg.cxx @@ -181,7 +181,7 @@ void ScPivotFilterDlg::Init( const SfxItemSet& rArgSet ) OUStringBuffer aBuf; aBuf.appendAscii(" ("); aBuf.append(theDbName); - aBuf.append(sal_Unicode(')')); + aBuf.append(')'); aFtDbArea.SetText(aBuf.makeStringAndClear()); } else diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 490358a5b602..6b8490760875 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -983,7 +983,7 @@ static void lcl_parseHtmlFilterOption(const OUString& rOption, LanguageType& rLa for (sal_Int32 i = 0; i < n; ++i) { const sal_Unicode c = p[i]; - if (c == sal_Unicode(' ')) + if (c == ' ') { if (!aBuf.isEmpty()) aTokens.push_back( aBuf.makeStringAndClear() ); @@ -1749,7 +1749,7 @@ sal_Int32 getTextSepPos( sal_Int32 nPos = rStr.indexOf(rTextSep); rNeedQuotes = rAsciiOpt.bQuoteAllText || (nPos >= 0) || (rStr.indexOf(rFieldSep) >= 0) || - (rStr.indexOf(sal_Unicode('\n')) >= 0); + (rStr.indexOf('\n') >= 0); return nPos; } diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index e9c050b79fc5..1ca265e2c6be 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -1237,7 +1237,7 @@ static OUString lcl_GetFixed( const OUString& rLine, sal_Int32 nStart, sal_Int32 while ( nSpace > nStart && pStr[nSpace-1] == ' ' ) --nSpace; - rbIsQuoted = (pStr[nStart] == sal_Unicode('"') && pStr[nSpace-1] == sal_Unicode('"')); + rbIsQuoted = (pStr[nStart] == '"' && pStr[nSpace-1] == '"'); if (rbIsQuoted) { bool bFits = (nSpace - nStart - 3 <= STRING_MAXLEN); @@ -2386,7 +2386,7 @@ OUString ReadCsvLine( SvStream &rStream, bool bEmbeddedLineBreak, nLastOffset = aStr.getLength(); OUString aNext; rStream.ReadUniOrByteStringLine(aNext, rStream.GetStreamCharSet(), nArbitraryLineLengthLimit); - aStr += OUString( sal_Unicode('\n')); + aStr += OUString('\n'); aStr += aNext; } } diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx index 3f077d80d4fc..c6aadee3a211 100644 --- a/sc/source/ui/miscdlgs/acredlin.cxx +++ b/sc/source/ui/miscdlgs/acredlin.cxx @@ -406,27 +406,27 @@ SvTreeListEntry* ScAcceptChgDlg::InsertChangeAction( pScChangeAction->GetRefString(aRefStr, pDoc, true); - aBuf.append(sal_Unicode('\t')); + aBuf.append('\t'); aBuf.append(aRefStr); - aBuf.append(sal_Unicode('\t')); + aBuf.append('\t'); bool bIsGenerated = false; if(!pChanges->IsGenerated(pScChangeAction->GetActionNumber())) { aBuf.append(aUser); - aBuf.append(sal_Unicode('\t')); + aBuf.append('\t'); aBuf.append(ScGlobal::pLocaleData->getDate(aDateTime)); - aBuf.append(sal_Unicode(' ')); + aBuf.append(' '); aBuf.append(ScGlobal::pLocaleData->getTime(aDateTime)); - aBuf.append(sal_Unicode('\t')); + aBuf.append('\t'); bIsGenerated = false; } else { - aBuf.append(sal_Unicode('\t')); - aBuf.append(sal_Unicode('\t')); + aBuf.append('\t'); + aBuf.append('\t'); bIsGenerated = true; } diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx index af88fed007a3..879afd4d1aae 100644 --- a/sc/source/ui/miscdlgs/linkarea.cxx +++ b/sc/source/ui/miscdlgs/linkarea.cxx @@ -330,7 +330,7 @@ OUString ScLinkedAreaDlg::GetSource() for (sal_uInt16 i=0; i<nCount; i++) { if (i > 0) - aBuf.append(sal_Unicode(';')); + aBuf.append(';'); aBuf.append(m_pLbRanges->GetSelectEntry(i)); } return aBuf.makeStringAndClear(); diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx index fdeceabb08dc..b4ce5e4b06a4 100644 --- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx +++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx @@ -308,7 +308,7 @@ void NumberFormatPropertyPanel::NotifyItemUpdate( while( nCount < aLen ) { sal_Unicode cChar = aCode[nCount]; - if(cChar == sal_Unicode(',')) + if(cChar == ',') { sFormat[nStrCount] = sTmpStr; sTmpStr = ""; diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index a39fed4a2a2c..8ebcf4f69fc1 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -117,7 +117,7 @@ struct lcl_appendTableNumber : public ::std::unary_function< SCTAB, void > { // there is no append with SCTAB or sal_Int16 m_rBuffer.append( static_cast< sal_Int32 >( nTab )); - m_rBuffer.append( sal_Unicode( ' ' )); + m_rBuffer.append( ' ' ); } private: OUStringBuffer & m_rBuffer; @@ -2281,7 +2281,7 @@ OUString SAL_CALL ScChart2DataProvider::convertRangeFromXML( const OUString& sXM aUIString = aUIString.copy( 1 ); if( !sRet.isEmpty() ) - sRet.append( (sal_Unicode) ';' ); + sRet.append( ';' ); sRet.append( aUIString ); } } diff --git a/sc/source/ui/unoobj/filtuno.cxx b/sc/source/ui/unoobj/filtuno.cxx index a94b73f351dd..068d01c2a319 100644 --- a/sc/source/ui/unoobj/filtuno.cxx +++ b/sc/source/ui/unoobj/filtuno.cxx @@ -235,7 +235,7 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() throw(uno::RuntimeException) OUStringBuffer aBuf; aBuf.append(OUString::number(static_cast<sal_Int32>(eLang))); - aBuf.append(sal_Unicode(' ')); + aBuf.append(' '); aBuf.append(pDlg->IsDateConversionSet() ? sal_Unicode('1') : sal_Unicode('0')); aFilterOptions = aBuf.makeStringAndClear(); nRet = ui::dialogs::ExecutableDialogResults::OK; diff --git a/sc/source/ui/vba/vbahyperlink.cxx b/sc/source/ui/vba/vbahyperlink.cxx index f88ebb600b84..a021ec568569 100644 --- a/sc/source/ui/vba/vbahyperlink.cxx +++ b/sc/source/ui/vba/vbahyperlink.cxx @@ -219,7 +219,7 @@ void ScVbaHyperlink::setUrlComponents( const UrlComponents& rUrlComp ) throw (un ensureTextField(); OUStringBuffer aUrl( rUrlComp.first ); if( !rUrlComp.second.isEmpty() ) - aUrl.append( sal_Unicode( '#' ) ).append( rUrlComp.second ); + aUrl.append( '#' ).append( rUrlComp.second ); mxTextField->setPropertyValue("URL", uno::Any( aUrl.makeStringAndClear() ) ); } diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index a5517806b3ab..b1cbaead87ae 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -2961,7 +2961,7 @@ ScVbaRange::AddComment( const uno::Any& Text ) throw (uno::RuntimeException) if( Text.hasValue() && !(Text >>= aNoteText) ) throw uno::RuntimeException(); if( aNoteText.isEmpty() ) - aNoteText = OUString( sal_Unicode( ' ' ) ); + aNoteText = OUString( ' ' ); // try to create a new annotation table::CellRangeAddress aRangePos = lclGetRangeAddress( mxRange ); diff --git a/sc/source/ui/vba/vbasheetobject.cxx b/sc/source/ui/vba/vbasheetobject.cxx index cf6adaf1b02b..a5898cb8a483 100644 --- a/sc/source/ui/vba/vbasheetobject.cxx +++ b/sc/source/ui/vba/vbasheetobject.cxx @@ -282,7 +282,7 @@ void SAL_CALL ScVbaSheetObjectBase::setPrintObject( sal_Bool /*bPrintObject*/ ) void ScVbaSheetObjectBase::setDefaultProperties( sal_Int32 nIndex ) throw (uno::RuntimeException) { - OUString aName = OUStringBuffer( implGetBaseName() ).append( sal_Unicode( ' ' ) ).append( nIndex + 1 ).makeStringAndClear(); + OUString aName = OUStringBuffer( implGetBaseName() ).append( ' ' ).append( nIndex + 1 ).makeStringAndClear(); setName( aName ); implSetDefaultProperties(); } diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx index c9111d30f3f8..69e0ed89ecf8 100644 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -1295,25 +1295,25 @@ static OUString lcl_replaceMemberNameInSubtotal(const OUString& rSubtotal, const for (sal_Int32 i = 0; i < n; ++i) { sal_Unicode c = p[i]; - if (c == sal_Unicode(' ')) + if (c == ' ') { OUString aWord = aWordBuf.makeStringAndClear(); if (aWord.equals(rMemberName)) - aBuf.append(sal_Unicode('?')); + aBuf.append('?'); else aBuf.append(aWord); aBuf.append(c); } - else if (c == sal_Unicode('\\')) + else if (c == '\\') { // Escape a backslash character. aWordBuf.append(c); aWordBuf.append(c); } - else if (c == sal_Unicode('?')) + else if (c == '?') { // A literal '?' must be escaped with a backslash ('\'); - aWordBuf.append(sal_Unicode('\\')); + aWordBuf.append('\\'); aWordBuf.append(c); } else @@ -1324,7 +1324,7 @@ static OUString lcl_replaceMemberNameInSubtotal(const OUString& rSubtotal, const { OUString aWord = aWordBuf.makeStringAndClear(); if (aWord.equals(rMemberName)) - aBuf.append(sal_Unicode('?')); + aBuf.append('?'); else aBuf.append(aWord); } diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index bb1440c930bd..fdc054bbd202 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -1142,7 +1142,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq ) { sal_Unicode cChar = aCode[nCount]; - if(cChar == sal_Unicode(',')) + if(cChar == ',') { sFormat[nStrCount] = sTmpStr; sTmpStr = ""; diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index 1ca9f4055c4a..48b16182ed37 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -630,11 +630,11 @@ void ScDrawStringsVars::SetTextToWidthOrHash( ScRefCellValue& rCell, long nWidth for( sal_Int32 i = 0; i < nLen; ++i ) { sal_Unicode c = aString[i]; - if (c == sal_Unicode('-')) + if (c == '-') ++nSignCount; else if (c == cDecSep) ++nDecimalCount; - else if (c == sal_Unicode('E')) + else if (c == 'E') ++nExpCount; } diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 637c7f3f3d06..2ee7075b5c6f 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -750,7 +750,7 @@ OUString ScViewFunc::GetAutoSumFormula( const ScRangeList& rRangeList, bool bSub OUStringBuffer aBuf; aComp.CreateStringFromTokenArray(aBuf); OUString aFormula = aBuf.makeStringAndClear(); - aBuf.append(sal_Unicode('=')); + aBuf.append('='); aBuf.append(aFormula); return aBuf.makeStringAndClear(); } diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx index 9c25516c94eb..8ec8bf170f5e 100644 --- a/sc/source/ui/view/viewfun6.cxx +++ b/sc/source/ui/view/viewfun6.cxx @@ -184,9 +184,9 @@ void ScViewFunc::DetectiveMarkPred() OUString aTabName = p->GetString().getString(); OUStringBuffer aBuf; aBuf.append(*pPath); - aBuf.append(sal_Unicode('#')); + aBuf.append('#'); aBuf.append(aTabName); - aBuf.append(sal_Unicode('.')); + aBuf.append('.'); OUString aRangeStr(aRange.Format(SCA_VALID)); aBuf.append(aRangeStr); diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx index 1500eb726963..9857b1ff2a94 100644 --- a/sc/source/ui/view/viewutil.cxx +++ b/sc/source/ui/view/viewutil.cxx @@ -166,7 +166,7 @@ sal_Bool ScViewUtil::IsActionShown( const ScChangeAction& rAction, OUString aTmp; rAction.GetDescription(aTmp, &rDocument); aBuf.append(aTmp); - aBuf.append(sal_Unicode(')')); + aBuf.append(')'); OUString aComStr = aBuf.makeStringAndClear(); if(!rSettings.IsValidComment(&aComStr)) |