vcl/unx/generic/print/printerjob.cxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
New commits: commit 49c16a49afb95d844df5746860e0ef6130bc929f Author: Matteo Casalin <matteo.casa...@yahoo.com> AuthorDate: Wed Jan 9 22:49:28 2019 +0100 Commit: Matteo Casalin <matteo.casa...@yahoo.com> CommitDate: Sun Jan 13 18:51:29 2019 +0100 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.casa...@yahoo.com> 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(); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits