[ooo-build-commit] .: 10 commits - dbaccess/source
Jan Holesovsky
kendy at kemper.freedesktop.org
Wed Oct 6 07:09:25 PDT 2010
dbaccess/source/core/api/KeySet.cxx | 7 ++++---
dbaccess/source/core/api/SingleSelectQueryComposer.cxx | 4 ++--
dbaccess/source/ui/app/AppController.cxx | 11 +++++++----
dbaccess/source/ui/app/subcomponentmanager.cxx | 10 +++++++++-
dbaccess/source/ui/app/subcomponentmanager.hxx | 3 ++-
5 files changed, 24 insertions(+), 11 deletions(-)
New commits:
commit 25a10665e1fcf74f6bbf01b8037c9ce573536d0b
Merge: 65e8a6a... 701fc2d...
Author: Jan Holesovsky <kendy at suse.cz>
Date: Wed Oct 6 12:33:00 2010 +0200
Merge commit 'ooo/OOO330_m9'
commit 701fc2df43967b2657f343e905fbcd226142339c
Merge: 2ee0e40... 67b88d0...
Author: obo <obo at openoffice.org>
Date: Tue Sep 14 09:05:18 2010 +0200
CWS-TOOLING: integrate CWS dba33i
commit 67b88d07aafe90c525a2f3dae201de5571bb21e4
Merge: 24d181f... 6b62093...
Author: Frank Schoenheit [fs] <frank.schoenheit at oracle.com>
Date: Thu Sep 2 13:50:32 2010 +0200
dba33i: merged latest changes from CWS dba33h
commit 6b620931b37f11076ac7f057a98a9e5bc62e122a
Merge: e1b5be6... f391dff...
Author: Frank Schoenheit [fs] <frank.schoenheit at oracle.com>
Date: Thu Sep 2 13:37:14 2010 +0200
dba33h: merged latest changes from CWS fs33a
commit 24d181f1087569b3c5ad68b7bb2f4e90efbc4094
Author: Frank Schoenheit [fs] <frank.schoenheit at sun.com>
Date: Thu Sep 2 07:15:38 2010 +0200
dba33i: #i113506# when loading a sub component which is already open, return the existing component instead of NULL
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 94bbb23..001105b 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 251ba9b..ea37fcf 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 d84cef2..a0dd80b 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
commit 3864a0acb6f15c905f6b33565bff7238b914314c
Merge: d6fa31e... e1b5be6...
Author: Frank Schoenheit [fs] <frank.schoenheit at oracle.com>
Date: Wed Sep 1 13:31:14 2010 +0200
dba33h: merge
commit e1b5be6c104d48a85ce9dd8cecc45c1f4b59c98f
Author: Ocke Janssen [oj] <Ocke.Janssen at oracle.com>
Date: Wed Sep 1 13:09:46 2010 +0200
dba33h: #i114246# use correct table name
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index eb1699f..4d76acc 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -198,7 +198,7 @@ void OKeySet::initColumns()
m_pForeignColumnNames.reset( new SelectColumnsMetaData(bCase) );
}
void OKeySet::findTableColumnsMatching_throw(const Any& i_aTable
- ,const Reference<XDatabaseMetaData>& /*i_xMeta*/
+ ,const Reference<XDatabaseMetaData>& i_xMeta
,const Reference<XNameAccess>& i_xQueryColumns)
{
// first ask the database itself for the best columns which can be used
@@ -209,9 +209,6 @@ void OKeySet::findTableColumnsMatching_throw(const Any& i_aTable
const Reference<XColumnsSupplier> xTblColSup(i_aTable,UNO_QUERY_THROW);
const Reference<XNameAccess> xTblColumns = xTblColSup->getColumns();
- ::dbaccess::getColumnPositions(i_xQueryColumns,aBestColumnNames,m_sUpdateTableName,(*m_pKeyColumnNames),true);
- ::dbaccess::getColumnPositions(i_xQueryColumns,xTblColumns->getElementNames(),m_sUpdateTableName,(*m_pColumnNames),true);
-
// locate parameter in select columns
Reference<XParametersSupplier> xParaSup(m_xComposer,UNO_QUERY);
Reference<XIndexAccess> xQueryParameters = xParaSup->getParameters();
@@ -222,7 +219,26 @@ void OKeySet::findTableColumnsMatching_throw(const Any& i_aTable
Reference<XPropertySet> xPara(xQueryParameters->getByIndex(i),UNO_QUERY_THROW);
xPara->getPropertyValue(PROPERTY_REALNAME) >>= aParameterColumns[i];
}
- ::dbaccess::getColumnPositions(i_xQueryColumns,aParameterColumns,m_sUpdateTableName,(*m_pParameterNames),true);
+
+ if ( m_sUpdateTableName.getLength() )
+ {
+ ::dbaccess::getColumnPositions(i_xQueryColumns,aBestColumnNames,m_sUpdateTableName,(*m_pKeyColumnNames),true);
+ ::dbaccess::getColumnPositions(i_xQueryColumns,xTblColumns->getElementNames(),m_sUpdateTableName,(*m_pColumnNames),true);
+ ::dbaccess::getColumnPositions(i_xQueryColumns,aParameterColumns,m_sUpdateTableName,(*m_pParameterNames),true);
+ }
+ else
+ {
+ ::rtl::OUString sCatalog,sSchema,sTable;
+ Reference<XPropertySet> xTableProp(i_aTable,UNO_QUERY);
+ Any aCatalog = xTableProp->getPropertyValue(PROPERTY_CATALOGNAME);
+ aCatalog >>= sCatalog;
+ xTableProp->getPropertyValue(PROPERTY_SCHEMANAME) >>= sSchema;
+ xTableProp->getPropertyValue(PROPERTY_NAME) >>= sTable;
+ const ::rtl::OUString sComposedUpdateTableName = dbtools::composeTableName( i_xMeta, sCatalog, sSchema, sTable, sal_False, ::dbtools::eInDataManipulation );
+ ::dbaccess::getColumnPositions(i_xQueryColumns,aBestColumnNames,sComposedUpdateTableName,(*m_pKeyColumnNames),true);
+ ::dbaccess::getColumnPositions(i_xQueryColumns,xTblColumns->getElementNames(),sComposedUpdateTableName,(*m_pColumnNames),true);
+ ::dbaccess::getColumnPositions(i_xQueryColumns,aParameterColumns,sComposedUpdateTableName,(*m_pParameterNames),true);
+ }
SelectColumnsMetaData::const_iterator aPosIter = m_pKeyColumnNames->begin();
SelectColumnsMetaData::const_iterator aPosEnd = m_pKeyColumnNames->end();
@@ -823,7 +839,10 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const ::rtl::OUString
::rtl::OUString sStmt = ::rtl::OUString::createFromAscii("SELECT ");
sStmt += sMaxStmt;
sStmt += ::rtl::OUString::createFromAscii("FROM ");
- sStmt += m_aSelectComposedTableName;
+ ::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/KeySet.hxx b/dbaccess/source/core/api/KeySet.hxx
index ccd5cf0..5403a56 100644
--- a/dbaccess/source/core/api/KeySet.hxx
+++ b/dbaccess/source/core/api/KeySet.hxx
@@ -112,7 +112,6 @@ namespace dbaccess
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow> m_xRow;
::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryAnalyzer > m_xComposer;
::rtl::OUString m_sUpdateTableName;
- ::rtl::OUString m_aSelectComposedTableName;
::std::vector< ::rtl::OUString > m_aFilterColumns;
sal_Bool m_bRowCountFinal;
commit d6fa31e6c7c1f881d89cdd5cba3562dbcc790555
Author: Ocke Janssen [oj] <Ocke.Janssen at oracle.com>
Date: Wed Sep 1 09:29:20 2010 +0200
dba33i: #i114189# correct wrong used variable
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index fc80134..eea07de 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;
commit e2526f4b238517d1c80abee19b1b819ed95affa7
Author: Ocke Janssen [oj] <Ocke.Janssen at oracle.com>
Date: Tue Aug 31 13:42:47 2010 +0200
dba33i: #i114173# fix name to select from and field name of auto incremtn column
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index eb1699f..3cea966 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -809,10 +809,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;
}
}
@@ -823,7 +825,9 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const ::rtl::OUString
::rtl::OUString sStmt = ::rtl::OUString::createFromAscii("SELECT ");
sStmt += sMaxStmt;
sStmt += ::rtl::OUString::createFromAscii("FROM ");
- sStmt += m_aSelectComposedTableName;
+ ::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 );
try
{
// now fetch the autoincrement values
commit 8d2c8b1c670fc900e1387ae9c4ddbe50418596a3
Merge: 4022fd7... bf76cc8...
Author: Frank Schoenheit [fs] <frank.schoenheit at oracle.com>
Date: Fri Aug 27 15:35:58 2010 +0200
dba33h: merge after pulling in fs33a
More information about the ooo-build-commit
mailing list