summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/dispatchwatcher.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx
index 3d24a158261e..e4745f6761a5 100644
--- a/desktop/source/app/dispatchwatcher.cxx
+++ b/desktop/source/app/dispatchwatcher.cxx
@@ -243,16 +243,16 @@ void scriptCat(const Reference< XModel >& xDoc )
}
// Perform batch print
-void batchPrint( const OUString &rPrinterName, const Reference< XPrintable > &xDoc,
+void batchPrint( std::u16string_view rPrinterName, const Reference< XPrintable > &xDoc,
const INetURLObject &aObj, const OUString &aName )
{
OUString aFilterOut;
OUString aPrinterName;
- sal_Int32 nPathIndex = rPrinterName.lastIndexOf( ';' );
- if( nPathIndex != -1 )
- aFilterOut=rPrinterName.copy( nPathIndex+1 );
+ size_t nPathIndex = rPrinterName.rfind( ';' );
+ if( nPathIndex != std::u16string_view::npos )
+ aFilterOut=rPrinterName.substr( nPathIndex+1 );
if( nPathIndex != 0 )
- aPrinterName=rPrinterName.copy( 0, nPathIndex );
+ aPrinterName=rPrinterName.substr( 0, nPathIndex );
INetURLObject aOutFilename( aObj );
aOutFilename.SetExtension( u"pdf" );