summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/fldui/flddb.cxx2
-rw-r--r--sw/source/ui/fldui/flddinf.cxx2
-rw-r--r--sw/source/ui/fldui/flddok.cxx2
-rw-r--r--sw/source/ui/fldui/fldfunc.cxx2
-rw-r--r--sw/source/ui/fldui/fldref.cxx4
-rw-r--r--sw/source/ui/fldui/fldvar.cxx3
-rw-r--r--sw/source/ui/misc/bookmark.cxx3
-rw-r--r--sw/source/ui/misc/glossary.cxx2
8 files changed, 11 insertions, 9 deletions
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index 73a63255cc62..3293a6bc670d 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -153,7 +153,7 @@ void SwFieldDBPage::Reset(const SfxItemSet*)
{
const OUString sUserData = GetUserData();
sal_Int32 nIdx{ 0 };
- if (sUserData.getToken(0, ';', nIdx).equalsIgnoreAsciiCase(USER_DATA_VERSION_1))
+ if (o3tl::equalsIgnoreAsciiCase(o3tl::getToken(sUserData, 0, ';', nIdx), u"" USER_DATA_VERSION_1))
{
const sal_uInt16 nVal = o3tl::narrowing<sal_uInt16>(o3tl::toInt32(o3tl::getToken(sUserData, 0, ';', nIdx)));
if (nVal != USHRT_MAX)
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index c3247352fe8a..50ce0548fd54 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -124,7 +124,7 @@ void SwFieldDokInfPage::Reset(const SfxItemSet* )
sal_Int32 nSelEntryData = -1;
const OUString sUserData = GetUserData();
sal_Int32 nIdx{ 0 };
- if (sUserData.getToken(0, ';', nIdx).equalsIgnoreAsciiCase(USER_DATA_VERSION_1))
+ if (o3tl::equalsIgnoreAsciiCase(o3tl::getToken(sUserData, 0, ';', nIdx), u"" USER_DATA_VERSION_1))
{
nSelEntryData = o3tl::toInt32(o3tl::getToken(sUserData, 0, ';', nIdx));
}
diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx
index 25e77775a2ba..2e7c1c67dbc2 100644
--- a/sw/source/ui/fldui/flddok.cxx
+++ b/sw/source/ui/fldui/flddok.cxx
@@ -154,7 +154,7 @@ void SwFieldDokPage::Reset(const SfxItemSet* )
{
const OUString sUserData = GetUserData();
sal_Int32 nIdx{ 0 };
- if (sUserData.getToken(0, ';', nIdx).equalsIgnoreAsciiCase(USER_DATA_VERSION_1))
+ if (o3tl::equalsIgnoreAsciiCase(o3tl::getToken(sUserData, 0, ';', nIdx), u"" USER_DATA_VERSION_1))
{
const sal_uInt16 nVal = static_cast< sal_uInt16 >(o3tl::toInt32(o3tl::getToken(sUserData, 0, ';', nIdx)));
if(nVal != USHRT_MAX)
diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx
index 874b8fe5e90f..017a4d19c6aa 100644
--- a/sw/source/ui/fldui/fldfunc.cxx
+++ b/sw/source/ui/fldui/fldfunc.cxx
@@ -144,7 +144,7 @@ void SwFieldFuncPage::Reset(const SfxItemSet* )
{
const OUString sUserData = GetUserData();
sal_Int32 nIdx{ 0 };
- if(sUserData.getToken(0, ';', nIdx).equalsIgnoreAsciiCase(USER_DATA_VERSION_1))
+ if(o3tl::equalsIgnoreAsciiCase(o3tl::getToken(sUserData, 0, ';', nIdx), u"" USER_DATA_VERSION_1))
{
const sal_uInt16 nVal = static_cast< sal_uInt16 >(o3tl::toInt32(o3tl::getToken(sUserData, 0, ';', nIdx)));
if(nVal != USHRT_MAX)
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index 0c6c4ace6e11..5392df80463e 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -239,8 +239,8 @@ void SwFieldRefPage::Reset(const SfxItemSet* )
{
sal_Int32 nIdx{ 0 };
const OUString sUserData = GetUserData();
- if(!IsRefresh() && sUserData.getToken(0, ';', nIdx).
- equalsIgnoreAsciiCase(USER_DATA_VERSION_1))
+ if(!IsRefresh() && o3tl::equalsIgnoreAsciiCase(o3tl::getToken(sUserData, 0, ';', nIdx),
+ u"" USER_DATA_VERSION_1))
{
const sal_uInt16 nVal = static_cast< sal_uInt16 >(o3tl::toInt32(o3tl::getToken(sUserData, 0, ';', nIdx)));
if(nVal != USHRT_MAX)
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index e07117a3c737..af34366b2d36 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -33,6 +33,7 @@
#include <calc.hxx>
#include <svl/numformat.hxx>
#include <svl/zformat.hxx>
+#include <o3tl/string_view.hxx>
#include <strings.hrc>
#define USER_DATA_VERSION_1 "1"
@@ -157,7 +158,7 @@ void SwFieldVarPage::Reset(const SfxItemSet* )
{
OUString sUserData = GetUserData();
sal_Int32 nIdx{ 0 };
- if(!IsRefresh() && sUserData.getToken(0, ';', nIdx).equalsIgnoreAsciiCase(USER_DATA_VERSION_1))
+ if(!IsRefresh() && o3tl::equalsIgnoreAsciiCase(o3tl::getToken(sUserData, 0, ';', nIdx), u"" USER_DATA_VERSION_1))
{
OUString sVal = sUserData.getToken(0, ';', nIdx);
sal_uInt16 nVal = o3tl::narrowing<sal_uInt16>(sVal.toInt32());
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index c886c603953d..48260cd48f0b 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -442,7 +442,8 @@ void BookmarkTable::InsertBookmark(sw::mark::IMark* pMark)
}
bool bExceedsLength = nBookmarkTextLen > nMaxTextLen;
nBookmarkTextLen = std::min<sal_Int32>(nMaxTextLen, nBookmarkTextLen);
- sBookmarkNodeText = sBookmarkNodeText.copy(nBookmarkNodeTextPos, nBookmarkTextLen).trim();
+ sBookmarkNodeText
+ = o3tl::trim(sBookmarkNodeText.subView(nBookmarkNodeTextPos, nBookmarkTextLen));
if (bExceedsLength)
sBookmarkNodeText += "...";
else if (bPulling && !bPulledAll)
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 58121c6734e7..4e657a260d02 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -250,7 +250,7 @@ OUString getCurrentGlossary()
const OUString sTemp{ ::GetCurrGlosGroup() };
// the zeroth path is not being recorded!
- if (sTemp.getToken(1, GLOS_DELIM).startsWith("0"))
+ if (o3tl::starts_with(o3tl::getToken(sTemp, 1, GLOS_DELIM), u"0"))
return sTemp.getToken(0, GLOS_DELIM);
return sTemp;