summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-15 21:17:14 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-10-16 09:54:29 +0200
commit20a872d21602409cda873bb1f4830d50be3b6f8b (patch)
tree27bbc7f458f83436f58bcf9845de027740466230 /sd/source
parent8a2f7704cd0e43304e54bf2281232335cc0979a3 (diff)
tdf#120626 unable to set direction in custom animation dialog
Change-Id: I8487381af648e562e2c11adda2e2c48557b12b41 Reviewed-on: https://gerrit.libreoffice.org/61806 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index 85a14a373463..2423a19e1497 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -188,7 +188,7 @@ public:
virtual void setValue( const Any& rValue, const OUString& rPresetId ) override;
private:
- std::map< sal_uInt16, OUString > maPropertyValues;
+ std::vector<OUString> maPropertyValues;
Link<LinkParamNone*,void> maModifyLink;
std::unique_ptr<weld::ComboBox> mxControl;
@@ -235,9 +235,9 @@ void SdPresetPropertyBox::setValue( const Any& rValue, const OUString& rPresetId
for( auto& aSubType : aSubTypes )
{
mxControl->append_text(rPresets.getUINameForProperty(aSubType));
- if(aSubType == aPropertyValue)
- nPos = mxControl->get_count() - 1;
- maPropertyValues[nPos] = aSubType;
+ maPropertyValues.push_back(aSubType);
+ if (aSubType == aPropertyValue)
+ nPos = maPropertyValues.size() - 1;
}
}
else
@@ -252,7 +252,10 @@ void SdPresetPropertyBox::setValue( const Any& rValue, const OUString& rPresetId
Any SdPresetPropertyBox::getValue()
{
- return makeAny(maPropertyValues[mxControl->get_active()]);
+ const int nIndex = mxControl->get_active();
+ if (nIndex == -1)
+ return Any();
+ return makeAny(maPropertyValues[nIndex]);
}
class ColorPropertyBox : public PropertySubControl