[ooo-build-commit] Branch 'ooo/OOO320' - 2 commits - extensions/source forms/source

Jan Holesovsky kendy at kemper.freedesktop.org
Thu Dec 3 17:35:31 PST 2009


 extensions/source/update/check/updatecheck.cxx |   37 ++++++++++++++++++-------
 forms/source/component/ComboBox.cxx            |    7 ++++
 forms/source/component/ComboBox.hxx            |    2 +
 forms/source/component/Currency.cxx            |    7 ++++
 forms/source/component/Currency.hxx            |    2 +
 forms/source/component/Date.cxx                |    7 ++++
 forms/source/component/Date.hxx                |    2 +
 forms/source/component/Edit.cxx                |    7 ++++
 forms/source/component/Edit.hxx                |    2 +
 forms/source/component/FormComponent.cxx       |    8 -----
 forms/source/component/FormattedField.cxx      |    7 ++++
 forms/source/component/FormattedField.hxx      |    1 
 forms/source/component/ListBox.cxx             |   11 ++++++-
 forms/source/component/ListBox.hxx             |    1 
 forms/source/component/Numeric.cxx             |    7 ++++
 forms/source/component/Numeric.hxx             |    1 
 forms/source/component/Pattern.cxx             |    7 ++++
 forms/source/component/Pattern.hxx             |    1 
 forms/source/component/Time.cxx                |    7 ++++
 forms/source/component/Time.hxx                |    1 
 20 files changed, 105 insertions(+), 20 deletions(-)

New commits:
commit 3dbc9cdc04abc00b9a4bfda9191962bc768400f2
Author: Oliver Bolte <obo at openoffice.org>
Date:   Tue Dec 1 11:19:29 2009 +0000

    CWS-TOOLING: integrate CWS dv18
    2009-11-27 07:45:02 +0100 dv  r277665 : #i107166# Use 32 bit for values larger than 32768
    2009-11-26 11:40:00 +0100 dv  r277651 : #i107166# Make check for extension update independent from office update check

diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx
index ea8f76c..befff85 100644
--- a/extensions/source/update/check/updatecheck.cxx
+++ b/extensions/source/update/check/updatecheck.cxx
@@ -264,7 +264,7 @@ protected:
     virtual void SAL_CALL onTerminated();
 
     /* Wrapper around checkForUpdates */
-    bool runCheck();
+    bool runCheck( bool & rbExtensionsChecked );
 
 private:
 
@@ -453,7 +453,7 @@ UpdateCheckThread::cancel()
 //------------------------------------------------------------------------------
 
 bool 
-UpdateCheckThread::runCheck()
+UpdateCheckThread::runCheck( bool & rbExtensionsChecked )
 {
     bool ret = false;
     UpdateState eUIState = UPDATESTATE_NO_UPDATE_AVAIL;
@@ -474,12 +474,14 @@ UpdateCheckThread::runCheck()
     // and when there was no office update found
     if ( ( eUIState != UPDATESTATE_UPDATE_AVAIL ) &&
          ( eUIState != UPDATESTATE_UPDATE_NO_DOWNLOAD ) &&
-         !aController->isDialogShowing() )
+         !aController->isDialogShowing() &&
+         !rbExtensionsChecked )
     {
         bool bHasExtensionUpdates = checkForExtensionUpdates( m_xContext );
         aController->setHasExtensionUpdates( bHasExtensionUpdates );
         if ( bHasExtensionUpdates )
             aController->setUIState( UPDATESTATE_EXT_UPD_AVAIL );
+        rbExtensionsChecked = true;
     }
 
     // joining with this thread is safe again
@@ -500,6 +502,11 @@ UpdateCheckThread::onTerminated()
 void SAL_CALL
 UpdateCheckThread::run()
 {
+    bool bExtensionsChecked = false;
+    TimeValue systime;
+    TimeValue nExtCheckTime;
+    osl_getSystemTime( &nExtCheckTime );
+
     osl::Condition::Result aResult = osl::Condition::result_timeout;
     TimeValue tv = { 10, 0 };
     
@@ -547,7 +554,6 @@ UpdateCheckThread::run()
             
             if( ! checkNow ) 
             {
-                TimeValue systime;
                 osl_getSystemTime(&systime);
                 
                 // Go back to sleep until time has elapsed
@@ -563,19 +569,28 @@ UpdateCheckThread::run()
 
             static sal_uInt8 n = 0;
             
-            if( ! hasInternetConnection() || ! runCheck() )
+            if( ! hasInternetConnection() || ! runCheck( bExtensionsChecked ) )
             {
-                // Increase next by 1, 5, 15, 60, .. minutes
-                static const sal_Int16 nRetryInterval[] = { 60, 300, 900, 3600 };
+                // the extension update check should be independent from the office update check
+                // 
+                osl_getSystemTime( &systime );
+                if ( nExtCheckTime.Seconds + offset < systime.Seconds )
+                    bExtensionsChecked = false;
+
+                // Increase next by 15, 60, .. minutes
+                static const sal_Int32 nRetryInterval[] = { 900, 3600, 14400, 86400 };
                 
-                if( n < sizeof(nRetryInterval) / sizeof(sal_Int16) )
+                if( n < sizeof(nRetryInterval) / sizeof(sal_Int32) )
                     ++n;
                 
                 tv.Seconds = nRetryInterval[n-1];
                 aResult = m_aCondition.wait(&tv);
             }
             else // reset retry counter
-                n = 0;            
+            {
+                n = 0;
+                bExtensionsChecked = false;
+            }
         }
     }
     
