summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2012-07-12 22:10:17 +0200
committerEike Rathke <erack@redhat.com>2012-07-13 16:36:04 +0200
commita7674482254ee996b1c4fee60f3064778be369aa (patch)
treedcafebf4d72d6d26ad949f0d18a000ea00f02315 /desktop
parent0cba5e5d25bf2f30c8500e1e673a7ef9e8e8d352 (diff)
Search for char instead of 1 char long string, when possible.
It is faster and even avoid memory allocation somtimes. Change-Id: Ic12ff70e95953de44ef5798131150669d07a5445
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/dispatchwatcher.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx
index fe295b15dc45..1ed73d59f48f 100644
--- a/desktop/source/app/dispatchwatcher.cxx
+++ b/desktop/source/app/dispatchwatcher.cxx
@@ -434,8 +434,8 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
Reference< XStorable > xStorable( xDoc, UNO_QUERY );
if ( xStorable.is() ) {
rtl::OUString aParam = aDispatchRequest.aPrinterName;
- sal_Int32 nPathIndex = aParam.lastIndexOfAsciiL( ";", 1 );
- sal_Int32 nFilterIndex = aParam.indexOfAsciiL( ":", 1 );
+ sal_Int32 nPathIndex = aParam.lastIndexOf( ';' );
+ sal_Int32 nFilterIndex = aParam.indexOf( ':' );
if( nPathIndex < nFilterIndex )
nFilterIndex = -1;
rtl::OUString aFilterOut=aParam.copy( nPathIndex+1 );
@@ -493,7 +493,7 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
}
} else if ( aDispatchRequest.aRequestType == REQUEST_BATCHPRINT ) {
rtl::OUString aParam = aDispatchRequest.aPrinterName;
- sal_Int32 nPathIndex = aParam.lastIndexOfAsciiL( ";", 1 );
+ sal_Int32 nPathIndex = aParam.lastIndexOf( ';' );
rtl::OUString aFilterOut;
rtl::OUString aPrinterName;