diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-10-16 15:06:23 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-10-17 07:28:49 +0200 |
commit | 8b4719c29fc9bd7e198ad6ced301e1ff7a350f16 (patch) | |
tree | d3ec594b343f56c76056418d835d3bc7b696a9ab /unotools | |
parent | f51cd77bcecc5134e0e04c398bfb7b34eb65d68d (diff) |
Rename OUStringLiteral1 to OUStringChar
It started out as a wrapper around character literals, but has by now become a
wrapper around arbitrary single characters. Besides updating the documentation,
this change is a mechanical
for i in $(git grep -Fl OUStringLiteral1); do sed -i -e s/OUStringLiteral1/OUStringChar/g "$i"; done
Change-Id: I1b9eaa4b3fbc9025ce4a4bffea3db1c16188b76f
Reviewed-on: https://gerrit.libreoffice.org/80892
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/config/bootstrap.cxx | 6 | ||||
-rw-r--r-- | unotools/source/i18n/resmgr.cxx | 4 | ||||
-rw-r--r-- | unotools/source/misc/datetime.cxx | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/unotools/source/config/bootstrap.cxx b/unotools/source/config/bootstrap.cxx index b413e883ab2a..4ea07ea99c67 100644 --- a/unotools/source/config/bootstrap.cxx +++ b/unotools/source/config/bootstrap.cxx @@ -216,7 +216,7 @@ static bool implNormalizeURL(OUString & _sURL, osl::DirectoryItem& aDirItem) // #109863# sal/osl returns final slash for file URLs contradicting // the URL/URI RFCs. - if ( !aNormalizedURL.endsWith(OUStringLiteral1(cURLSeparator)) ) + if ( !aNormalizedURL.endsWith(OUStringChar(cURLSeparator)) ) _sURL = aNormalizedURL; else _sURL = aNormalizedURL.copy( 0, aNormalizedURL.getLength()-1 ); @@ -318,9 +318,9 @@ static PathStatus getDerivedPath( // do we have a base path ? if (!_aBaseURL.isEmpty()) { - OSL_PRECOND(!_aBaseURL.endsWith(OUStringLiteral1(cURLSeparator)), "Unexpected: base URL ends in slash"); + OSL_PRECOND(!_aBaseURL.endsWith(OUStringChar(cURLSeparator)), "Unexpected: base URL ends in slash"); - sDerivedURL = _aBaseURL + OUStringLiteral1(cURLSeparator) + _sRelativeURL; + sDerivedURL = _aBaseURL + OUStringChar(cURLSeparator) + _sRelativeURL; // a derived (nested) URL can only exist or have a lesser status, if the parent exists if (aStatus == Bootstrap::PATH_EXISTS) diff --git a/unotools/source/i18n/resmgr.cxx b/unotools/source/i18n/resmgr.cxx index c55de86ee89b..0f58039509fb 100644 --- a/unotools/source/i18n/resmgr.cxx +++ b/unotools/source/i18n/resmgr.cxx @@ -196,7 +196,7 @@ namespace Translate if (std::use_facet<boost::locale::info>(loc).language() == "qtz") { OString sKeyId(genKeyId(OString(pContextAndId).replace('\004', '|'))); - return OUString::fromUtf8(sKeyId) + OUStringLiteral1(0x2016) + createFromUtf8(pId, strlen(pId)); + return OUString::fromUtf8(sKeyId) + OUStringChar(0x2016) + createFromUtf8(pId, strlen(pId)); } //otherwise translate it @@ -230,7 +230,7 @@ namespace Translate { OString sKeyId(genKeyId(aContextIdId[0] + "|" + aContextIdId[1])); int nForm = n == 0 ? 1 : 2; - return OUString::fromUtf8(sKeyId) + OUStringLiteral1(0x2016) + createFromUtf8(aContextIdId[nForm].getStr(), aContextIdId[nForm].getLength()); + return OUString::fromUtf8(sKeyId) + OUStringChar(0x2016) + createFromUtf8(aContextIdId[nForm].getStr(), aContextIdId[nForm].getLength()); } //otherwise translate it diff --git a/unotools/source/misc/datetime.cxx b/unotools/source/misc/datetime.cxx index 88d5095bd385..7b2ef0eb2c40 100644 --- a/unotools/source/misc/datetime.cxx +++ b/unotools/source/misc/datetime.cxx @@ -114,7 +114,7 @@ namespace return true; if (c < c0 || c > c9) return false; - resInt += OUStringLiteral1(c); + resInt += OUStringChar(c); } if (nPos == i_str.getLength() || i_str[nPos] == sep) return true; @@ -135,7 +135,7 @@ namespace return false; if (c < c0 || c > c9) return false; - resFrac += OUStringLiteral1(c); + resFrac += OUStringChar(c); } OSL_ENSURE(nPos == i_str.getLength(), "impl_getISO8601TimeToken internal error; expected to be at end of string"); return true; @@ -185,7 +185,7 @@ namespace const sal_Unicode c = i_str[io_index]; if ((c < c0 || c > c9) && c != sep) return false; - o_strInt += OUStringLiteral1(c); + o_strInt += OUStringChar(c); } return true; } |