tools/source/fsys/urlobj.cxx | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-)
New commits: commit be5f70e2b8498345f2301598cba325d5524513f2 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sat Dec 25 12:51:53 2021 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sat Dec 25 18:44:09 2021 +0100 Simplify INetURLObject::parseHostOrNetBiosName a bit more Change-Id: Ie22e7a142aabd2c0f12c34945ad0858f5bd868a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127451 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index 67cb1f1cd024..1d08a5590eaa 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -2843,9 +2843,16 @@ bool INetURLObject::parseHostOrNetBiosName( while (pBegin < pEnd) { EscapeType eEscapeType; - sal_uInt32 nUTF32 = getUTF32(pBegin, pEnd, eMechanism, eCharset, eEscapeType); - switch (nUTF32) + switch (sal_uInt32 nUTF32 = getUTF32(pBegin, pEnd, eMechanism, eCharset, eEscapeType)) { + default: + if (INetMIME::isVisible(nUTF32)) + { + if (pCanonic) + appendUCS4(*pCanonic, nUTF32, eEscapeType, PART_URIC, eCharset, true); + break; + } + [[fallthrough]]; case '"': case '*': case '+': @@ -2865,16 +2872,7 @@ bool INetURLObject::parseHostOrNetBiosName( if (pCanonic) pCanonic->setLength(nOriginalCanonicLength); return false; - default: - if (!INetMIME::isVisible(nUTF32)) - { - if (pCanonic) - pCanonic->setLength(nOriginalCanonicLength); - return false; - } } - if (pCanonic) - appendUCS4(*pCanonic, nUTF32, eEscapeType, PART_URIC, eCharset, true); } return true; }