summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2017-05-03 16:55:00 +0200
committerAndras Timar <andras.timar@collabora.com>2017-05-10 21:37:26 +0200
commitbb51303007ff1588dc467b270651619e3eff282e (patch)
treee8249f318fdee38a374c08c5d0fb6795400c5a74 /sd
parent3e0044057846819fe9a4836063e6ca70206329d5 (diff)
tdf#105703: Make sure we actually have a motion path here
fix regression from my previous commit Change-Id: Iddba458ffaf7b647c1942b35d80aa37e6ff6ed13 Reviewed-on: https://gerrit.libreoffice.org/37216 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Katarina Behrens <Katarina.Behrens@cib.de> (cherry picked from commit 9eae606ebc1ebd20dbc0aeb44e1f760e62afcdbe) Reviewed-on: https://gerrit.libreoffice.org/37226 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 8501821f3b5ad541c40b5465aab000a6960b97ba)
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.cxx7
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.hxx1
2 files changed, 6 insertions, 2 deletions
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index 26bd04829f50..7e2fc961e67e 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -130,6 +130,7 @@ CustomAnimationPane::CustomAnimationPane( Window* pParent, ViewShellBase& rBase,
mrBase( rBase ),
mpCustomAnimationPresets(nullptr),
mnPropertyType( nPropertyTypeNone ),
+ mnMotionPathPos( 3 ),
mnCurvePathPos( LISTBOX_ENTRY_NOTFOUND ),
mnPolygonPathPos( LISTBOX_ENTRY_NOTFOUND ),
mnFreeformPathPos( LISTBOX_ENTRY_NOTFOUND ),
@@ -146,6 +147,7 @@ CustomAnimationPane::CustomAnimationPane( Window* pParent, ViewShellBase& rBase,
mrBase( rBase ),
mpCustomAnimationPresets(nullptr),
mnPropertyType( nPropertyTypeNone ),
+ mnMotionPathPos( 3 ),
mnCurvePathPos( LISTBOX_ENTRY_NOTFOUND ),
mnPolygonPathPos( LISTBOX_ENTRY_NOTFOUND ),
mnFreeformPathPos( LISTBOX_ENTRY_NOTFOUND ),
@@ -1980,7 +1982,8 @@ PathKind CustomAnimationPane::getCreatePathKind() const
{
PathKind eKind = PathKind::NONE;
- if( mpLBAnimation->GetSelectEntryCount() == 1 )
+ if( ( mpLBAnimation->GetSelectEntryCount() == 1 ) &&
+ ( mpLBCategory->GetSelectEntryPos() == mnMotionPathPos ) )
{
const sal_Int32 nPos = mpLBAnimation->GetSelectEntryPos();
if( nPos == mnCurvePathPos )
@@ -2167,7 +2170,7 @@ sal_uInt32 CustomAnimationPane::fillAnimationLB( bool bHasText )
const PresetCategoryList::const_iterator aCategoryEnd( rCategoryList.end() );
mpLBAnimation->Clear();
- if(nPosition == 3)
+ if(nPosition == mnMotionPathPos)
{
OUString sMotionPathLabel( SD_RESSTR( STR_CUSTOMANIMATION_USERPATH ) );
mpLBAnimation->InsertCategory( sMotionPathLabel );
diff --git a/sd/source/ui/animations/CustomAnimationPane.hxx b/sd/source/ui/animations/CustomAnimationPane.hxx
index e849d70876dd..f6cef94dbafd 100644
--- a/sd/source/ui/animations/CustomAnimationPane.hxx
+++ b/sd/source/ui/animations/CustomAnimationPane.hxx
@@ -161,6 +161,7 @@ private:
OUString maStrProperty;
sal_Int32 mnPropertyType;
+ sal_Int32 mnMotionPathPos;
sal_Int32 mnCurvePathPos;
sal_Int32 mnPolygonPathPos;
sal_Int32 mnFreeformPathPos;