summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers
diff options
context:
space:
mode:
authorKevin Hunter <hunteke@earlham.edu>2010-11-09 14:55:22 -0500
committerDavid Tardon <dtardon@redhat.com>2010-11-10 08:19:12 +0100
commit601bfe023f5aeb9b10f4c17d50d18f9b7455f229 (patch)
tree22fa377c3b0de213eda4d616600749c5e1ccad31 /connectivity/source/drivers
parente30c45f22519a413f6fb08adb5307b2b610e5c28 (diff)
EasyHack: Convert to RTL macro from FromAscii
Diffstat (limited to 'connectivity/source/drivers')
-rw-r--r--connectivity/source/drivers/adabas/BCatalog.cxx3
-rw-r--r--connectivity/source/drivers/adabas/BGroup.cxx2
-rw-r--r--connectivity/source/drivers/adabas/BGroups.cxx4
-rw-r--r--connectivity/source/drivers/adabas/BIndexes.cxx4
-rw-r--r--connectivity/source/drivers/adabas/BKeys.cxx2
-rw-r--r--connectivity/source/drivers/adabas/BTable.cxx4
-rw-r--r--connectivity/source/drivers/adabas/BTables.cxx6
-rw-r--r--connectivity/source/drivers/adabas/BUser.cxx4
-rw-r--r--connectivity/source/drivers/adabas/BUsers.cxx8
-rw-r--r--connectivity/source/drivers/adabas/BViews.cxx6
-rw-r--r--connectivity/source/drivers/ado/APreparedStatement.cxx4
-rw-r--r--connectivity/source/drivers/ado/Awrapado.cxx2
-rw-r--r--connectivity/source/drivers/dbase/DDatabaseMetaData.cxx2
-rw-r--r--connectivity/source/drivers/evoab2/NTables.cxx2
-rw-r--r--connectivity/source/drivers/file/FDatabaseMetaData.cxx2
-rw-r--r--connectivity/source/drivers/hsqldb/HTable.cxx2
-rw-r--r--connectivity/source/drivers/hsqldb/HTables.cxx2
-rw-r--r--connectivity/source/drivers/hsqldb/HUser.cxx20
-rw-r--r--connectivity/source/drivers/hsqldb/HUsers.cxx4
-rw-r--r--connectivity/source/drivers/hsqldb/HViews.cxx4
-rw-r--r--connectivity/source/drivers/jdbc/JDriver.cxx2
-rw-r--r--connectivity/source/drivers/kab/KDatabaseMetaData.cxx4
-rw-r--r--connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx4
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx2
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx6
-rw-r--r--connectivity/source/drivers/mysql/YTable.cxx2
-rw-r--r--connectivity/source/drivers/mysql/YTables.cxx2
-rw-r--r--connectivity/source/drivers/mysql/YUser.cxx20
-rw-r--r--connectivity/source/drivers/mysql/YUsers.cxx4
-rw-r--r--connectivity/source/drivers/mysql/YViews.cxx4
30 files changed, 68 insertions, 69 deletions
diff --git a/connectivity/source/drivers/adabas/BCatalog.cxx b/connectivity/source/drivers/adabas/BCatalog.cxx
index 13ce824e00ec..e04f4d3a9373 100644
--- a/connectivity/source/drivers/adabas/BCatalog.cxx
+++ b/connectivity/source/drivers/adabas/BCatalog.cxx
@@ -63,7 +63,6 @@ OAdabasCatalog::OAdabasCatalog(SQLHANDLE _aConnectionHdl, OAdabasConnection* _pC
sName += OAdabasCatalog::getDot();
sName += _xRow->getString(3);
-
return sName;
}
// -----------------------------------------------------------------------------
@@ -158,7 +157,7 @@ void OAdabasCatalog::correctColumnProperties(sal_Int32 /*_nPrec*/, sal_Int32& _r
}
// else if(_nPrec > 15)
// {
-// static const ::rtl::OUString sReal = ::rtl::OUString::createFromAscii("REAL");
+// static const ::rtl::OUString sReal( RTL_CONSTASCII_USTRINGPARAM( "REAL" ));
// _rsTypeName = sReal;
// _rnType = DataType::REAL;
// }
diff --git a/connectivity/source/drivers/adabas/BGroup.cxx b/connectivity/source/drivers/adabas/BGroup.cxx
index 2669454192e1..2478e12b6b57 100644
--- a/connectivity/source/drivers/adabas/BGroup.cxx
+++ b/connectivity/source/drivers/adabas/BGroup.cxx
@@ -70,7 +70,7 @@ void OAdabasGroup::refreshUsers()
TStringVector aVector;
Reference< XStatement > xStmt = m_pConnection->createStatement( );
- ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("SELECT DISTINCT USERNAME FROM DOMAIN.USERS WHERE USERNAME IS NOT NULL AND USERNAME <> ' ' AND USERNAME <> 'CONTROL' AND GROUPNAME = '");
+ ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "SELECT DISTINCT USERNAME FROM DOMAIN.USERS WHERE USERNAME IS NOT NULL AND USERNAME <> ' ' AND USERNAME <> 'CONTROL' AND GROUPNAME = '" ));
aSql += getName( );
aSql += ::rtl::OUString::createFromAscii("'");
diff --git a/connectivity/source/drivers/adabas/BGroups.cxx b/connectivity/source/drivers/adabas/BGroups.cxx
index f514b9eef8bb..2a58ec10ea14 100644
--- a/connectivity/source/drivers/adabas/BGroups.cxx
+++ b/connectivity/source/drivers/adabas/BGroups.cxx
@@ -65,7 +65,7 @@ Reference< XPropertySet > OGroups::createDescriptor()
// XAppend
sdbcx::ObjectType OGroups::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& /*descriptor*/ )
{
- ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE USERGROUP ");
+ ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "CREATE USERGROUP " ));
::rtl::OUString aQuote = m_pConnection->getMetaData()->getIdentifierQuoteString( );
aSql = aSql + aQuote + _rForName + aQuote;
@@ -80,7 +80,7 @@ sdbcx::ObjectType OGroups::appendObject( const ::rtl::OUString& _rForName, const
// XDrop
void OGroups::dropObject(sal_Int32 /*_nPos*/,const ::rtl::OUString _sElementName)
{
- ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP USERGROUP ");
+ ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "DROP USERGROUP " ));
::rtl::OUString aQuote = m_pConnection->getMetaData()->getIdentifierQuoteString( );
aSql = aSql + aQuote + _sElementName + aQuote;
diff --git a/connectivity/source/drivers/adabas/BIndexes.cxx b/connectivity/source/drivers/adabas/BIndexes.cxx
index 0da65ae53257..a762e1eaf43a 100644
--- a/connectivity/source/drivers/adabas/BIndexes.cxx
+++ b/connectivity/source/drivers/adabas/BIndexes.cxx
@@ -105,7 +105,7 @@ sdbcx::ObjectType OIndexes::appendObject( const ::rtl::OUString& _rForName, cons
if ( m_pTable->isNew() )
::dbtools::throwFunctionSequenceException(static_cast<XTypeProvider*>(this));
- ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE ");
+ ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "CREATE " ));
::rtl::OUString aQuote = m_pTable->getMetaData()->getIdentifierQuoteString( );
const ::rtl::OUString& sDot = OAdabasCatalog::getDot();
@@ -171,7 +171,7 @@ void OIndexes::dropObject(sal_Int32 /*_nPos*/,const ::rtl::OUString _sElementNam
aSchema = _sElementName.copy(0,nLen);
aName = _sElementName.copy(nLen+1);
- ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP INDEX ");
+ ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "DROP INDEX " ));
::rtl::OUString aQuote = m_pTable->getMetaData()->getIdentifierQuoteString( );
const ::rtl::OUString& sDot = OAdabasCatalog::getDot();
diff --git a/connectivity/source/drivers/adabas/BKeys.cxx b/connectivity/source/drivers/adabas/BKeys.cxx
index 9c130d6e5690..e807d726b3f4 100644
--- a/connectivity/source/drivers/adabas/BKeys.cxx
+++ b/connectivity/source/drivers/adabas/BKeys.cxx
@@ -65,7 +65,7 @@ sdbcx::ObjectType OKeys::appendObject( const ::rtl::OUString& _rForName, const R
sal_Int32 nKeyType = getINT32(descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)));
- ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("ALTER TABLE ");
+ ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "ALTER TABLE " ));
const ::rtl::OUString aQuote = getTable()->getConnection()->getMetaData()->getIdentifierQuoteString( );
const ::rtl::OUString& sDot = OAdabasCatalog::getDot();
diff --git a/connectivity/source/drivers/adabas/BTable.cxx b/connectivity/source/drivers/adabas/BTable.cxx
index ad76c4a3f4b1..77a5709dbfea 100644
--- a/connectivity/source/drivers/adabas/BTable.cxx
+++ b/connectivity/source/drivers/adabas/BTable.cxx
@@ -193,7 +193,7 @@ void SAL_CALL OAdabasTable::alterColumnByName( const ::rtl::OUString& colName, c
const ::rtl::OUString sQuote = m_pConnection->getMetaData()->getIdentifierQuoteString( );
const ::rtl::OUString& sDot = OAdabasCatalog::getDot();
- ::rtl::OUString sSql = ::rtl::OUString::createFromAscii("RENAME COLUMN ") ;
+ ::rtl::OUString sSql( RTL_CONSTASCII_USTRINGPARAM( "RENAME COLUMN " )) ;
sSql += ::dbtools::quoteName(sQuote,m_SchemaName) + sDot + ::dbtools::quoteName(sQuote,m_Name);
sSql += sDot + ::dbtools::quoteName(sQuote,colName);
sSql += ::rtl::OUString::createFromAscii(" TO ");
@@ -362,7 +362,7 @@ void OAdabasTable::rollbackTransAction()
// -----------------------------------------------------------------------------
::rtl::OUString OAdabasTable::getAlterTableColumnPart(const ::rtl::OUString& _rsColumnName )
{
- ::rtl::OUString sSql = ::rtl::OUString::createFromAscii("ALTER TABLE ");
+ ::rtl::OUString sSql( RTL_CONSTASCII_USTRINGPARAM( "ALTER TABLE " ));
const ::rtl::OUString sQuote = m_pConnection->getMetaData()->getIdentifierQuoteString( );
const ::rtl::OUString& sDot = OAdabasCatalog::getDot();
diff --git a/connectivity/source/drivers/adabas/BTables.cxx b/connectivity/source/drivers/adabas/BTables.cxx
index b09476b154e8..be1044f0579c 100644
--- a/connectivity/source/drivers/adabas/BTables.cxx
+++ b/connectivity/source/drivers/adabas/BTables.cxx
@@ -112,7 +112,7 @@ sdbcx::ObjectType OTables::appendObject( const ::rtl::OUString& _rForName, const
// -------------------------------------------------------------------------
void OTables::setComments(const Reference< XPropertySet >& descriptor ) throw(SQLException, RuntimeException)
{
- ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE TABLE ");
+ ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "CREATE TABLE " ));
::rtl::OUString aQuote = static_cast<OAdabasCatalog&>(m_rParent).getConnection()->getMetaData()->getIdentifierQuoteString( );
const ::rtl::OUString& sDot = OAdabasCatalog::getDot();
@@ -175,7 +175,7 @@ void OTables::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName)
sal_Int32 nLen = _sElementName.indexOf('.');
aSchema = _sElementName.copy(0,nLen);
aName = _sElementName.copy(nLen+1);
- ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP ");
+ ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "DROP " ));
const ::rtl::OUString& sDot = OAdabasCatalog::getDot();
Reference<XPropertySet> xProp(xObject,UNO_QUERY);
@@ -202,7 +202,7 @@ void OTables::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName)
// -------------------------------------------------------------------------
void OTables::createTable( const Reference< XPropertySet >& descriptor )
{
- ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE TABLE ");
+ ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "CREATE TABLE " ));
::rtl::OUString aQuote = static_cast<OAdabasCatalog&>(m_rParent).getConnection()->getMetaData()->getIdentifierQuoteString( );
const ::rtl::OUString& sDot = OAdabasCatalog::getDot();
::rtl::OUString sSchema;
diff --git a/connectivity/source/drivers/adabas/BUser.cxx b/connectivity/source/drivers/adabas/BUser.cxx
index 671edf6df8fb..bd4748db8b85 100644
--- a/connectivity/source/drivers/adabas/BUser.cxx
+++ b/connectivity/source/drivers/adabas/BUser.cxx
@@ -70,7 +70,7 @@ void OAdabasUser::refreshGroups()
TStringVector aVector;
aVector.reserve(7); // we don't know the excatly count of users but this should fit the normal need
Reference< XStatement > xStmt = m_pConnection->createStatement( );
- ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("SELECT DISTINCT GROUPNAME FROM DOMAIN.USERS WHERE GROUPNAME IS NOT NULL AND GROUPNAME <> ' ' AND USERNAME = '");
+ ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "SELECT DISTINCT GROUPNAME FROM DOMAIN.USERS WHERE GROUPNAME IS NOT NULL AND GROUPNAME <> ' ' AND USERNAME = '" ));
aSql += getName( );
aSql += ::rtl::OUString::createFromAscii("'");
@@ -136,7 +136,7 @@ void OAdabasUser::getAnyTablePrivileges(const ::rtl::OUString& objName, sal_Int3
::rtl::OUString sCatalog,sSchema,sTable;
::dbtools::qualifiedNameComponents(xMeta,objName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation);
Reference<XStatement> xStmt = m_pConnection->createStatement();
- ::rtl::OUString sSql = ::rtl::OUString::createFromAscii("SELECT REFTABLENAME,PRIVILEGES FROM DOMAIN.USR_USES_TAB WHERE REFOBJTYPE <> 'SYSTEM' AND DEFUSERNAME = '");
+ ::rtl::OUString sSql( RTL_CONSTASCII_USTRINGPARAM( "SELECT REFTABLENAME,PRIVILEGES FROM DOMAIN.USR_USES_TAB WHERE REFOBJTYPE <> 'SYSTEM' AND DEFUSERNAME = '" ));
sSql += m_Name;
sSql += ::rtl::OUString::createFromAscii("' AND REFTABLENAME = '");
sSql += sTable;
diff --git a/connectivity/source/drivers/adabas/BUsers.cxx b/connectivity/source/drivers/adabas/BUsers.cxx
index c342a9158339..904831bc1b95 100644
--- a/connectivity/source/drivers/adabas/BUsers.cxx
+++ b/connectivity/source/drivers/adabas/BUsers.cxx
@@ -69,7 +69,7 @@ Reference< XPropertySet > OUsers::createDescriptor()
// XAppend
sdbcx::ObjectType OUsers::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor )
{
- ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE USER ");
+ ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "CREATE USER " ));
::rtl::OUString aQuote = m_pConnection->getMetaData()->getIdentifierQuoteString( );
::rtl::OUString sUserName( _rForName );
@@ -94,7 +94,7 @@ void OUsers::dropObject(sal_Int32 /*_nPos*/,const ::rtl::OUString _sElementName)
{
// first we have to check if this user is live relevaant for the database
// which means with out these users the database will miss more than one important system table
- ::rtl::OUString sUsers = ::rtl::OUString::createFromAscii("SELECT USERMODE,USERNAME FROM DOMAIN.USERS WHERE USERNAME = '");
+ ::rtl::OUString sUsers( RTL_CONSTASCII_USTRINGPARAM( "SELECT USERMODE,USERNAME FROM DOMAIN.USERS WHERE USERNAME = '" ));
sUsers += _sElementName + ::rtl::OUString::createFromAscii("'");
Reference< XStatement > xStmt = m_pConnection->createStatement();
if(xStmt.is())
@@ -103,7 +103,7 @@ void OUsers::dropObject(sal_Int32 /*_nPos*/,const ::rtl::OUString _sElementName)
Reference<XRow> xRow(xRes,UNO_QUERY);
if(xRes.is() && xRow.is() && xRes->next()) // there can only be one user with this name
{
- static const ::rtl::OUString sDbaUser = ::rtl::OUString::createFromAscii("DBA");
+ static const ::rtl::OUString sDbaUser( RTL_CONSTASCII_USTRINGPARAM( "DBA" ));
if(xRow->getString(1) == sDbaUser)
{
::comphelper::disposeComponent(xStmt);
@@ -115,7 +115,7 @@ void OUsers::dropObject(sal_Int32 /*_nPos*/,const ::rtl::OUString _sElementName)
}
{
- ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP USER ");
+ ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "DROP USER " ));
::rtl::OUString aQuote = m_pConnection->getMetaData()->getIdentifierQuoteString( );
aSql += ::dbtools::quoteName(aQuote,_sElementName);
diff --git a/connectivity/source/drivers/adabas/BViews.cxx b/connectivity/source/drivers/adabas/BViews.cxx
index 75caf4fd3967..f34869f4e5b8 100644
--- a/connectivity/source/drivers/adabas/BViews.cxx
+++ b/connectivity/source/drivers/adabas/BViews.cxx
@@ -66,7 +66,7 @@ sdbcx::ObjectType OViews::createObject(const ::rtl::OUString& _rName)
aSchema = _rName.copy(0,nLen);
aName = _rName.copy(nLen+1);
- ::rtl::OUString sStmt = ::rtl::OUString::createFromAscii("SELECT DISTINCT * FROM DOMAIN.SHOW_VIEW WHERE ");
+ ::rtl::OUString sStmt( RTL_CONSTASCII_USTRINGPARAM( "SELECT DISTINCT * FROM DOMAIN.SHOW_VIEW WHERE " ));
if(aSchema.getLength())
{
sStmt += ::rtl::OUString::createFromAscii("OWNER = '");
@@ -142,7 +142,7 @@ void OViews::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName)
sal_Int32 nLen = _sElementName.indexOf('.');
aSchema = _sElementName.copy(0,nLen);
aName = _sElementName.copy(nLen+1);
- ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP VIEW");
+ ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "DROP VIEW" ));
const ::rtl::OUString& sDot = OAdabasCatalog::getDot();
aSql = aSql + m_xMetaData->getIdentifierQuoteString( ) + aSchema + m_xMetaData->getIdentifierQuoteString( );
@@ -162,7 +162,7 @@ void OViews::dropByNameImpl(const ::rtl::OUString& elementName)
// -----------------------------------------------------------------------------
void OViews::createView( const Reference< XPropertySet >& descriptor )
{
- ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE VIEW ");
+ ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "CREATE VIEW " ));
::rtl::OUString aQuote = static_cast<OAdabasCatalog&>(m_rParent).getConnection()->getMetaData()->getIdentifierQuoteString( );
const ::rtl::OUString& sDot = OAdabasCatalog::getDot();
::rtl::OUString sSchema,sCommand;
diff --git a/connectivity/source/drivers/ado/APreparedStatement.cxx b/connectivity/source/drivers/ado/APreparedStatement.cxx
index 433ed279ba2e..64a039e5fc9b 100644
--- a/connectivity/source/drivers/ado/APreparedStatement.cxx
+++ b/connectivity/source/drivers/ado/APreparedStatement.cxx
@@ -78,7 +78,7 @@ OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const OTypeInf
{ // special handling for parameters
/* we recusive replace all occurences of ? in the statement and replace them with name like "" */
sal_Int32 nParameterCount = 0;
- ::rtl::OUString sDefaultName = ::rtl::OUString::createFromAscii("parame");
+ ::rtl::OUString sDefaultName( RTL_CONSTASCII_USTRINGPARAM( "parame" ));
replaceParameterNodeName(pNode,sDefaultName,nParameterCount);
pNode->parseNodeToStr( sNewSql, _pConnection );
delete pNode;
@@ -225,7 +225,7 @@ void OPreparedStatement::setParameter(sal_Int32 parameterIndex, const DataTypeEn
m_pParameters->get_Count(&nCount);
if(nCount < (parameterIndex-1))
{
- ::rtl::OUString sDefaultName = ::rtl::OUString::createFromAscii("parame");
+ ::rtl::OUString sDefaultName( RTL_CONSTASCII_USTRINGPARAM( "parame" ));
sDefaultName += ::rtl::OUString::valueOf(parameterIndex);
ADOParameter* pParam = m_Command.CreateParameter(sDefaultName,_eType,adParamInput,_nSize,_Val);
if(pParam)
diff --git a/connectivity/source/drivers/ado/Awrapado.cxx b/connectivity/source/drivers/ado/Awrapado.cxx
index bc9bb2948608..fa8dc5739029 100644
--- a/connectivity/source/drivers/ado/Awrapado.cxx
+++ b/connectivity/source/drivers/ado/Awrapado.cxx
@@ -2006,7 +2006,7 @@ ADORecordset* WpADOConnection::getTables( const ::com::sun::star::uno::Any& cata
++nPos;
::rtl::OUStringBuffer aTypes;
- ::rtl::OUString aComma = ::rtl::OUString::createFromAscii(",");
+ ::rtl::OUString aComma( RTL_CONSTASCII_USTRINGPARAM( "," ));
const ::rtl::OUString* pIter = types.getConstArray();
const ::rtl::OUString* pEnd = pIter + types.getLength();
for( ; pIter != pEnd ; ++pIter)
diff --git a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx
index 74c053b66f8d..17cad00bb64b 100644
--- a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx
@@ -391,7 +391,7 @@ sal_Bool SAL_CALL ODbaseDatabaseMetaData::isReadOnly( ) throw(SQLException, Run
::osl::MutexGuard aGuard( m_aMutex );
sal_Bool bReadOnly = sal_False;
- static ::rtl::OUString sReadOnly = ::rtl::OUString::createFromAscii("IsReadOnly");
+ static ::rtl::OUString sReadOnly( RTL_CONSTASCII_USTRINGPARAM( "IsReadOnly" ));
::ucbhelper::Content aFile(m_pConnection->getContent(),Reference< XCommandEnvironment >());
aFile.getPropertyValue(sReadOnly) >>= bReadOnly;
diff --git a/connectivity/source/drivers/evoab2/NTables.cxx b/connectivity/source/drivers/evoab2/NTables.cxx
index 88bce2c7d869..a48def0a0425 100644
--- a/connectivity/source/drivers/evoab2/NTables.cxx
+++ b/connectivity/source/drivers/evoab2/NTables.cxx
@@ -60,7 +60,7 @@ typedef connectivity::sdbcx::OCollection OCollection_TYPE;
ObjectType OEvoabTables::createObject(const ::rtl::OUString& aName)
{
- ::rtl::OUString aSchema = ::rtl::OUString::createFromAscii("%");
+ ::rtl::OUString aSchema( RTL_CONSTASCII_USTRINGPARAM( "%" ));
Sequence< ::rtl::OUString > aTypes(1);
aTypes[0] = ::rtl::OUString::createFromAscii("TABLE");
diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index 91443bab7ed8..89fe6ee57126 100644
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -973,7 +973,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(SQL
::rtl::OUString SAL_CALL ODatabaseMetaData::getURL( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "ODatabaseMetaData::getURL" );
- static const ::rtl::OUString aValue = ::rtl::OUString::createFromAscii("sdbc:file:");
+ static const ::rtl::OUString aValue( RTL_CONSTASCII_USTRINGPARAM( "sdbc:file:" ));
return aValue;
}
// -------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/hsqldb/HTable.cxx b/connectivity/source/drivers/hsqldb/HTable.cxx
index 3d4373542e08..b75bd5151e08 100644
--- a/connectivity/source/drivers/hsqldb/HTable.cxx
+++ b/connectivity/source/drivers/hsqldb/HTable.cxx
@@ -327,7 +327,7 @@ void OHSQLTable::dropDefaultValue(const ::rtl::OUString& _rColName)
// -----------------------------------------------------------------------------
::rtl::OUString OHSQLTable::getAlterTableColumnPart()
{
- ::rtl::OUString sSql = ::rtl::OUString::createFromAscii("ALTER TABLE ");
+ ::rtl::OUString sSql( RTL_CONSTASCII_USTRINGPARAM( "ALTER TABLE " ));
const ::rtl::OUString sQuote = getMetaData()->getIdentifierQuoteString( );
::rtl::OUString sComposedName( ::dbtools::composeTableName( getMetaData(), m_CatalogName, m_SchemaName, m_Name, sal_True, ::dbtools::eInTableDefinitions ) );
diff --git a/connectivity/source/drivers/hsqldb/HTables.cxx b/connectivity/source/drivers/hsqldb/HTables.cxx
index 44ce6dfbecc9..259f33c3a41a 100644
--- a/connectivity/source/drivers/hsqldb/HTables.cxx
+++ b/connectivity/source/drivers/hsqldb/HTables.cxx
@@ -140,7 +140,7 @@ void OTables::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName)
::rtl::OUString sCatalog,sSchema,sTable;
::dbtools::qualifiedNameComponents(m_xMetaData,_sElementName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation);
- ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP ");
+ ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "DROP " ));
Reference<XPropertySet> xProp(xObject,UNO_QUERY);
sal_Bool bIsView;
diff --git a/connectivity/source/drivers/hsqldb/HUser.cxx b/connectivity/source/drivers/hsqldb/HUser.cxx
index bfc9d5a44144..2e9655fe7fba 100644
--- a/connectivity/source/drivers/hsqldb/HUser.cxx
+++ b/connectivity/source/drivers/hsqldb/HUser.cxx
@@ -131,16 +131,16 @@ void OHSQLUser::findPrivilegesAndGrantPrivileges(const ::rtl::OUString& objName,
if ( xRes.is() )
{
- static const ::rtl::OUString sSELECT = ::rtl::OUString::createFromAscii("SELECT");
- static const ::rtl::OUString sINSERT = ::rtl::OUString::createFromAscii("INSERT");
- static const ::rtl::OUString sUPDATE = ::rtl::OUString::createFromAscii("UPDATE");
- static const ::rtl::OUString sDELETE = ::rtl::OUString::createFromAscii("DELETE");
- static const ::rtl::OUString sREAD = ::rtl::OUString::createFromAscii("READ");
- static const ::rtl::OUString sCREATE = ::rtl::OUString::createFromAscii("CREATE");
- static const ::rtl::OUString sALTER = ::rtl::OUString::createFromAscii("ALTER");
- static const ::rtl::OUString sREFERENCE = ::rtl::OUString::createFromAscii("REFERENCE");
- static const ::rtl::OUString sDROP = ::rtl::OUString::createFromAscii("DROP");
- static const ::rtl::OUString sYes = ::rtl::OUString::createFromAscii("YES");
+ static const ::rtl::OUString sSELECT( RTL_CONSTASCII_USTRINGPARAM( "SELECT" ));
+ static const ::rtl::OUString sINSERT( RTL_CONSTASCII_USTRINGPARAM( "INSERT" ));
+ static const ::rtl::OUString sUPDATE( RTL_CONSTASCII_USTRINGPARAM( "UPDATE" ));
+ static const ::rtl::OUString sDELETE( RTL_CONSTASCII_USTRINGPARAM( "DELETE" ));
+ static const ::rtl::OUString sREAD( RTL_CONSTASCII_USTRINGPARAM( "READ" ));
+ static const ::rtl::OUString sCREATE( RTL_CONSTASCII_USTRINGPARAM( "CREATE" ));
+ static const ::rtl::OUString sALTER( RTL_CONSTASCII_USTRINGPARAM( "ALTER" ));
+ static const ::rtl::OUString sREFERENCE( RTL_CONSTASCII_USTRINGPARAM( "REFERENCE" ));
+ static const ::rtl::OUString sDROP( RTL_CONSTASCII_USTRINGPARAM( "DROP" ));
+ static const ::rtl::OUString sYes( RTL_CONSTASCII_USTRINGPARAM( "YES" ));
nRightsWithGrant = nRights = 0;
diff --git a/connectivity/source/drivers/hsqldb/HUsers.cxx b/connectivity/source/drivers/hsqldb/HUsers.cxx
index e9c2ead9d733..78c7d4525997 100644
--- a/connectivity/source/drivers/hsqldb/HUsers.cxx
+++ b/connectivity/source/drivers/hsqldb/HUsers.cxx
@@ -81,7 +81,7 @@ Reference< XPropertySet > OUsers::createDescriptor()
// XAppend
sdbcx::ObjectType OUsers::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor )
{
- ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("GRANT USAGE ON * TO ");
+ ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "GRANT USAGE ON * TO " ));
::rtl::OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString( );
::rtl::OUString sUserName( _rForName );
aSql += ::dbtools::quoteName(aQuote,sUserName)
@@ -107,7 +107,7 @@ sdbcx::ObjectType OUsers::appendObject( const ::rtl::OUString& _rForName, const
void OUsers::dropObject(sal_Int32 /*nPos*/,const ::rtl::OUString _sElementName)
{
{
- ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("REVOKE ALL ON * FROM ");
+ ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "REVOKE ALL ON * FROM " ));
::rtl::OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString( );
aSql += ::dbtools::quoteName(aQuote,_sElementName);
diff --git a/connectivity/source/drivers/hsqldb/HViews.cxx b/connectivity/source/drivers/hsqldb/HViews.cxx
index 1ead660ac9be..6c414b65b38f 100644
--- a/connectivity/source/drivers/hsqldb/HViews.cxx
+++ b/connectivity/source/drivers/hsqldb/HViews.cxx
@@ -119,7 +119,7 @@ void HViews::dropObject(sal_Int32 _nPos,const ::rtl::OUString /*_sElementName*/)
sal_Bool bIsNew = connectivity::sdbcx::ODescriptor::isNew( xObject );
if (!bIsNew)
{
- ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP VIEW");
+ ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "DROP VIEW" ));
Reference<XPropertySet> xProp(xObject,UNO_QUERY);
aSql += ::dbtools::composeTableName( m_xMetaData, xProp, ::dbtools::eInTableDefinitions, false, false, true );
@@ -142,7 +142,7 @@ void HViews::createView( const Reference< XPropertySet >& descriptor )
{
Reference<XConnection> xConnection = static_cast<OHCatalog&>(m_rParent).getConnection();
- ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE VIEW ");
+ ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "CREATE VIEW " ));
::rtl::OUString aQuote = xConnection->getMetaData()->getIdentifierQuoteString( );
::rtl::OUString sSchema,sCommand;
diff --git a/connectivity/source/drivers/jdbc/JDriver.cxx b/connectivity/source/drivers/jdbc/JDriver.cxx
index 18ea813b25a1..0fe4540a879b 100644
--- a/connectivity/source/drivers/jdbc/JDriver.cxx
+++ b/connectivity/source/drivers/jdbc/JDriver.cxx
@@ -129,7 +129,7 @@ sal_Bool SAL_CALL java_sql_Driver::acceptsURL( const ::rtl::OUString& url ) thro
// I feel responsible for all jdbc url's
sal_Bool bEnabled = sal_False;
OSL_VERIFY_EQUALS( jfw_getEnabled( &bEnabled ), JFW_E_NONE, "error in jfw_getEnabled" );
- static const ::rtl::OUString s_sJdbcPrefix = ::rtl::OUString::createFromAscii("jdbc:");
+ static const ::rtl::OUString s_sJdbcPrefix( RTL_CONSTASCII_USTRINGPARAM( "jdbc:" ));
return bEnabled && 0 == url.compareTo(s_sJdbcPrefix, 5);
}
// -------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/kab/KDatabaseMetaData.cxx b/connectivity/source/drivers/kab/KDatabaseMetaData.cxx
index 8ae1227a0062..2569e106e7da 100644
--- a/connectivity/source/drivers/kab/KDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/kab/KDatabaseMetaData.cxx
@@ -567,7 +567,7 @@ sal_Bool SAL_CALL KabDatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(S
{
// if someday we support more than the default address book,
// this method should return the URL which was used to create it
- ::rtl::OUString aValue = ::rtl::OUString::createFromAscii("sdbc:address:kab:");
+ ::rtl::OUString aValue( RTL_CONSTASCII_USTRINGPARAM( "sdbc:address:kab:" ));
return aValue;
}
// -------------------------------------------------------------------------
@@ -579,7 +579,7 @@ sal_Bool SAL_CALL KabDatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(S
// -------------------------------------------------------------------------
::rtl::OUString SAL_CALL KabDatabaseMetaData::getDriverName( ) throw(SQLException, RuntimeException)
{
- ::rtl::OUString aValue = ::rtl::OUString::createFromAscii("kab");
+ ::rtl::OUString aValue( RTL_CONSTASCII_USTRINGPARAM( "kab" ));
return aValue;
}
// -------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
index a7217c6bd666..fe5aabf635cd 100644
--- a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
@@ -564,7 +564,7 @@ sal_Bool SAL_CALL MacabDatabaseMetaData::supportsANSI92IntermediateSQL( ) throw
{
// if someday we support more than the default address book,
// this method should return the URL which was used to create it
- ::rtl::OUString aValue = ::rtl::OUString::createFromAscii("sdbc:address:macab:");
+ ::rtl::OUString aValue( RTL_CONSTASCII_USTRINGPARAM( "sdbc:address:macab:" ));
return aValue;
}
// -------------------------------------------------------------------------
@@ -576,7 +576,7 @@ sal_Bool SAL_CALL MacabDatabaseMetaData::supportsANSI92IntermediateSQL( ) throw
// -------------------------------------------------------------------------
::rtl::OUString SAL_CALL MacabDatabaseMetaData::getDriverName( ) throw(SQLException, RuntimeException)
{
- ::rtl::OUString aValue = ::rtl::OUString::createFromAscii("macab");
+ ::rtl::OUString aValue( RTL_CONSTASCII_USTRINGPARAM( "macab" ));
return aValue;
}
// -------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx
index 7e523f44e7fd..fe40a35844ff 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx
@@ -62,7 +62,7 @@ IniParser::IniParser(OUString const & rIniName) throw(com::sun::star::io::IOExce
sal_uInt64 nSize = 0;
osl_getFileSize(handle, &nSize);
- OUString sectionName = OUString::createFromAscii("no name section");
+ OUString sectionName( RTL_CONSTASCII_USTRINGPARAM( "no name section" ));
while (true)
{
sal_uInt64 nPos;
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
index dbf1c598b5c8..8eba5b6fb284 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
@@ -90,9 +90,9 @@ static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CI
// Registry Keys
-static ::rtl::OUString szProfileSubtreeString=::rtl::OUString::createFromAscii("Profiles");
-static ::rtl::OUString szCurrentProfileString= ::rtl::OUString::createFromAscii("CurrentProfile");
-static ::rtl::OUString szDirectoryString =::rtl::OUString::createFromAscii("directory");
+static ::rtl::OUString szProfileSubtreeString( RTL_CONSTASCII_USTRINGPARAM( "Profiles" ));
+static ::rtl::OUString szCurrentProfileString( RTL_CONSTASCII_USTRINGPARAM( "CurrentProfile" ));
+static ::rtl::OUString szDirectoryString( RTL_CONSTASCII_USTRINGPARAM( "directory" ));
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024
diff --git a/connectivity/source/drivers/mysql/YTable.cxx b/connectivity/source/drivers/mysql/YTable.cxx
index f40a348db09e..8d453979f681 100644
--- a/connectivity/source/drivers/mysql/YTable.cxx
+++ b/connectivity/source/drivers/mysql/YTable.cxx
@@ -352,7 +352,7 @@ void OMySQLTable::dropDefaultValue(const ::rtl::OUString& _rColName)
// -----------------------------------------------------------------------------
::rtl::OUString OMySQLTable::getAlterTableColumnPart()
{
- ::rtl::OUString sSql = ::rtl::OUString::createFromAscii("ALTER TABLE ");
+ ::rtl::OUString sSql( RTL_CONSTASCII_USTRINGPARAM( "ALTER TABLE " ));
const ::rtl::OUString sQuote = getMetaData()->getIdentifierQuoteString( );
::rtl::OUString sComposedName(
diff --git a/connectivity/source/drivers/mysql/YTables.cxx b/connectivity/source/drivers/mysql/YTables.cxx
index 7248e3a7327d..26dfb19dfcdb 100644
--- a/connectivity/source/drivers/mysql/YTables.cxx
+++ b/connectivity/source/drivers/mysql/YTables.cxx
@@ -157,7 +157,7 @@ void OTables::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName)
::rtl::OUString sCatalog,sSchema,sTable;
::dbtools::qualifiedNameComponents(m_xMetaData,_sElementName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation);
- ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP ");
+ ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "DROP " ));
Reference<XPropertySet> xProp(xObject,UNO_QUERY);
sal_Bool bIsView = xProp.is() && ::comphelper::getString(xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))) == ::rtl::OUString::createFromAscii("VIEW");
diff --git a/connectivity/source/drivers/mysql/YUser.cxx b/connectivity/source/drivers/mysql/YUser.cxx
index 0cdd1bf5e8c4..b8b4f830c79d 100644
--- a/connectivity/source/drivers/mysql/YUser.cxx
+++ b/connectivity/source/drivers/mysql/YUser.cxx
@@ -131,16 +131,16 @@ void OMySQLUser::findPrivilegesAndGrantPrivileges(const ::rtl::OUString& objName
if ( xRes.is() )
{
- static const ::rtl::OUString sSELECT = ::rtl::OUString::createFromAscii("SELECT");
- static const ::rtl::OUString sINSERT = ::rtl::OUString::createFromAscii("INSERT");
- static const ::rtl::OUString sUPDATE = ::rtl::OUString::createFromAscii("UPDATE");
- static const ::rtl::OUString sDELETE = ::rtl::OUString::createFromAscii("DELETE");
- static const ::rtl::OUString sREAD = ::rtl::OUString::createFromAscii("READ");
- static const ::rtl::OUString sCREATE = ::rtl::OUString::createFromAscii("CREATE");
- static const ::rtl::OUString sALTER = ::rtl::OUString::createFromAscii("ALTER");
- static const ::rtl::OUString sREFERENCE = ::rtl::OUString::createFromAscii("REFERENCE");
- static const ::rtl::OUString sDROP = ::rtl::OUString::createFromAscii("DROP");
- static const ::rtl::OUString sYes = ::rtl::OUString::createFromAscii("YES");
+ static const ::rtl::OUString sSELECT( RTL_CONSTASCII_USTRINGPARAM( "SELECT" ));
+ static const ::rtl::OUString sINSERT( RTL_CONSTASCII_USTRINGPARAM( "INSERT" ));
+ static const ::rtl::OUString sUPDATE( RTL_CONSTASCII_USTRINGPARAM( "UPDATE" ));
+ static const ::rtl::OUString sDELETE( RTL_CONSTASCII_USTRINGPARAM( "DELETE" ));
+ static const ::rtl::OUString sREAD( RTL_CONSTASCII_USTRINGPARAM( "READ" ));
+ static const ::rtl::OUString sCREATE( RTL_CONSTASCII_USTRINGPARAM( "CREATE" ));
+ static const ::rtl::OUString sALTER( RTL_CONSTASCII_USTRINGPARAM( "ALTER" ));
+ static const ::rtl::OUString sREFERENCE( RTL_CONSTASCII_USTRINGPARAM( "REFERENCE" ));
+ static const ::rtl::OUString sDROP( RTL_CONSTASCII_USTRINGPARAM( "DROP" ));
+ static const ::rtl::OUString sYes( RTL_CONSTASCII_USTRINGPARAM( "YES" ));
nRightsWithGrant = nRights = 0;
diff --git a/connectivity/source/drivers/mysql/YUsers.cxx b/connectivity/source/drivers/mysql/YUsers.cxx
index da6e024fef62..05ba70939844 100644
--- a/connectivity/source/drivers/mysql/YUsers.cxx
+++ b/connectivity/source/drivers/mysql/YUsers.cxx
@@ -81,7 +81,7 @@ Reference< XPropertySet > OUsers::createDescriptor()
// XAppend
sdbcx::ObjectType OUsers::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor )
{
- ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("GRANT USAGE ON * TO ");
+ ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "GRANT USAGE ON * TO " ));
::rtl::OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString( );
::rtl::OUString sUserName( _rForName );
aSql += ::dbtools::quoteName(aQuote,sUserName)
@@ -106,7 +106,7 @@ sdbcx::ObjectType OUsers::appendObject( const ::rtl::OUString& _rForName, const
// XDrop
void OUsers::dropObject(sal_Int32 /*_nPos*/,const ::rtl::OUString _sElementName)
{
- ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("REVOKE ALL ON * FROM ");
+ ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "REVOKE ALL ON * FROM " ));
::rtl::OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString( );
aSql += ::dbtools::quoteName(aQuote,_sElementName);
diff --git a/connectivity/source/drivers/mysql/YViews.cxx b/connectivity/source/drivers/mysql/YViews.cxx
index 767ae19cdb48..80c691cfbfe9 100644
--- a/connectivity/source/drivers/mysql/YViews.cxx
+++ b/connectivity/source/drivers/mysql/YViews.cxx
@@ -113,7 +113,7 @@ void OViews::dropObject(sal_Int32 _nPos,const ::rtl::OUString /*_sElementName*/)
sal_Bool bIsNew = connectivity::sdbcx::ODescriptor::isNew( xObject );
if (!bIsNew)
{
- ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP VIEW");
+ ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "DROP VIEW" ));
Reference<XPropertySet> xProp(xObject,UNO_QUERY);
aSql += ::dbtools::composeTableName( m_xMetaData, xProp, ::dbtools::eInTableDefinitions, false, false, true );
@@ -136,7 +136,7 @@ void OViews::createView( const Reference< XPropertySet >& descriptor )
{
Reference<XConnection> xConnection = static_cast<OMySQLCatalog&>(m_rParent).getConnection();
- ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE VIEW ");
+ ::rtl::OUString aSql( RTL_CONSTASCII_USTRINGPARAM( "CREATE VIEW " ));
::rtl::OUString aQuote = xConnection->getMetaData()->getIdentifierQuoteString( );
::rtl::OUString sSchema,sCommand;