diff options
Diffstat (limited to 'stoc/source/uriproc/UriReferenceFactory.cxx')
-rw-r--r-- | stoc/source/uriproc/UriReferenceFactory.cxx | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/stoc/source/uriproc/UriReferenceFactory.cxx b/stoc/source/uriproc/UriReferenceFactory.cxx index 39b9229633ca..6b78fa079d15 100644 --- a/stoc/source/uriproc/UriReferenceFactory.cxx +++ b/stoc/source/uriproc/UriReferenceFactory.cxx @@ -424,8 +424,7 @@ css::uno::Reference< css::uri::XUriReference > Factory::makeAbsolute( auto const path = uriReference->getPath(); auto [segments, proc] = processSegments(path, {}, true); if (proc) { - OUStringBuffer abs(uriReference->getScheme()); - abs.append(':'); + OUStringBuffer abs(uriReference->getScheme() + ":"); if (uriReference->hasAuthority()) { abs.append("//" + uriReference->getAuthority()); } @@ -454,12 +453,10 @@ css::uno::Reference< css::uri::XUriReference > Factory::makeAbsolute( abs.append(i.segment); } if (uriReference->hasQuery()) { - abs.append('?'); - abs.append(uriReference->getQuery()); + abs.append("?" + uriReference->getQuery()); } if (uriReference->hasFragment()) { - abs.append('#'); - abs.append(uriReference->getFragment()); + abs.append("#" + uriReference->getFragment()); } return parse(abs.makeStringAndClear()); } @@ -467,28 +464,23 @@ css::uno::Reference< css::uri::XUriReference > Factory::makeAbsolute( return clone(uriReference); } else if (!uriReference->hasAuthority() && uriReference->getPath().isEmpty()) { - OUStringBuffer abs(baseUriReference->getScheme()); - abs.append(':'); + OUStringBuffer abs(baseUriReference->getScheme() + ":"); if (baseUriReference->hasAuthority()) { abs.append("//" + baseUriReference->getAuthority()); } abs.append(baseUriReference->getPath()); if (uriReference->hasQuery()) { - abs.append('?'); - abs.append(uriReference->getQuery()); + abs.append("?" + uriReference->getQuery()); } else if (baseUriReference->hasQuery()) { - abs.append('?'); - abs.append(baseUriReference->getQuery()); + abs.append("?" + baseUriReference->getQuery()); } if (uriReference->hasFragment()) { - abs.append('#'); - abs.append(uriReference->getFragment()); + abs.append("#" + uriReference->getFragment()); } return parse(abs.makeStringAndClear()); } else { OUStringBuffer abs(128); - abs.append(baseUriReference->getScheme()); - abs.append(':'); + abs.append(baseUriReference->getScheme() + ":"); if (uriReference->hasAuthority()) { abs.append("//" + uriReference->getAuthority()); } else if (baseUriReference->hasAuthority()) { @@ -568,12 +560,10 @@ css::uno::Reference< css::uri::XUriReference > Factory::makeAbsolute( } } if (uriReference->hasQuery()) { - abs.append('?'); - abs.append(uriReference->getQuery()); + abs.append("?" + uriReference->getQuery()); } if (uriReference->hasFragment()) { - abs.append('#'); - abs.append(uriReference->getFragment()); + abs.append("#" + uriReference->getFragment()); } return parse(abs.makeStringAndClear()); } @@ -690,12 +680,10 @@ css::uno::Reference< css::uri::XUriReference > Factory::makeRelative( } } if (!omitQuery && uriReference->hasQuery()) { - rel.append('?'); - rel.append(uriReference->getQuery()); + rel.append("?" + uriReference->getQuery()); } if (uriReference->hasFragment()) { - rel.append('#'); - rel.append(uriReference->getFragment()); + rel.append("#" + uriReference->getFragment()); } return parse(rel.makeStringAndClear()); } |