[Libreoffice-commits] core.git: sd/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Oct 16 07:55:04 UTC 2018


 sd/source/ui/animations/CustomAnimationDialog.cxx |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

New commits:
commit 20a872d21602409cda873bb1f4830d50be3b6f8b
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Oct 15 21:17:14 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Oct 16 09:54:29 2018 +0200

    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 at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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


More information about the Libreoffice-commits mailing list