summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2009-12-05 19:29:07 +0100
committerMathias Bauer <mba@openoffice.org>2009-12-05 19:29:07 +0100
commitcd0b2efd96ff274ea11610e16c0f2b28285a461f (patch)
treef2e8977a64bc2adaf16faf29e6f34b46f6bcd6e3 /forms
parentd4fb305ef0e2b8d0332153f34800cd2b9520869b (diff)
parent40651dbc54ccb847c97aecb1518f84bdcf5ff996 (diff)
merge to m67
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/ComboBox.cxx7
-rw-r--r--forms/source/component/ComboBox.hxx2
-rw-r--r--forms/source/component/Currency.cxx7
-rw-r--r--forms/source/component/Currency.hxx2
-rw-r--r--forms/source/component/Date.cxx7
-rw-r--r--forms/source/component/Date.hxx2
-rw-r--r--forms/source/component/Edit.cxx7
-rw-r--r--forms/source/component/Edit.hxx2
-rw-r--r--forms/source/component/FormComponent.cxx8
-rw-r--r--forms/source/component/FormattedField.cxx7
-rw-r--r--forms/source/component/FormattedField.hxx1
-rw-r--r--forms/source/component/ListBox.cxx11
-rw-r--r--forms/source/component/ListBox.hxx1
-rw-r--r--forms/source/component/Numeric.cxx7
-rw-r--r--forms/source/component/Numeric.hxx1
-rw-r--r--forms/source/component/Pattern.cxx7
-rw-r--r--forms/source/component/Pattern.hxx1
-rw-r--r--forms/source/component/Time.cxx7
-rw-r--r--forms/source/component/Time.hxx1
19 files changed, 78 insertions, 10 deletions
diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx
index 1d6d204ea977..432bc5124775 100644
--- a/forms/source/component/ComboBox.cxx
+++ b/forms/source/component/ComboBox.cxx
@@ -747,6 +747,13 @@ void SAL_CALL OComboBoxModel::reloaded( const EventObject& aEvent ) throw(Runtim
loadData( false );
}
+//------------------------------------------------------------------------------
+void OComboBoxModel::resetNoBroadcast()
+{
+ OBoundControlModel::resetNoBroadcast();
+ m_aLastKnownValue.clear();
+}
+
//-----------------------------------------------------------------------------
sal_Bool OComboBoxModel::commitControlValueToDbColumn( bool _bPostReset )
{
diff --git a/forms/source/component/ComboBox.hxx b/forms/source/component/ComboBox.hxx
index 835099a7637c..068f4fd97163 100644
--- a/forms/source/component/ComboBox.hxx
+++ b/forms/source/component/ComboBox.hxx
@@ -145,6 +145,8 @@ protected:
virtual ::com::sun::star::uno::Any
getDefaultForReset() const;
+ virtual void resetNoBroadcast();
+
// OEntryListHelper overriables
virtual void stringItemListChanged( ControlModelLock& _rInstanceLock );
virtual void connectedExternalListSource( );
diff --git a/forms/source/component/Currency.cxx b/forms/source/component/Currency.cxx
index 28fb27c94958..5af83ca2fba1 100644
--- a/forms/source/component/Currency.cxx
+++ b/forms/source/component/Currency.cxx
@@ -257,6 +257,13 @@ Any OCurrencyModel::getDefaultForReset() const
return aValue;
}
+//------------------------------------------------------------------------------
+void OCurrencyModel::resetNoBroadcast()
+{
+ OEditBaseModel::resetNoBroadcast();
+ m_aSaveValue.clear();
+}
+
//.........................................................................
} // namespace frm
//.........................................................................
diff --git a/forms/source/component/Currency.hxx b/forms/source/component/Currency.hxx
index 91eb109d6a14..3e968dcf3bc7 100644
--- a/forms/source/component/Currency.hxx
+++ b/forms/source/component/Currency.hxx
@@ -73,6 +73,8 @@ protected:
virtual ::com::sun::star::uno::Any
getDefaultForReset() const;
+ virtual void resetNoBroadcast();
+
protected:
DECLARE_XCLONEABLE();
diff --git a/forms/source/component/Date.cxx b/forms/source/component/Date.cxx
index 33332ae82908..5d0d3f21ce7a 100644
--- a/forms/source/component/Date.cxx
+++ b/forms/source/component/Date.cxx
@@ -348,6 +348,13 @@ Any ODateModel::getDefaultForReset() const
}
//------------------------------------------------------------------------------
+void ODateModel::resetNoBroadcast()
+{
+ OEditBaseModel::resetNoBroadcast();
+ m_aSaveValue.clear();
+}
+
+//------------------------------------------------------------------------------
Sequence< Type > ODateModel::getSupportedBindingTypes()
{
return Sequence< Type >( &::getCppuType( static_cast< util::Date* >( NULL ) ), 1 );
diff --git a/forms/source/component/Date.hxx b/forms/source/component/Date.hxx
index 4c4e84e2822f..7eb1acfabf75 100644
--- a/forms/source/component/Date.hxx
+++ b/forms/source/component/Date.hxx
@@ -96,6 +96,8 @@ protected:
virtual ::com::sun::star::uno::Any
getDefaultForReset() const;
+ virtual void resetNoBroadcast();
+
virtual void onConnectedDbColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxForm );
protected:
diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx
index 0f4abd687d65..4eca9402fef8 100644
--- a/forms/source/component/Edit.cxx
+++ b/forms/source/component/Edit.cxx
@@ -675,6 +675,13 @@ sal_Bool OEditModel::approveDbColumnType( sal_Int32 _nColumnType )
}
//------------------------------------------------------------------------------
+void OEditModel::resetNoBroadcast()
+{
+ OEditBaseModel::resetNoBroadcast();
+ m_aLastKnownValue.clear();
+}
+
+//------------------------------------------------------------------------------
sal_Bool OEditModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
{
Any aNewValue( m_xAggregateFastSet->getFastPropertyValue( getValuePropertyAggHandle() ) );
diff --git a/forms/source/component/Edit.hxx b/forms/source/component/Edit.hxx
index cb8d5c6300e4..774944eda939 100644
--- a/forms/source/component/Edit.hxx
+++ b/forms/source/component/Edit.hxx
@@ -118,6 +118,8 @@ protected:
virtual sal_Bool approveDbColumnType( sal_Int32 _nColumnType );
+ virtual void resetNoBroadcast();
+
protected:
virtual sal_uInt16 getPersistenceFlags() const;
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index 3b6a6afaf5de..2e46fa0c00f3 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -2266,14 +2266,6 @@ void OBoundControlModel::impl_connectDatabaseColumn_noNotify( bool _bFromReload
m_bLoaded = sal_True;
onConnectedDbColumn( xRowSet );
- // Some derived classes decide to cache the "current" (resp. "last known") control value, so operations like
- // commitControlValueToDbColumn can be made a no-op when nothing actually changed.
- // Normally, this cache is kept in sync with the column value, but during a reload, this synchronization is
- // temporarily disable. To allow the derived classes to update their cache from the current column value,
- // we call translateDbColumnToControlValue.
- if ( _bFromReload && hasField() )
- translateDbColumnToControlValue();
-
// initially transfer the db column value to the control, if we successfully connected to a database column
if ( hasField() )
initFromField( xRowSet );
diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx
index 9fd440ffa460..3add838333b9 100644
--- a/forms/source/component/FormattedField.cxx
+++ b/forms/source/component/FormattedField.cxx
@@ -1248,6 +1248,13 @@ Any OFormattedModel::getDefaultForReset() const
return m_xAggregateSet->getPropertyValue( PROPERTY_EFFECTIVE_DEFAULT );
}
+//------------------------------------------------------------------------------
+void OFormattedModel::resetNoBroadcast()
+{
+ OEditBaseModel::resetNoBroadcast();
+ m_aSaveValue.clear();
+}
+
//.........................................................................
}
//.........................................................................
diff --git a/forms/source/component/FormattedField.hxx b/forms/source/component/FormattedField.hxx
index 0e728288aaba..4a25d10c5c81 100644
--- a/forms/source/component/FormattedField.hxx
+++ b/forms/source/component/FormattedField.hxx
@@ -141,6 +141,7 @@ namespace frm
virtual ::com::sun::star::uno::Any
getDefaultForReset() const;
+ virtual void resetNoBroadcast();
virtual void onConnectedDbColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxForm );
virtual void onDisconnectedDbColumn();
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index 0a25f66fe401..4bbf42381900 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -1037,10 +1037,10 @@ namespace frm
Sequence< sal_Int16 > aSelectionIndicies;
- // Bei NULL-Eintraegen Selektion aufheben!
ORowSetValue aCurrentValue;
- aCurrentValue.fill( xBoundField->getPropertyValue( PROPERTY_VALUE ) );
+ aCurrentValue.fill( getFieldType(), m_xColumn );
+ // reset selection for NULL values
if ( aCurrentValue.isNull() )
{
if ( m_nNULLPos != -1 )
@@ -1088,6 +1088,13 @@ namespace frm
}
//--------------------------------------------------------------------
+ void OListBoxModel::resetNoBroadcast()
+ {
+ OBoundControlModel::resetNoBroadcast();
+ m_aSaveValue.setNull();
+ }
+
+ //--------------------------------------------------------------------
void SAL_CALL OListBoxModel::disposing( const EventObject& _rSource ) throw ( RuntimeException )
{
if ( !OEntryListHelper::handleDisposing( _rSource ) )
diff --git a/forms/source/component/ListBox.hxx b/forms/source/component/ListBox.hxx
index 60bd63b3712d..308fb618e18a 100644
--- a/forms/source/component/ListBox.hxx
+++ b/forms/source/component/ListBox.hxx
@@ -157,6 +157,7 @@ protected:
virtual ::com::sun::star::uno::Any
getDefaultForReset() const;
+ virtual void resetNoBroadcast();
virtual ::com::sun::star::uno::Any
getCurrentFormComponentValue() const;
diff --git a/forms/source/component/Numeric.cxx b/forms/source/component/Numeric.cxx
index 2ec1f0cfcfdc..2eba2daae067 100644
--- a/forms/source/component/Numeric.cxx
+++ b/forms/source/component/Numeric.cxx
@@ -212,6 +212,13 @@ Any ONumericModel::getDefaultForReset() const
return aValue;
}
+//------------------------------------------------------------------------------
+void ONumericModel::resetNoBroadcast()
+{
+ OEditBaseModel::resetNoBroadcast();
+ m_aSaveValue.clear();
+}
+
//.........................................................................
} // namespace frm
//.........................................................................
diff --git a/forms/source/component/Numeric.hxx b/forms/source/component/Numeric.hxx
index 45b096afef50..5599707e86d5 100644
--- a/forms/source/component/Numeric.hxx
+++ b/forms/source/component/Numeric.hxx
@@ -72,6 +72,7 @@ protected:
virtual ::com::sun::star::uno::Any
getDefaultForReset() const;
+ virtual void resetNoBroadcast();
protected:
DECLARE_XCLONEABLE();
diff --git a/forms/source/component/Pattern.cxx b/forms/source/component/Pattern.cxx
index 64f5ea0e5e75..166522c18359 100644
--- a/forms/source/component/Pattern.cxx
+++ b/forms/source/component/Pattern.cxx
@@ -252,6 +252,13 @@ Any OPatternModel::getDefaultForReset() const
return makeAny( m_aDefaultText );
}
+//------------------------------------------------------------------------------
+void OPatternModel::resetNoBroadcast()
+{
+ OEditBaseModel::resetNoBroadcast();
+ m_aLastKnownValue.clear();
+}
+
//.........................................................................
} // namespace frm
//.........................................................................
diff --git a/forms/source/component/Pattern.hxx b/forms/source/component/Pattern.hxx
index 8b2bf3b878c2..9e0bc3b68d77 100644
--- a/forms/source/component/Pattern.hxx
+++ b/forms/source/component/Pattern.hxx
@@ -81,6 +81,7 @@ protected:
virtual ::com::sun::star::uno::Any
getDefaultForReset() const;
+ virtual void resetNoBroadcast();
protected:
DECLARE_XCLONEABLE();
diff --git a/forms/source/component/Time.cxx b/forms/source/component/Time.cxx
index 85ce1670572d..6a63724829d1 100644
--- a/forms/source/component/Time.cxx
+++ b/forms/source/component/Time.cxx
@@ -350,6 +350,13 @@ Any OTimeModel::getDefaultForReset() const
}
//------------------------------------------------------------------------------
+void OTimeModel::resetNoBroadcast()
+{
+ OEditBaseModel::resetNoBroadcast();
+ m_aSaveValue.clear();
+}
+
+//------------------------------------------------------------------------------
Sequence< Type > OTimeModel::getSupportedBindingTypes()
{
return Sequence< Type >( &::getCppuType( static_cast< util::Time* >( NULL ) ), 1 );
diff --git a/forms/source/component/Time.hxx b/forms/source/component/Time.hxx
index d2ba5381f466..7a7ce373b363 100644
--- a/forms/source/component/Time.hxx
+++ b/forms/source/component/Time.hxx
@@ -96,6 +96,7 @@ protected:
virtual ::com::sun::star::uno::Any
getDefaultForReset() const;
+ virtual void resetNoBroadcast();
virtual void onConnectedDbColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxForm );