Kaydet (Commit) 20a872d2 authored tarafından Caolán McNamara's avatar Caolán McNamara

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: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 8a2f7704
...@@ -188,7 +188,7 @@ public: ...@@ -188,7 +188,7 @@ public:
virtual void setValue( const Any& rValue, const OUString& rPresetId ) override; virtual void setValue( const Any& rValue, const OUString& rPresetId ) override;
private: private:
std::map< sal_uInt16, OUString > maPropertyValues; std::vector<OUString> maPropertyValues;
Link<LinkParamNone*,void> maModifyLink; Link<LinkParamNone*,void> maModifyLink;
std::unique_ptr<weld::ComboBox> mxControl; std::unique_ptr<weld::ComboBox> mxControl;
...@@ -235,9 +235,9 @@ void SdPresetPropertyBox::setValue( const Any& rValue, const OUString& rPresetId ...@@ -235,9 +235,9 @@ void SdPresetPropertyBox::setValue( const Any& rValue, const OUString& rPresetId
for( auto& aSubType : aSubTypes ) for( auto& aSubType : aSubTypes )
{ {
mxControl->append_text(rPresets.getUINameForProperty(aSubType)); mxControl->append_text(rPresets.getUINameForProperty(aSubType));
if(aSubType == aPropertyValue) maPropertyValues.push_back(aSubType);
nPos = mxControl->get_count() - 1; if (aSubType == aPropertyValue)
maPropertyValues[nPos] = aSubType; nPos = maPropertyValues.size() - 1;
} }
} }
else else
...@@ -252,7 +252,10 @@ void SdPresetPropertyBox::setValue( const Any& rValue, const OUString& rPresetId ...@@ -252,7 +252,10 @@ void SdPresetPropertyBox::setValue( const Any& rValue, const OUString& rPresetId
Any SdPresetPropertyBox::getValue() 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 class ColorPropertyBox : public PropertySubControl
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment