[Libreoffice-commits] core.git: vcl/unx
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sun Jan 13 17:51:49 UTC 2019
vcl/unx/generic/print/printerjob.cxx | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
New commits:
commit 49c16a49afb95d844df5746860e0ef6130bc929f
Author: Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Wed Jan 9 22:49:28 2019 +0100
Commit: Matteo Casalin <matteo.casalin at 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.casalin at 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();
}
More information about the Libreoffice-commits
mailing list