summaryrefslogtreecommitdiff
path: root/stoc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-10-16 10:13:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-16 12:12:31 +0200
commit4a96fb8ec0130e1036913093836bcf28bc37a49b (patch)
treee7aad9be4ca417e9e64f688cc99bee0638037741 /stoc
parentf33b6e341fb7dd1ab3acd4fe5457b716be316e89 (diff)
loplugin:bufferadd loosen some constraints
and extend O*StringView to have a constructor that takes a pointer and a length Change-Id: I6120e96280f030757e855a6596efdae438b7e1e8 Reviewed-on: https://gerrit.libreoffice.org/80872 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'stoc')
-rw-r--r--stoc/source/security/file_policy.cxx7
-rw-r--r--stoc/source/security/permissions.cxx7
2 files changed, 4 insertions, 10 deletions
diff --git a/stoc/source/security/file_policy.cxx b/stoc/source/security/file_policy.cxx
index 9d8edc2bf102..08d97cfdbf44 100644
--- a/stoc/source/security/file_policy.cxx
+++ b/stoc/source/security/file_policy.cxx
@@ -172,11 +172,8 @@ void PolicyReader::assureToken( sal_Unicode token )
sal_Unicode c = get();
if (c == token)
return;
- OUStringBuffer buf( 16 );
- buf.append( "expected >" );
- buf.append( c );
- buf.append( "<!" );
- error( buf.makeStringAndClear() );
+ OUString msg = "expected >" + OUStringLiteral1(c) + "<!";
+ error( msg );
}
OUString PolicyReader::assureQuotedToken()
diff --git a/stoc/source/security/permissions.cxx b/stoc/source/security/permissions.cxx
index ab70ac1e051b..9568602c1fb4 100644
--- a/stoc/source/security/permissions.cxx
+++ b/stoc/source/security/permissions.cxx
@@ -435,11 +435,8 @@ bool RuntimePermission::implies( Permission const & perm ) const
OUString RuntimePermission::toString() const
{
- OUStringBuffer buf( 48 );
- buf.append( "com.sun.star.security.RuntimePermission (name=\"" );
- buf.append( m_name );
- buf.append( "\")" );
- return buf.makeStringAndClear();
+ return "com.sun.star.security.RuntimePermission (name=\"" +
+ m_name + "\")";
}