summaryrefslogtreecommitdiff
path: root/sfx2
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 /sfx2
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 'sfx2')
-rw-r--r--sfx2/source/appl/childwin.cxx4
-rw-r--r--sfx2/source/dialog/dockwin.cxx4
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx2
-rw-r--r--sfx2/source/doc/doctemplates.cxx2
-rw-r--r--sfx2/source/doc/new.cxx4
5 files changed, 8 insertions, 8 deletions
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 09e97f6de3da..263f750f9b12 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -405,7 +405,7 @@ void SfxChildWindow::InitializeChildWinFactory_Impl(sal_uInt16 nId, SfxChildWinI
{
// there is extra information
rInfo.nFlags = static_cast<SfxChildWindowFlags>(static_cast<sal_uInt16>(aWinData.copy( nPos+1, nNextPos - nPos - 1 ).toInt32()));
- aWinData = aWinData.replaceAt( nPos, nNextPos-nPos+1, "" );
+ aWinData = aWinData.replaceAt( nPos, nNextPos-nPos+1, u"" );
rInfo.aExtraString = aWinData;
}
else
@@ -471,7 +471,7 @@ bool SfxChildWinInfo::GetExtraData_Impl
{
// Cut out Alignment string
aStr = aExtraString.copy(nPos, n2 - nPos + 1);
- aStr = aStr.replaceAt(nPos, n1-nPos+1, "");
+ aStr = aStr.replaceAt(nPos, n1-nPos+1, u"");
}
}
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index eb419d7c1656..e19949b279f8 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -815,8 +815,8 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
{
// extract alignment information from extrastring
aStr = pInfo->aExtraString.copy(nPos, n2 - nPos + 1);
- pInfo->aExtraString = pInfo->aExtraString.replaceAt(nPos, n2 - nPos + 1, "");
- aStr = aStr.replaceAt(nPos, n1-nPos+1, "");
+ pInfo->aExtraString = pInfo->aExtraString.replaceAt(nPos, n2 - nPos + 1, u"");
+ aStr = aStr.replaceAt(nPos, n1-nPos+1, u"");
}
}
}
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 918b9c1869b7..60fb167c359a 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -1949,7 +1949,7 @@ void FileDialogHelper_Impl::addGraphicFilter()
constexpr OUStringLiteral GRF_CONFIG_STR = u" ";
constexpr OUStringLiteral STD_CONFIG_STR = u"1 ";
-static void SetToken( OUString& rOrigStr, sal_Int32 nToken, sal_Unicode cTok, const OUString& rStr)
+static void SetToken( OUString& rOrigStr, sal_Int32 nToken, sal_Unicode cTok, std::u16string_view rStr)
{
const sal_Unicode* pStr = rOrigStr.getStr();
sal_Int32 nLen = rOrigStr.getLength();
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 41aff2bd93c7..f2e13da357e2 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -560,7 +560,7 @@ void SfxDocTplService_Impl::getDirList()
if (nIndex<0)
continue;
- rTemplateDir = rTemplateDir.replaceAt(nIndex, aPrefix.getLength(), OUString());
+ rTemplateDir = rTemplateDir.replaceAt(nIndex, aPrefix.getLength(), u"");
rTemplateDir = xExpander->expandMacros( rTemplateDir );
}
}
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index 2de3a680bd4d..37edc065bd88 100644
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -174,7 +174,7 @@ IMPL_LINK( SfxNewFileDialog, RegionSelect, weld::TreeView&, rBox, void )
OUString aSel = m_xRegionLb->get_selected_text();
sal_Int32 nc = aSel.indexOf('(');
if (nc != -1 && nc != 0)
- aSel = aSel.replaceAt(nc-1, 1, "");
+ aSel = aSel.replaceAt(nc-1, 1, u"");
if ( aSel.compareToIgnoreAsciiCase( SfxResId(STR_STANDARD) ) == 0 )
m_xTemplateLb->append_text(SfxResId(STR_NONE));
for (sal_uInt16 i = 0; i < nCount; ++i)
@@ -221,7 +221,7 @@ sal_uInt16 SfxNewFileDialog::GetSelectedTemplatePos() const
OUString aSel = m_xRegionLb->get_selected_text();
sal_Int32 nc = aSel.indexOf('(');
if (nc != -1 && nc != 0)
- aSel = aSel.replaceAt(nc-1, 1, "");
+ aSel = aSel.replaceAt(nc-1, 1, u"");
if ( aSel.compareToIgnoreAsciiCase(SfxResId(STR_STANDARD)) != 0 )
nEntry++;
return nEntry;