[Libreoffice-commits] core.git: Branch 'private/quwex/gsoc-box2d-experimental' - 4 commits - animations/source include/xmloff offapi/com offapi/UnoApi_offapi.mk officecfg/registry sd/xml slideshow/Lib

2020-08-08 Thread Sarper Akdemir (via logerrit)
Rebased ref, commits from common ancestor:
commit e486d22139bdec2b20b2f21907aeb4e29a69d5ae
Author: Sarper Akdemir 
AuthorDate: Thu Aug 6 10:32:55 2020 +0300
Commit: Sarper Akdemir 
CommitDate: Sat Aug 8 20:38:04 2020 +0300

make physics based animation effects always processed last

Change-Id: I92d436aced6ef3ee2c8b0bf0167c1f7e642ba3b5

diff --git a/slideshow/source/engine/activitiesqueue.cxx 
b/slideshow/source/engine/activitiesqueue.cxx
index ba982385356e..38e79d1e5677 100644
--- a/slideshow/source/engine/activitiesqueue.cxx
+++ b/slideshow/source/engine/activitiesqueue.cxx
@@ -50,6 +50,8 @@ namespace slideshow::internal
 {
 for( const auto& pActivity : maCurrentActivitiesWaiting )
 pActivity->dispose();
+for( const auto& pActivity : 
maCurrentActivitiesToBeProcessedLast )
+pActivity->dispose();
 for( const auto& pActivity : maCurrentActivitiesReinsert )
 pActivity->dispose();
 }
@@ -59,7 +61,7 @@ namespace slideshow::internal
 }
 }
 
-bool ActivitiesQueue::addActivity( const ActivitySharedPtr& pActivity )
+bool ActivitiesQueue::addActivity( const ActivitySharedPtr& pActivity, 
const bool bProcessLast )
 {
 OSL_ENSURE( pActivity, "ActivitiesQueue::addActivity: activity ptr 
NULL" );
 
@@ -67,7 +69,17 @@ namespace slideshow::internal
 return false;
 
 // add entry to waiting list
-maCurrentActivitiesWaiting.push_back( pActivity );
+if( !bProcessLast )
+{
+maCurrentActivitiesWaiting.push_back( pActivity );
+}
+else
+{
+// Activities that should be processed last is kept in a 
different
+// ActivityQueue, and later added to the end of the 
maCurrentActivitiesWaiting
+// at the start of ActivitiesQueue::process()
+maCurrentActivitiesToBeProcessedLast.push_back( pActivity );
+}
 
 return true;
 }
@@ -76,6 +88,12 @@ namespace slideshow::internal
 {
 SAL_INFO("slideshow.verbose", "ActivitiesQueue: outer loop 
heartbeat" );
 
+// If there are activities to be processed last add them to the 
end of the ActivitiesQueue
+maCurrentActivitiesWaiting.insert( 
maCurrentActivitiesWaiting.end(),
+   
maCurrentActivitiesToBeProcessedLast.begin(),
+   
maCurrentActivitiesToBeProcessedLast.end() );
+maCurrentActivitiesToBeProcessedLast.clear();
+
 // accumulate time lag for all activities, and lag time
 // base if necessary:
 double fLag = 0.0;
diff --git a/slideshow/source/engine/animationnodes/animationbasenode.cxx 
b/slideshow/source/engine/animationnodes/animationbasenode.cxx
index 4dcb640795aa..7999b5a7654a 100644
--- a/slideshow/source/engine/animationnodes/animationbasenode.cxx
+++ b/slideshow/source/engine/animationnodes/animationbasenode.cxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "nodetools.hxx"
 #include 
@@ -294,7 +295,10 @@ void AnimationBaseNode::activate_st()
 mpActivity->setTargets( getShape(), maAttributeLayerHolder.get() );
 
 // add to activities queue
-getContext().mrActivitiesQueue.addActivity( mpActivity );
+if( mxAnimateNode->getType() == 
css::animations::AnimationNodeType::ANIMATEPHYSICS )
+getContext().mrActivitiesQueue.addActivity(mpActivity, true);
+else
+getContext().mrActivitiesQueue.addActivity( mpActivity );
 }
 else {
 // Actually, DO generate the event for empty activity,
diff --git a/slideshow/source/inc/activitiesqueue.hxx 
b/slideshow/source/inc/activitiesqueue.hxx
index b4f88b1b39d1..76dc981f8f65 100644
--- a/slideshow/source/inc/activitiesqueue.hxx
+++ b/slideshow/source/inc/activitiesqueue.hxx
@@ -57,7 +57,7 @@ namespace slideshow
 
 /** Add the given activity to the queue.
  */
-bool addActivity( const ActivitySharedPtr& pActivity );
+bool addActivity( const ActivitySharedPtr& pActivity, const bool 
bProcessLast = false );
 
 /** Process the activities queue.
 
@@ -96,6 +96,11 @@ namespace slideshow
  // await 
processing for this
  // round
 
+ActivityQueue   maCurrentActivitiesToBeProcessedLast; // 
activities that will be
+  // 
added to the end of
+  // 
maCurrentActivitiesWaiting at
+   

[Libreoffice-commits] core.git: Branch 'private/quwex/gsoc-box2d-experimental' - 4 commits - animations/source include/xmloff offapi/com offapi/UnoApi_offapi.mk officecfg/registry sd/xml slideshow/Lib

2020-08-08 Thread Sarper Akdemir (via logerrit)
Rebased ref, commits from common ancestor:
commit 09ed83f7cded70165ea0c0bea876e4c553c73d65
Author: Sarper Akdemir 
AuthorDate: Thu Aug 6 10:32:55 2020 +0300
Commit: Sarper Akdemir 
CommitDate: Sat Aug 8 19:30:38 2020 +0300

make physics based animation effects always processed last

Change-Id: I92d436aced6ef3ee2c8b0bf0167c1f7e642ba3b5

diff --git a/slideshow/source/engine/activitiesqueue.cxx 
b/slideshow/source/engine/activitiesqueue.cxx
index ba982385356e..38e79d1e5677 100644
--- a/slideshow/source/engine/activitiesqueue.cxx
+++ b/slideshow/source/engine/activitiesqueue.cxx
@@ -50,6 +50,8 @@ namespace slideshow::internal
 {
 for( const auto& pActivity : maCurrentActivitiesWaiting )
 pActivity->dispose();
+for( const auto& pActivity : 
maCurrentActivitiesToBeProcessedLast )
+pActivity->dispose();
 for( const auto& pActivity : maCurrentActivitiesReinsert )
 pActivity->dispose();
 }
@@ -59,7 +61,7 @@ namespace slideshow::internal
 }
 }
 
-bool ActivitiesQueue::addActivity( const ActivitySharedPtr& pActivity )
+bool ActivitiesQueue::addActivity( const ActivitySharedPtr& pActivity, 
const bool bProcessLast )
 {
 OSL_ENSURE( pActivity, "ActivitiesQueue::addActivity: activity ptr 
NULL" );
 
@@ -67,7 +69,17 @@ namespace slideshow::internal
 return false;
 
 // add entry to waiting list
-maCurrentActivitiesWaiting.push_back( pActivity );
+if( !bProcessLast )
+{
+maCurrentActivitiesWaiting.push_back( pActivity );
+}
+else
+{
+// Activities that should be processed last is kept in a 
different
+// ActivityQueue, and later added to the end of the 
maCurrentActivitiesWaiting
+// at the start of ActivitiesQueue::process()
+maCurrentActivitiesToBeProcessedLast.push_back( pActivity );
+}
 
 return true;
 }
@@ -76,6 +88,12 @@ namespace slideshow::internal
 {
 SAL_INFO("slideshow.verbose", "ActivitiesQueue: outer loop 
heartbeat" );
 
+// If there are activities to be processed last add them to the 
end of the ActivitiesQueue
+maCurrentActivitiesWaiting.insert( 
maCurrentActivitiesWaiting.end(),
+   
maCurrentActivitiesToBeProcessedLast.begin(),
+   
maCurrentActivitiesToBeProcessedLast.end() );
+maCurrentActivitiesToBeProcessedLast.clear();
+
 // accumulate time lag for all activities, and lag time
 // base if necessary:
 double fLag = 0.0;
diff --git a/slideshow/source/engine/animationnodes/animationbasenode.cxx 
b/slideshow/source/engine/animationnodes/animationbasenode.cxx
index 4dcb640795aa..7999b5a7654a 100644
--- a/slideshow/source/engine/animationnodes/animationbasenode.cxx
+++ b/slideshow/source/engine/animationnodes/animationbasenode.cxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "nodetools.hxx"
 #include 
@@ -294,7 +295,10 @@ void AnimationBaseNode::activate_st()
 mpActivity->setTargets( getShape(), maAttributeLayerHolder.get() );
 
 // add to activities queue
-getContext().mrActivitiesQueue.addActivity( mpActivity );
+if( mxAnimateNode->getType() == 
css::animations::AnimationNodeType::ANIMATEPHYSICS )
+getContext().mrActivitiesQueue.addActivity(mpActivity, true);
+else
+getContext().mrActivitiesQueue.addActivity( mpActivity );
 }
 else {
 // Actually, DO generate the event for empty activity,
diff --git a/slideshow/source/inc/activitiesqueue.hxx 
b/slideshow/source/inc/activitiesqueue.hxx
index b4f88b1b39d1..76dc981f8f65 100644
--- a/slideshow/source/inc/activitiesqueue.hxx
+++ b/slideshow/source/inc/activitiesqueue.hxx
@@ -57,7 +57,7 @@ namespace slideshow
 
 /** Add the given activity to the queue.
  */
-bool addActivity( const ActivitySharedPtr& pActivity );
+bool addActivity( const ActivitySharedPtr& pActivity, const bool 
bProcessLast = false );
 
 /** Process the activities queue.
 
@@ -96,6 +96,11 @@ namespace slideshow
  // await 
processing for this
  // round
 
+ActivityQueue   maCurrentActivitiesToBeProcessedLast; // 
activities that will be
+  // 
added to the end of
+  // 
maCurrentActivitiesWaiting at
+   

[Libreoffice-commits] core.git: Branch 'private/quwex/gsoc-box2d-experimental' - 4 commits - animations/source include/xmloff offapi/com offapi/UnoApi_offapi.mk officecfg/registry sd/xml slideshow/Lib

2020-08-07 Thread Sarper Akdemir (via logerrit)
Rebased ref, commits from common ancestor:
commit 215dd4b85dd6c5afa52af313481543a7a0ecad4d
Author: Sarper Akdemir 
AuthorDate: Thu Aug 6 10:32:55 2020 +0300
Commit: Sarper Akdemir 
CommitDate: Sat Aug 8 03:40:53 2020 +0300

make physics based animation effects always processed last

Change-Id: I92d436aced6ef3ee2c8b0bf0167c1f7e642ba3b5

diff --git a/slideshow/source/engine/activitiesqueue.cxx 
b/slideshow/source/engine/activitiesqueue.cxx
index ba982385356e..38e79d1e5677 100644
--- a/slideshow/source/engine/activitiesqueue.cxx
+++ b/slideshow/source/engine/activitiesqueue.cxx
@@ -50,6 +50,8 @@ namespace slideshow::internal
 {
 for( const auto& pActivity : maCurrentActivitiesWaiting )
 pActivity->dispose();
+for( const auto& pActivity : 
maCurrentActivitiesToBeProcessedLast )
+pActivity->dispose();
 for( const auto& pActivity : maCurrentActivitiesReinsert )
 pActivity->dispose();
 }
@@ -59,7 +61,7 @@ namespace slideshow::internal
 }
 }
 
-bool ActivitiesQueue::addActivity( const ActivitySharedPtr& pActivity )
+bool ActivitiesQueue::addActivity( const ActivitySharedPtr& pActivity, 
const bool bProcessLast )
 {
 OSL_ENSURE( pActivity, "ActivitiesQueue::addActivity: activity ptr 
NULL" );
 
@@ -67,7 +69,17 @@ namespace slideshow::internal
 return false;
 
 // add entry to waiting list
-maCurrentActivitiesWaiting.push_back( pActivity );
+if( !bProcessLast )
+{
+maCurrentActivitiesWaiting.push_back( pActivity );
+}
+else
+{
+// Activities that should be processed last is kept in a 
different
+// ActivityQueue, and later added to the end of the 
maCurrentActivitiesWaiting
+// at the start of ActivitiesQueue::process()
+maCurrentActivitiesToBeProcessedLast.push_back( pActivity );
+}
 
 return true;
 }
@@ -76,6 +88,12 @@ namespace slideshow::internal
 {
 SAL_INFO("slideshow.verbose", "ActivitiesQueue: outer loop 
heartbeat" );
 
+// If there are activities to be processed last add them to the 
end of the ActivitiesQueue
+maCurrentActivitiesWaiting.insert( 
maCurrentActivitiesWaiting.end(),
+   
maCurrentActivitiesToBeProcessedLast.begin(),
+   
maCurrentActivitiesToBeProcessedLast.end() );
+maCurrentActivitiesToBeProcessedLast.clear();
+
 // accumulate time lag for all activities, and lag time
 // base if necessary:
 double fLag = 0.0;
diff --git a/slideshow/source/engine/animationnodes/animationbasenode.cxx 
b/slideshow/source/engine/animationnodes/animationbasenode.cxx
index 4dcb640795aa..7999b5a7654a 100644
--- a/slideshow/source/engine/animationnodes/animationbasenode.cxx
+++ b/slideshow/source/engine/animationnodes/animationbasenode.cxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "nodetools.hxx"
 #include 
@@ -294,7 +295,10 @@ void AnimationBaseNode::activate_st()
 mpActivity->setTargets( getShape(), maAttributeLayerHolder.get() );
 
 // add to activities queue
-getContext().mrActivitiesQueue.addActivity( mpActivity );
+if( mxAnimateNode->getType() == 
css::animations::AnimationNodeType::ANIMATEPHYSICS )
+getContext().mrActivitiesQueue.addActivity(mpActivity, true);
+else
+getContext().mrActivitiesQueue.addActivity( mpActivity );
 }
 else {
 // Actually, DO generate the event for empty activity,
diff --git a/slideshow/source/inc/activitiesqueue.hxx 
b/slideshow/source/inc/activitiesqueue.hxx
index b4f88b1b39d1..76dc981f8f65 100644
--- a/slideshow/source/inc/activitiesqueue.hxx
+++ b/slideshow/source/inc/activitiesqueue.hxx
@@ -57,7 +57,7 @@ namespace slideshow
 
 /** Add the given activity to the queue.
  */
-bool addActivity( const ActivitySharedPtr& pActivity );
+bool addActivity( const ActivitySharedPtr& pActivity, const bool 
bProcessLast = false );
 
 /** Process the activities queue.
 
@@ -96,6 +96,11 @@ namespace slideshow
  // await 
processing for this
  // round
 
+ActivityQueue   maCurrentActivitiesToBeProcessedLast; // 
activities that will be
+  // 
added to the end of
+  // 
maCurrentActivitiesWaiting at
+