summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2007-11-21 16:16:39 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2007-11-21 16:16:39 +0000
commit85525c098491a2762358f86d41bf5ab5c0e5d1f1 (patch)
tree68f5d8524203129c8f862a56165a872631e97db8 /forms
parent5e4370f6b0f93a0ac3d0cf0a0806f3b1d7580b16 (diff)
INTEGRATION: CWS dba24c (1.52.12); FILE MERGED
2007/10/29 08:53:02 fs 1.52.12.2: #i81223# when filling the list, do not use a css.sdb.RowSet, but a simple statement/result set - that's cheaper by far, and sufficient 2007/10/28 21:24:41 fs 1.52.12.1: copying changes from CWS dba24b to dba24c, so I don't need to wait for integration/resync
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/ListBox.cxx59
1 files changed, 2 insertions, 57 deletions
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index 420de3a4deb6..5274c1707ad8 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: ListBox.cxx,v $
*
- * $Revision: 1.54 $
+ * $Revision: 1.55 $
*
- * last change: $Author: ihi $ $Date: 2007-11-21 17:15:47 $
+ * last change: $Author: ihi $ $Date: 2007-11-21 17:16:39 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -738,70 +738,25 @@ namespace frm
qualifiedNameComponents( xMeta, sListSource, sCatalog, sSchema, sTable, eInDataManipulation );
aStatement += composeTableNameForSelect( xConnection, sCatalog, sSchema, sTable );
-<<<<<<< ListBox.cxx
- m_aListRowSet.setCommand( aStatement );
-=======
m_aListRowSet.setEscapeProcessing( sal_False );
m_aListRowSet.setCommand( aStatement );
->>>>>>> 1.52.12.2
bExecute = sal_True;
}
break;
case ListSourceType_QUERY:
-<<<<<<< ListBox.cxx
- {
- Reference< XQueriesSupplier > xSupplyQueries( xConnection, UNO_QUERY_THROW );
- Reference< XNameAccess > xQueries ( xSupplyQueries->getQueries(), UNO_QUERY_THROW );
- Reference< XPropertySet > xQuery ( xQueries->getByName( sListSource ), UNO_QUERY );
- if ( xQuery.is() )
- {
- m_aListRowSet.setEscapeProcessing( xQuery->getPropertyValue( PROPERTY_ESCAPE_PROCESSING ) );
- m_aListRowSet.setCommand( xQuery->getPropertyValue( PROPERTY_COMMAND ) );
- bExecute = sal_True;
- }
- }
-=======
m_aListRowSet.setCommandFromQuery( sListSource );
bExecute = sal_True;
->>>>>>> 1.52.12.2
break;
default:
-<<<<<<< ListBox.cxx
- {
- if (ListSourceType_SQLPASSTHROUGH == m_eListSourceType)
- m_aListRowSet.setEscapeProcessing( sal_False );
- m_aListRowSet.setCommand( sListSource );
- bExecute = sal_True;
- }
-=======
m_aListRowSet.setEscapeProcessing( ListSourceType_SQLPASSTHROUGH != m_eListSourceType );
m_aListRowSet.setCommand( sListSource );
bExecute = sal_True;
->>>>>>> 1.52.12.2
}
if (bExecute)
{
-<<<<<<< ListBox.cxx
- Reference< XPropertySet > xFormProps(xForm, UNO_QUERY);
-
- m_aListRowSet.setCommandType( CommandType::COMMAND );
- m_aListRowSet.setDataSource( xFormProps->getPropertyValue( PROPERTY_DATASOURCE ) );
-
- // try to give the row set the connection of our form - this saves the rowset from creating an own one
- m_aListRowSet.setConnection( xFormProps->getPropertyValue( PROPERTY_ACTIVE_CONNECTION ) );
-
- if ( !m_aListRowSet.isDirty() )
- {
- // if none of the settings of the row set changed, compared to the last
- // invocation of loadData, then don't re-fill the list. Instead, assume
- // the list entries are the same.
- return;
- }
- m_aListRowSet.execute();
-=======
if ( !m_aListRowSet.isDirty() )
{
// if none of the settings of the row set changed, compared to the last
@@ -810,8 +765,6 @@ namespace frm
return;
}
xListCursor.reset( m_aListRowSet.execute() );
-
->>>>>>> 1.52.12.2
}
}
catch(SQLException& eSQL)
@@ -833,19 +786,11 @@ namespace frm
try
{
-<<<<<<< ListBox.cxx
- ::utl::SharedUNOComponent< XResultSet > xListCursor( Reference< XResultSet >( m_aListRowSet.getRowSet(), UNO_QUERY ) );
- if ( ListSourceType_TABLEFIELDS != m_eListSourceType && !xListCursor.is() )
- // something went wrong ...
- return;
-
-=======
OSL_ENSURE( xListCursor.is() || ( ListSourceType_TABLEFIELDS == m_eListSourceType ),
"OListBoxModel::loadData: logic error!" );
if ( !xListCursor.is() && ( ListSourceType_TABLEFIELDS != m_eListSourceType ) )
return;
->>>>>>> 1.52.12.2
switch (m_eListSourceType)
{
case ListSourceType_SQL: