diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-02-28 17:49:40 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-02-28 17:49:58 +0100 |
commit | 51f73a9be8270487885d185eaa3dda13ec43d9b0 (patch) | |
tree | fe9399ade452f75f14c31618c8f148e8d916e9cc /sal | |
parent | 29c3bb0968cb9770f7b822f5cf466314be9db825 (diff) |
Simplify string construction
Change-Id: Ib46a64d8438dcaba37a234460d1a4113707e8c43
Diffstat (limited to 'sal')
-rw-r--r-- | sal/rtl/uri.cxx | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/sal/rtl/uri.cxx b/sal/rtl/uri.cxx index 513fb51d9900..774c5f77b133 100644 --- a/sal/rtl/uri.cxx +++ b/sal/rtl/uri.cxx @@ -708,20 +708,23 @@ sal_Bool SAL_CALL rtl_uriConvertRelToAbs(rtl_uString * pBaseUriRef, parseUriRef(pBaseUriRef, &aBaseComponents); if (!aBaseComponents.aScheme.isPresent()) { - rtl::OUString aMessage(pBaseUriRef); - aMessage += rtl::OUString( - " does not start with a scheme component"); - rtl_uString_assign(pException, - const_cast< rtl::OUString & >(aMessage).pData); + rtl_uString_assign( + pException, + (rtl::OUString( + "<" + rtl::OUString(pBaseUriRef) + + "> does not start with a scheme component") + .pData)); return false; } if (aBaseComponents.aPath.pBegin != aBaseComponents.aPath.pEnd && *aBaseComponents.aPath.pBegin != '/') { - rtl::OUString aMessage(pBaseUriRef); - aMessage += rtl::OUString( - "path component does not start with slash"); - rtl_uString_assign(pException, aMessage.pData); + rtl_uString_assign( + pException, + (rtl::OUString( + "<" + rtl::OUString(pBaseUriRef) + + "> path component does not start with a slash") + .pData)); return false; } |