diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-02-15 15:26:43 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-02-15 15:41:09 +0100 |
commit | 9ab0b38e95133dab720408cc2c80093b8a201c10 (patch) | |
tree | 416dde227ed5c4ded99292feb94f36a64c327999 /basctl/source/basicide/brkdlg.cxx | |
parent | 42422f2599220b678aa41c4aadeec28df113c3ec (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 'basctl/source/basicide/brkdlg.cxx')
-rw-r--r-- | basctl/source/basicide/brkdlg.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/basctl/source/basicide/brkdlg.cxx b/basctl/source/basicide/brkdlg.cxx index 3365e13897cb..917a95f6c55a 100644 --- a/basctl/source/basicide/brkdlg.cxx +++ b/basctl/source/basicide/brkdlg.cxx @@ -36,28 +36,29 @@ #include "basidesh.hrc" #include "iderdll.hxx" -#include <comphelper/string.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/viewfrm.hxx> // FIXME Why does BreakPointDialog allow only sal_uInt16 for break-point line // numbers, whereas BreakPoint supports sal_uLong? -bool lcl_ParseText( const String &rText, size_t& rLineNr ) +bool lcl_ParseText(rtl::OUString const &rText, size_t& rLineNr ) { // aText should look like "# n" where // n > 0 && n < std::numeric_limits< sal_uInt16 >::max(). // All spaces are ignored, so there can even be spaces within the // number n. (Maybe it would be better to ignore all whitespace instead // of just spaces.) - String aText = comphelper::string::remove(rText, ' '); - sal_Unicode cFirst = aText.GetChar(0); + rtl::OUString aText( + rText.replaceAllAsciiL( + RTL_CONSTASCII_STRINGPARAM(" "), rtl::OUString())); + sal_Unicode cFirst = aText[0]; if (cFirst != '#' && !(cFirst >= '0' && cFirst <= '9')) return false; if (cFirst == '#') - aText.Erase(0, 1); + aText = aText.copy(1); // XXX Assumes that sal_uInt16 is contained within sal_Int32: - sal_Int32 n = aText.ToInt32(); + sal_Int32 n = aText.toInt32(); if ( n <= 0 ) return false; rLineNr = static_cast< size_t >(n); |