From bf7690bc1b444278bef1e355c7463d27381a8700 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 25 Feb 2016 09:38:09 +0200 Subject: convert EComposeRule to scoped enum Change-Id: I5a2e4f6f6f0f353c75dff85e865608b12c2104f9 --- dbaccess/source/core/api/CacheSet.cxx | 2 +- dbaccess/source/core/api/FilteredContainer.cxx | 4 ++-- dbaccess/source/core/api/KeySet.cxx | 10 +++++----- dbaccess/source/core/api/OptimisticSet.cxx | 8 ++++---- dbaccess/source/core/api/RowSet.cxx | 6 +++--- dbaccess/source/core/api/SingleSelectQueryComposer.cxx | 12 ++++++------ dbaccess/source/core/api/definitioncolumn.cxx | 2 +- dbaccess/source/core/api/tablecontainer.cxx | 4 ++-- dbaccess/source/core/api/viewcontainer.cxx | 6 +++--- dbaccess/source/core/dataaccess/connection.cxx | 2 +- dbaccess/source/sdbtools/connection/objectnames.cxx | 2 +- dbaccess/source/sdbtools/connection/tablename.cxx | 12 ++++++------ dbaccess/source/ui/app/AppController.cxx | 6 +++--- dbaccess/source/ui/app/AppControllerGen.cxx | 2 +- dbaccess/source/ui/control/tabletree.cxx | 6 +++--- dbaccess/source/ui/dlg/adtabdlg.cxx | 2 +- dbaccess/source/ui/dlg/dlgsave.cxx | 4 ++-- dbaccess/source/ui/dlg/queryfilter.cxx | 4 ++-- dbaccess/source/ui/dlg/tablespage.cxx | 2 +- dbaccess/source/ui/misc/DExport.cxx | 2 +- dbaccess/source/ui/misc/UITools.cxx | 4 ++-- dbaccess/source/ui/misc/WCPage.cxx | 2 +- dbaccess/source/ui/misc/WCopyTable.cxx | 12 ++++++------ dbaccess/source/ui/misc/databaseobjectview.cxx | 2 +- dbaccess/source/ui/querydesign/QueryDesignView.cxx | 6 +++--- dbaccess/source/ui/querydesign/QueryTableView.cxx | 2 +- dbaccess/source/ui/querydesign/querycontroller.cxx | 2 +- dbaccess/source/ui/relationdesign/RelationController.cxx | 4 ++-- dbaccess/source/ui/tabledesign/TableController.cxx | 4 ++-- dbaccess/source/ui/uno/copytablewizard.cxx | 2 +- 30 files changed, 69 insertions(+), 69 deletions(-) (limited to 'dbaccess/source') diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx index 8853a653a03c..5618df02005c 100644 --- a/dbaccess/source/core/api/CacheSet.cxx +++ b/dbaccess/source/core/api/CacheSet.cxx @@ -144,7 +144,7 @@ void OCacheSet::fillTableName(const Reference& _xTable) throw(SQL ,comphelper::getString(_xTable->getPropertyValue(PROPERTY_SCHEMANAME)) ,comphelper::getString(_xTable->getPropertyValue(PROPERTY_NAME)) ,true - ,::dbtools::eInDataManipulation); + ,::dbtools::EComposeRule::InDataManipulation); } } diff --git a/dbaccess/source/core/api/FilteredContainer.cxx b/dbaccess/source/core/api/FilteredContainer.cxx index 4dad392d6ee4..768f600f064b 100644 --- a/dbaccess/source/core/api/FilteredContainer.cxx +++ b/dbaccess/source/core/api/FilteredContainer.cxx @@ -131,7 +131,7 @@ sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, ::std::vecto _io_tableInfo.sComposedName = OptionalString( composeTableName( _metaData, *_io_tableInfo.sCatalog, *_io_tableInfo.sSchema, *_io_tableInfo.sName, - false, ::dbtools::eInDataManipulation ) + false, ::dbtools::EComposeRule::InDataManipulation ) ); } } @@ -405,7 +405,7 @@ sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, ::std::vecto OUString OFilteredContainer::getNameForObject(const ObjectType& _xObject) { OSL_ENSURE( _xObject.is(), "OFilteredContainer::getNameForObject: Object is NULL!" ); - return ::dbtools::composeTableName( m_xMetaData, _xObject, ::dbtools::eInDataManipulation, false, false, false ); + return ::dbtools::composeTableName( m_xMetaData, _xObject, ::dbtools::EComposeRule::InDataManipulation, false, false, false ); } // multiple to obtain all tables from XDatabaseMetaData::getTables, via passing a particular diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx index 8aafd7eb76ab..12e74c4dfbf5 100644 --- a/dbaccess/source/core/api/KeySet.cxx +++ b/dbaccess/source/core/api/KeySet.cxx @@ -190,7 +190,7 @@ void OKeySet::findTableColumnsMatching_throw( const Any& i_aTable, xTableProp->getPropertyValue( PROPERTY_CATALOGNAME )>>= sCatalog; xTableProp->getPropertyValue( PROPERTY_SCHEMANAME ) >>= sSchema; xTableProp->getPropertyValue( PROPERTY_NAME ) >>= sTable; - sUpdateTableName = dbtools::composeTableName( i_xMeta, sCatalog, sSchema, sTable, false, ::dbtools::eInDataManipulation ); + sUpdateTableName = dbtools::composeTableName( i_xMeta, sCatalog, sSchema, sTable, false, ::dbtools::EComposeRule::InDataManipulation ); } ::dbaccess::getColumnPositions(i_xQueryColumns,aBestColumnNames,sUpdateTableName,(*o_pKeyColumnNames),true); @@ -265,7 +265,7 @@ OUStringBuffer OKeySet::createKeyFilter() { if ( ! aFilter.isEmpty() ) aFilter.append(aAnd); - appendOneKeyColumnClause(::dbtools::quoteTableName(xMeta, aPosIter->second.sTableName, ::dbtools::eInDataManipulation), + appendOneKeyColumnClause(::dbtools::quoteTableName(xMeta, aPosIter->second.sTableName, ::dbtools::EComposeRule::InDataManipulation), ::dbtools::quoteName(aQuote, aPosIter->second.sRealName), *aIter++, aFilter); @@ -275,7 +275,7 @@ OUStringBuffer OKeySet::createKeyFilter() { if ( ! aFilter.isEmpty() ) aFilter.append(aAnd); - appendOneKeyColumnClause(::dbtools::quoteTableName(xMeta, aPosIter->second.sTableName, ::dbtools::eInDataManipulation), + appendOneKeyColumnClause(::dbtools::quoteTableName(xMeta, aPosIter->second.sTableName, ::dbtools::EComposeRule::InDataManipulation), ::dbtools::quoteName(aQuote, aPosIter->second.sRealName), *aIter++, aFilter); @@ -311,7 +311,7 @@ void OKeySet::construct(const Reference< XResultSet>& _xDriverSet, const OUStrin { connectivity::OSQLTable xSelColSup(xSelectTables->getByName(*pIter),uno::UNO_QUERY); Reference xProp(xSelColSup,uno::UNO_QUERY); - OUString sSelectTableName = ::dbtools::composeTableName( xMeta, xProp, ::dbtools::eInDataManipulation, false, false, false ); + OUString sSelectTableName = ::dbtools::composeTableName( xMeta, xProp, ::dbtools::EComposeRule::InDataManipulation, false, false, false ); ::dbaccess::getColumnPositions(xQueryColumns, xSelColSup->getColumns()->getElementNames(), sSelectTableName, (*m_pForeignColumnNames), true); @@ -768,7 +768,7 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const OUString& i_sSQ sMaxStmt = sMaxStmt.replaceAt(sMaxStmt.getLength()-1,1," "); OUString sStmt = "SELECT " + sMaxStmt + "FROM "; OUString sCatalog,sSchema,sTable; - ::dbtools::qualifiedNameComponents(m_xConnection->getMetaData(),m_sUpdateTableName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); + ::dbtools::qualifiedNameComponents(m_xConnection->getMetaData(),m_sUpdateTableName,sCatalog,sSchema,sTable,::dbtools::EComposeRule::InDataManipulation); sStmt += ::dbtools::composeTableNameForSelect( m_xConnection, sCatalog, sSchema, sTable ); try { diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx index 7774fe563b1b..67f6850f8684 100644 --- a/dbaccess/source/core/api/OptimisticSet.cxx +++ b/dbaccess/source/core/api/OptimisticSet.cxx @@ -228,7 +228,7 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORow { m_bResultSetChanged = m_bResultSetChanged || aResultSetChanged[aSqlIter->first]; OUString sCatalog,sSchema,sTable; - ::dbtools::qualifiedNameComponents(xMetaData,aSqlIter->first,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); + ::dbtools::qualifiedNameComponents(xMetaData,aSqlIter->first,sCatalog,sSchema,sTable,::dbtools::EComposeRule::InDataManipulation); OUStringBuffer sSql(s_sUPDATE + ::dbtools::composeTableNameForSelect( m_xConnection, sCatalog, sSchema, sTable ) + s_sSET + aSqlIter->second.toString()); OUStringBuffer& rCondition = aKeyConditions[aSqlIter->first]; @@ -293,7 +293,7 @@ void SAL_CALL OptimisticSet::insertRow( const ORowSetRow& _rInsertRow,const conn { m_bResultSetChanged = m_bResultSetChanged || aResultSetChanged[aSqlIter->first]; OUString sCatalog,sSchema,sTable; - ::dbtools::qualifiedNameComponents(xMetaData,aSqlIter->first,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); + ::dbtools::qualifiedNameComponents(xMetaData,aSqlIter->first,sCatalog,sSchema,sTable,::dbtools::EComposeRule::InDataManipulation); OUString sComposedTableName = ::dbtools::composeTableNameForSelect( m_xConnection, sCatalog, sSchema, sTable ); OUString sSql(s_sINSERT + sComposedTableName + " ( " + aSqlIter->second.toString() + s_sVALUES + aParameter[aSqlIter->first].toString() + " )"); @@ -363,7 +363,7 @@ void SAL_CALL OptimisticSet::deleteRow(const ORowSetRow& _rDeleteRow,const conne if ( !rCondition.isEmpty() ) { OUString sCatalog,sSchema,sTable; - ::dbtools::qualifiedNameComponents(xMetaData,aSqlIter->first,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); + ::dbtools::qualifiedNameComponents(xMetaData,aSqlIter->first,sCatalog,sSchema,sTable,::dbtools::EComposeRule::InDataManipulation); OUString sSql("DELETE FROM " + ::dbtools::composeTableNameForSelect( m_xConnection, sCatalog, sSchema, sTable ) + " WHERE " + rCondition.toString() ); executeDelete(_rDeleteRow, sSql, aSqlIter->first); @@ -585,7 +585,7 @@ void OptimisticSet::fillMissingValues(ORowSetValueVector::Vector& io_aRow) const if ( !rCondition.isEmpty() ) { OUString sCatalog,sSchema,sTable; - ::dbtools::qualifiedNameComponents(xMetaData,aSqlIter->first,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); + ::dbtools::qualifiedNameComponents(xMetaData,aSqlIter->first,sCatalog,sSchema,sTable,::dbtools::EComposeRule::InDataManipulation); OUString sComposedTableName = ::dbtools::composeTableNameForSelect( m_xConnection, sCatalog, sSchema, sTable ); OUString sQuery("SELECT " + aSqlIter->second.toString() + " FROM " + sComposedTableName + " WHERE " + rCondition.makeStringAndClear()); diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index e4a51b828558..3762ec59cbf6 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -1686,7 +1686,7 @@ Reference< XResultSet > ORowSet::impl_prepareAndExecute_throw() OUString aComposedUpdateTableName; if ( !m_aUpdateTableName.isEmpty() ) - aComposedUpdateTableName = composeTableName( m_xActiveConnection->getMetaData(), m_aUpdateCatalogName, m_aUpdateSchemaName, m_aUpdateTableName, false, ::dbtools::eInDataManipulation ); + aComposedUpdateTableName = composeTableName( m_xActiveConnection->getMetaData(), m_aUpdateCatalogName, m_aUpdateSchemaName, m_aUpdateTableName, false, ::dbtools::EComposeRule::InDataManipulation ); SAL_INFO("dbaccess", "ORowSet::impl_prepareAndExecute_throw: creating cache" ); if(m_pCache) @@ -2354,7 +2354,7 @@ bool ORowSet::impl_buildActiveCommand_throw() { sCommand = "SELECT * FROM "; OUString sCatalog, sSchema, sTable; - ::dbtools::qualifiedNameComponents( m_xActiveConnection->getMetaData(), m_aCommand, sCatalog, sSchema, sTable, ::dbtools::eInDataManipulation ); + ::dbtools::qualifiedNameComponents( m_xActiveConnection->getMetaData(), m_aCommand, sCatalog, sSchema, sTable, ::dbtools::EComposeRule::InDataManipulation ); sCommand += ::dbtools::composeTableNameForSelect( m_xActiveConnection, sCatalog, sSchema, sTable ); } } @@ -2386,7 +2386,7 @@ bool ORowSet::impl_buildActiveCommand_throw() xQuery->getPropertyValue(PROPERTY_UPDATE_SCHEMANAME) >>= aSchema; xQuery->getPropertyValue(PROPERTY_UPDATE_TABLENAME) >>= aTable; if(!aTable.isEmpty()) - m_aUpdateTableName = composeTableName( m_xActiveConnection->getMetaData(), aCatalog, aSchema, aTable, false, ::dbtools::eInDataManipulation ); + m_aUpdateTableName = composeTableName( m_xActiveConnection->getMetaData(), aCatalog, aSchema, aTable, false, ::dbtools::EComposeRule::InDataManipulation ); } } else diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index ec4ae3ece64c..f0de55ba9b75 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -488,8 +488,8 @@ OUString OSingleSelectQueryComposer::impl_getColumnRealName_throw(const Referenc if(sTableName.indexOf('.') != -1) { OUString aCatlog,aSchema,aTable; - ::dbtools::qualifiedNameComponents(m_xMetaData,sTableName,aCatlog,aSchema,aTable,::dbtools::eInDataManipulation); - sTableName = ::dbtools::composeTableName( m_xMetaData, aCatlog, aSchema, aTable, true, ::dbtools::eInDataManipulation ); + ::dbtools::qualifiedNameComponents(m_xMetaData,sTableName,aCatlog,aSchema,aTable,::dbtools::EComposeRule::InDataManipulation); + sTableName = ::dbtools::composeTableName( m_xMetaData, aCatlog, aSchema, aTable, true, ::dbtools::EComposeRule::InDataManipulation ); } else if (!sTableName.isEmpty()) sTableName = ::dbtools::quoteName(aQuote,sTableName); @@ -1305,7 +1305,7 @@ OUString OSingleSelectQueryComposer::getTableAlias(const Reference< XPropertySet } else { - aComposedName = ::dbtools::composeTableName( m_xMetaData, aCatalog, aSchema, aTable, false, ::dbtools::eInDataManipulation ); + aComposedName = ::dbtools::composeTableName( m_xMetaData, aCatalog, aSchema, aTable, false, ::dbtools::EComposeRule::InDataManipulation ); // Is this the right case for the table name? // Else, look for it with different case, if applicable. @@ -1338,7 +1338,7 @@ OUString OSingleSelectQueryComposer::getTableAlias(const Reference< XPropertySet } if(pBegin != pEnd) { - sReturn = ::dbtools::composeTableName( m_xMetaData, aCatalog, aSchema, aTable, true, ::dbtools::eInDataManipulation ) + "."; + sReturn = ::dbtools::composeTableName( m_xMetaData, aCatalog, aSchema, aTable, true, ::dbtools::EComposeRule::InDataManipulation ) + "."; } } return sReturn; @@ -1591,8 +1591,8 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert if(sTableName.indexOf('.') != -1) { OUString aCatlog,aSchema,aTable; - ::dbtools::qualifiedNameComponents(m_xMetaData,sTableName,aCatlog,aSchema,aTable,::dbtools::eInDataManipulation); - sTableName = ::dbtools::composeTableName( m_xMetaData, aCatlog, aSchema, aTable, true, ::dbtools::eInDataManipulation ); + ::dbtools::qualifiedNameComponents(m_xMetaData,sTableName,aCatlog,aSchema,aTable,::dbtools::EComposeRule::InDataManipulation); + sTableName = ::dbtools::composeTableName( m_xMetaData, aCatlog, aSchema, aTable, true, ::dbtools::EComposeRule::InDataManipulation ); } else sTableName = ::dbtools::quoteName(aQuote,sTableName); diff --git a/dbaccess/source/core/api/definitioncolumn.cxx b/dbaccess/source/core/api/definitioncolumn.cxx index d6505031ee94..2cb8693976f2 100644 --- a/dbaccess/source/core/api/definitioncolumn.cxx +++ b/dbaccess/source/core/api/definitioncolumn.cxx @@ -237,7 +237,7 @@ Reference< XPropertySet > OQueryColumn::impl_determineOriginalTableColumn( const return nullptr; OUString sComposedTableName = ::dbtools::composeTableName( - _rxConnection->getMetaData(), sCatalog, sSchema, sTable, false, ::dbtools::eComplete ); + _rxConnection->getMetaData(), sCatalog, sSchema, sTable, false, ::dbtools::EComposeRule::Complete ); // retrieve the table in question Reference< XTablesSupplier > xSuppTables( _rxConnection, UNO_QUERY_THROW ); diff --git a/dbaccess/source/core/api/tablecontainer.cxx b/dbaccess/source/core/api/tablecontainer.cxx index b02baf958d6a..3cbac3de7189 100644 --- a/dbaccess/source/core/api/tablecontainer.cxx +++ b/dbaccess/source/core/api/tablecontainer.cxx @@ -188,7 +188,7 @@ connectivity::sdbcx::ObjectType OTableContainer::createObject(const OUString& _r sCatalog, sSchema, sTable, - ::dbtools::eInDataManipulation); + ::dbtools::EComposeRule::InDataManipulation); Any aCatalog; if(!sCatalog.isEmpty()) aCatalog <<= sCatalog; @@ -367,7 +367,7 @@ void OTableContainer::dropObject(sal_Int32 _nPos, const OUString& _sElementName) xTable->getPropertyValue(PROPERTY_SCHEMANAME) >>= sSchema; xTable->getPropertyValue(PROPERTY_NAME) >>= sTable; - sComposedName = ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sTable, true, ::dbtools::eInTableDefinitions ); + sComposedName = ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sTable, true, ::dbtools::EComposeRule::InTableDefinitions ); OUString sType; xTable->getPropertyValue(PROPERTY_TYPE) >>= sType; diff --git a/dbaccess/source/core/api/viewcontainer.cxx b/dbaccess/source/core/api/viewcontainer.cxx index f17f8d7df909..0832b2b9f395 100644 --- a/dbaccess/source/core/api/viewcontainer.cxx +++ b/dbaccess/source/core/api/viewcontainer.cxx @@ -91,7 +91,7 @@ ObjectType OViewContainer::createObject(const OUString& _rName) sCatalog, sSchema, sTable, - ::dbtools::eInDataManipulation); + ::dbtools::EComposeRule::InDataManipulation); return new View(m_xConnection, isCaseSensitive(), sCatalog, @@ -136,7 +136,7 @@ ObjectType OViewContainer::appendObject( const OUString& _rForName, const Refere } else { - OUString sComposedName = ::dbtools::composeTableName( m_xMetaData, descriptor, ::dbtools::eInTableDefinitions, false, false, true ); + OUString sComposedName = ::dbtools::composeTableName( m_xMetaData, descriptor, ::dbtools::EComposeRule::InTableDefinitions, false, false, true ); if(sComposedName.isEmpty()) ::dbtools::throwFunctionSequenceException(static_cast(static_cast(this))); @@ -181,7 +181,7 @@ void OViewContainer::dropObject(sal_Int32 _nPos, const OUString& _sElementName) xTable->getPropertyValue(PROPERTY_SCHEMANAME) >>= sSchema; xTable->getPropertyValue(PROPERTY_NAME) >>= sTable; - sComposedName = ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sTable, true, ::dbtools::eInTableDefinitions ); + sComposedName = ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sTable, true, ::dbtools::EComposeRule::InTableDefinitions ); } if(sComposedName.isEmpty()) diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx index 624bc13e0c37..0ff63620d8f7 100644 --- a/dbaccess/source/core/dataaccess/connection.cxx +++ b/dbaccess/source/core/dataaccess/connection.cxx @@ -610,7 +610,7 @@ Reference< XPreparedStatement > SAL_CALL OConnection::prepareCommand( const OUS aStatement = "SELECT * FROM "; OUString sCatalog, sSchema, sTable; - ::dbtools::qualifiedNameComponents( getMetaData(), command, sCatalog, sSchema, sTable, ::dbtools::eInDataManipulation ); + ::dbtools::qualifiedNameComponents( getMetaData(), command, sCatalog, sSchema, sTable, ::dbtools::EComposeRule::InDataManipulation ); aStatement += ::dbtools::composeTableNameForSelect( this, sCatalog, sSchema, sTable ); } break; diff --git a/dbaccess/source/sdbtools/connection/objectnames.cxx b/dbaccess/source/sdbtools/connection/objectnames.cxx index a0f08669ce83..f243ab4c8dd8 100644 --- a/dbaccess/source/sdbtools/connection/objectnames.cxx +++ b/dbaccess/source/sdbtools/connection/objectnames.cxx @@ -134,7 +134,7 @@ namespace sdbtools OUString sCatalog, sSchema, sName; ::dbtools::qualifiedNameComponents( - m_xConnection->getMetaData(), _rName, sCatalog, sSchema, sName, ::dbtools::eInTableDefinitions ); + m_xConnection->getMetaData(), _rName, sCatalog, sSchema, sName, ::dbtools::EComposeRule::InTableDefinitions ); OUString sExtraNameCharacters( m_xConnection->getMetaData()->getExtraNameCharacters() ); if ( ( !sCatalog.isEmpty() && !::dbtools::isValidSQLName( sCatalog, sExtraNameCharacters ) ) diff --git a/dbaccess/source/sdbtools/connection/tablename.cxx b/dbaccess/source/sdbtools/connection/tablename.cxx index a64a9f922e38..0ba45989a981 100644 --- a/dbaccess/source/sdbtools/connection/tablename.cxx +++ b/dbaccess/source/sdbtools/connection/tablename.cxx @@ -186,12 +186,12 @@ namespace sdbtools EComposeRule eComposeRule; } TypeTable[] = { - { CompositionType::ForTableDefinitions, eInTableDefinitions }, - { CompositionType::ForIndexDefinitions, eInIndexDefinitions }, - { CompositionType::ForDataManipulation, eInDataManipulation }, - { CompositionType::ForProcedureCalls, eInProcedureCalls }, - { CompositionType::ForPrivilegeDefinitions, eInPrivilegeDefinitions }, - { CompositionType::ForPrivilegeDefinitions, eComplete } + { CompositionType::ForTableDefinitions, EComposeRule::InTableDefinitions }, + { CompositionType::ForIndexDefinitions, EComposeRule::InIndexDefinitions }, + { CompositionType::ForDataManipulation, EComposeRule::InDataManipulation }, + { CompositionType::ForProcedureCalls, EComposeRule::InProcedureCalls }, + { CompositionType::ForPrivilegeDefinitions, EComposeRule::InPrivilegeDefinitions }, + { CompositionType::ForPrivilegeDefinitions, EComposeRule::Complete } }; bool found = false; diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index 3a391f509762..47f3e465fdae 100644 --- a/dbaccess/source/ui/app/AppController.cxx +++ b/dbaccess/source/ui/app/AppController.cxx @@ -1595,7 +1595,7 @@ void SAL_CALL OApplicationController::elementReplaced( const ContainerEvent& _rE { ensureConnection(); if ( xProp.is() && m_xMetaData.is() ) - sNewName = ::dbaui::composeTableName( m_xMetaData, xProp, ::dbtools::eInDataManipulation, false, false, false ); + sNewName = ::dbaui::composeTableName( m_xMetaData, xProp, ::dbtools::EComposeRule::InDataManipulation, false, false, false ); } break; case E_FORM: @@ -2111,7 +2111,7 @@ void OApplicationController::renameEntry() OUString sCatalog = aDialog->getCatalog(); OUString sSchema = aDialog->getSchema(); - sNewName = ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sName, false, ::dbtools::eInDataManipulation ); + sNewName = ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sName, false, ::dbtools::EComposeRule::InDataManipulation ); } else sNewName = aDialog->getName(); @@ -2131,7 +2131,7 @@ void OApplicationController::renameEntry() if ( eType == E_TABLE ) { Reference xProp(xRename,UNO_QUERY); - sNewName = ::dbaui::composeTableName( m_xMetaData, xProp, ::dbtools::eInDataManipulation, false, false, false ); + sNewName = ::dbaui::composeTableName( m_xMetaData, xProp, ::dbtools::EComposeRule::InDataManipulation, false, false, false ); } getContainer()->elementReplaced( eType , sOldName, sNewName ); diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx index 286c752c7385..bd081777caf8 100644 --- a/dbaccess/source/ui/app/AppControllerGen.cxx +++ b/dbaccess/source/ui/app/AppControllerGen.cxx @@ -118,7 +118,7 @@ void OApplicationController::convertToView(const OUString& _sName) OUString sCatalog = aDlg->getCatalog(); OUString sSchema = aDlg->getSchema(); OUString sNewName( - ::dbtools::composeTableName( xMeta, sCatalog, sSchema, sName, false, ::dbtools::eInTableDefinitions ) ); + ::dbtools::composeTableName( xMeta, sCatalog, sSchema, sName, false, ::dbtools::EComposeRule::InTableDefinitions ) ); Reference xView = ::dbaui::createView(sNewName,xConnection,xSourceObject); if ( !xView.is() ) throw SQLException(OUString(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE)),*this,OUString( "S1000" ) ,0,Any()); diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx index c42afc808dbb..5437a4e2718a 100644 --- a/dbaccess/source/ui/control/tabletree.cxx +++ b/dbaccess/source/ui/control/tabletree.cxx @@ -424,7 +424,7 @@ SvTreeListEntry* OTableTreeListBox::implAddEntry( // split the complete name into its components OUString sCatalog, sSchema, sName; - qualifiedNameComponents( _rxMeta, _rTableName, sCatalog, sSchema, sName, ::dbtools::eInDataManipulation ); + qualifiedNameComponents( _rxMeta, _rTableName, sCatalog, sSchema, sName, ::dbtools::EComposeRule::InDataManipulation ); SvTreeListEntry* pParentEntry = getAllObjectsEntry(); @@ -577,7 +577,7 @@ OUString OTableTreeListBox::getQualifiedTableName( SvTreeListEntry* _pEntry ) co } sTable = GetEntryText( _pEntry ); - return ::dbtools::composeTableName( xMeta, sCatalog, sSchema, sTable, false, ::dbtools::eInDataManipulation ); + return ::dbtools::composeTableName( xMeta, sCatalog, sSchema, sTable, false, ::dbtools::EComposeRule::InDataManipulation ); } catch( const Exception& ) { @@ -596,7 +596,7 @@ SvTreeListEntry* OTableTreeListBox::getEntryByQualifiedName( const OUString& _rN // split the complete name into its components OUString sCatalog, sSchema, sName; - qualifiedNameComponents(xMeta, _rName, sCatalog, sSchema, sName,::dbtools::eInDataManipulation); + qualifiedNameComponents(xMeta, _rName, sCatalog, sSchema, sName,::dbtools::EComposeRule::InDataManipulation); SvTreeListEntry* pParent = getAllObjectsEntry(); SvTreeListEntry* pCat = nullptr; diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx index 1dcfc1f6a94a..1cb57daca2da 100644 --- a/dbaccess/source/ui/dlg/adtabdlg.cxx +++ b/dbaccess/source/ui/dlg/adtabdlg.cxx @@ -122,7 +122,7 @@ OUString TableListFacade::getSelectedName( OUString& _out_rAliasName ) const } aComposedName = ::dbtools::composeTableName( - xMeta, aCatalog, aSchema, aTableName, false, ::dbtools::eInDataManipulation ); + xMeta, aCatalog, aSchema, aTableName, false, ::dbtools::EComposeRule::InDataManipulation ); } catch ( const Exception& ) { diff --git a/dbaccess/source/ui/dlg/dlgsave.cxx b/dbaccess/source/ui/dlg/dlgsave.cxx index a1337e5c69d8..c88bbbf6968b 100644 --- a/dbaccess/source/ui/dlg/dlgsave.cxx +++ b/dbaccess/source/ui/dlg/dlgsave.cxx @@ -215,7 +215,7 @@ OSaveAsDlg::OSaveAsDlg( vcl::Window * pParent, sCatalog, sSchema, sTable, - ::dbtools::eInDataManipulation); + ::dbtools::EComposeRule::InDataManipulation); sal_Int32 nPos = m_pImpl->m_pCatalog->GetEntryPos(OUString(sCatalog)); if ( nPos != COMBOBOX_ENTRY_NOTFOUND ) @@ -291,7 +291,7 @@ IMPL_LINK_TYPED(OSaveAsDlg, ButtonClickHdl, Button *, pButton, void) getSchema(), sNameToCheck, false, // no quoting - ::dbtools::eInDataManipulation + ::dbtools::EComposeRule::InDataManipulation ); } diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx index 93115beab46c..27bec94f4563 100644 --- a/dbaccess/source/ui/dlg/queryfilter.cxx +++ b/dbaccess/source/ui/dlg/queryfilter.cxx @@ -330,8 +330,8 @@ bool DlgFilterCrit::getCondition(const ListBox& _rField,const ListBox& _rComp,co // properly quote all parts of the table name, so // e.g. . becomes ""."
" OUString aCatlog,aSchema,aTable; - ::dbtools::qualifiedNameComponents( m_xMetaData, sTableName, aCatlog, aSchema, aTable, ::dbtools::eInDataManipulation ); - sTableName = ::dbtools::composeTableName( m_xMetaData, aCatlog, aSchema, aTable, true, ::dbtools::eInDataManipulation ); + ::dbtools::qualifiedNameComponents( m_xMetaData, sTableName, aCatlog, aSchema, aTable, ::dbtools::EComposeRule::InDataManipulation ); + sTableName = ::dbtools::composeTableName( m_xMetaData, aCatlog, aSchema, aTable, true, ::dbtools::EComposeRule::InDataManipulation ); } } xColumn->getPropertyValue(PROPERTY_REALNAME) >>= _rFilter.Name; diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx index 8f70184dd87e..eae9b041da15 100644 --- a/dbaccess/source/ui/dlg/tablespage.cxx +++ b/dbaccess/source/ui/dlg/tablespage.cxx @@ -164,7 +164,7 @@ namespace dbaui for (sal_Int32 i=0; i<_rTables.getLength(); ++i, ++pIncludeTable) { if (xMeta.is()) - qualifiedNameComponents(xMeta, pIncludeTable->getStr(), sCatalog, sSchema, sName,::dbtools::eInDataManipulation); + qualifiedNameComponents(xMeta, pIncludeTable->getStr(), sCatalog, sSchema, sName,::dbtools::EComposeRule::InDataManipulation); else sName = pIncludeTable->getStr(); diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx index 77ac7f94ddda..d53142252e1c 100644 --- a/dbaccess/source/ui/misc/DExport.cxx +++ b/dbaccess/source/ui/misc/DExport.cxx @@ -808,7 +808,7 @@ Reference< XPreparedStatement > ODatabaseExport::createPreparedStatment( const R ,const TPositions& _rvColumns) { OUString aSql("INSERT INTO "); - OUString sComposedTableName = ::dbtools::composeTableName( _xMetaData, _xDestTable, ::dbtools::eInDataManipulation, false, false, true ); + OUString sComposedTableName = ::dbtools::composeTableName( _xMetaData, _xDestTable, ::dbtools::EComposeRule::InDataManipulation, false, false, true ); aSql += sComposedTableName; aSql += " ( "; diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index db995cc875ff..ebfd43a4d29f 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -696,7 +696,7 @@ OUString createDefaultName(const Reference< XDatabaseMetaData>& _xMetaData,const { sSchema = _xMetaData->getUserName(); } - sCompsedName = ::dbtools::composeTableName( _xMetaData, sCatalog, sSchema, _sName, false, ::dbtools::eInDataManipulation ); + sCompsedName = ::dbtools::composeTableName( _xMetaData, sCatalog, sSchema, _sName, false, ::dbtools::EComposeRule::InDataManipulation ); sDefaultName = ::dbtools::createUniqueName(_xTables,sCompsedName); } catch(const SQLException&) @@ -1338,7 +1338,7 @@ Reference< XPropertySet > createView( const OUString& _rName, const Reference< X sCatalog, sSchema, sTable, - ::dbtools::eInDataManipulation); + ::dbtools::EComposeRule::InDataManipulation); xView->setPropertyValue(PROPERTY_CATALOGNAME,makeAny(sCatalog)); xView->setPropertyValue(PROPERTY_SCHEMANAME,makeAny(sSchema)); diff --git a/dbaccess/source/ui/misc/WCPage.cxx b/dbaccess/source/ui/misc/WCPage.cxx index f764dcf3486e..001956b7a123 100644 --- a/dbaccess/source/ui/misc/WCPage.cxx +++ b/dbaccess/source/ui/misc/WCPage.cxx @@ -192,7 +192,7 @@ bool OCopyTable::LeavePage() sCatalog, sSchema, sTable, - ::dbtools::eInDataManipulation); + ::dbtools::EComposeRule::InDataManipulation); sal_Int32 nMaxLength = xMeta->getMaxTableNameLength(); if ( nMaxLength && sTable.getLength() > nMaxLength ) { diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx index 51549cc3b29d..840234b66dea 100644 --- a/dbaccess/source/ui/misc/WCopyTable.cxx +++ b/dbaccess/source/ui/misc/WCopyTable.cxx @@ -113,7 +113,7 @@ OUString ObjectCopySource::getQualifiedObjectName() const OUString sName; if ( !m_xObjectPSI->hasPropertyByName( PROPERTY_COMMAND ) ) - sName = ::dbtools::composeTableName( m_xMetaData, m_xObject, ::dbtools::eInDataManipulation, false, false, false ); + sName = ::dbtools::composeTableName( m_xMetaData, m_xObject, ::dbtools::EComposeRule::InDataManipulation, false, false, false ); else m_xObject->getPropertyValue( PROPERTY_NAME ) >>= sName; return sName; @@ -266,7 +266,7 @@ NamedTableCopySource::NamedTableCopySource( const Reference< XConnection >& _rxC ,m_sTableName( _rTableName ) ,m_aColumnInfo() { - ::dbtools::qualifiedNameComponents( m_xMetaData, m_sTableName, m_sTableCatalog, m_sTableSchema, m_sTableBareName, ::dbtools::eComplete ); + ::dbtools::qualifiedNameComponents( m_xMetaData, m_sTableName, m_sTableCatalog, m_sTableSchema, m_sTableBareName, ::dbtools::EComposeRule::Complete ); impl_ensureColumnInfo_throw(); } @@ -572,9 +572,9 @@ OCopyTableWizard::OCopyTableWizard( vcl::Window * pParent, const OUString& _rDef sCatalog, sSchema, sTable, - ::dbtools::eInDataManipulation); + ::dbtools::EComposeRule::InDataManipulation); - m_sName = ::dbtools::composeTableName(m_xDestConnection->getMetaData(),sCatalog,sSchema,sTable,false,::dbtools::eInTableDefinitions); + m_sName = ::dbtools::composeTableName(m_xDestConnection->getMetaData(),sCatalog,sSchema,sTable,false,::dbtools::EComposeRule::InTableDefinitions); } VclPtrInstance pPage1( this ); @@ -1217,7 +1217,7 @@ Reference< XPropertySet > OCopyTableWizard::createTable() sCatalog, sSchema, sTable, - ::dbtools::eInDataManipulation); + ::dbtools::EComposeRule::InDataManipulation); if ( sCatalog.isEmpty() && xMetaData->supportsCatalogsInTableDefinitions() ) { @@ -1252,7 +1252,7 @@ Reference< XPropertySet > OCopyTableWizard::createTable() else { OUString sComposedName( - ::dbtools::composeTableName( m_xDestConnection->getMetaData(), xTable, ::dbtools::eInDataManipulation, false, false, false ) ); + ::dbtools::composeTableName( m_xDestConnection->getMetaData(), xTable, ::dbtools::EComposeRule::InDataManipulation, false, false, false ) ); if(xTables->hasByName(sComposedName)) { xTables->getByName(sComposedName) >>= xTable; diff --git a/dbaccess/source/ui/misc/databaseobjectview.cxx b/dbaccess/source/ui/misc/databaseobjectview.cxx index 54dc283f642d..f0045aba106f 100644 --- a/dbaccess/source/ui/misc/databaseobjectview.cxx +++ b/dbaccess/source/ui/misc/databaseobjectview.cxx @@ -281,7 +281,7 @@ namespace dbaui OUString sSchema; OUString sTable; if ( m_bTable ) - ::dbtools::qualifiedNameComponents( getConnection()->getMetaData(), _rQualifiedName, sCatalog, sSchema, sTable, ::dbtools::eInDataManipulation ); + ::dbtools::qualifiedNameComponents( getConnection()->getMetaData(), _rQualifiedName, sCatalog, sSchema, sTable, ::dbtools::EComposeRule::InDataManipulation ); i_rDispatchArgs.put( OUString(PROPERTY_COMMAND_TYPE), (m_bTable ? CommandType::TABLE : CommandType::QUERY) ); i_rDispatchArgs.put( OUString(PROPERTY_COMMAND), _rQualifiedName ); diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index c83d285c8d4f..ba937e1f6c62 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -358,7 +358,7 @@ namespace Reference< XDatabaseMetaData > xMetaData = _xConnection->getMetaData(); OUString sCatalog, sSchema, sTable; - ::dbtools::qualifiedNameComponents( xMetaData, aDBName, sCatalog, sSchema, sTable, ::dbtools::eInDataManipulation ); + ::dbtools::qualifiedNameComponents( xMetaData, aDBName, sCatalog, sSchema, sTable, ::dbtools::EComposeRule::InDataManipulation ); OUString aTableListStr = ::dbtools::composeTableNameForSelect( _xConnection, sCatalog, sSchema, sTable ); OUString aQuote = xMetaData->getIdentifierQuoteString(); @@ -1998,13 +1998,13 @@ namespace OSL_VERIFY( xTableProps->getPropertyValue( PROPERTY_NAME ) >>= sComposedName ); else { - sComposedName = ::dbtools::composeTableName( xMetaData, xTableProps, ::dbtools::eInDataManipulation, false, false, false ); + sComposedName = ::dbtools::composeTableName( xMetaData, xTableProps, ::dbtools::EComposeRule::InDataManipulation, false, false, false ); // if the alias is the complete (composed) table, then shorten it if ( aKeyComp( sComposedName, aIter->first ) ) { OUString sCatalog, sSchema, sTable; - ::dbtools::qualifiedNameComponents( xMetaData, sComposedName, sCatalog, sSchema, sTable, ::dbtools::eInDataManipulation ); + ::dbtools::qualifiedNameComponents( xMetaData, sComposedName, sCatalog, sSchema, sTable, ::dbtools::EComposeRule::InDataManipulation ); sAlias = sTable; } } diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx index 40f43aae2b7b..ab8fcda1b419 100644 --- a/dbaccess/source/ui/querydesign/QueryTableView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx @@ -388,7 +388,7 @@ void OQueryTableView::AddTabWin(const OUString& _rTableName, const OUString& _rA sCatalog, sSchema, sTable, - ::dbtools::eInDataManipulation); + ::dbtools::EComposeRule::InDataManipulation); OUString sRealName(sSchema); if (!sRealName.isEmpty()) sRealName += "."; diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index 2958e21b1aae..d969277f8af3 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -1528,7 +1528,7 @@ bool OQueryController::doSaveAsDoc(bool _bSaveAs) xViewProps.set( xElements->getByName( m_sName ), UNO_QUERY ); if ( !xViewProps.is() ) // correct name and try again - m_sName = ::dbtools::composeTableName( getMetaData(), xQuery, ::dbtools::eInDataManipulation, false, false, false ); + m_sName = ::dbtools::composeTableName( getMetaData(), xQuery, ::dbtools::EComposeRule::InDataManipulation, false, false, false ); OSL_ENSURE( xElements->hasByName( m_sName ), "OQueryController::doSaveAsDoc: newly created view does not exist!" ); diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx index c5e17dac51e9..a1b254c3c9a2 100644 --- a/dbaccess/source/ui/relationdesign/RelationController.cxx +++ b/dbaccess/source/ui/relationdesign/RelationController.cxx @@ -323,7 +323,7 @@ namespace sCatalog, sSchema, sTable, - ::dbtools::eInDataManipulation); + ::dbtools::EComposeRule::InDataManipulation); Any aCatalog; if ( !sCatalog.isEmpty() ) aCatalog <<= sCatalog; @@ -352,7 +352,7 @@ namespace void RelationLoader::loadTableData(const Any& _aTable) { Reference xTableProp(_aTable,UNO_QUERY); - const OUString sSourceName = ::dbtools::composeTableName( m_xMetaData, xTableProp, ::dbtools::eInTableDefinitions, false, false, false ); + const OUString sSourceName = ::dbtools::composeTableName( m_xMetaData, xTableProp, ::dbtools::EComposeRule::InTableDefinitions, false, false, false ); TTableDataHelper::iterator aFind = m_aTableData.find(sSourceName); if ( aFind == m_aTableData.end() ) { diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx index fbdbe931cf27..26864c741e05 100644 --- a/dbaccess/source/ui/tabledesign/TableController.cxx +++ b/dbaccess/source/ui/tabledesign/TableController.cxx @@ -368,7 +368,7 @@ bool OTableController::doSaveDoc(bool _bSaveAs) if(!m_xTable.is()) // correct name and try again { // it can be that someone inserted new data for us - m_sName = ::dbtools::composeTableName( getConnection()->getMetaData(), xTable, ::dbtools::eInDataManipulation, false, false, false ); + m_sName = ::dbtools::composeTableName( getConnection()->getMetaData(), xTable, ::dbtools::EComposeRule::InDataManipulation, false, false, false ); assignTable(); } // now check if our datasource has set a tablefilter and if append the new table name to it @@ -1481,7 +1481,7 @@ OUString OTableController::getPrivateTitle() const if ( !m_sName.isEmpty() && getConnection().is() ) { if ( m_xTable.is() ) - sTitle = ::dbtools::composeTableName( getConnection()->getMetaData(), m_xTable, ::dbtools::eInDataManipulation, false, false, false ); + sTitle = ::dbtools::composeTableName( getConnection()->getMetaData(), m_xTable, ::dbtools::EComposeRule::InDataManipulation, false, false, false ); else sTitle = m_sName; } diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx index 5030eeb3995a..03f8a4c18535 100644 --- a/dbaccess/source/ui/uno/copytablewizard.cxx +++ b/dbaccess/source/ui/uno/copytablewizard.cxx @@ -1444,7 +1444,7 @@ OUString CopyTableWizard::impl_getServerSideCopyStatement_throw(const Reference< sColumns.append(sQuote + aDestColumnNames[aPosIter->second - 1] + sQuote); } } - const OUString sComposedTableName = ::dbtools::composeTableName( xDestMetaData, _xTable, ::dbtools::eInDataManipulation, false, false, true ); + const OUString sComposedTableName = ::dbtools::composeTableName( xDestMetaData, _xTable, ::dbtools::EComposeRule::InDataManipulation, false, false, true ); OUString sSql("INSERT INTO " + sComposedTableName + " ( " + sColumns.makeStringAndClear() + " ) ( " + m_pSourceObject->getSelectStatement() + " )"); return sSql; -- cgit