32 Commits
Author SHA1 Message Date
Sarper Akdemir a8355cf0fc make physics animation imports forward compatible
Change-Id: Ic61ec9fafdd45a76d6f000cf5bd64cab1025fe22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101644
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Jenkins
2020-08-31 12:59:54 +02:00
Sarper Akdemir 943aaf6c61 tdf#136301: fix parallel physics animations over-stepping during lock transfer
introducing mbAlreadyStepped flag to make physics animation effects
aware that the lock was just obtained from another physics animation
which already stepped the time interval meant to be stepped through.

Change-Id: Id7c01c96e302d7da7aae785f56c09a9ddfe4bdf1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101665
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-08-31 12:31:05 +02:00
Sarper Akdemir 6915d69a12 add physics based exit animation effect preset Fall and fade out
Adding a new animation effect preset in the Exciting sub category
of Exit category called Fall and fade out, which makes the shape
fall with a bounciness of 0.6 and fade out.

Change-Id: Id9fe29f98f276cdb9748f0eb787e03f68314097a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101660
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-08-31 12:30:12 +02:00
Sarper Akdemir bf0afdbe80 tdf#136276: fix physics animations faulty duplication
Change-Id: Id147eb129e6e0ee65ecd16139e183790b3f9976c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101658
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-08-31 12:29:18 +02:00
Sarper Akdemir d616104eee add two physics based emphasis animation effects presets
Adding two physics based emphasis animation effects presets called
Shoot right/left and return.

Change-Id: I38ea22a4347c83b7065476b9f673a900566b045f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101657
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-08-31 12:28:35 +02:00
Sarper Akdemir f525b8898d add missing initializers about physics animations to AnimationNode class
fixes the case when a physics animation preset is imported it
doesn't have any information about start velocity, density or
bounciness paramaters.

Change-Id: Ic817afb211597ad553ccc3a43fe24bfbebadbc43
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101656
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-08-31 12:27:39 +02:00
Sarper Akdemir 8e36582d92 document physics animations and related code
Change-Id: I1369588dd757d5fedcd7e91eabe0020e5cf60c56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101492
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-08-31 12:25:59 +02:00
Sarper Akdemir 490cab0539 tdf#136152: make physics animation effects handle animations with jumpy starts
fixes the bug where an animation effect doesn't start on it's original location
and collides with everything as if it was moving from the original location to
wherever the animation effect starts in a single step.

Change-Id: Icd2919bcad665f8a1839a57642694d98ff73afca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101425
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-08-28 09:24:37 +02:00
Sarper Akdemir d29c27af4a tdf#136097: make physics animation effects handle skips and rewinds
Making box2d world only stay populated when there's an animation
effect going on. This makes it possible to get rid of big chunk
of sequential update implementation.

Change-Id: Iaf50d4871b2355035495618354f0ae09abe94164
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101304
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-08-26 14:47:52 +02:00
Sarper Akdemir 5edbac1b8c fix group shape crash for physics animations
Group shapes are now considered as foreground objects.

Physics animations now do not create individual bodies
for shapes that are part of a group but instead create
one body that represent all of them.

Change-Id: I27819c853af75aff93636c99f216a67ef18791d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101174
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-08-22 18:58:47 +02:00
Sarper Akdemir 394f74e6f1 add bounciness velocity and density options to physics animations
Adding new xml options to specify the starting velocity, bounciness,
and density of the rigid body that physics animation control.

Change-Id: Ifaba785e82c8ee17be00711a3e7a75257e7704ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101141
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-08-22 11:24:16 +02:00
Sarper Akdemir b240db9210 make physics animations handle sequential animations correctly
fixes a bug where if there is a sequence of animations between
two physics animations that change the position, rotation or visibility
of a shape - changes are not picked up by the latter physics animation.

Change-Id: Ie8bb8b32588f4c7bf16317b5229adc5b0334d192
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100715
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Jenkins
2020-08-21 16:32:14 +02:00
Sarper Akdemir 76f3218b32 make physics animation effects always processed last
Makes it possible to add activities that will be processed last in the queue.

Makes physics animation effects queued this way.

And fixes the bug that makes physics animation effects appear
out of sync for a frame with the shapes that other in parallel
animation effects control.

Change-Id: I92d436aced6ef3ee2c8b0bf0167c1f7e642ba3b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100713
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Jenkins
2020-08-21 16:31:52 +02:00
Sarper Akdemir 7de41aa023 box2dtools renaming some for clarity
Change-Id: Idd872213ee3140e82fbd6e8e8bd1ebff78dfdc18
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101132
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-08-21 13:05:51 +02:00
Sarper Akdemir 51275a633f add support for complex shapes in physics animation effects
Makes it possible to represent complex shapes of LibreOffice
in physics animation effects by closely approximating their geometry.

Therefore enables more convincing animation effects.

Change-Id: I807bbde92c143b8c96792b3d8bf9603a31216486
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100432
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-08-20 15:23:01 +02:00
Sarper Akdemir e33486189d make physics based animation effects importable-exportable
Makes physics based animation effects importable and exportable
on content.xml. Uses one new xml token animatePhysics.

Also adds a new animation preset called Physics Basic that is
available under Emphasis animation effect category.

Change-Id: I38b0511f973668655cff78becebe3f1e628d9083
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100247
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-08-20 15:21:07 +02:00
Sarper Akdemir 3bc2154ebf fix box2dtools build error for non debug builds
Removed the asserts and moved the functions out of the
box2DWorld class.

Change-Id: Ifa58bceb2c64c1012e5d0e65bc12646312ab1c16
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100856
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-08-17 14:19:03 +02:00
Sarper Akdemir 47f3349434 add version tag to ANIMATEPHYSICS
Change-Id: Ia6db8ca10a0311ae8492cdc5ab518efaba611cb2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100431
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
2020-08-12 09:14:49 +02:00
Sarper Akdemir 28022cee39 make physics based animation effects part of the animation engine
Wiring up and creating required classes for physics based
animation effects to be part of the animation engine.

Creating a new animation node AnimationPhysicsNode
for physics based animation effects and PhysicsAnimation
class that inherits the NumberAnimation in the animation
factory.

Change-Id: I1f125df5324673e9937b8164c0fc267c9683afa0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100151
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-08-09 23:44:00 +02:00
Sarper Akdemir 060a069966 add box2d to CppunitTest_slideshow
Change-Id: I37c439eefba6337d95232361bffe9718b71ce8cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99040
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-08-05 23:31:18 +02:00
Sarper Akdemir 49cdda7c4f box2d tools: initial work for physics based animation effects
Two new classes for managing box2d bodies(b2Body) and box2d worlds(b2World)

::box2d::utils::Box2DBody :
Manages box2d bodies (b2Body)

::box2d::utils::Box2DWorld :
Manages box2d world (b2World)

Change-Id: Id02fefe937347029daddde043da2b8e8dba3acaf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95614
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-08-05 23:30:45 +02:00
Sarper Akdemir e13dd9546e Add Shape mbIsForeground flag and getters and setters for it
mbIsForeground is a flag that is set false if a shape is known to
not belong to the foreground.

It is set to false while shapes are being imported and the shape
belongs to the master slide or is a group shape, right now.

Change-Id: Id9738fc943f32a1e1a6e1888d179e69fd60bd022
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95968
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-06-30 23:52:55 +02:00
Sarper Akdemir 7394ac17f3 adding XShapeToShapeMapSharedPtr getter to ShapeManager
Refactoring XShapeHash in layermanager as XShapeToShapeMap
and XShapeHash in targetpropertiescreator as XShapeToNamedValuesMap.
This refactoring describes what the types are more clearly and
stops violating one define rule in the desired implementation.

And adding getter getXShapeToShapeMap to ShapeManager to enable
Animation::start() to access Shapes and XShapes of the current
slide.

Change-Id: I78d510ae43888fd6cf0f037e224b24f91b263b00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95967
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-06-30 23:50:18 +02:00
Sarper Akdemir a46ab778d9 box2d: fix strict aliasing error and ignore -Wshadow
Adding two patches to static external library box2d
getting rid of strict aliasing error and ignoring
-Wshadow in b2Draw.h to get rid of errors while building.

Change-Id: I5752eb484d6aafe057c9102b1ed87aaf31d6555c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96559
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-06-20 01:41:37 +02:00
Sarper Akdemir a7f2239e64 external: bundle box2d
Bundled box2d with the build system of LO as a static library.
If --with-system-box2d was specified checks for instance box2d in
the system, defines SYSTEM_BOX2D and uses the library from the system.

Change-Id: Ifb05912f2acaff273b25abebafc5af1cac3afec4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94103
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-05-17 02:21:54 +02:00
Sarper Akdemir 8cd7543bab tdf#127113: Allow to fill any two numeric fields in Fill Series dialog
Added m_nSelectHeight and m_nSelectWidth to ScFillSeriesDlg
class for deriving missing box if other two boxes are full.

CheckValues() mimics behaviour of previous check functions with
added functionality of calculating missing start or increment values
(end value was already handled in previous check functions) in linear
fill mode if it is possible to calculate them from other two values.

Change-Id: If30d96f1b5f7e1bb88f473d7c0c5c2802ba6f225
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87841
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
2020-03-25 22:22:50 +01:00
Sarper Akdemir d54202ff69 tdf#112135: Provide controls through context menu in lists of Customize dialog
Introduced two new handlers to SvxMenuConfigPage and SvxToolbarConfigPage.
Each handler is connected to connect_popup_menu() call of corresponding list.

All of the context menus use entrycontextmenu.ui

Change-Id: I309672c41631b7acb58209b01efbe24c0bb0d947
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88676
Reviewed-by: PhD. Ayhan YALÇINSOY <ayhanyalcinsoy@pisilinux.org>
Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
Tested-by: Jenkins
2020-02-28 18:32:54 +01:00
Sarper Akdemir 81f73ca9b9 tdf#75280: Convert inappropriate use of sal_uIntPtr to better integer types
Change-Id: If0c39b85dc5fc8c84b723e03159abbdd790e42ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87453
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-02-03 15:12:17 +01:00
Sarper Akdemir 4b723bf58c tdf#88205: Adapt uses of css::uno::Sequence to use initializer_list ctor
Change-Id: I37a8b72895e75bf1f0e7e1b1574353b3317ca031
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87500
Tested-by: Jenkins
Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-01-27 21:55:17 +01:00
Sarper Akdemir 09a2432c59 tdf#75280: Convert inappropriate use of sal_uIntPtr to better integer types
Change-Id: Ifa5991296bda4c4b3f86f01c3713b5a5f8f9acb5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87471
Tested-by: Jenkins
Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-01-27 13:47:38 +01:00
Sarper Akdemir 8d4cb2870f tdf#124176: Use pragma once instead of include guards
Change-Id: Ib83c5cf44537bc1c4552f97c9114357c410a6ddb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87473
Tested-by: Jenkins
Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-01-27 10:03:23 +01:00
Sarper Akdemir 04df666661 tdf#124176: Use pragma once instead of include guards
Change-Id: Ieeed31e81d47c01eda2edc792cb2ecf271eac58d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87472
Tested-by: Jenkins
Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-01-27 09:56:42 +01:00