diff options
author | Mark Hung <marklh9@gmail.com> | 2019-11-18 00:49:03 +0800 |
---|---|---|
committer | Mark Hung <marklh9@gmail.com> | 2019-11-30 15:00:09 +0100 |
commit | d86cfcaf709638d73fcb0de5067b902dab7a7f2f (patch) | |
tree | 9306bca1007d5888e76c608f2fd1103704761623 /sd/source/ui/animations | |
parent | aeed331f7307612fbc4ebac4764cd39f6f2352e9 (diff) |
tdf#94947 Set preset-id for user defined motion paths.
User defined motion paths ( curve, polygon, freeform line )
did not have preset-id. Set the preset-id so that the
preset type will be highlighted in the custom animation
pane after editing.
"libo-motionpath-curve", "libo-motionpath-polygon",
and "libo-motionpath-freeform-line" are used for the three
user defined motion paths.
This patch is related to tdf#94947, though it doesn't
make the original document display correctly by guessing
the missing preset-id, but it prevent empty preset-id
to be generated when creating those three motion path
animation.
Change-Id: I50c0133bea32e022b07e5d8c0a024810844f124d
Reviewed-on: https://gerrit.libreoffice.org/83079
Tested-by: Jenkins
Reviewed-by: Mark Hung <marklh9@gmail.com>
Diffstat (limited to 'sd/source/ui/animations')
-rw-r--r-- | sd/source/ui/animations/CustomAnimationPane.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index c63e4d0e8712..42b5055b0e5a 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -637,6 +637,17 @@ void CustomAnimationPane::updateControls() } } + // If preset id is missing and category is motion path. + if (nAnimationPos < 0 && nCategoryPos == 3) + { + if (rsPresetId == "libo-motionpath-curve") + mpLBAnimation->SelectEntryPos(mnCurvePathPos); + else if (rsPresetId == "libo-motionpath-polygon") + mpLBAnimation->SelectEntryPos(mnPolygonPathPos); + else if (rsPresetId == "libo-motionpath-freeform-line") + mpLBAnimation->SelectEntryPos(mnFreeformPathPos); + } + sal_uInt16 nPos = 0xffff; sal_Int16 nNodeType = pEffect->getNodeType(); |