summaryrefslogtreecommitdiff
path: root/vcl/generic/print
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-02-15 15:26:43 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-02-15 15:41:09 +0100
commit9ab0b38e95133dab720408cc2c80093b8a201c10 (patch)
tree416dde227ed5c4ded99292feb94f36a64c327999 /vcl/generic/print
parent42422f2599220b678aa41c4aadeec28df113c3ec (diff)
Various string function clean up
Added: * rtl::OString::matchL * rtl::OString::endsWith * rtl::OString::endsWithL * rtl::OString::indexOfL * rtl::OString::replaceFirst * rtl::OString::replaceAll * rtl::OString::getToken * rtl::OUString::endsWith * rtl::OUString::replaceFirst * rtl::OUString::replaceFirstAsciiL * rtl::OUString::replaceFirstAsciiLAsciiL * rtl::OUString::replaceAll * rtl::OUString::replaceAllAsciiL * rtl::OUString::replaceAllAsciiLAsciiL * rtl::OUString::getToken plus underlying C functions where necessary Deprecated: * comphelper::string::remove * comphelper::string::getToken Removed: * comphelper::string::searchAndReplaceAsciiL * comphelper::string::searchAndReplaceAllAsciiWithAscii * comphelper::string::searchAndReplaceAsciiI * comphelper::string::replace * comphelper::string::matchL * comphelper::string::matchIgnoreAsciiCaseL * comphelper::string::indexOfL Also fixed some apparent misuses of RTL_CONSTASCII_USTRINGPARAM -> RTL_CONSTASCII_STRINGPARAM.
Diffstat (limited to 'vcl/generic/print')
-rw-r--r--vcl/generic/print/common_gfx.cxx9
-rw-r--r--vcl/generic/print/genprnpsp.cxx11
2 files changed, 11 insertions, 9 deletions
diff --git a/vcl/generic/print/common_gfx.cxx b/vcl/generic/print/common_gfx.cxx
index 8de0134283f3..941a5ccc51c9 100644
--- a/vcl/generic/print/common_gfx.cxx
+++ b/vcl/generic/print/common_gfx.cxx
@@ -30,7 +30,6 @@
#include "psputil.hxx"
#include "glyphset.hxx"
-#include <comphelper/string.hxx>
#include "generic/printergfx.hxx"
#include "generic/printerjob.hxx"
#include "vcl/fontmanager.hxx"
@@ -1204,9 +1203,9 @@ PrinterGfx::DrawEPS( const Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize
char cChar = aLine[1];
if( cChar == '%' )
{
- if( comphelper::string::matchIgnoreAsciiCaseL( aLine, RTL_CONSTASCII_STRINGPARAM("%%BoundingBox:") ) )
+ if( aLine.matchIgnoreAsciiCase( rtl::OString( RTL_CONSTASCII_STRINGPARAM("%%BoundingBox:") ) ) )
{
- aLine = WhitespaceToSpace( comphelper::string::getToken(aLine, 1, ':') );
+ aLine = WhitespaceToSpace( aLine.getToken(1, ':') );
if( !aLine.isEmpty() && aLine.indexOf( "atend" ) == -1 )
{
fLeft = StringToDouble( GetCommandLineToken( 0, aLine ) );
@@ -1215,9 +1214,9 @@ PrinterGfx::DrawEPS( const Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize
fTop = StringToDouble( GetCommandLineToken( 3, aLine ) );
}
}
- else if( comphelper::string::matchIgnoreAsciiCaseL( aLine, RTL_CONSTASCII_STRINGPARAM("%%Title:") ) )
+ else if( aLine.matchIgnoreAsciiCase( rtl::OString( RTL_CONSTASCII_STRINGPARAM("%%Title:") ) ) )
aDocTitle = WhitespaceToSpace( aLine.copy( 8 ) );
- else if( comphelper::string::matchIgnoreAsciiCaseL( aLine, RTL_CONSTASCII_STRINGPARAM("%%EndComments") ) )
+ else if( aLine.matchIgnoreAsciiCase( rtl::OString( RTL_CONSTASCII_STRINGPARAM("%%EndComments") ) ) )
bEndComments = true;
}
else if( cChar == ' ' || cChar == '\t' || cChar == '\r' || cChar == '\n' )
diff --git a/vcl/generic/print/genprnpsp.cxx b/vcl/generic/print/genprnpsp.cxx
index 18980a421e28..9bc8731016c3 100644
--- a/vcl/generic/print/genprnpsp.cxx
+++ b/vcl/generic/print/genprnpsp.cxx
@@ -47,7 +47,6 @@
#endif
#include "rtl/ustring.hxx"
-#include "comphelper/string.hxx"
#include "osl/module.h"
@@ -243,7 +242,7 @@ static bool passFileToCommandLine( const OUString& rFilename, const OUString& rC
// setup command line for exec
if( ! bPipe )
- aCmdLine = comphelper::string::replace( aCmdLine, rtl::OString("(TMP)"), aFilename );
+ aCmdLine = aCmdLine.replaceAll(rtl::OString("(TMP)"), aFilename);
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "%s commandline: \"%s\"\n",
@@ -359,7 +358,9 @@ static bool sendAFax( const OUString& rFaxNumber, const OUString& rFileName, con
{
OUString aFaxNumber( aFaxNumbers.front() );
aFaxNumbers.pop_front();
- OUString aCmdLine = comphelper::string::replace( rCommand, OUString( RTL_CONSTASCII_USTRINGPARAM( "(PHONE)" ) ), aFaxNumber );
+ OUString aCmdLine(
+ rCommand.replaceAllAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("(PHONE)"), aFaxNumber));
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "sending fax to \"%s\"\n", OUStringToOString( aFaxNumber, osl_getThreadTextEncoding() ).getStr() );
#endif
@@ -382,7 +383,9 @@ static bool sendAFax( const OUString& rFaxNumber, const OUString& rFileName, con
static bool createPdf( const OUString& rToFile, const OUString& rFromFile, const OUString& rCommandLine )
{
#if defined( UNX )
- OUString aCommandLine = comphelper::string::replace( rCommandLine, OUString( RTL_CONSTASCII_USTRINGPARAM( "(OUTFILE)" ) ), rToFile );
+ OUString aCommandLine(
+ rCommandLine.replaceAllAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("(OUTFILE)"), rToFile));
return passFileToCommandLine( rFromFile, aCommandLine );
#else