diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2019-01-09 22:49:28 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2019-01-13 18:51:29 +0100 |
commit | 49c16a49afb95d844df5746860e0ef6130bc929f (patch) | |
tree | 11bd52ab78b3ee5e0c918f34f8c228b6a5a6bdba /vcl/unx | |
parent | 889b57e48d94d11cd76578f421ef27534300a894 (diff) |
Do not loop on getToken to just get last token
Change-Id: If0f6761d0f3632146dcc4fbbc8fa0405eb2007ff
Reviewed-on: https://gerrit.libreoffice.org/66234
Tested-by: Jenkins
Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/print/printerjob.cxx | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/vcl/unx/generic/print/printerjob.cxx b/vcl/unx/generic/print/printerjob.cxx index c1f1a0f718d4..ba68913619f9 100644 --- a/vcl/unx/generic/print/printerjob.cxx +++ b/vcl/unx/generic/print/printerjob.cxx @@ -348,10 +348,7 @@ PrinterJob::StartJob ( OUString aTitle( aFilterWS ); if( ! isAscii( aTitle ) ) { - sal_Int32 nIndex = 0; - while( nIndex != -1 ) - aTitle = rFileName.getToken( 0, '/', nIndex ); - aTitle = WhitespaceToSpace( aTitle, false ); + aTitle = WhitespaceToSpace( rFileName.copy(rFileName.lastIndexOf('/')+1), false ); if( ! isAscii( aTitle ) ) aTitle.clear(); } |