summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2017-05-03 16:55:00 +0200
committerCaolán McNamara <caolanm@redhat.com>2017-05-09 09:50:21 +0200
commit8501821f3b5ad541c40b5465aab000a6960b97ba (patch)
tree6d62e628ef8d0d4ad9fdc50d38fd665f1f840b3b
parent8521f4c8fb08aa37912f73a73ba1a34c2ccc97ed (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>
-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;