diff options
author | obo <obo@openoffice.org> | 2010-09-14 09:05:18 +0200 |
---|---|---|
committer | obo <obo@openoffice.org> | 2010-09-14 09:05:18 +0200 |
commit | 30891b5b51d5bef92450ffd89a2c0150709957a3 (patch) | |
tree | 19844061732fc5c06db3b0944e5c31c02be0eacc | |
parent | a86eb1b0660a7a1198b36ff5eb6d641554b61e2d (diff) | |
parent | 2fc62ba1a827201303191184f697ec22b9216f44 (diff) |
CWS-TOOLING: integrate CWS dba33i
Notes
split repo tag: base_ooo/OOO330_m8
split repo tag: base_ooo/OOO330_m9
-rw-r--r-- | dbaccess/source/core/api/KeySet.cxx | 7 | ||||
-rw-r--r-- | dbaccess/source/core/api/SingleSelectQueryComposer.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppController.cxx | 11 | ||||
-rw-r--r-- | dbaccess/source/ui/app/subcomponentmanager.cxx | 10 | ||||
-rw-r--r-- | dbaccess/source/ui/app/subcomponentmanager.hxx | 3 |
5 files changed, 24 insertions, 11 deletions
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx index 88b67b5ea5e3..6ee7a2b8ea4c 100644 --- a/dbaccess/source/core/api/KeySet.cxx +++ b/dbaccess/source/core/api/KeySet.cxx @@ -825,10 +825,12 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const ::rtl::OUString for (;aAutoIter != aAutoEnd; ++aAutoIter) { // we will only fetch values which are keycolumns - if ( m_pKeyColumnNames->find(*aAutoIter) != aEnd ) + SelectColumnsMetaData::iterator aFind = m_pKeyColumnNames->find(*aAutoIter); + if ( aFind != aEnd ) { sMaxStmt += sMax; - sMaxStmt += ::dbtools::quoteName( sQuote,*aAutoIter); + sMaxStmt += ::dbtools::quoteName( sQuote,aFind->second.sRealName +); sMaxStmt += sMaxEnd; } } @@ -842,7 +844,6 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const ::rtl::OUString ::rtl::OUString sCatalog,sSchema,sTable; ::dbtools::qualifiedNameComponents(m_xConnection->getMetaData(),m_sUpdateTableName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation); sStmt += ::dbtools::composeTableNameForSelect( m_xConnection, sCatalog, sSchema, sTable ); - //sStmt += m_aSelectComposedTableName; try { // now fetch the autoincrement values diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index 69520d043c52..2f9a58c975b7 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -1266,13 +1266,13 @@ sal_Bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode * pCon // Feldnamen sal_uInt16 i; for (i=0;i< pLhs->count();i++) - pCondition->getChild(i)->parseNodeToPredicateStr( aName, m_xConnection, xFormatter, m_aLocale, static_cast<sal_Char>( m_sDecimalSep.toChar() ) ); + pLhs->getChild(i)->parseNodeToPredicateStr( aName, m_xConnection, xFormatter, m_aLocale, static_cast<sal_Char>( m_sDecimalSep.toChar() ) ); // Kriterium aItem.Handle = pCondition->getChild(1)->getNodeType(); aValue = pCondition->getChild(1)->getTokenValue(); for(i=0;i< pRhs->count();i++) - pCondition->getChild(i)->parseNodeToPredicateStr(aValue, m_xConnection, xFormatter, m_aLocale, static_cast<sal_Char>( m_sDecimalSep.toChar() ) ); + pRhs->getChild(i)->parseNodeToPredicateStr(aValue, m_xConnection, xFormatter, m_aLocale, static_cast<sal_Char>( m_sDecimalSep.toChar() ) ); aItem.Name = aName; aItem.Value <<= aValue; diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index 1905193a4f04..9d659c26e707 100644 --- a/dbaccess/source/ui/app/AppController.cxx +++ b/dbaccess/source/ui/app/AppController.cxx @@ -1347,7 +1347,9 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa InvalidateAll(); break; case SID_DB_APP_DSRELDESIGN: - if ( !m_pSubComponentManager->activateSubFrame( ::rtl::OUString(), SID_DB_APP_DSRELDESIGN, E_OPEN_DESIGN ) ) + { + Reference< XComponent > xRelationDesigner; + if ( !m_pSubComponentManager->activateSubFrame( ::rtl::OUString(), SID_DB_APP_DSRELDESIGN, E_OPEN_DESIGN, xRelationDesigner ) ) { SharedConnection xConnection( ensureConnection() ); if ( xConnection.is() ) @@ -1359,7 +1361,8 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa onDocumentOpened( ::rtl::OUString(), SID_DB_APP_DSRELDESIGN, E_OPEN_DESIGN, xComponent, NULL ); } } - break; + } + break; case SID_DB_APP_DSUSERADMIN: { SharedConnection xConnection( ensureConnection() ); @@ -1844,7 +1847,7 @@ Reference< XComponent > OApplicationController::openElementWithArguments( const case E_REPORT: case E_FORM: { - if ( !m_pSubComponentManager->activateSubFrame( _sName, _eType, _eOpenMode ) ) + if ( !m_pSubComponentManager->activateSubFrame( _sName, _eType, _eOpenMode, xRet ) ) { ::std::auto_ptr< OLinkedDocumentsAccess > aHelper = getDocumentsAccess( _eType ); if ( !aHelper->isConnected() ) @@ -1861,7 +1864,7 @@ Reference< XComponent > OApplicationController::openElementWithArguments( const case E_QUERY: case E_TABLE: { - if ( !m_pSubComponentManager->activateSubFrame( _sName, _eType, _eOpenMode ) ) + if ( !m_pSubComponentManager->activateSubFrame( _sName, _eType, _eOpenMode, xRet ) ) { SharedConnection xConnection( ensureConnection() ); if ( !xConnection.is() ) diff --git a/dbaccess/source/ui/app/subcomponentmanager.cxx b/dbaccess/source/ui/app/subcomponentmanager.cxx index 56fbc30f46e7..9b56120c3ea0 100644 --- a/dbaccess/source/ui/app/subcomponentmanager.cxx +++ b/dbaccess/source/ui/app/subcomponentmanager.cxx @@ -529,7 +529,8 @@ namespace dbaui } //------------------------------------------------------------------------------------------------------------------ - bool SubComponentManager::activateSubFrame( const ::rtl::OUString& _rName, const sal_Int32 _nComponentType, const ElementOpenMode _eOpenMode ) const + bool SubComponentManager::activateSubFrame( const ::rtl::OUString& _rName, const sal_Int32 _nComponentType, + const ElementOpenMode _eOpenMode, Reference< XComponent >& o_rComponent ) const { ::osl::MutexGuard aGuard( m_pData->getMutex() ); @@ -546,6 +547,13 @@ namespace dbaui const Reference< XTopWindow > xTopWindow( xFrame->getContainerWindow(), UNO_QUERY_THROW ); xTopWindow->toFront(); + if ( pos->xModel.is() ) + o_rComponent = pos->xModel.get(); + else if ( pos->xController.is() ) + o_rComponent = pos->xController.get(); + else + o_rComponent = pos->xFrame.get(); + return true; } diff --git a/dbaccess/source/ui/app/subcomponentmanager.hxx b/dbaccess/source/ui/app/subcomponentmanager.hxx index f7f93ab6a53b..72b0a548e533 100644 --- a/dbaccess/source/ui/app/subcomponentmanager.hxx +++ b/dbaccess/source/ui/app/subcomponentmanager.hxx @@ -90,7 +90,8 @@ namespace dbaui bool activateSubFrame( const ::rtl::OUString& _rName, const sal_Int32 _nComponentType, - const ElementOpenMode _eOpenMode + const ElementOpenMode _eOpenMode, + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& o_rComponent ) const; /** closes all frames of the given component |