From 3f765e5bb2955683fc2db10f630365a4c35416d3 Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Thu, 8 Mar 2012 00:49:32 +0100 Subject: replace usage of OUString::replace*AsciiL() with string literal overloads --- basctl/source/basicide/baside3.cxx | 3 +-- basctl/source/basicide/basides1.cxx | 4 +--- basctl/source/basicide/bastypes.cxx | 6 ++---- basctl/source/basicide/brkdlg.cxx | 3 +-- basctl/source/basicide/moduldl2.cxx | 12 +++--------- basctl/source/dlged/managelang.cxx | 2 +- 6 files changed, 9 insertions(+), 21 deletions(-) (limited to 'basctl') diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 67c8b006ce93..d6ce0def323f 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -1063,8 +1063,7 @@ sal_Bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const { ::rtl::OUString aQueryBoxTitle(ResId::toString(IDEResId(RID_STR_DLGIMP_CLASH_TITLE))); ::rtl::OUString aQueryBoxText(ResId::toString(IDEResId(RID_STR_DLGIMP_CLASH_TEXT))); - aQueryBoxText = aQueryBoxText.replaceAllAsciiL( - RTL_CONSTASCII_STRINGPARAM("$(ARG1)"), aXmlDlgName); + aQueryBoxText = aQueryBoxText.replaceAll("$(ARG1)", aXmlDlgName); NameClashQueryBox aQueryBox( pWin, aQueryBoxTitle, aQueryBoxText ); sal_uInt16 nRet = aQueryBox.Execute(); diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index 96f662ba0c56..d78f43a6863f 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -177,9 +177,7 @@ void BasicIDEShell::ExecuteCurrent( SfxRequest& rReq ) nFound = ((ModulWindow*)pCurWin)->StartSearchAndReplace( (const SvxSearchItem&)rItem ); ::rtl::OUString aReplStr(ResId::toString(IDEResId(RID_STR_SEARCHREPLACES))); - aReplStr = aReplStr.replaceAllAsciiL( - RTL_CONSTASCII_STRINGPARAM("XX"), - rtl::OUString::valueOf(nFound)); + aReplStr = aReplStr.replaceAll("XX", rtl::OUString::valueOf(nFound)); InfoBox( pCurWin, aReplStr ).Execute(); } else diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index f7221f43f40d..3ea2668c6942 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -762,8 +762,7 @@ bool QueryDel( const ::rtl::OUString& rName, const ResId& rId, Window* pParent ) ::rtl::OUStringBuffer aNameBuf( rName ); aNameBuf.append('\''); aNameBuf.insert(sal_Int32(0), sal_Unicode('\'')); - aQuery = aQuery.replaceAllAsciiL( - RTL_CONSTASCII_STRINGPARAM("XX"), aNameBuf.makeStringAndClear()); + aQuery = aQuery.replaceAll("XX", aNameBuf.makeStringAndClear()); QueryBox aQueryBox( pParent, WB_YES_NO | WB_DEF_YES, aQuery ); return ( aQueryBox.Execute() == RET_YES ); } @@ -808,8 +807,7 @@ bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer, if ( bNewTitle ) { ::rtl::OUString aTitle(ResId::toString(IDEResId(RID_STR_ENTERPASSWORD))); - aTitle = aTitle.replaceAllAsciiL( - RTL_CONSTASCII_STRINGPARAM("XX"), rLibName); + aTitle = aTitle.replaceAll("XX", rLibName); pDlg->SetText( aTitle ); } diff --git a/basctl/source/basicide/brkdlg.cxx b/basctl/source/basicide/brkdlg.cxx index 917a95f6c55a..0df53c46eb28 100644 --- a/basctl/source/basicide/brkdlg.cxx +++ b/basctl/source/basicide/brkdlg.cxx @@ -50,8 +50,7 @@ bool lcl_ParseText(rtl::OUString const &rText, size_t& rLineNr ) // number n. (Maybe it would be better to ignore all whitespace instead // of just spaces.) rtl::OUString aText( - rText.replaceAllAsciiL( - RTL_CONSTASCII_STRINGPARAM(" "), rtl::OUString())); + rText.replaceAll(" ", rtl::OUString())); sal_Unicode cFirst = aText[0]; if (cFirst != '#' && !(cFirst >= '0' && cFirst <= '9')) return false; diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index ebb113765fc7..96545f649d51 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -962,9 +962,7 @@ void LibPage::InsertLib() ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aLibName ) && xDlgLibContainer->isLibraryReadOnly( aLibName ) && !xDlgLibContainer->isLibraryLink( aLibName ) ) ) { ::rtl::OUString aErrStr( ResId::toString( IDEResId( RID_STR_REPLACELIB ) ) ); - aErrStr = aErrStr.replaceAllAsciiL( - RTL_CONSTASCII_STRINGPARAM("XX"), - aLibName); + aErrStr = aErrStr.replaceAll("XX", aLibName); aErrStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n")); aErrStr += ResId::toString( IDEResId( RID_STR_LIBISREADONLY ) ); ErrorBox( this, WB_OK | WB_DEF_OK, aErrStr ).Execute(); @@ -981,9 +979,7 @@ void LibPage::InsertLib() aErrStr = ResId::toString( IDEResId( RID_STR_REFNOTPOSSIBLE ) ); else aErrStr = ResId::toString( IDEResId( RID_STR_IMPORTNOTPOSSIBLE ) ); - aErrStr = aErrStr.replaceAllAsciiL( - RTL_CONSTASCII_STRINGPARAM("XX"), - aLibName); + aErrStr = aErrStr.replaceAll("XX", aLibName); aErrStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n")); aErrStr += ResId::toString( IDEResId( RID_STR_SBXNAMEALLREADYUSED ) ); ErrorBox( this, WB_OK | WB_DEF_OK, aErrStr ).Execute(); @@ -1004,9 +1000,7 @@ void LibPage::InsertLib() if ( !bOK ) { ::rtl::OUString aErrStr( ResId::toString( IDEResId( RID_STR_NOIMPORT ) ) ); - aErrStr = aErrStr.replaceAllAsciiL( - RTL_CONSTASCII_STRINGPARAM("XX"), - aLibName); + aErrStr = aErrStr.replaceAll("XX", aLibName); ErrorBox( this, WB_OK | WB_DEF_OK, aErrStr ).Execute(); continue; } diff --git a/basctl/source/dlged/managelang.cxx b/basctl/source/dlged/managelang.cxx index 01935d5d1046..856d523154d3 100644 --- a/basctl/source/dlged/managelang.cxx +++ b/basctl/source/dlged/managelang.cxx @@ -121,7 +121,7 @@ void ManageLanguageDialog::Init() ::rtl::OUString sLibName = pIDEShell->GetCurLibName(); // set dialog title with library name ::rtl::OUString sText = GetText(); - sText = sText.replaceAllAsciiL(RTL_CONSTASCII_STRINGPARAM("$1"), sLibName); + sText = sText.replaceAll("$1", sLibName); SetText( sText ); // set handler m_aAddPB.SetClickHdl( LINK( this, ManageLanguageDialog, AddHdl ) ); -- cgit v1.2.3