summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-06-02 11:04:27 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-06-02 12:58:04 -0500
commitcf04745f7a027594fd64a493c276a8280dbccfe1 (patch)
tree39b85e3750c451005933f253f78b5fffe7d08c6e /dbaccess
parent69660f216aff43f397bbcc9d3c0f251078a6aa79 (diff)
targeted string re-work
Change-Id: I08114529cc6be6148a4f9ee3c89aafaafada77fe
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/api/CacheSet.cxx30
-rw-r--r--dbaccess/source/core/api/FilteredContainer.cxx8
-rw-r--r--dbaccess/source/core/api/KeySet.cxx74
-rw-r--r--dbaccess/source/core/api/OptimisticSet.cxx10
-rw-r--r--dbaccess/source/core/api/RowSet.cxx10
-rw-r--r--dbaccess/source/core/api/callablestatement.cxx2
-rw-r--r--dbaccess/source/core/api/column.cxx4
-rw-r--r--dbaccess/source/core/api/datacolumn.cxx2
-rw-r--r--dbaccess/source/core/api/definitioncolumn.cxx10
-rw-r--r--dbaccess/source/core/api/preparedstatement.cxx2
-rw-r--r--dbaccess/source/core/api/querydescriptor.cxx2
-rw-r--r--dbaccess/source/core/api/resultcolumn.cxx2
-rw-r--r--dbaccess/source/core/api/resultset.cxx2
-rw-r--r--dbaccess/source/core/api/statement.cxx2
-rw-r--r--dbaccess/source/core/api/tablecontainer.cxx8
-rw-r--r--dbaccess/source/core/api/viewcontainer.cxx6
16 files changed, 87 insertions, 87 deletions
diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx
index 5a692fb76183..f5b6caa6e5e0 100644
--- a/dbaccess/source/core/api/CacheSet.cxx
+++ b/dbaccess/source/core/api/CacheSet.cxx
@@ -165,17 +165,17 @@ void OCacheSet::fillTableName(const Reference<XPropertySet>& _xTable) throw(SQL
void SAL_CALL OCacheSet::insertRow( const ORowSetRow& _rInsertRow,const connectivity::OSQLTable& _xTable ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::insertRow" );
- ::rtl::OUStringBuffer aSql(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INSERT INTO ")));
+ ::rtl::OUStringBuffer aSql(::rtl::OUString("INSERT INTO "));
Reference<XPropertySet> xSet(_xTable,UNO_QUERY);
fillTableName(xSet);
aSql.append(m_aComposedTableName);
- aSql.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ( ")));
+ aSql.append(::rtl::OUString(" ( "));
// set values and column names
- ::rtl::OUStringBuffer aValues = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" VALUES ( "));
- static ::rtl::OUString aPara(RTL_CONSTASCII_USTRINGPARAM("?,"));
+ ::rtl::OUStringBuffer aValues = ::rtl::OUString(" VALUES ( ");
+ static ::rtl::OUString aPara("?,");
::rtl::OUString aQuote = getIdentifierQuoteString();
- static ::rtl::OUString aComma(RTL_CONSTASCII_USTRINGPARAM(","));
+ static ::rtl::OUString aComma(",");
sal_Int32 i = 1;
ORowVector< ORowSetValue >::Vector::const_iterator aIter = _rInsertRow->get().begin()+1;
connectivity::ORowVector< ORowSetValue > ::Vector::iterator aEnd = _rInsertRow->get().end();
@@ -245,16 +245,16 @@ void OCacheSet::fillParameters( const ORowSetRow& _rRow
::rtl::OUString aColumnName;
- static ::rtl::OUString aPara(RTL_CONSTASCII_USTRINGPARAM("?,"));
- static ::rtl::OUString aAnd(RTL_CONSTASCII_USTRINGPARAM(" AND "));
+ static ::rtl::OUString aPara("?,");
+ static ::rtl::OUString aAnd(" AND ");
::rtl::OUString aQuote = getIdentifierQuoteString();
sal_Int32 nCheckCount = 1; // index for the orginal values
sal_Int32 i = 1;
- ::rtl::OUString sIsNull(RTL_CONSTASCII_USTRINGPARAM(" IS NULL"));
- ::rtl::OUString sParam(RTL_CONSTASCII_USTRINGPARAM(" = ?"));
+ ::rtl::OUString sIsNull(" IS NULL");
+ ::rtl::OUString sParam(" = ?");
ORowVector< ORowSetValue >::Vector::const_iterator aIter = _rRow->get().begin()+1;
ORowVector< ORowSetValue >::Vector::const_iterator aEnd = _rRow->get().end()+1;
for(; aIter != aEnd;++aIter,++nCheckCount,++i)
@@ -301,9 +301,9 @@ void SAL_CALL OCacheSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetR
Reference<XPropertySet> xSet(_xTable,UNO_QUERY);
fillTableName(xSet);
- ::rtl::OUStringBuffer aSql = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UPDATE "));
+ ::rtl::OUStringBuffer aSql = ::rtl::OUString("UPDATE ");
aSql.append(m_aComposedTableName);
- aSql.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" SET ")));
+ aSql.append(::rtl::OUString(" SET "));
// list all cloumns that should be set
::rtl::OUStringBuffer aCondition;
@@ -314,7 +314,7 @@ void SAL_CALL OCacheSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetR
{
aCondition.setLength(aCondition.getLength()-5);
- aSql.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" WHERE ")));
+ aSql.append(::rtl::OUString(" WHERE "));
aSql.append(aCondition.makeStringAndClear());
}
else
@@ -349,13 +349,13 @@ void SAL_CALL OCacheSet::deleteRow(const ORowSetRow& _rDeleteRow ,const connecti
Reference<XPropertySet> xSet(_xTable,UNO_QUERY);
fillTableName(xSet);
- ::rtl::OUStringBuffer aSql = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DELETE FROM "));
+ ::rtl::OUStringBuffer aSql = ::rtl::OUString("DELETE FROM ");
aSql.append(m_aComposedTableName);
- aSql.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" WHERE ")));
+ aSql.append(::rtl::OUString(" WHERE "));
// list all cloumns that should be set
::rtl::OUString aQuote = getIdentifierQuoteString();
- static ::rtl::OUString aAnd(RTL_CONSTASCII_USTRINGPARAM(" AND "));
+ static ::rtl::OUString aAnd(" AND ");
// use keys and indexes for exact positioning
// first the keys
diff --git a/dbaccess/source/core/api/FilteredContainer.cxx b/dbaccess/source/core/api/FilteredContainer.cxx
index 2da3120991a2..82797eab8407 100644
--- a/dbaccess/source/core/api/FilteredContainer.cxx
+++ b/dbaccess/source/core/api/FilteredContainer.cxx
@@ -359,7 +359,7 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
}
}
- static const ::rtl::OUString sAll(RTL_CONSTASCII_USTRINGPARAM("%"));
+ static const ::rtl::OUString sAll("%");
Reference< XResultSet > xTables = m_xMetaData->getTables( Any(), sAll, sAll, aTableTypeFilter );
Reference< XRow > xCurrentRow( xTables, UNO_QUERY_THROW );
@@ -450,9 +450,9 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
OSL_VERIFY( aFilterModeSetting >>= nFilterMode );
}
- const ::rtl::OUString sAll( RTL_CONSTASCII_USTRINGPARAM( "%" ) );
- const ::rtl::OUString sView( RTL_CONSTASCII_USTRINGPARAM( "VIEW" ) );
- const ::rtl::OUString sTable( RTL_CONSTASCII_USTRINGPARAM( "TABLE" ) );
+ const ::rtl::OUString sAll( "%" );
+ const ::rtl::OUString sView( "VIEW" );
+ const ::rtl::OUString sTable( "TABLE" );
switch ( nFilterMode )
{
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index 49f463662d99..c1b327cea51d 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -203,7 +203,7 @@ void OKeySet::findTableColumnsMatching_throw( const Any& i_aTable,
if ( o_pKeyColumnNames->empty() )
{
- ::dbtools::throwGenericSQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Could not find any key column." ) ), *this );
+ ::dbtools::throwGenericSQLException( ::rtl::OUString( "Could not find any key column." ), *this );
}
for ( SelectColumnsMetaData::const_iterator keyColumn = o_pKeyColumnNames->begin();
@@ -226,10 +226,10 @@ namespace
{
void appendOneKeyColumnClause( const ::rtl::OUString &tblName, const ::rtl::OUString &colName, ::rtl::OUStringBuffer &o_buf )
{
- static ::rtl::OUString s_sDot(RTL_CONSTASCII_USTRINGPARAM("."));
- static ::rtl::OUString s_sParam0(RTL_CONSTASCII_USTRINGPARAM(" ( 1 = ? AND "));
- static ::rtl::OUString s_sParam1(RTL_CONSTASCII_USTRINGPARAM(" = ? OR 1 = ? AND "));
- static ::rtl::OUString s_sParam2(RTL_CONSTASCII_USTRINGPARAM(" IS NULL ) "));
+ static ::rtl::OUString s_sDot(".");
+ static ::rtl::OUString s_sParam0(" ( 1 = ? AND ");
+ static ::rtl::OUString s_sParam1(" = ? OR 1 = ? AND ");
+ static ::rtl::OUString s_sParam2(" IS NULL ) ");
o_buf.append(s_sParam0);
o_buf.append(tblName);
o_buf.append(s_sDot);
@@ -261,7 +261,7 @@ void OKeySet::setOneKeyColumnParameter( sal_Int32 &nPos, const Reference< XParam
::rtl::OUStringBuffer OKeySet::createKeyFilter()
{
- static ::rtl::OUString aAnd(RTL_CONSTASCII_USTRINGPARAM(" AND "));
+ static ::rtl::OUString aAnd(" AND ");
const ::rtl::OUString aQuote = getIdentifierQuoteString();
::rtl::OUStringBuffer aFilter;
// create the where clause
@@ -307,7 +307,7 @@ void OKeySet::construct(const Reference< XResultSet>& _xDriverSet,const ::rtl::O
const Sequence< ::rtl::OUString> aSeq = xSelectTables->getElementNames();
if ( aSeq.getLength() > 1 ) // special handling for join
{
- static ::rtl::OUString aAnd(RTL_CONSTASCII_USTRINGPARAM(" AND "));
+ static ::rtl::OUString aAnd(" AND ");
const ::rtl::OUString aQuote = getIdentifierQuoteString();
const ::rtl::OUString* pIter = aSeq.getConstArray();
const ::rtl::OUString* pEnd = pIter + aSeq.getLength();
@@ -429,22 +429,22 @@ Sequence< sal_Int32 > SAL_CALL OKeySet::deleteRows( const Sequence< Any >& rows
Reference<XPropertySet> xSet(_xTable,UNO_QUERY);
fillTableName(xSet);
- ::rtl::OUStringBuffer aSql = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DELETE FROM "));
+ ::rtl::OUStringBuffer aSql = ::rtl::OUString("DELETE FROM ");
aSql.append(m_aComposedTableName);
- aSql.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" WHERE ")));
+ aSql.append(::rtl::OUString(" WHERE "));
// list all cloumns that should be set
const ::rtl::OUString aQuote = getIdentifierQuoteString();
- static ::rtl::OUString aAnd(RTL_CONSTASCII_USTRINGPARAM(" AND "));
- static ::rtl::OUString aOr(RTL_CONSTASCII_USTRINGPARAM(" OR "));
- static ::rtl::OUString aEqual(RTL_CONSTASCII_USTRINGPARAM(" = ?"));
+ static ::rtl::OUString aAnd(" AND ");
+ static ::rtl::OUString aOr(" OR ");
+ static ::rtl::OUString aEqual(" = ?");
// use keys and indexes for excat postioning
// first the keys
Reference<XNameAccess> xKeyColumns = getKeyColumns();
- ::rtl::OUStringBuffer aCondition = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("( "));
+ ::rtl::OUStringBuffer aCondition = ::rtl::OUString("( ");
SelectColumnsMetaData::const_iterator aIter = (*m_pKeyColumnNames).begin();
SelectColumnsMetaData::const_iterator aPosEnd = (*m_pKeyColumnNames).end();
@@ -517,15 +517,15 @@ void SAL_CALL OKeySet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow
Reference<XPropertySet> xSet(_xTable,UNO_QUERY);
fillTableName(xSet);
- ::rtl::OUStringBuffer aSql = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UPDATE "));
+ ::rtl::OUStringBuffer aSql = ::rtl::OUString("UPDATE ");
aSql.append(m_aComposedTableName);
- aSql.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" SET ")));
+ aSql.append(::rtl::OUString(" SET "));
// list all cloumns that should be set
- static ::rtl::OUString aPara(RTL_CONSTASCII_USTRINGPARAM(" = ?,"));
+ static ::rtl::OUString aPara(" = ?,");
::rtl::OUString aQuote = getIdentifierQuoteString();
- static ::rtl::OUString aAnd(RTL_CONSTASCII_USTRINGPARAM(" AND "));
- ::rtl::OUString sIsNull(RTL_CONSTASCII_USTRINGPARAM(" IS NULL"));
- ::rtl::OUString sParam(RTL_CONSTASCII_USTRINGPARAM(" = ?"));
+ static ::rtl::OUString aAnd(" AND ");
+ ::rtl::OUString sIsNull(" IS NULL");
+ ::rtl::OUString sParam(" = ?");
// use keys and indexes for excat postioning
// first the keys
@@ -598,7 +598,7 @@ void SAL_CALL OKeySet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow
if(sKeyCondition.getLength() || sIndexCondition.getLength())
{
- aSql.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" WHERE ")));
+ aSql.append(::rtl::OUString(" WHERE "));
if(sKeyCondition.getLength() && sIndexCondition.getLength())
{
aSql.append(sKeyCondition.makeStringAndClear());
@@ -691,17 +691,17 @@ void OKeySet::executeUpdate(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rO
void SAL_CALL OKeySet::insertRow( const ORowSetRow& _rInsertRow,const connectivity::OSQLTable& _xTable ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::insertRow" );
- ::rtl::OUStringBuffer aSql(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INSERT INTO ")));
+ ::rtl::OUStringBuffer aSql(::rtl::OUString("INSERT INTO "));
Reference<XPropertySet> xSet(_xTable,UNO_QUERY);
fillTableName(xSet);
aSql.append(m_aComposedTableName);
- aSql.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ( ")));
+ aSql.append(::rtl::OUString(" ( "));
// set values and column names
- ::rtl::OUStringBuffer aValues(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" VALUES ( ")));
- static ::rtl::OUString aPara(RTL_CONSTASCII_USTRINGPARAM("?,"));
+ ::rtl::OUStringBuffer aValues(::rtl::OUString(" VALUES ( "));
+ static ::rtl::OUString aPara("?,");
::rtl::OUString aQuote = getIdentifierQuoteString();
- static ::rtl::OUString aComma(RTL_CONSTASCII_USTRINGPARAM(","));
+ static ::rtl::OUString aComma(",");
SelectColumnsMetaData::const_iterator aIter = m_pColumnNames->begin();
SelectColumnsMetaData::const_iterator aEnd = m_pColumnNames->end();
@@ -809,8 +809,8 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const ::rtl::OUString
if ( i_sTableName.isEmpty() && !bAutoValuesFetched && m_bInserted )
{
// first check if all key column values were set
- const ::rtl::OUString sMax(RTL_CONSTASCII_USTRINGPARAM(" MAX("));
- const ::rtl::OUString sMaxEnd(RTL_CONSTASCII_USTRINGPARAM("),"));
+ const ::rtl::OUString sMax(" MAX(");
+ const ::rtl::OUString sMaxEnd("),");
const ::rtl::OUString sQuote = getIdentifierQuoteString();
::rtl::OUString sMaxStmt;
aEnd = m_pKeyColumnNames->end();
@@ -831,10 +831,10 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const ::rtl::OUString
if(!sMaxStmt.isEmpty())
{
- sMaxStmt = sMaxStmt.replaceAt(sMaxStmt.getLength()-1,1,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ")));
- ::rtl::OUString sStmt = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT "));
+ sMaxStmt = sMaxStmt.replaceAt(sMaxStmt.getLength()-1,1,::rtl::OUString(" "));
+ ::rtl::OUString sStmt = ::rtl::OUString("SELECT ");
sStmt += sMaxStmt;
- sStmt += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FROM "));
+ sStmt += ::rtl::OUString("FROM ");
::rtl::OUString sCatalog,sSchema,sTable;
::dbtools::qualifiedNameComponents(m_xConnection->getMetaData(),m_sUpdateTableName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation);
sStmt += ::dbtools::composeTableNameForSelect( m_xConnection, sCatalog, sSchema, sTable );
@@ -941,13 +941,13 @@ void SAL_CALL OKeySet::deleteRow(const ORowSetRow& _rDeleteRow,const connectivit
Reference<XPropertySet> xSet(_xTable,UNO_QUERY);
fillTableName(xSet);
- ::rtl::OUStringBuffer aSql = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DELETE FROM "));
+ ::rtl::OUStringBuffer aSql = ::rtl::OUString("DELETE FROM ");
aSql.append(m_aComposedTableName);
- aSql.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" WHERE ")));
+ aSql.append(::rtl::OUString(" WHERE "));
// list all cloumns that should be set
::rtl::OUString aQuote = getIdentifierQuoteString();
- static ::rtl::OUString aAnd(RTL_CONSTASCII_USTRINGPARAM(" AND "));
+ static ::rtl::OUString aAnd(" AND ");
// use keys and indexes for excat postioning
Reference<XNameAccess> xKeyColumns = getKeyColumns();
@@ -976,10 +976,10 @@ void SAL_CALL OKeySet::deleteRow(const ORowSetRow& _rDeleteRow,const connectivit
if((_rDeleteRow->get())[aIter->second.nPosition].isNull())
{
OSL_FAIL("can a primary key be null");
- aSql.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" IS NULL")));
+ aSql.append(::rtl::OUString(" IS NULL"));
}
else
- aSql.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" = ?")));
+ aSql.append(::rtl::OUString(" = ?"));
aSql.append(aAnd);
}
else
@@ -992,10 +992,10 @@ void SAL_CALL OKeySet::deleteRow(const ORowSetRow& _rDeleteRow,const connectivit
{
sIndexCondition.append(::dbtools::quoteName( aQuote,aIter->second.sRealName));
if((_rDeleteRow->get())[aIter->second.nPosition].isNull())
- sIndexCondition.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" IS NULL")));
+ sIndexCondition.append(::rtl::OUString(" IS NULL"));
else
{
- sIndexCondition.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" = ?")));
+ sIndexCondition.append(::rtl::OUString(" = ?"));
aIndexColumnPositions.push_back(aIter->second.nPosition);
}
sIndexCondition.append(aAnd);
diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx
index 8d408f6b1e0d..274eb16c0cde 100644
--- a/dbaccess/source/core/api/OptimisticSet.cxx
+++ b/dbaccess/source/core/api/OptimisticSet.cxx
@@ -187,7 +187,7 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORow
if ( m_aJoinedKeyColumns.empty() )
throw SQLException();
// list all cloumns that should be set
- static ::rtl::OUString s_sPara(RTL_CONSTASCII_USTRINGPARAM(" = ?"));
+ static ::rtl::OUString s_sPara(" = ?");
::rtl::OUString aQuote = getIdentifierQuoteString();
::rtl::OUString aColumnName;
@@ -234,8 +234,8 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORow
if( aKeyConditions.empty() )
::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_CONDITION_FOR_PK ), SQL_GENERAL_ERROR, m_xConnection );
- static const ::rtl::OUString s_sUPDATE(RTL_CONSTASCII_USTRINGPARAM("UPDATE "));
- static const ::rtl::OUString s_sSET(RTL_CONSTASCII_USTRINGPARAM(" SET "));
+ static const ::rtl::OUString s_sUPDATE("UPDATE ");
+ static const ::rtl::OUString s_sSET(" SET ");
Reference<XDatabaseMetaData> xMetaData = m_xConnection->getMetaData();
@@ -307,8 +307,8 @@ void SAL_CALL OptimisticSet::insertRow( const ORowSetRow& _rInsertRow,const conn
::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_VALUE_CHANGED ), SQL_GENERAL_ERROR, m_xConnection );
Reference<XDatabaseMetaData> xMetaData = m_xConnection->getMetaData();
- static const ::rtl::OUString s_sINSERT(RTL_CONSTASCII_USTRINGPARAM("INSERT INTO "));
- static const ::rtl::OUString s_sVALUES(RTL_CONSTASCII_USTRINGPARAM(") VALUES ( "));
+ static const ::rtl::OUString s_sINSERT("INSERT INTO ");
+ static const ::rtl::OUString s_sVALUES(") VALUES ( ");
TSQLStatements::iterator aSqlIter = aSql.begin();
TSQLStatements::iterator aSqlEnd = aSql.end();
for(;aSqlIter != aSqlEnd ; ++aSqlIter)
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index 8ed1d7f6ca87..a85fc0e35710 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -482,7 +482,7 @@ Any SAL_CALL ORowSet::queryAggregation( const Type& rType ) throw(RuntimeExcepti
rtl::OUString ORowSet::getImplementationName_static( ) throw(RuntimeException)
{
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.dba.ORowSet"));
+ return rtl::OUString("com.sun.star.comp.dba.ORowSet");
}
// ::com::sun::star::XServiceInfo
@@ -2230,7 +2230,7 @@ Reference< XNameAccess > ORowSet::impl_getTables_throw()
m_pTables = new OTableContainer(*this,m_aMutex,m_xActiveConnection,bCase,NULL,NULL,NULL,m_nInAppend);
xTables = m_pTables;
Sequence< ::rtl::OUString> aTableFilter(1);
- aTableFilter[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%"));
+ aTableFilter[0] = ::rtl::OUString("%");
m_pTables->construct(aTableFilter,Sequence< ::rtl::OUString>());
}
@@ -2285,7 +2285,7 @@ sal_Bool ORowSet::impl_initComposer_throw( ::rtl::OUString& _out_rCommandToExecu
// don't simply overwrite an existent filter, this would lead to problems if this existent
// filter contains paramters (since a keyset may add parameters itself)
m_xComposer->setElementaryQuery( m_xComposer->getQuery( ) );
- m_xComposer->setFilter( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "0 = 1" ) ) );
+ m_xComposer->setFilter( ::rtl::OUString("0 = 1" ) );
}
m_xComposer->setOrder( m_aOrder );
@@ -2337,7 +2337,7 @@ sal_Bool ORowSet::impl_buildActiveCommand_throw()
}
else
{
- sCommand = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT * FROM "));
+ sCommand = rtl::OUString("SELECT * FROM ");
::rtl::OUString sCatalog, sSchema, sTable;
::dbtools::qualifiedNameComponents( m_xActiveConnection->getMetaData(), m_aCommand, sCatalog, sSchema, sTable, ::dbtools::eInDataManipulation );
sCommand += ::dbtools::composeTableNameForSelect( m_xActiveConnection, sCatalog, sSchema, sTable );
@@ -2847,7 +2847,7 @@ void ORowSetClone::release() throw()
// XServiceInfo
rtl::OUString ORowSetClone::getImplementationName( ) throw(RuntimeException)
{
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.ORowSetClone"));
+ return rtl::OUString("com.sun.star.sdb.ORowSetClone");
}
sal_Bool ORowSetClone::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
diff --git a/dbaccess/source/core/api/callablestatement.cxx b/dbaccess/source/core/api/callablestatement.cxx
index 1f8d58b14a57..432274168360 100644
--- a/dbaccess/source/core/api/callablestatement.cxx
+++ b/dbaccess/source/core/api/callablestatement.cxx
@@ -96,7 +96,7 @@ void OCallableStatement::release() throw ()
rtl::OUString OCallableStatement::getImplementationName( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getImplementationName" );
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.OCallableStatement"));
+ return rtl::OUString("com.sun.star.sdb.OCallableStatement");
}
Sequence< ::rtl::OUString > OCallableStatement::getSupportedServiceNames( ) throw (RuntimeException)
diff --git a/dbaccess/source/core/api/column.cxx b/dbaccess/source/core/api/column.cxx
index 7727e246ca7a..c3bd3bd43cb2 100644
--- a/dbaccess/source/core/api/column.cxx
+++ b/dbaccess/source/core/api/column.cxx
@@ -106,7 +106,7 @@ IMPLEMENT_FORWARD_XINTERFACE2( OColumn, OColumnBase, ::comphelper::OPropertyCont
// ::com::sun::star::lang::XServiceInfo
rtl::OUString OColumn::getImplementationName( ) throw(RuntimeException)
{
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.OColumn"));
+ return rtl::OUString("com.sun.star.sdb.OColumn");
}
sal_Bool OColumn::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
@@ -216,7 +216,7 @@ OColumns::~OColumns()
// XServiceInfo
rtl::OUString OColumns::getImplementationName( ) throw(RuntimeException)
{
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.OColumns"));
+ return rtl::OUString("com.sun.star.sdb.OColumns");
}
sal_Bool OColumns::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
diff --git a/dbaccess/source/core/api/datacolumn.cxx b/dbaccess/source/core/api/datacolumn.cxx
index e33a98720649..1811953e9b62 100644
--- a/dbaccess/source/core/api/datacolumn.cxx
+++ b/dbaccess/source/core/api/datacolumn.cxx
@@ -105,7 +105,7 @@ Any SAL_CALL ODataColumn::queryInterface( const Type & _rType ) throw (RuntimeEx
// XServiceInfo
rtl::OUString ODataColumn::getImplementationName( ) throw(RuntimeException)
{
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.ODataColumn"));
+ return rtl::OUString("com.sun.star.sdb.ODataColumn");
}
Sequence< ::rtl::OUString > ODataColumn::getSupportedServiceNames( ) throw (RuntimeException)
diff --git a/dbaccess/source/core/api/definitioncolumn.cxx b/dbaccess/source/core/api/definitioncolumn.cxx
index 5acc09ebe7cc..a6f88d134a1f 100644
--- a/dbaccess/source/core/api/definitioncolumn.cxx
+++ b/dbaccess/source/core/api/definitioncolumn.cxx
@@ -92,7 +92,7 @@ IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumnDescriptor )
// ::com::sun::star::lang::XServiceInfo
rtl::OUString OTableColumnDescriptor::getImplementationName( ) throw (RuntimeException)
{
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.OTableColumnDescriptor"));
+ return rtl::OUString("com.sun.star.sdb.OTableColumnDescriptor");
}
Sequence< ::rtl::OUString > OTableColumnDescriptor::getSupportedServiceNames( ) throw (RuntimeException)
@@ -155,7 +155,7 @@ IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumn )
rtl::OUString OTableColumn::getImplementationName( ) throw (RuntimeException)
{
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.OTableColumn"));
+ return rtl::OUString("com.sun.star.sdb.OTableColumn");
}
::cppu::IPropertyArrayHelper& SAL_CALL OTableColumn::getInfoHelper()
@@ -281,7 +281,7 @@ IMPLEMENT_GET_IMPLEMENTATION_ID( OQueryColumn )
::rtl::OUString SAL_CALL OQueryColumn::getImplementationName( ) throw(RuntimeException)
{
- return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.comp.dbaccess.OQueryColumn" ) );
+ return ::rtl::OUString( "org.openoffice.comp.dbaccess.OQueryColumn" );
}
::cppu::IPropertyArrayHelper& SAL_CALL OQueryColumn::getInfoHelper()
@@ -439,7 +439,7 @@ IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumnDescriptorWrapper )
// ::com::sun::star::lang::XServiceInfo
rtl::OUString OTableColumnDescriptorWrapper::getImplementationName( ) throw (RuntimeException)
{
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.OTableColumnDescriptorWrapper"));
+ return rtl::OUString("com.sun.star.sdb.OTableColumnDescriptorWrapper");
}
Sequence< ::rtl::OUString > OTableColumnDescriptorWrapper::getSupportedServiceNames( ) throw (RuntimeException)
@@ -602,7 +602,7 @@ IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumnWrapper )
rtl::OUString OTableColumnWrapper::getImplementationName( ) throw (RuntimeException)
{
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.OTableColumnWrapper" ));
+ return rtl::OUString("com.sun.star.sdb.OTableColumnWrapper" );
}
Sequence< ::rtl::OUString > OTableColumnWrapper::getSupportedServiceNames( ) throw (RuntimeException)
diff --git a/dbaccess/source/core/api/preparedstatement.cxx b/dbaccess/source/core/api/preparedstatement.cxx
index 2202c5a6ff43..e00ea1cf90b8 100644
--- a/dbaccess/source/core/api/preparedstatement.cxx
+++ b/dbaccess/source/core/api/preparedstatement.cxx
@@ -131,7 +131,7 @@ void OPreparedStatement::release() throw ()
// XServiceInfo
rtl::OUString OPreparedStatement::getImplementationName( ) throw(RuntimeException)
{
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.OPreparedStatement"));
+ return rtl::OUString("com.sun.star.sdb.OPreparedStatement");
}
sal_Bool OPreparedStatement::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
diff --git a/dbaccess/source/core/api/querydescriptor.cxx b/dbaccess/source/core/api/querydescriptor.cxx
index 811b39c3391f..bdd5eca5e42b 100644
--- a/dbaccess/source/core/api/querydescriptor.cxx
+++ b/dbaccess/source/core/api/querydescriptor.cxx
@@ -222,7 +222,7 @@ Reference< XNameAccess > SAL_CALL OQueryDescriptor_Base::getColumns( ) throw (Ru
::rtl::OUString SAL_CALL OQueryDescriptor_Base::getImplementationName( ) throw(RuntimeException)
{
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.OQueryDescriptor"));
+ return ::rtl::OUString("com.sun.star.sdb.OQueryDescriptor");
}
sal_Bool SAL_CALL OQueryDescriptor_Base::supportsService( const ::rtl::OUString& _rServiceName ) throw(RuntimeException)
diff --git a/dbaccess/source/core/api/resultcolumn.cxx b/dbaccess/source/core/api/resultcolumn.cxx
index aa9fe489fb87..e8727d9057ca 100644
--- a/dbaccess/source/core/api/resultcolumn.cxx
+++ b/dbaccess/source/core/api/resultcolumn.cxx
@@ -131,7 +131,7 @@ Sequence< sal_Int8 > OResultColumn::getImplementationId() throw (RuntimeExceptio
// XServiceInfo
rtl::OUString OResultColumn::getImplementationName( ) throw(RuntimeException)
{
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.OResultColumn"));
+ return rtl::OUString("com.sun.star.sdb.OResultColumn");
}
Sequence< ::rtl::OUString > OResultColumn::getSupportedServiceNames( ) throw (RuntimeException)
diff --git a/dbaccess/source/core/api/resultset.cxx b/dbaccess/source/core/api/resultset.cxx
index 267875f010d6..459472f6f967 100644
--- a/dbaccess/source/core/api/resultset.cxx
+++ b/dbaccess/source/core/api/resultset.cxx
@@ -197,7 +197,7 @@ void OResultSet::close(void) throw( SQLException, RuntimeException )
rtl::OUString OResultSet::getImplementationName( ) throw(RuntimeException)
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getImplementationName" );
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.OResultSet"));
+ return rtl::OUString("com.sun.star.sdb.OResultSet");
}
sal_Bool OResultSet::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
diff --git a/dbaccess/source/core/api/statement.cxx b/dbaccess/source/core/api/statement.cxx
index 624fb3e212fd..8f198b1bce64 100644
--- a/dbaccess/source/core/api/statement.cxx
+++ b/dbaccess/source/core/api/statement.cxx
@@ -462,7 +462,7 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER2( OStatement, OStatementBase, OStatement_IFACE )
rtl::OUString OStatement::getImplementationName( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatement::getImplementationName" );
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.OStatement"));
+ return rtl::OUString("com.sun.star.sdb.OStatement");
}
sal_Bool OStatement::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
diff --git a/dbaccess/source/core/api/tablecontainer.cxx b/dbaccess/source/core/api/tablecontainer.cxx
index fa011eed6994..88b3cc5d3370 100644
--- a/dbaccess/source/core/api/tablecontainer.cxx
+++ b/dbaccess/source/core/api/tablecontainer.cxx
@@ -398,18 +398,18 @@ void OTableContainer::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElement
::rtl::OUString sType;
xTable->getPropertyValue(PROPERTY_TYPE) >>= sType;
- bIsView = sType.equalsIgnoreAsciiCase(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VIEW")));
+ bIsView = sType.equalsIgnoreAsciiCase(::rtl::OUString("VIEW"));
}
if(sComposedName.isEmpty())
::dbtools::throwFunctionSequenceException(static_cast<XTypeProvider*>(static_cast<OFilteredContainer*>(this)));
- ::rtl::OUString aSql(RTL_CONSTASCII_USTRINGPARAM("DROP "));
+ ::rtl::OUString aSql("DROP ");
if ( bIsView ) // here we have a view
- aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VIEW "));
+ aSql += ::rtl::OUString("VIEW ");
else
- aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TABLE "));
+ aSql += ::rtl::OUString("TABLE ");
aSql += sComposedName;
Reference<XConnection> xCon = m_xConnection;
OSL_ENSURE(xCon.is(),"Connection is null!");
diff --git a/dbaccess/source/core/api/viewcontainer.cxx b/dbaccess/source/core/api/viewcontainer.cxx
index 105c5df7cfee..74f2dd55592d 100644
--- a/dbaccess/source/core/api/viewcontainer.cxx
+++ b/dbaccess/source/core/api/viewcontainer.cxx
@@ -202,7 +202,7 @@ void OViewContainer::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementN
if(sComposedName.isEmpty())
::dbtools::throwFunctionSequenceException(static_cast<XTypeProvider*>(static_cast<OFilteredContainer*>(this)));
- ::rtl::OUString aSql(RTL_CONSTASCII_USTRINGPARAM("DROP VIEW "));
+ ::rtl::OUString aSql("DROP VIEW ");
aSql += sComposedName;
Reference<XConnection> xCon = m_xConnection;
OSL_ENSURE(xCon.is(),"Connection is null!");
@@ -229,7 +229,7 @@ void SAL_CALL OViewContainer::elementInserted( const ContainerEvent& Event ) thr
Reference<XPropertySet> xProp(Event.Element,UNO_QUERY);
::rtl::OUString sType;
xProp->getPropertyValue(PROPERTY_TYPE) >>= sType;
- if ( sType == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VIEW")) )
+ if ( sType == ::rtl::OUString("VIEW") )
insertElement(sName,createObject(sName));
}
}
@@ -265,7 +265,7 @@ void SAL_CALL OViewContainer::elementReplaced( const ContainerEvent& /*Event*/ )
::rtl::OUString OViewContainer::getTableTypeRestriction() const
{
// no restriction at all (other than the ones provided externally)
- return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VIEW" ) );
+ return ::rtl::OUString( "VIEW" );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */