diff options
Diffstat (limited to 'connectivity/source/drivers/hsqldb/HTables.cxx')
-rw-r--r-- | connectivity/source/drivers/hsqldb/HTables.cxx | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/connectivity/source/drivers/hsqldb/HTables.cxx b/connectivity/source/drivers/hsqldb/HTables.cxx index 787af894b992..002dfbf9a295 100644 --- a/connectivity/source/drivers/hsqldb/HTables.cxx +++ b/connectivity/source/drivers/hsqldb/HTables.cxx @@ -37,7 +37,6 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; -using namespace ::com::sun::star::lang; using namespace dbtools; sdbcx::ObjectType OTables::createObject(const OUString& _rName) @@ -45,10 +44,7 @@ sdbcx::ObjectType OTables::createObject(const OUString& _rName) OUString sCatalog,sSchema,sTable; ::dbtools::qualifiedNameComponents(m_xMetaData,_rName,sCatalog,sSchema,sTable,::dbtools::EComposeRule::InDataManipulation); - Sequence< OUString > sTableTypes(3); - sTableTypes[0] = "VIEW"; - sTableTypes[1] = "TABLE"; - sTableTypes[2] = "%"; // just to be sure to include anything else... + Sequence< OUString > sTableTypes {"VIEW", "TABLE", "%"}; // this last one just to be sure to include anything else... Any aCatalog; if ( !sCatalog.isEmpty() ) @@ -66,7 +62,7 @@ sdbcx::ObjectType OTables::createObject(const OUString& _rName) nPrivileges &= ~( Privilege::INSERT | Privilege::UPDATE | Privilege::DELETE | Privilege::CREATE | Privilege::ALTER | Privilege::DROP ); // obtain privileges - OHSQLTable* pRet = new OHSQLTable( this + xRet = new OHSQLTable( this ,static_cast<OHCatalog&>(m_rParent).getConnection() ,sTable ,xRow->getString(4) @@ -74,7 +70,6 @@ sdbcx::ObjectType OTables::createObject(const OUString& _rName) ,sSchema ,sCatalog ,nPrivileges); - xRet = pRet; } ::comphelper::disposeComponent(xResult); } @@ -164,10 +159,10 @@ void OTables::appendNew(const OUString& _rsNewTable) insertElement(_rsNewTable,nullptr); // notify our container listeners - ContainerEvent aEvent(static_cast<XContainer*>(this), makeAny(_rsNewTable), Any(), Any()); - OInterfaceIteratorHelper2 aListenerLoop(m_aContainerListeners); + ContainerEvent aEvent(static_cast<XContainer*>(this), Any(_rsNewTable), Any(), Any()); + OInterfaceIteratorHelper3 aListenerLoop(m_aContainerListeners); while (aListenerLoop.hasMoreElements()) - static_cast<XContainerListener*>(aListenerLoop.next())->elementInserted(aEvent); + aListenerLoop.next()->elementInserted(aEvent); } OUString OTables::getNameForObject(const sdbcx::ObjectType& _xObject) |