diff options
Diffstat (limited to 'stoc/source/security/permissions.cxx')
-rw-r--r-- | stoc/source/security/permissions.cxx | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/stoc/source/security/permissions.cxx b/stoc/source/security/permissions.cxx index 86e523e5a9fe..987b07ed8997 100644 --- a/stoc/source/security/permissions.cxx +++ b/stoc/source/security/permissions.cxx @@ -311,17 +311,11 @@ FilePermission::FilePermission( if ( m_url == "*" ) { - OUStringBuffer buf( 64 ); - buf.append( getWorkingDir() ); - buf.append( "/*" ); - m_url = buf.makeStringAndClear(); + m_url = getWorkingDir() + "/*"; } else if ( m_url == "-" ) { - OUStringBuffer buf( 64 ); - buf.append( getWorkingDir() ); - buf.append( "/-" ); - m_url = buf.makeStringAndClear(); + m_url = getWorkingDir() + "/-"; } else if (!m_url.startsWith("file:///")) { @@ -401,15 +395,11 @@ bool FilePermission::implies( Permission const & perm ) const OUString FilePermission::toString() const { - OUStringBuffer buf( 48 ); - // url - buf.append( "com.sun.star.io.FilePermission (url=\"" ); - buf.append( m_url ); - // actions - buf.append( "\", actions=\"" ); - buf.append( makeStrings( m_actions, s_actions ) ); - buf.append( "\")" ); - return buf.makeStringAndClear(); + return + // url + "com.sun.star.io.FilePermission (url=\"" + m_url + // actions + + "\", actions=\"" + makeStrings( m_actions, s_actions ) + "\")"; } namespace { |