[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sd/source

Mark Hung (via logerrit) logerrit at kemper.freedesktop.org
Tue Dec 29 14:32:10 UTC 2020


 sd/source/ui/animations/CustomAnimationPane.cxx |   20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

New commits:
commit 2a468a02e4ef2dd90f29f750e701a00936d13f60
Author:     Mark Hung <marklh9 at gmail.com>
AuthorDate: Sat Dec 19 21:38:55 2020 +0800
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Dec 29 15:31:36 2020 +0100

    tdf#138937 don't use attributes that depend on preset data
    
    if preset data is not found. Curve, polygon, and free form
    motion paths do not have preset data. Create the path
    in these cases as well.
    
    Change-Id: Idd3b24b81a15de53e302e8cb7f3636d72e10b4da
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108022
    Tested-by: Jenkins
    Reviewed-by: Mark Hung <marklh9 at gmail.com>
    (cherry picked from commit 765b13b67e46aa8c8618fdad8582f8586bffce9e)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108296
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index 37ab3c36c4f1..81acc71b0eb8 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -1815,14 +1815,14 @@ void CustomAnimationPane::onAdd()
     if (nEntryData)
         pDescriptor = *reinterpret_cast<CustomAnimationPresetPtr*>(nEntryData);
 
-    const double fDuration = pDescriptor->getDuration();
-    mxCBXDuration->set_value(fDuration*100.0, FieldUnit::NONE);
-    bool bHasSpeed = pDescriptor->getDuration() > 0.001;
-    mxCBXDuration->set_sensitive( bHasSpeed );
-    mxFTDuration->set_sensitive( bHasSpeed );
-
     if( pDescriptor )
     {
+        const double fDuration = pDescriptor->getDuration();
+        mxCBXDuration->set_value(fDuration*100.0, FieldUnit::NONE);
+        bool bHasSpeed = pDescriptor->getDuration() > 0.001;
+        mxCBXDuration->set_sensitive( bHasSpeed );
+        mxFTDuration->set_sensitive( bHasSpeed );
+
         mxCustomAnimationList->unselect_all();
 
         // gather shapes from the selection
@@ -1851,6 +1851,14 @@ void CustomAnimationPane::onAdd()
         }
     }
 
+    PathKind ePathKind = getCreatePathKind();
+
+    if (ePathKind != PathKind::NONE)
+    {
+        createPath( ePathKind, aTargets, 0.0 );
+        updateMotionPathTags();
+    }
+
     mrBase.GetDocShell()->SetModified();
 
     updateControls();


More information about the Libreoffice-commits mailing list