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 /desktop | |
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 'desktop')
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx | 26 | ||||
-rw-r--r-- | desktop/source/deployment/misc/dp_dependencies.cxx | 5 |
2 files changed, 21 insertions, 10 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx index 53a179403e3d..62347ce12804 100644 --- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx +++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx @@ -75,10 +75,8 @@ #include "cppuhelper/exc_hlp.hxx" #include "cppuhelper/implbase3.hxx" #include "comphelper/anytostring.hxx" -#include "comphelper/string.hxx" #include "vcl/msgbox.hxx" #include "toolkit/helper/vclunohelper.hxx" -#include "comphelper/processfactory.hxx" #include "dp_gui.h" #include "dp_gui_thread.hxx" @@ -899,7 +897,9 @@ void ExtensionCmdQueue::Thread::_addExtension( ::rtl::Reference< ProgressCmdEnv rCmdEnv->setWarnUser( bWarnUser ); uno::Reference< deployment::XExtensionManager > xExtMgr = m_pManager->getExtensionManager(); uno::Reference< task::XAbortChannel > xAbortChannel( xExtMgr->createAbortChannel() ); - OUString sTitle = comphelper::string::replace(m_sAddingPackages, OUSTR("%EXTENSION_NAME"), sName); + OUString sTitle( + m_sAddingPackages.replaceAllAsciiL( + RTL_CONSTASCII_STRINGPARAM("%EXTENSION_NAME"), sName)); rCmdEnv->progressSection( sTitle, xAbortChannel ); try @@ -926,7 +926,10 @@ void ExtensionCmdQueue::Thread::_removeExtension( ::rtl::Reference< ProgressCmdE { uno::Reference< deployment::XExtensionManager > xExtMgr = m_pManager->getExtensionManager(); uno::Reference< task::XAbortChannel > xAbortChannel( xExtMgr->createAbortChannel() ); - OUString sTitle = comphelper::string::replace(m_sRemovingPackages, OUSTR("%EXTENSION_NAME"), xPackage->getDisplayName()); + OUString sTitle( + m_sRemovingPackages.replaceAllAsciiL( + RTL_CONSTASCII_STRINGPARAM("%EXTENSION_NAME"), + xPackage->getDisplayName())); rCmdEnv->progressSection( sTitle, xAbortChannel ); OUString id( dp_misc::getIdentifier( xPackage ) ); @@ -1009,7 +1012,10 @@ void ExtensionCmdQueue::Thread::_enableExtension( ::rtl::Reference< ProgressCmdE uno::Reference< deployment::XExtensionManager > xExtMgr = m_pManager->getExtensionManager(); uno::Reference< task::XAbortChannel > xAbortChannel( xExtMgr->createAbortChannel() ); - OUString sTitle = comphelper::string::replace(m_sEnablingPackages, OUSTR("%EXTENSION_NAME"), xPackage->getDisplayName()); + OUString sTitle( + m_sEnablingPackages.replaceAllAsciiL( + RTL_CONSTASCII_STRINGPARAM("%EXTENSION_NAME"), + xPackage->getDisplayName())); rCmdEnv->progressSection( sTitle, xAbortChannel ); try @@ -1031,7 +1037,10 @@ void ExtensionCmdQueue::Thread::_disableExtension( ::rtl::Reference< ProgressCmd uno::Reference< deployment::XExtensionManager > xExtMgr = m_pManager->getExtensionManager(); uno::Reference< task::XAbortChannel > xAbortChannel( xExtMgr->createAbortChannel() ); - OUString sTitle = comphelper::string::replace(m_sDisablingPackages, OUSTR("%EXTENSION_NAME"), xPackage->getDisplayName()); + OUString sTitle( + m_sDisablingPackages.replaceAllAsciiL( + RTL_CONSTASCII_STRINGPARAM("%EXTENSION_NAME"), + xPackage->getDisplayName())); rCmdEnv->progressSection( sTitle, xAbortChannel ); try @@ -1053,7 +1062,10 @@ void ExtensionCmdQueue::Thread::_acceptLicense( ::rtl::Reference< ProgressCmdEnv uno::Reference< deployment::XExtensionManager > xExtMgr = m_pManager->getExtensionManager(); uno::Reference< task::XAbortChannel > xAbortChannel( xExtMgr->createAbortChannel() ); - OUString sTitle = comphelper::string::replace(m_sAcceptLicense, OUSTR("%EXTENSION_NAME"), xPackage->getDisplayName()); + OUString sTitle( + m_sAcceptLicense.replaceAllAsciiL( + RTL_CONSTASCII_STRINGPARAM("%EXTENSION_NAME"), + xPackage->getDisplayName())); rCmdEnv->progressSection( sTitle, xAbortChannel ); try diff --git a/desktop/source/deployment/misc/dp_dependencies.cxx b/desktop/source/deployment/misc/dp_dependencies.cxx index 7581af831a83..e24873f7c017 100644 --- a/desktop/source/deployment/misc/dp_dependencies.cxx +++ b/desktop/source/deployment/misc/dp_dependencies.cxx @@ -32,7 +32,6 @@ #include "com/sun/star/uno/Sequence.hxx" #include "com/sun/star/xml/dom/XElement.hpp" #include "com/sun/star/xml/dom/XNodeList.hpp" -#include "comphelper/string.hxx" #include "rtl/bootstrap.hxx" #include "rtl/string.h" #include "rtl/ustring.h" @@ -94,8 +93,8 @@ bool satisfiesMaximalVersion( rtl::OUString produceErrorText( rtl::OUString const & reason, rtl::OUString const & version) { - return comphelper::string::searchAndReplaceAsciiL( - reason, RTL_CONSTASCII_STRINGPARAM("%VERSION"), + return reason.replaceFirstAsciiL( + RTL_CONSTASCII_STRINGPARAM("%VERSION"), (version.isEmpty() ? ResId::toString( dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_UNKNOWN)) |