summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/access/acccell.cxx12
-rw-r--r--sw/source/core/crsr/swcrsr.cxx2
-rw-r--r--sw/source/core/edit/autofmt.cxx2
-rw-r--r--sw/source/core/fields/expfld.cxx6
-rw-r--r--sw/source/core/table/swtable.cxx4
-rw-r--r--sw/source/core/text/porfld.cxx2
-rw-r--r--sw/source/core/txtnode/fntcache.cxx8
-rw-r--r--sw/source/core/txtnode/modeltoviewhelper.cxx2
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx12
-rw-r--r--sw/source/core/txtnode/thints.cxx4
-rw-r--r--sw/source/core/undo/undel.cxx2
-rw-r--r--sw/source/core/unocore/unofield.cxx4
12 files changed, 30 insertions, 30 deletions
diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx
index d79f4eb5caef..419206c56f00 100644
--- a/sw/source/core/access/acccell.cxx
+++ b/sw/source/core/access/acccell.cxx
@@ -370,7 +370,7 @@ uno::Any SwAccessibleCell::getMinimumIncrement( )
return uno::Any();
}
-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;
@@ -384,11 +384,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/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 6f4ed5f01ed0..c5061c42f854 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -1546,7 +1546,7 @@ static OUString lcl_MaskDeletedRedlines( const SwTextNode* pTextNd )
pRed->CalcStartEnd( pTextNd->GetIndex(), nStart, nEnd );
while ( nStart < nEnd && nStart < sNodeText.getLength() )
- sNodeText = sNodeText.replaceAt( nStart++, 1, OUString(CH_TXTATR_INWORD) );
+ sNodeText = sNodeText.replaceAt( nStart++, 1, rtl::OUStringChar(CH_TXTATR_INWORD) );
}
}
}
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 27b6b1c79108..6df314ae55c2 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -853,7 +853,7 @@ SwAutoFormat::GetDigitLevel(const SwTextFrame& rFrame, TextFrameIndex& rPos,
eScan = (eScan & ~(UPPER_ALPHA|LOWER_ALPHA)) | eTmpScan;
if( pNumTypes )
- (*pNumTypes) = pNumTypes->replaceAt( pNumTypes->getLength() - 1, 1, OUString(c) );
+ (*pNumTypes) = pNumTypes->replaceAt( pNumTypes->getLength() - 1, 1, rtl::OUStringChar(c) );
}
if( eScan & DELIM )
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index 44c589060feb..ee4cfc5c3460 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -112,7 +112,7 @@ OUString ReplacePoint( const OUString& rTmpName, bool bWithCommandType )
return rTmpName;
}
- OUString sRes = rTmpName.replaceAt(nIndex, 1, OUString(DB_DELIM));
+ OUString sRes = rTmpName.replaceAt(nIndex, 1, rtl::OUStringChar(DB_DELIM));
if (bWithCommandType)
{
@@ -121,13 +121,13 @@ OUString ReplacePoint( const OUString& rTmpName, bool bWithCommandType )
{
return sRes;
}
- sRes = sRes.replaceAt(nIndex, 1, OUString(DB_DELIM));
+ sRes = sRes.replaceAt(nIndex, 1, rtl::OUStringChar(DB_DELIM));
}
nIndex = sRes.indexOf('.');
if (nIndex>=0)
{
- sRes = sRes.replaceAt(nIndex, 1, OUString(DB_DELIM));
+ sRes = sRes.replaceAt(nIndex, 1, rtl::OUStringChar(DB_DELIM));
}
return sRes;
}
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index da6255a73770..a272642125da 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -101,10 +101,10 @@ static OUString& lcl_TabToBlankAtSttEnd( OUString& rText )
for( n = 0; n < rText.getLength() && ' ' >= ( c = rText[n] ); ++n )
if( '\x9' == c )
- rText = rText.replaceAt( n, 1, " " );
+ rText = rText.replaceAt( n, 1, u" " );
for( n = rText.getLength(); n && ' ' >= ( c = rText[--n] ); )
if( '\x9' == c )
- rText = rText.replaceAt( n, 1, " " );
+ rText = rText.replaceAt( n, 1, u" " );
return rText;
}
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 7c9aba47d74e..c366401c9153 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -68,7 +68,7 @@ void SwFieldPortion::TakeNextOffset( const SwFieldPortion* pField )
{
OSL_ENSURE( pField, "TakeNextOffset: Missing Source" );
m_nNextOffset = pField->GetNextOffset();
- m_aExpand = m_aExpand.replaceAt(0, sal_Int32(m_nNextOffset), "");
+ m_aExpand = m_aExpand.replaceAt(0, sal_Int32(m_nNextOffset), u"");
m_bFollow = true;
}
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index ccc25f50df9c..f2c18d7b1ce9 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -1616,16 +1616,16 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ((i + nCopyStart + 1 >= sal_Int32(rInf.GetLen())) ||
aKernArray[i + nCopyStart] != aKernArray[ i + nCopyStart + 1])
{
- aBulletOverlay = aBulletOverlay.replaceAt(i, 1, OUString(CH_BULLET));
+ aBulletOverlay = aBulletOverlay.replaceAt(i, 1, rtl::OUStringChar(CH_BULLET));
}
else
{
- aBulletOverlay = aBulletOverlay.replaceAt(i, 1, OUString(CH_BLANK));
+ aBulletOverlay = aBulletOverlay.replaceAt(i, 1, rtl::OUStringChar(CH_BLANK));
}
}
else
{
- aBulletOverlay = aBulletOverlay.replaceAt(i, 1, OUString(CH_BLANK));
+ aBulletOverlay = aBulletOverlay.replaceAt(i, 1, rtl::OUStringChar(CH_BLANK));
}
}
@@ -2502,7 +2502,7 @@ TextFrameIndex SwFont::GetTextBreak(SwDrawTextInfo const & rInf, tools::Long nTe
// In this case, the beginning of aTmpText is wrong.
OUString aSnippetTmp(aSnippet.copy(0, 1));
aSnippetTmp = m_aSub[m_nActual].CalcCaseMap( aSnippetTmp );
- aTmpText = aTmpText.replaceAt( 0, aSnippetTmp.getLength(), OUString(aSnippet[0]) );
+ aTmpText = aTmpText.replaceAt( 0, aSnippetTmp.getLength(), rtl::OUStringChar(aSnippet[0]) );
}
}
diff --git a/sw/source/core/txtnode/modeltoviewhelper.cxx b/sw/source/core/txtnode/modeltoviewhelper.cxx
index cf4983192b23..c8c6095726cb 100644
--- a/sw/source/core/txtnode/modeltoviewhelper.cxx
+++ b/sw/source/core/txtnode/modeltoviewhelper.cxx
@@ -226,7 +226,7 @@ ModelToViewHelper::ModelToViewHelper(const SwTextNode &rNode,
sal_Int32 const viewBlockPos(nBlockStart + nOffset);
m_aMap.emplace_back(modelBlockPos, viewBlockPos, false);
- m_aRetText = m_aRetText.replaceAt(nOffset + nBlockStart, nBlockLen, OUString());
+ m_aRetText = m_aRetText.replaceAt(nOffset + nBlockStart, nBlockLen, u"");
nOffset -= nBlockLen;
}
else
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 33509d405aad..5134d7672fa2 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -2392,8 +2392,8 @@ void SwTextNode::CutImpl( SwTextNode * const pDest, const SwIndex & rDestStart,
abort();
}
pDest->m_Text = pDest->m_Text.replaceAt(nDestStart, 0,
- m_Text.copy(nTextStartIdx, nLen));
- OUString const newText = m_Text.replaceAt(nTextStartIdx, nLen, "");
+ m_Text.subView(nTextStartIdx, nLen));
+ OUString const newText = m_Text.replaceAt(nTextStartIdx, nLen, u"");
nLen = pDest->m_Text.getLength() - nInitSize; // update w/ current size!
if (!nLen) // String didn't grow?
return;
@@ -2639,7 +2639,7 @@ void SwTextNode::EraseText(const SwIndex &rIdx, const sal_Int32 nCount,
? m_Text.getLength() - nStartIdx : nCount;
const sal_Int32 nEndIdx = nStartIdx + nCnt;
if (nEndIdx <= m_Text.getLength())
- m_Text = m_Text.replaceAt(nStartIdx, nCnt, "");
+ m_Text = m_Text.replaceAt(nStartIdx, nCnt, u"");
// GCAttr(); don't remove all empty ones, just the ones that are in the
// range but not at the end of the range.
@@ -3679,10 +3679,10 @@ void SwTextNode::ReplaceText( const SwIndex& rStart, const sal_Int32 nDelLen,
{
// Replace the 1st char, then delete the rest and insert.
// This way the attributes of the 1st char are expanded!
- m_Text = m_Text.replaceAt(nStartPos, 1, sInserted.copy(0, 1));
+ m_Text = m_Text.replaceAt(nStartPos, 1, sInserted.subView(0, 1));
++const_cast<SwIndex&>(rStart);
- m_Text = m_Text.replaceAt(rStart.GetIndex(), nLen - 1, "");
+ m_Text = m_Text.replaceAt(rStart.GetIndex(), nLen - 1, u"");
Update( rStart, nLen - 1, true );
OUString aTmpText( sInserted.copy(1) );
@@ -3691,7 +3691,7 @@ void SwTextNode::ReplaceText( const SwIndex& rStart, const sal_Int32 nDelLen,
}
else
{
- m_Text = m_Text.replaceAt(nStartPos, nLen, "");
+ m_Text = m_Text.replaceAt(nStartPos, nLen, u"");
Update( rStart, nLen, true );
m_Text = m_Text.replaceAt(nStartPos, 0, sInserted);
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index e97df81267df..5aba3a2b6e64 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -1389,7 +1389,7 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
// delete the char from the string
assert(CH_TXTATR_BREAKWORD == m_Text[pAttr->GetStart()]
|| CH_TXTATR_INWORD == m_Text[pAttr->GetStart()]);
- m_Text = m_Text.replaceAt(pAttr->GetStart(), 1, "");
+ m_Text = m_Text.replaceAt(pAttr->GetStart(), 1, u"");
// Update SwIndexes
SwIndex aTmpIdx( this, pAttr->GetStart() );
Update( aTmpIdx, 1, true );
@@ -1420,7 +1420,7 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
// delete the char from the string
assert(CH_TXTATR_BREAKWORD == m_Text[pAttr->GetStart()]
|| CH_TXTATR_INWORD == m_Text[pAttr->GetStart()]);
- m_Text = m_Text.replaceAt(pAttr->GetStart(), 1, "");
+ m_Text = m_Text.replaceAt(pAttr->GetStart(), 1, u"");
// Update SwIndexes
SwIndex aTmpIdx( this, pAttr->GetStart() );
Update( aTmpIdx, 1, true );
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index 88c8b2ed1f76..ed1cdf38794d 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -589,7 +589,7 @@ bool SwUndoDelete::CanGrouping( SwDoc& rDoc, const SwPaM& rDelPam )
m_nEndContent++; // Delete: attach char at the end
nUChrPos++;
}
- m_aSttStr = m_aSttStr->replaceAt( nUChrPos, 0, OUString(cDelChar) );
+ m_aSttStr = m_aSttStr->replaceAt( nUChrPos, 0, rtl::OUStringChar(cDelChar) );
pDelTextNd->EraseText( pStt->nContent, 1 );
m_bGroup = true;
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index 729a2581075a..a09e6785c864 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -2568,10 +2568,10 @@ static OUString OldNameToNewName_Impl( const OUString &rOld )
OUString sServiceNameCC( rOld );
sal_Int32 nIdx = sServiceNameCC.indexOf( aOldNamePart1 );
if (nIdx >= 0)
- sServiceNameCC = sServiceNameCC.replaceAt( nIdx, strlen(aOldNamePart1), ".textfield.docinfo." );
+ sServiceNameCC = sServiceNameCC.replaceAt( nIdx, strlen(aOldNamePart1), u".textfield.docinfo." );
nIdx = sServiceNameCC.indexOf( aOldNamePart2 );
if (nIdx >= 0)
- sServiceNameCC = sServiceNameCC.replaceAt( nIdx, strlen(aOldNamePart2), ".textfield." );
+ sServiceNameCC = sServiceNameCC.replaceAt( nIdx, strlen(aOldNamePart2), u".textfield." );
return sServiceNameCC;
}