@@ -591,8 +606,10 @@ UpdateCheckThread::run()
 void SAL_CALL
 ManualUpdateCheckThread::run()
 {
+    bool bExtensionsChecked = false;
+
     try {
-        runCheck();
+        runCheck( bExtensionsChecked );
         m_aCondition.reset();
     }
     catch(const uno::Exception& e) {
commit 21e8da5fc2b3dee5dcbd893876e8c4615cc7a9b2
Author: Oliver Bolte <obo at openoffice.org>
Date:   Tue Dec 1 08:53:35 2009 +0000

    CWS-TOOLING: integrate CWS dba32j
    2009-11-26 09:30:10 +0100 msc  r277648 : #100000 fix urgent testscript error
    2009-11-25 10:27:56 +0100 msc  r277625 : #i100000 fix urgent testscript error
    2009-11-17 22:16:46 +0100 fs  r277544 : CWS-TOOLING: rebase CWS dba32j to branches/OOO320 at 277531 (milestone: OOO320:m5)
    2009-11-17 14:26:47 +0100 fs  r277535 : ooops, didn't mean to commit this uncommented line
    2009-11-14 20:50:29 +0100 fs  r277505 : add a --disable-pango switch to SM's configure options, and add a patch which makes certain code respect it (well, respect it better than currently, by not using some pango_x_* functions, which are not always available, even when pango itself is present)
    2009-11-14 20:47:41 +0100 fs  r277504 : spelling
    2009-11-13 14:04:00 +0100 fs  r277502 : #i100764# (commit approved by ab at openoffice.org): getModelFromBasic: do not start with the parent's parent when looking for ThisComponent, but walk up the anchestor chain, starting with the immediate parent
    2009-11-13 11:04:15 +0100 fs  r277496 : #i100764# better heuristics for determining whether or not to participate in the ThisComponent game
    2009-11-13 11:02:30 +0100 fs  r277495 : #i100764# set the WB_EXT_DOCUMENT style at the backing component's container window, when creating it without the TaskCreator (which would normally do this)
    2009-11-11 13:49:11 +0100 fs  r277452 : #i106816#
    2009-11-11 13:48:53 +0100 fs  r277451 : fix the CREATETARBAL target, which is expected to create the zips used as prebuilts. The *inc.zip missed the NSS files in case NSS was built externally
    2009-11-11 12:15:34 +0100 fs  r277449 : update ignore list
    2009-11-11 12:09:23 +0100 fs  r277448 : add a link to the Mozilla build tools download location
    2009-11-11 12:07:16 +0100 fs  r277447 : add a link to the Mozilla build tools download location
    2009-11-06 16:23:12 +0100 fs  r277393 : #i106643#
    2009-11-03 23:20:29 +0100 fs  r277328 : #i106574#
    reverted the recent fix for issue #i105235#, and implemented a better one.
    2009-11-02 12:59:48 +0100 fs  r277294 : #i106550# errorOccured: also display the error when we're not in a nested form action - form actions are allowed to be triggered by other instances as well

diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx
index 2093544..1ef4565 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 4177ff2..f78b64e 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 ca3dae5..05c4675 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 bac9793..28148ea 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 72daa5f..00c460f 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 8d7de9d..94b37b5 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 4b483f3..408bbab 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 ca6ca41..fc4f109 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 0769639..5c68f20 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 2a0d973..0947b9a 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 43716ca..562d3fc 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 5e48646..c50c10c 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 9d1dcb7..307ecc5 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 0edd1bd..6032c0b 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 703c9fa..b857b24 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 f7cf04a..e0eb901 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 7acb258..90acfdc 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 0d857ac..5912536 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 433f938..e108a81 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 );
 


More information about the ooo-build-commit mailing list