summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2012-03-08 00:49:32 +0100
committerLuboš Luňák <l.lunak@suse.cz>2012-03-12 13:35:57 +0100
commit3f765e5bb2955683fc2db10f630365a4c35416d3 (patch)
tree005cbfefc4547529d7a1e416b657d44c6e1e8308 /dbaccess
parent56e4153e2cbee8d66659e0c59690ef8911ad090a (diff)
replace usage of OUString::replace*AsciiL() with string literal overloads
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/dataaccess/datasource.cxx3
-rw-r--r--dbaccess/source/core/dataaccess/documentcontainer.cxx6
-rw-r--r--dbaccess/source/ext/macromigration/migrationengine.cxx21
-rw-r--r--dbaccess/source/ui/app/AppController.cxx4
-rw-r--r--dbaccess/source/ui/uno/copytablewizard.cxx3
5 files changed, 12 insertions, 25 deletions
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index ae8971729bb2..dc0e767f1896 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -747,8 +747,7 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const ::rtl::O
SQLContext aContext;
aContext.Message = DBACORE_RESSTRING(RID_STR_CONNECTION_REQUEST).
- replaceFirstAsciiL(
- RTL_CONSTASCII_STRINGPARAM("$name$"), m_pImpl->m_sConnectURL);
+ replaceFirst("$name$", m_pImpl->m_sConnectURL);
throwGenericSQLException( sMessage, static_cast< XDataSource* >( this ), makeAny( aContext ) );
}
diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx
index 082a6f315f96..8b2481a2be7b 100644
--- a/dbaccess/source/core/dataaccess/documentcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx
@@ -542,8 +542,7 @@ Reference< XComponent > SAL_CALL ODocumentContainer::loadComponentFromURL( const
if ( !lcl_queryContent(_sURL,xNameContainer,aContent,sName) )
{
::rtl::OUString sMessage(
- DBA_RES(RID_STR_NAME_NOT_FOUND).replaceFirstAsciiL(
- RTL_CONSTASCII_STRINGPARAM("$name$"), _sURL));
+ DBA_RES(RID_STR_NAME_NOT_FOUND).replaceFirst("$name$", _sURL));
throw IllegalArgumentException( sMessage, *this, 1 );
}
@@ -613,8 +612,7 @@ void SAL_CALL ODocumentContainer::insertByHierarchicalName( const ::rtl::OUStrin
{
sal_Int32 index = sName.getLength();
::rtl::OUString sMessage(
- DBA_RES(RID_STR_NO_SUB_FOLDER).replaceFirstAsciiL(
- RTL_CONSTASCII_STRINGPARAM("$folder$"),
+ DBA_RES(RID_STR_NO_SUB_FOLDER).replaceFirst("$folder$",
_sName.getToken(0,'/',index)));
throw IllegalArgumentException( sMessage, *this, 1 );
}
diff --git a/dbaccess/source/ext/macromigration/migrationengine.cxx b/dbaccess/source/ext/macromigration/migrationengine.cxx
index 5bdde99a1407..5da4555fd2aa 100644
--- a/dbaccess/source/ext/macromigration/migrationengine.cxx
+++ b/dbaccess/source/ext/macromigration/migrationengine.cxx
@@ -257,9 +257,7 @@ namespace dbmm
ResId::toString(
MacroMigrationResId(
_rDocument.eType == eForm ? STR_FORM : STR_REPORT)).
- replaceFirstAsciiL(
- RTL_CONSTASCII_STRINGPARAM("$name$"),
- _rDocument.sHierarchicalName));
+ replaceFirst("$name$", _rDocument.sHierarchicalName));
return sObjectName;
}
@@ -1031,9 +1029,7 @@ namespace dbmm
sal_Int32 nOverallRange( m_aSubDocs.size() );
rtl::OUString sProgressSkeleton(
ResId::toString(MacroMigrationResId( STR_OVERALL_PROGRESS)).
- replaceFirstAsciiL(
- RTL_CONSTASCII_STRINGPARAM("$overall$"),
- rtl::OUString::valueOf(nOverallRange)));
+ replaceFirst("$overall$", rtl::OUString::valueOf(nOverallRange)));
m_rProgress.start( nOverallRange );
@@ -1045,8 +1041,7 @@ namespace dbmm
sal_Int32 nOverallProgressValue( doc - m_aSubDocs.begin() + 1 );
// update overall progress text
::rtl::OUString sOverallProgress(
- sProgressSkeleton.replaceFirstAsciiL(
- RTL_CONSTASCII_STRINGPARAM("$current$"),
+ sProgressSkeleton.replaceFirst("$current$",
::rtl::OUString::valueOf(nOverallProgressValue)));
m_rProgress.setOverallProgressText( sOverallProgress );
@@ -1938,14 +1933,12 @@ namespace dbmm
// a human-readable description of the affected library
::rtl::OUString sLibraryDescription(
ResId::toString(MacroMigrationResId(STR_LIBRARY_TYPE_AND_NAME)).
- replaceFirstAsciiL(
- RTL_CONSTASCII_STRINGPARAM("$type$"),
+ replaceFirst("$type$",
getScriptTypeDisplayName(_eScriptType)).
- replaceFirstAsciiL(
- RTL_CONSTASCII_STRINGPARAM("$library$"), _rLibraryName));
- //TODO: probably broken if first replaceFirstAsciiL can produce
+ replaceFirst("$library$", _rLibraryName));
+ //TODO: probably broken if first replaceFirst can produce
// fresh instance of "$library$" in subject string of second
- // replaceFirstAsciiL
+ // replaceFirst
InteractionHandler aHandler( m_aContext, m_xDocumentModel );
::rtl::OUString sPassword;
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 1ee3d1b77dd1..d5f2b6698309 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -2966,9 +2966,7 @@ void SAL_CALL OApplicationController::removeSelectionChangeListener( const Refer
::rtl::OUString sMessage(
rtl::OUString(
String(ModuleRes(RID_STR_UNSUPPORTED_OBJECT_TYPE))).
- replaceFirstAsciiL(
- RTL_CONSTASCII_STRINGPARAM("$type$"),
- ::rtl::OUString::valueOf(sal_Int32(pObject->Type))));
+ replaceFirst("$type$", ::rtl::OUString::valueOf(sal_Int32(pObject->Type))));
throw IllegalArgumentException(sMessage, *this, sal_Int16( pObject - aSelectedObjects.getConstArray() ));
}
}
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx
index cfcadfcf2e26..5af49b91f0d6 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -763,8 +763,7 @@ void CopyTableWizard::impl_checkForUnsupportedSettings_throw( const Reference< X
{
::rtl::OUString sMessage(
rtl::OUString(String(ModuleRes(STR_CTW_ERROR_UNSUPPORTED_SETTING))).
- replaceFirstAsciiL(
- RTL_CONSTASCII_STRINGPARAM("$name$"), sUnsupportedSetting));
+ replaceFirst("$name$", sUnsupportedSetting));
throw IllegalArgumentException(
sMessage,
*const_cast< CopyTableWizard* >( this ),