diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-10-10 12:09:44 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-10-11 08:44:09 +0200 |
commit | 71337b4327805b73e92c995153c5746d89793b13 (patch) | |
tree | fd66764b57912cb2a8b86618e97f1e90d607d2cd /sw/source/uibase/config/modcfg.cxx | |
parent | bab44a97d21d0ac8a8a06678e71024c1a830943f (diff) |
use more string_view in sw
Change-Id: Ibefb8549834ba5011286e3221f1ae276e2c0c0bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141153
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/config/modcfg.cxx')
-rw-r--r-- | sw/source/uibase/config/modcfg.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/uibase/config/modcfg.cxx b/sw/source/uibase/config/modcfg.cxx index 2b80d8127b74..ff36e0a3e1fa 100644 --- a/sw/source/uibase/config/modcfg.cxx +++ b/sw/source/uibase/config/modcfg.cxx @@ -130,19 +130,19 @@ SwModuleOptions::SwModuleOptions() : { } -OUString SwModuleOptions::ConvertWordDelimiter(const OUString& rDelim, bool bFromUI) +OUString SwModuleOptions::ConvertWordDelimiter(std::u16string_view aDelim, bool bFromUI) { OUStringBuffer sReturn; - const sal_Int32 nDelimLen = rDelim.getLength(); + const sal_Int32 nDelimLen = aDelim.size(); if(bFromUI) { for (sal_Int32 i = 0; i < nDelimLen; ) { - const sal_Unicode c = rDelim[i++]; + const sal_Unicode c = aDelim[i++]; if (c == '\\' && i < nDelimLen ) { - switch (rDelim[i++]) + switch (aDelim[i++]) { case 'n': sReturn.append("\n"); break; case 't': sReturn.append("\t"); break; @@ -154,7 +154,7 @@ OUString SwModuleOptions::ConvertWordDelimiter(const OUString& rDelim, bool bFro bool bValidData = true; for( sal_Int32 n = 0; n < 2 && i < nDelimLen; ++n, ++i ) { - sal_Unicode nVal = rDelim[i]; + sal_Unicode nVal = aDelim[i]; if( (nVal >= '0') && ( nVal <= '9') ) nVal -= '0'; else if( (nVal >= 'A') && (nVal <= 'F') ) @@ -190,7 +190,7 @@ OUString SwModuleOptions::ConvertWordDelimiter(const OUString& rDelim, bool bFro { for (sal_Int32 i = 0; i < nDelimLen; ++i) { - const sal_Unicode c = rDelim[i]; + const sal_Unicode c = aDelim[i]; switch (c) { |