summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-11-22 14:08:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-11-23 14:00:08 +0100
commitec1c4c49301758c54394f9943252e192ad54638b (patch)
treeb53af3cb9154a388495b1af35c3f8ff41d6ebe1f /sc
parentdb0f2c29bf3a6ad5a08f8524ea0e65aa90792bb2 (diff)
O[U]String::replaceAt overloads that take string_view
which results in lots of nice string_view improvements picked up by the plugins Change-Id: Ib0ec3887816b3d4436d003b739d9814f83e244b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125657 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/subsequent_export_test2.cxx4
-rw-r--r--sc/source/core/data/global2.cxx2
-rw-r--r--sc/source/core/tool/address.cxx2
-rw-r--r--sc/source/core/tool/compiler.cxx6
-rw-r--r--sc/source/core/tool/interpr1.cxx10
-rw-r--r--sc/source/core/tool/rangenam.cxx2
-rw-r--r--sc/source/core/tool/rangeutl.cxx2
-rw-r--r--sc/source/filter/dif/difexp.cxx2
-rw-r--r--sc/source/filter/excel/xecontent.cxx4
-rw-r--r--sc/source/filter/excel/xicontent.cxx2
-rw-r--r--sc/source/filter/excel/xiescher.cxx2
-rw-r--r--sc/source/filter/ftools/ftools.cxx4
-rw-r--r--sc/source/filter/oox/formulabase.cxx2
-rw-r--r--sc/source/filter/oox/worksheetbuffer.cxx2
-rw-r--r--sc/source/filter/oox/worksheethelper.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleCell.cxx12
-rw-r--r--sc/source/ui/app/inputhdl.cxx4
-rw-r--r--sc/source/ui/docshell/docsh4.cxx8
-rw-r--r--sc/source/ui/docshell/impex.cxx2
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx2
-rw-r--r--sc/source/ui/navipi/content.cxx2
-rw-r--r--sc/source/ui/unoobj/addruno.cxx2
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx2
-rw-r--r--sc/source/ui/view/output2.cxx2
-rw-r--r--sc/source/ui/view/viewfunc.cxx4
25 files changed, 44 insertions, 44 deletions
diff --git a/sc/qa/unit/subsequent_export_test2.cxx b/sc/qa/unit/subsequent_export_test2.cxx
index c585d2394c27..a74fff7e04af 100644
--- a/sc/qa/unit/subsequent_export_test2.cxx
+++ b/sc/qa/unit/subsequent_export_test2.cxx
@@ -2328,7 +2328,7 @@ void ScExportTest2::testTdf87973_externalLinkSkipUnuseds()
// change external link to: 87973_externalSource.ods
OUString aFormula = rDoc.GetFormula(3, 1, 0);
auto nIdxOfFilename = aFormula.indexOf("tdf132105_external.ods");
- aFormula = aFormula.replaceAt(nIdxOfFilename, 22, "87973_externalSource.ods");
+ aFormula = aFormula.replaceAt(nIdxOfFilename, 22, u"87973_externalSource.ods");
auto nIdxOfFile = aFormula.indexOf("file");
// saveAndReload save the file to a temporary directory
@@ -2344,7 +2344,7 @@ void ScExportTest2::testTdf87973_externalLinkSkipUnuseds()
// tdf#138832: test the same thing with singleref link
aFormula = rDoc.GetFormula(3, 2, 0);
nIdxOfFilename = aFormula.indexOf("tdf132105_external.ods");
- aFormula = aFormula.replaceAt(nIdxOfFilename, 22, "87973_externalSource.ods");
+ aFormula = aFormula.replaceAt(nIdxOfFilename, 22, u"87973_externalSource.ods");
nIdxOfFile = aFormula.indexOf("file");
aFormula = aFormula.replaceAt(nIdxOfFile, nIdxOfFilename - nIdxOfFile, aTempFilename);
diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx
index 356379dc3f1f..5dcbbdd11709 100644
--- a/sc/source/core/data/global2.cxx
+++ b/sc/source/core/data/global2.cxx
@@ -326,7 +326,7 @@ OUString ScGlobal::GetDocTabName( std::u16string_view rFileName,
sal_Int32 nPos = 1;
while( (nPos = aDocTab.indexOf( '\'', nPos )) != -1 )
{ // escape Quotes
- aDocTab = aDocTab.replaceAt( nPos, 0, "\\" );
+ aDocTab = aDocTab.replaceAt( nPos, 0, u"\\" );
nPos += 2;
}
aDocTab += "'" + OUStringChar(SC_COMPILER_FILE_TAB_SEP) + rTabName;
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index ae4d48787fe3..c09628608bd2 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -547,7 +547,7 @@ const sal_Unicode* ScRange::Parse_XL_Header(
else
{
rExternDocName = rExternDocName.copy(0, nClose);
- rExternDocName = rExternDocName.replaceAt( nOpen, 1, "");
+ rExternDocName = rExternDocName.replaceAt( nOpen, 1, u"");
pMsoxlQuoteStop = p - 1; // the ' quote char
// There may be embedded escaped quotes, just matching the
// doc name's length may not work.
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 952a53423b3f..2c8bf6c5655b 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -4118,9 +4118,9 @@ void ScCompiler::AutoCorrectParsedSymbol()
(ScCharFlags::Word | ScCharFlags::CharDontCare)) == ScCharFlags::NONE)) )
nPos--;
if ( nPos == MAXSTRLEN - 1 )
- aCorrectedSymbol = aCorrectedSymbol.replaceAt( nPos, 1, OUString(cQuote) ); // '"' the MAXSTRLENth character
+ aCorrectedSymbol = aCorrectedSymbol.replaceAt( nPos, 1, rtl::OUStringChar(cQuote) ); // '"' the MAXSTRLENth character
else
- aCorrectedSymbol = aCorrectedSymbol.replaceAt( nPos + 1, 0, OUString(cQuote) );
+ aCorrectedSymbol = aCorrectedSymbol.replaceAt( nPos + 1, 0, rtl::OUStringChar(cQuote) );
bCorrected = true;
}
else if ( c1 != cQuote && c2 == cQuote )
@@ -5448,7 +5448,7 @@ bool ScCompiler::EnQuote( OUString& rStr )
sal_Int32 nPos = 0;
while ( (nPos = rStr.indexOf( '\'', nPos)) != -1 )
{
- rStr = rStr.replaceAt( nPos, 0, "\\" );
+ rStr = rStr.replaceAt( nPos, 0, u"\\" );
nPos += 2;
}
rStr = "'" + rStr + "'";
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 4e1471c46fbc..fae8a6eeb222 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -3412,12 +3412,12 @@ void ScInterpreter::ScNumberValue()
{
sal_Unicode c = aInputString[ i ];
if ( c == 0x0020 || c == 0x0009 || c == 0x000A || c == 0x000D )
- aInputString = aInputString.replaceAt( i, 1, "" ); // remove spaces etc.
+ aInputString = aInputString.replaceAt( i, 1, u"" ); // remove spaces etc.
}
sal_Int32 nPercentCount = 0;
for ( sal_Int32 i = aInputString.getLength() - 1; i >= 0 && aInputString[ i ] == 0x0025; i-- )
{
- aInputString = aInputString.replaceAt( i, 1, "" ); // remove and count trailing '%'
+ aInputString = aInputString.replaceAt( i, 1, u"" ); // remove and count trailing '%'
nPercentCount++;
}
@@ -3446,7 +3446,7 @@ void ScInterpreter::ScClean()
for ( sal_Int32 i = 0; i < aStr.getLength(); i++ )
{
if ( !lcl_ScInterpreter_IsPrintable( aStr[i] ) )
- aStr = aStr.replaceAt(i,1,"");
+ aStr = aStr.replaceAt(i, 1, u"");
}
PushString(aStr);
}
@@ -8860,7 +8860,7 @@ void ScInterpreter::ScReplace()
aOldStr.iterateCodePoints( &nIdx );
++nCnt;
}
- aOldStr = aOldStr.replaceAt( nStart, nIdx - nStart, "" );
+ aOldStr = aOldStr.replaceAt( nStart, nIdx - nStart, u"" );
if ( CheckStringResultLen( aOldStr, aNewStr ) )
aOldStr = aOldStr.replaceAt( nStart, 0, aNewStr );
PushString( aOldStr );
@@ -9700,7 +9700,7 @@ void ScInterpreter::ScSubstitute()
nCount++;
if( !nCnt || nCount == nCnt )
{
- sStr = sStr.replaceAt(nPos,nOldLen, "");
+ sStr = sStr.replaceAt(nPos,nOldLen, u"");
if ( CheckStringResultLen( sStr, sNewStr ) )
{
sStr = sStr.replaceAt(nPos, 0, sNewStr);
diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx
index a0d213ed3c9a..11e177158148 100644
--- a/sc/source/core/tool/rangenam.cxx
+++ b/sc/source/core/tool/rangenam.cxx
@@ -440,7 +440,7 @@ void ScRangeData::MakeValidName( const ScDocument& rDoc, OUString& rName )
for (nPos=0; nPos<nLen; nPos++)
{
if ( !ScCompiler::IsCharFlagAllConventions( rName, nPos, ScCharFlags::Name) )
- rName = rName.replaceAt( nPos, 1, "_" );
+ rName = rName.replaceAt( nPos, 1, u"_" );
}
// Ensure that the proposed name is not a reference under any convention,
diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx
index 439f00a6cb97..c5901c834b40 100644
--- a/sc/source/core/tool/rangeutl.cxx
+++ b/sc/source/core/tool/rangeutl.cxx
@@ -519,7 +519,7 @@ bool ScRangeStringConverter::GetRangeFromString(
if ( nIndex < aUIString.getLength() - 1 &&
aUIString[ nIndex + 1 ] == '.' )
- aUIString = aUIString.replaceAt( nIndex + 1, 1, "" );
+ aUIString = aUIString.replaceAt( nIndex + 1, 1, u"" );
bResult = ((rRange.Parse(aUIString, rDocument, eConv) & ScRefFlags::VALID) ==
ScRefFlags::VALID);
diff --git a/sc/source/filter/dif/difexp.cxx b/sc/source/filter/dif/difexp.cxx
index 18706b2c0916..4e5984f9e943 100644
--- a/sc/source/filter/dif/difexp.cxx
+++ b/sc/source/filter/dif/difexp.cxx
@@ -204,7 +204,7 @@ void ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc,
sal_Int32 nPos = aTmpStr.indexOf( cStrDelim );
while ( nPos != -1 )
{
- aTmpStr = aTmpStr.replaceAt( nPos, 0, OUString(cStrDelim) );
+ aTmpStr = aTmpStr.replaceAt( nPos, 0, rtl::OUStringChar(cStrDelim) );
nPos = aTmpStr.indexOf( cStrDelim, nPos+2 );
}
rOut.WriteUniOrByteChar( cStrDelim, eCharSet );
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 006e3cb2c956..17a614b8fdf3 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -425,7 +425,7 @@ XclExpHyperlink::XclExpHyperlink( const XclExpRoot& rRoot, const SvxURLField& rU
if(nSepPos < nPointPos)
{
nSepPos = nPointPos;
- aTextMark = aTextMark.replaceAt( nSepPos, 1, "!" );
+ aTextMark = aTextMark.replaceAt( nSepPos, 1, u"!" );
}
if (nSepPos != -1)
@@ -434,7 +434,7 @@ XclExpHyperlink::XclExpHyperlink( const XclExpRoot& rRoot, const SvxURLField& rU
if (aSheetName.indexOf(' ') != -1 && aSheetName[0] != '\'')
{
- aTextMark = "'" + aTextMark.replaceAt(nSepPos, 0, "'");
+ aTextMark = "'" + aTextMark.replaceAt(nSepPos, 0, u"'");
}
}
else
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index c12d39376d56..872632a1c061 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -341,7 +341,7 @@ OUString XclImpHyperlink::ReadEmbeddedData( XclImpStream& rStrm )
ScRange aRange;
if ((aRange.ParseAny( xTextMark->copy( nSepPos + 1 ), rDoc, formula::FormulaGrammar::CONV_XL_R1C1)
& ScRefFlags::VALID) == ScRefFlags::ZERO)
- xTextMark.reset( new OUString( xTextMark->replaceAt( nSepPos, 1, OUString( '.' ))));
+ xTextMark.reset( new OUString( xTextMark->replaceAt( nSepPos, 1, rtl::OUStringChar( '.' ))));
}
}
}
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index c1749c310ab6..298517b0f5b0 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -2111,7 +2111,7 @@ void XclImpTbxObjBase::ConvertLabel( ScfPropertySet& rPropSet ) const
{
sal_Int32 nPos = aLabel.indexOf( static_cast< sal_Unicode >( maTextData.maData.mnShortcut ) );
if( nPos != -1 )
- aLabel = aLabel.replaceAt( nPos, 0, "~" );
+ aLabel = aLabel.replaceAt( nPos, 0, u"~" );
}
rPropSet.SetStringProperty( "Label", aLabel );
diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx
index d82b84a2eb60..9605dc7a46f7 100644
--- a/sc/source/filter/ftools/ftools.cxx
+++ b/sc/source/filter/ftools/ftools.cxx
@@ -152,10 +152,10 @@ OUString ScfTools::ConvertToScDefinedName(const OUString& rName )
u'_');
sal_Int32 nLen = sName.getLength();
if( nLen && !ScCompiler::IsCharFlagAllConventions( sName, 0, ScCharFlags::CharName ) )
- sName = sName.replaceAt( 0, 1, "_" );
+ sName = sName.replaceAt( 0, 1, u"_" );
for( sal_Int32 nPos = 1; nPos < nLen; ++nPos )
if( !ScCompiler::IsCharFlagAllConventions( sName, nPos, ScCharFlags::Name ) )
- sName = sName.replaceAt( nPos, 1, "_" );
+ sName = sName.replaceAt( nPos, 1, u"_" );
return sName;
}
diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx
index 3cb012bda7c8..2dcc513f21a9 100644
--- a/sc/source/filter/oox/formulabase.cxx
+++ b/sc/source/filter/oox/formulabase.cxx
@@ -1566,7 +1566,7 @@ OUString FormulaProcessorBase::generateApiString( const OUString& rString )
OUString aRetString = rString;
sal_Int32 nQuotePos = aRetString.getLength();
while( (nQuotePos = aRetString.lastIndexOf( '"', nQuotePos )) >= 0 )
- aRetString = aRetString.replaceAt( nQuotePos, 1, "\"\"" );
+ aRetString = aRetString.replaceAt( nQuotePos, 1, u"\"\"" );
return "\"" + aRetString + "\"";
}
diff --git a/sc/source/filter/oox/worksheetbuffer.cxx b/sc/source/filter/oox/worksheetbuffer.cxx
index c4daa9cd98bd..a00f6cb6cc78 100644
--- a/sc/source/filter/oox/worksheetbuffer.cxx
+++ b/sc/source/filter/oox/worksheetbuffer.cxx
@@ -134,7 +134,7 @@ void WorksheetBuffer::convertSheetNameRef( OUString& sSheetNameRef ) const
ScRange aRange;
if ((aRange.ParseAny( sSheetNameRef.copy( nSepPos + 1 ), getScDocument(),
formula::FormulaGrammar::CONV_XL_R1C1) & ScRefFlags::VALID) == ScRefFlags::ZERO)
- sSheetNameRef = sSheetNameRef.replaceAt( nSepPos, 1, OUString( '.' ) );
+ sSheetNameRef = sSheetNameRef.replaceAt( nSepPos, 1, rtl::OUStringChar( '.' ) );
}
// #i66592# convert sheet names that have been renamed on import
OUString aSheetName = sSheetNameRef.copy( 1, nSepPos - 1 );
diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx
index a5fc023f8a99..40a99cdb444b 100644
--- a/sc/source/filter/oox/worksheethelper.cxx
+++ b/sc/source/filter/oox/worksheethelper.cxx
@@ -1034,7 +1034,7 @@ OUString WorksheetGlobals::getHyperlinkUrl( const HyperlinkModel& rHyperlink ) c
if ((aRange.ParseAny( aUrl.copy( nSepPos + 1 ), rDoc.getDoc(),
formula::FormulaGrammar::CONV_XL_R1C1)
& ScRefFlags::VALID) == ScRefFlags::ZERO)
- aUrl = aUrl.replaceAt( nSepPos, 1, OUString( '.' ) );
+ aUrl = aUrl.replaceAt( nSepPos, 1, rtl::OUStringChar( '.' ) );
}
// #i66592# convert sheet names that have been renamed on import
OUString aSheetName = aUrl.copy( 1, nSepPos - 1 );
diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx
index ed1dbd8ebeda..654dfe84ef67 100644
--- a/sc/source/ui/Accessibility/AccessibleCell.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCell.cxx
@@ -457,7 +457,7 @@ void ScAccessibleCell::AddRelation(const ScRange& rRange,
pRelationSet->AddRelation(aRelation);
}
-static OUString ReplaceOneChar(const OUString& oldOUString, std::u16string_view replacedChar, const OUString& replaceStr)
+static OUString ReplaceOneChar(const OUString& oldOUString, std::u16string_view replacedChar, std::u16string_view replaceStr)
{
int iReplace = oldOUString.lastIndexOf(replacedChar);
OUString aRet = oldOUString;
@@ -471,11 +471,11 @@ static OUString ReplaceOneChar(const OUString& oldOUString, std::u16string_view
static OUString ReplaceFourChar(const OUString& oldOUString)
{
- OUString aRet = ReplaceOneChar(oldOUString, u"\\", "\\\\");
- aRet = ReplaceOneChar(aRet, u";", "\\;");
- aRet = ReplaceOneChar(aRet, u"=", "\\=");
- aRet = ReplaceOneChar(aRet, u",", "\\,");
- aRet = ReplaceOneChar(aRet, u":", "\\:");
+ OUString aRet = ReplaceOneChar(oldOUString, u"\\", u"\\\\");
+ aRet = ReplaceOneChar(aRet, u";", u"\\;");
+ aRet = ReplaceOneChar(aRet, u"=", u"\\=");
+ aRet = ReplaceOneChar(aRet, u",", u"\\,");
+ aRet = ReplaceOneChar(aRet, u":", u"\\:");
return aRet;
}
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 8c06ebfcc111..6466c30576f0 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -362,10 +362,10 @@ void ScInputHandler::InitRangeFinder( const OUString& rFormula )
sal_Int32 nColon = aDelimiters.indexOf( ':' );
if ( nColon != -1 )
- aDelimiters = aDelimiters.replaceAt( nColon, 1, ""); // Delimiter without colon
+ aDelimiters = aDelimiters.replaceAt( nColon, 1, u""); // Delimiter without colon
sal_Int32 nDot = aDelimiters.indexOf(cSheetSep);
if ( nDot != -1 )
- aDelimiters = aDelimiters.replaceAt( nDot, 1 , ""); // Delimiter without dot
+ aDelimiters = aDelimiters.replaceAt( nDot, 1 , u""); // Delimiter without dot
const sal_Unicode* pChar = rFormula.getStr();
sal_Int32 nLen = rFormula.getLength();
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 289c66f756d9..a97a47ecc6ec 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1213,7 +1213,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
}
else if ( (nPos = aLangText.indexOf(aDocLangPrefix)) != -1 )
{
- aLangText = aLangText.replaceAt(nPos, aDocLangPrefix.getLength(), "");
+ aLangText = aLangText.replaceAt(nPos, aDocLangPrefix.getLength(), u"");
if ( aLangText == "LANGUAGE_NONE" )
{
@@ -1243,12 +1243,12 @@ void ScDocShell::Execute( SfxRequest& rReq )
else if (-1 != (nPos = aLangText.indexOf( aSelectionLangPrefix )))
{
bSelection = true;
- aLangText = aLangText.replaceAt( nPos, aSelectionLangPrefix.getLength(), "" );
+ aLangText = aLangText.replaceAt( nPos, aSelectionLangPrefix.getLength(), u"" );
}
else if (-1 != (nPos = aLangText.indexOf( aParagraphLangPrefix )))
{
bParagraph = true;
- aLangText = aLangText.replaceAt( nPos, aParagraphLangPrefix.getLength(), "" );
+ aLangText = aLangText.replaceAt( nPos, aParagraphLangPrefix.getLength(), u"" );
}
if (bSelection || bParagraph)
@@ -1345,7 +1345,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
sal_Int32 nPos = 0;
if(-1 != (nPos = sApplyText.indexOf( sSpellingRule )))
{
- sApplyText = sApplyText.replaceAt(nPos, sSpellingRule.getLength(), "");
+ sApplyText = sApplyText.replaceAt(nPos, sSpellingRule.getLength(), u"");
pEditView->InsertText( sApplyText );
}
}
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 72dad3cc6410..5d8e755c18f6 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -890,7 +890,7 @@ static void lcl_DoubleEscapeChar( OUString& rString, sal_Unicode cStr )
sal_Int32 n = 0;
while( ( n = rString.indexOf( cStr, n ) ) != -1 )
{
- rString = rString.replaceAt( n, 0, OUString(cStr) );
+ rString = rString.replaceAt( n, 0, rtl::OUStringChar(cStr) );
n += 2;
}
}
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index 554bf801d1de..1d0ab68a3313 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -1680,7 +1680,7 @@ namespace
{
// cut out alignment string
aStr = rExtraString.copy(nPos, n2 - nPos + 1);
- rExtraString = rExtraString.replaceAt(nPos, n2 - nPos + 1, "");
+ rExtraString = rExtraString.replaceAt(nPos, n2 - nPos + 1, u"");
aStr = aStr.copy( n1-nPos+1 );
}
}
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index c19c6b87a6fd..1b30df7f2406 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -943,7 +943,7 @@ static OUString lcl_NoteString( const ScPostIt& rNote )
OUString aText = rNote.GetText();
sal_Int32 nAt;
while ( (nAt = aText.indexOf( '\n' )) != -1 )
- aText = aText.replaceAt( nAt, 1, " " );
+ aText = aText.replaceAt( nAt, 1, u" " );
return aText;
}
diff --git a/sc/source/ui/unoobj/addruno.cxx b/sc/source/ui/unoobj/addruno.cxx
index 0e307071d9ef..520f110a6f5d 100644
--- a/sc/source/ui/unoobj/addruno.cxx
+++ b/sc/source/ui/unoobj/addruno.cxx
@@ -196,7 +196,7 @@ void SAL_CALL ScAddressConversionObj::setPropertyValue( const OUString& aPropert
sal_Int32 nColon = aUIString.lastIndexOf( ':' );
if ( nColon >= 0 && nColon < aUIString.getLength() - 1 &&
aUIString[nColon+1] == '.' )
- aUIString = aUIString.replaceAt( nColon+1, 1, "" );
+ aUIString = aUIString.replaceAt( nColon+1, 1, u"" );
}
// parse the rest like a UI string
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 6ec3a1e633d1..40e72bbfc8d9 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -2261,7 +2261,7 @@ OUString SAL_CALL ScChart2DataProvider::convertRangeFromXML( const OUString& sXM
sal_Int32 nIndex = ScRangeStringConverter::IndexOf( sToken, ':', 0 );
if ( nIndex >= 0 && nIndex < aUIString.getLength() - 1 &&
aUIString[nIndex + 1] == '.' )
- aUIString = aUIString.replaceAt( nIndex + 1, 1, "" );
+ aUIString = aUIString.replaceAt( nIndex + 1, 1, u"" );
if ( aUIString[0] == '.' )
aUIString = aUIString.copy( 1 );
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 7c8758bb75e1..ba4a1b13a795 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -536,7 +536,7 @@ bool ScDrawStringsVars::SetText( const ScRefCellValue& rCell )
{
nRepeatChar = aString[ nRepeatPos + 1 ];
// delete placeholder and char to repeat
- aString = aString.replaceAt( nRepeatPos, 2, "" );
+ aString = aString.replaceAt( nRepeatPos, 2, u"" );
// Do not cache/reuse a repeat-filled string, column
// widths or fonts or sizes may differ.
maLastCell.clear();
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 339c70d30aac..af151534c018 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -383,7 +383,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
{
++nIndex;
}
- OUString aString = rString.replaceAt( 1, nIndex - 1, "" );
+ OUString aString = rString.replaceAt( 1, nIndex - 1, u"" );
// if the remaining part without the leading '+' or '-' character
// is non-empty and not a number, handle as formula
@@ -2745,7 +2745,7 @@ void ScViewFunc::ChangeNumFmtDecimals( bool bIncrement )
for ( sal_Int32 i=1 ; i<sExponentialStandardFormat.getLength() ; i++ )
{
if ( sExponentialStandardFormat[i] >= '1' && sExponentialStandardFormat[i] <= '9' )
- sExponentialStandardFormat = sExponentialStandardFormat.replaceAt( i, 1, "0" );
+ sExponentialStandardFormat = sExponentialStandardFormat.replaceAt( i, 1, u"0" );
}
aOut = aOut.copy( 0, nIndexE ); // remove exponential part
}