diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2017-05-03 16:55:00 +0200 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2017-05-04 10:13:16 +0200 |
commit | 9eae606ebc1ebd20dbc0aeb44e1f760e62afcdbe (patch) | |
tree | 2642904d1fcc0370ad23115da221186530fb820e /sd | |
parent | 86b2c0c7642f0e87d534a9ff57f188ce08149473 (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>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/animations/CustomAnimationPane.cxx | 7 | ||||
-rw-r--r-- | sd/source/ui/animations/CustomAnimationPane.hxx | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index 20bd4c1f23fa..e089514c0133 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 ), @@ -1992,7 +1994,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 ) @@ -2205,7 +2208,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 5a5302390a1d..cbe7be1a746f 100644 --- a/sd/source/ui/animations/CustomAnimationPane.hxx +++ b/sd/source/ui/animations/CustomAnimationPane.hxx @@ -164,6 +164,7 @@ private: OUString maStrProperty; sal_Int32 mnPropertyType; + sal_Int32 mnMotionPathPos; sal_Int32 mnCurvePathPos; sal_Int32 mnPolygonPathPos; sal_Int32 mnFreeformPathPos; |