[Libreoffice-commits] core.git: 2 commits - include/vcl sc/qa vcl/inc vcl/source

Michael Meeks michael.meeks at collabora.com
Wed Nov 25 05:08:38 PST 2015


 include/vcl/scheduler.hxx    |   15 ++-------------
 sc/qa/extras/macros-test.cxx |    5 +++++
 vcl/inc/saltimer.hxx         |   16 ++++++++++++++++
 vcl/source/app/idle.cxx      |    1 +
 vcl/source/app/timer.cxx     |    1 +
 5 files changed, 25 insertions(+), 13 deletions(-)

New commits:
commit 55c6f5f36dfe0d917533a6056c4393debb16138c
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Wed Nov 25 13:15:49 2015 +0000

    sc: force vba events ordering.
    
    Otherwise we get workbook load events (eg.) happening at idle, which
    occurs at (more or less) random places as the StarBasic interpreter
    Yields every few instructions executed.
    
    Change-Id: I51ea57f4ad45e30e04fe84a9dc051ed1c5537536

diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx
index 70b7009..e2a6f32 100644
--- a/sc/qa/extras/macros-test.cxx
+++ b/sc/qa/extras/macros-test.cxx
@@ -306,6 +306,11 @@ void ScMacrosTest::testVba()
         OUString sMsg( "Failed to load " + aFileName );
         CPPUNIT_ASSERT_MESSAGE( OUStringToOString( sMsg, RTL_TEXTENCODING_UTF8 ).getStr(), xComponent.is() );
 
+        // process all events such as OnLoad events etc.
+        // otherwise the tend to arrive later at a random
+        // time - while processing other StarBasic methods.
+        Application::Reschedule(true);
+
         Any aRet;
         Sequence< sal_Int16 > aOutParamIndex;
         Sequence< Any > aOutParam;
commit 2092a4588888bf7d9013415e2b9a2c5cd6113a7f
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Wed Nov 25 10:35:37 2015 +0000

    vcl: move private impl. detail of Scheduler out of global header.
    
    Change-Id: Iee56131a15f9554c263406356456f65694515719

diff --git a/include/vcl/scheduler.hxx b/include/vcl/scheduler.hxx
index 5771f3a..b1152a0 100644
--- a/include/vcl/scheduler.hxx
+++ b/include/vcl/scheduler.hxx
@@ -22,20 +22,9 @@
 
 #include <vcl/dllapi.h>
 
-struct ImplSVData;
 class Scheduler;
-struct ImplSchedulerData
-{
-    ImplSchedulerData*  mpNext;      // Pointer to the next element in list
-    Scheduler*          mpScheduler;      // Pointer to VCL Scheduler instance
-    bool                mbDelete;    // Destroy this scheduler?
-    bool                mbInScheduler;    // Scheduler currently processed?
-    sal_uInt64          mnUpdateTime;   // Last Update Time
-
-    void Invoke();
-
-    static ImplSchedulerData *GetMostImportantTask( bool bTimer );
-};
+struct ImplSVData;
+struct ImplSchedulerData;
 
 enum class SchedulerPriority {
     HIGHEST   = 0,
diff --git a/vcl/inc/saltimer.hxx b/vcl/inc/saltimer.hxx
index 01a3012..04427ad 100644
--- a/vcl/inc/saltimer.hxx
+++ b/vcl/inc/saltimer.hxx
@@ -54,6 +54,22 @@ public:
     }
 };
 
+class Scheduler;
+
+// Internal scheduler record holding intrusive linked list pieces
+struct ImplSchedulerData
+{
+    ImplSchedulerData*  mpNext;        // Pointer to the next element in list
+    Scheduler*          mpScheduler;   // Pointer to VCL Scheduler instance
+    bool                mbDelete;      // Destroy this scheduler?
+    bool                mbInScheduler; // Scheduler currently processed?
+    sal_uInt64          mnUpdateTime;  // Last Update Time
+
+    void Invoke();
+
+    static ImplSchedulerData *GetMostImportantTask( bool bTimer );
+};
+
 #endif // INCLUDED_VCL_INC_SALTIMER_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/app/idle.cxx b/vcl/source/app/idle.cxx
index bba2d05..198ccfc 100644
--- a/vcl/source/app/idle.cxx
+++ b/vcl/source/app/idle.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <vcl/idle.hxx>
+#include "saltimer.hxx"
 
 void Idle::Invoke()
 {
diff --git a/vcl/source/app/timer.cxx b/vcl/source/app/timer.cxx
index de7c52b..f5ec1b2 100644
--- a/vcl/source/app/timer.cxx
+++ b/vcl/source/app/timer.cxx
@@ -19,6 +19,7 @@
 
 #include <tools/time.hxx>
 #include <vcl/timer.hxx>
+#include "saltimer.hxx"
 
 void Timer::SetDeletionFlags()
 {


More information about the Libreoffice-commits mailing list