diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-16 10:13:30 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-16 12:12:31 +0200 |
commit | 4a96fb8ec0130e1036913093836bcf28bc37a49b (patch) | |
tree | e7aad9be4ca417e9e64f688cc99bee0638037741 /vcl/unx/generic/print | |
parent | f33b6e341fb7dd1ab3acd4fe5457b716be316e89 (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 'vcl/unx/generic/print')
-rw-r--r-- | vcl/unx/generic/print/printerjob.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/vcl/unx/generic/print/printerjob.cxx b/vcl/unx/generic/print/printerjob.cxx index 73dedc5a2415..7d805ef942e5 100644 --- a/vcl/unx/generic/print/printerjob.cxx +++ b/vcl/unx/generic/print/printerjob.cxx @@ -211,18 +211,14 @@ createSpoolDir () do { - OUStringBuffer aDir( aTmpDir.getLength() + 16 ); - aDir.append( aTmpDir ); - aDir.append( "/psp" ); - aDir.append(nRand); - OUString aResult = aDir.makeStringAndClear(); - if( osl::Directory::create( aResult ) == osl::FileBase::E_None ) + OUString aDir = aTmpDir + "/psp" + OUString::number(nRand); + if( osl::Directory::create( aDir ) == osl::FileBase::E_None ) { - osl::File::setAttributes( aResult, + osl::File::setAttributes( aDir, osl_File_Attribute_OwnWrite | osl_File_Attribute_OwnRead | osl_File_Attribute_OwnExe ); - return aResult; + return aDir; } nRand++; } while( nRand ); |