diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-05-14 12:10:31 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-05-14 12:10:31 +0000 |
commit | 7c3947612d573f91dd8ae5d733711dae82a2512d (patch) | |
tree | 7f9cfae381dc85f58f0e95e8360c19cca08511c0 /forms/source/component/ComboBox.cxx | |
parent | ccbeb531a332272f5d1bf86c2ff9c95086ed1a00 (diff) |
INTEGRATION: CWS dba241b_DEV300 (1.38.4); FILE MERGED
2008/04/01 19:42:24 fs 1.38.4.1: #i87690# loadData got a 'force' parameter, to enforce refreshing the list box when triggered via XRefreshable
Diffstat (limited to 'forms/source/component/ComboBox.cxx')
-rw-r--r-- | forms/source/component/ComboBox.cxx | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx index c0da526e65ac..277250f47511 100644 --- a/forms/source/component/ComboBox.cxx +++ b/forms/source/component/ComboBox.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: ComboBox.cxx,v $ - * $Revision: 1.41 $ + * $Revision: 1.42 $ * * This file is part of OpenOffice.org. * @@ -246,7 +246,7 @@ void OComboBoxModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const if ( m_xCursor.is() && !hasField() && !hasExternalListSource() ) // combo box is already connected to a database, and no external list source // data source changed -> refresh - loadData(); + loadData( false ); } break; @@ -474,7 +474,7 @@ void SAL_CALL OComboBoxModel::read(const Reference<stario::XObjectInputStream>& } //------------------------------------------------------------------------------ -void OComboBoxModel::loadData() +void OComboBoxModel::loadData( bool _bForce ) { DBG_ASSERT(m_eListSourceType != ListSourceType_VALUELIST, "OComboBoxModel::loadData : do not call for a value list !"); DBG_ASSERT( !hasExternalListSource(), "OComboBoxModel::loadData: cannot load from DB when I have an external list source!" ); @@ -602,7 +602,7 @@ void OComboBoxModel::loadData() if ( bExecuteRowSet ) { - if ( !m_aListRowSet.isDirty() ) + if ( !_bForce && !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 @@ -715,7 +715,7 @@ void OComboBoxModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm // Daten nur laden, wenn eine Listenquelle angegeben wurde if ( m_aListSource.getLength() && m_xCursor.is() && !hasExternalListSource() ) - loadData(); + loadData( false ); } //------------------------------------------------------------------------------ @@ -735,7 +735,7 @@ void SAL_CALL OComboBoxModel::reloaded( const EventObject& aEvent ) throw(Runtim // reload data if we have a list source if ( m_aListSource.getLength() && m_xCursor.is() && !hasExternalListSource() ) - loadData(); + loadData( false ); } //----------------------------------------------------------------------------- @@ -850,6 +850,20 @@ void OComboBoxModel::disconnectedExternalListSource( ) } //-------------------------------------------------------------------- +void OComboBoxModel::refreshInternalEntryList() +{ + DBG_ASSERT( !hasExternalListSource(), "OComboBoxModel::refreshInternalEntryList: invalid call!" ); + + if ( !hasExternalListSource( ) + && ( m_eListSourceType != ListSourceType_VALUELIST ) + && ( m_xCursor.is() ) + ) + { + loadData( true ); + } +} + +//-------------------------------------------------------------------- void SAL_CALL OComboBoxModel::disposing( const EventObject& _rSource ) throw ( RuntimeException ) { if ( !OEntryListHelper::handleDisposing( _rSource ) ) |