diff options
Diffstat (limited to 'connectivity/source/drivers/hsqldb/HTables.cxx')
-rw-r--r-- | connectivity/source/drivers/hsqldb/HTables.cxx | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/connectivity/source/drivers/hsqldb/HTables.cxx b/connectivity/source/drivers/hsqldb/HTables.cxx index 7ca0aab0c609..a68f24a44aa0 100644 --- a/connectivity/source/drivers/hsqldb/HTables.cxx +++ b/connectivity/source/drivers/hsqldb/HTables.cxx @@ -46,16 +46,16 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; using namespace dbtools; -sdbcx::ObjectType OTables::createObject(const ::rtl::OUString& _rName) +sdbcx::ObjectType OTables::createObject(const OUString& _rName) { - ::rtl::OUString sCatalog,sSchema,sTable; + OUString sCatalog,sSchema,sTable; ::dbtools::qualifiedNameComponents(m_xMetaData,_rName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); - static const ::rtl::OUString s_sTableTypeView("VIEW"); - static const ::rtl::OUString s_sTableTypeTable("TABLE"); - static const ::rtl::OUString s_sAll("%"); + static const OUString s_sTableTypeView("VIEW"); + static const OUString s_sTableTypeTable("TABLE"); + static const OUString s_sAll("%"); - Sequence< ::rtl::OUString > sTableTypes(3); + Sequence< OUString > sTableTypes(3); sTableTypes[0] = s_sTableTypeView; sTableTypes[1] = s_sTableTypeTable; sTableTypes[2] = s_sAll; // just to be sure to include anything else .... @@ -109,14 +109,14 @@ Reference< XPropertySet > OTables::createDescriptor() } // ------------------------------------------------------------------------- // XAppend -sdbcx::ObjectType OTables::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor ) +sdbcx::ObjectType OTables::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) { createTable(descriptor); return createObject( _rForName ); } // ------------------------------------------------------------------------- // XDrop -void OTables::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName) +void OTables::dropObject(sal_Int32 _nPos,const OUString _sElementName) { Reference< XInterface > xObject( getObject( _nPos ) ); sal_Bool bIsNew = connectivity::sdbcx::ODescriptor::isNew( xObject ); @@ -125,19 +125,19 @@ void OTables::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName) Reference< XConnection > xConnection = static_cast<OHCatalog&>(m_rParent).getConnection(); - ::rtl::OUString sCatalog,sSchema,sTable; + OUString sCatalog,sSchema,sTable; ::dbtools::qualifiedNameComponents(m_xMetaData,_sElementName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); - ::rtl::OUString aSql( "DROP " ); + OUString aSql( "DROP " ); Reference<XPropertySet> xProp(xObject,UNO_QUERY); sal_Bool bIsView; - if((bIsView = (xProp.is() && ::comphelper::getString(xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))) == ::rtl::OUString("VIEW")))) // here we have a view - aSql += ::rtl::OUString("VIEW "); + if((bIsView = (xProp.is() && ::comphelper::getString(xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))) == OUString("VIEW")))) // here we have a view + aSql += OUString("VIEW "); else - aSql += ::rtl::OUString("TABLE "); + aSql += OUString("TABLE "); - ::rtl::OUString sComposedName( + OUString sComposedName( ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sTable, sal_True, ::dbtools::eInDataManipulation ) ); aSql += sComposedName; Reference< XStatement > xStmt = xConnection->createStatement( ); @@ -159,7 +159,7 @@ void OTables::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName) void OTables::createTable( const Reference< XPropertySet >& descriptor ) { Reference< XConnection > xConnection = static_cast<OHCatalog&>(m_rParent).getConnection(); - ::rtl::OUString aSql = ::dbtools::createSqlCreateTableStatement(descriptor,xConnection); + OUString aSql = ::dbtools::createSqlCreateTableStatement(descriptor,xConnection); Reference< XStatement > xStmt = xConnection->createStatement( ); if ( xStmt.is() ) @@ -169,7 +169,7 @@ void OTables::createTable( const Reference< XPropertySet >& descriptor ) } } // ----------------------------------------------------------------------------- -void OTables::appendNew(const ::rtl::OUString& _rsNewTable) +void OTables::appendNew(const OUString& _rsNewTable) { insertElement(_rsNewTable,NULL); @@ -180,7 +180,7 @@ void OTables::appendNew(const ::rtl::OUString& _rsNewTable) static_cast<XContainerListener*>(aListenerLoop.next())->elementInserted(aEvent); } // ----------------------------------------------------------------------------- -::rtl::OUString OTables::getNameForObject(const sdbcx::ObjectType& _xObject) +OUString OTables::getNameForObject(const sdbcx::ObjectType& _xObject) { OSL_ENSURE(_xObject.is(),"OTables::getNameForObject: Object is NULL!"); return ::dbtools::composeTableName( m_xMetaData, _xObject, ::dbtools::eInDataManipulation, false, false, false ); |