summaryrefslogtreecommitdiff
path: root/padmin
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 /padmin
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 'padmin')
-rw-r--r--padmin/source/adddlg.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/padmin/source/adddlg.cxx b/padmin/source/adddlg.cxx
index 382924c37b7f..df2f4e2c8f93 100644
--- a/padmin/source/adddlg.cxx
+++ b/padmin/source/adddlg.cxx
@@ -39,7 +39,6 @@
#include <tools/config.hxx>
#include <osl/thread.h>
#include <rtl/strbuf.hxx>
-#include <comphelper/string.hxx>
#include <boost/unordered_set.hpp>
using namespace psp;
@@ -508,8 +507,6 @@ APOldPrinterPage::APOldPrinterPage( AddPrinterDialog* pParent )
rtl::OString aDefCopies( aConfig.ReadKey( "Copies" ) );
rtl::OString aDefDPI( aConfig.ReadKey( "DPI" ) );
- using comphelper::string::getToken;
-
aConfig.SetGroup( "devices" );
int nDevices = aConfig.GetKeyCount();
for( int nKey = 0; nKey < nDevices; nKey++ )
@@ -517,9 +514,9 @@ APOldPrinterPage::APOldPrinterPage( AddPrinterDialog* pParent )
aConfig.SetGroup( "devices" );
rtl::OString aPrinter(aConfig.GetKeyName(nKey));
rtl::OString aValue(aConfig.ReadKey(aPrinter));
- rtl::OString aPort(getToken(aValue, 1, ','));
- rtl::OString aDriver(getToken(aValue, 0, ' '));
- rtl::OString aPS( getToken(getToken(aValue, 0, ','), 1, ' ') );
+ rtl::OString aPort(aValue.getToken(1, ','));
+ rtl::OString aDriver(aValue.getToken(0, ' '));
+ rtl::OString aPS( aValue.getToken(0, ',').getToken(1, ' ') );
rtl::OString aNewDriver(aDriver);
if( aDriver.equalsL(RTL_CONSTASCII_STRINGPARAM("GENERIC")))
aNewDriver = rtl::OString(RTL_CONSTASCII_STRINGPARAM("SGENPRT"));
@@ -613,7 +610,7 @@ APOldPrinterPage::APOldPrinterPage( AddPrinterDialog* pParent )
// should never have been writte because they are defaults
// PageRegion leads to problems in conjunction
// with a not matching PageSize
- if (comphelper::string::matchL(aPPDKey, RTL_CONSTASCII_STRINGPARAM("PPD_")) &&
+ if (aPPDKey.matchL(RTL_CONSTASCII_STRINGPARAM("PPD_")) &&
!aPPDKey.equalsL(RTL_CONSTASCII_STRINGPARAM("PPD_PageRegion")))
{
aValue = aConfig.ReadKey( nPPDKey );