diff options
Diffstat (limited to 'connectivity/source/drivers/evoab2/NTables.cxx')
-rw-r--r-- | connectivity/source/drivers/evoab2/NTables.cxx | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/connectivity/source/drivers/evoab2/NTables.cxx b/connectivity/source/drivers/evoab2/NTables.cxx index b7a844fac15d..f124f6dbf92a 100644 --- a/connectivity/source/drivers/evoab2/NTables.cxx +++ b/connectivity/source/drivers/evoab2/NTables.cxx @@ -29,35 +29,29 @@ using namespace ::cppu; using namespace connectivity::evoab; using namespace connectivity::sdbcx; using namespace ::com::sun::star::uno; -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; -ObjectType OEvoabTables::createObject(const OUString& aName) +css::uno::Reference< css::beans::XPropertySet > OEvoabTables::createObject(const OUString& aName) { - Sequence< OUString > aTypes { "TABLE" }; + Sequence< OUString > aTypes { u"TABLE"_ustr }; - Reference< XResultSet > xResult = m_xMetaData->getTables(Any(),"%",aName,aTypes); + Reference< XResultSet > xResult = m_xMetaData->getTables(Any(),u"%"_ustr,aName,aTypes); - ObjectType xRet; - if(xResult.is()) + rtl::Reference< OEvoabTable > xRet; + if(!xResult.is()) + return nullptr; + + Reference< XRow > xRow(xResult,UNO_QUERY); + if(xResult->next()) // there can be only one table with this name { - Reference< XRow > xRow(xResult,UNO_QUERY); - if(xResult->next()) // there can be only one table with this name - { - OEvoabTable* pRet = new OEvoabTable( - this, - static_cast<OEvoabCatalog&>(m_rParent).getConnection(), - aName, - xRow->getString(4), - xRow->getString(5), - "", - ""); - xRet = pRet; - } + xRet = new OEvoabTable( + this, + static_cast<OEvoabCatalog&>(m_rParent).getConnection(), + aName, + xRow->getString(4), + xRow->getString(5), + u""_ustr, + u""_ustr); } ::comphelper::disposeComponent(xResult); |