diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2020-11-30 21:19:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-12-02 08:01:57 +0100 |
commit | 264498b4baeb4d451c17153ae354bf9c241709eb (patch) | |
tree | 1a04f7e410b1d427333578870e95d896fc55c6c6 /include | |
parent | 70a7ed7fe8959988b58c0ef3c3f04a2a7db0625b (diff) |
simplify SvtDynamicMenuOptions
just use the struct instead of passing around sequence
of sequence of PropertyValue
Change-Id: Ic03c066962a10daac6f83f30413a5ab09e1bfd5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106915
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/unotools/dynamicmenuoptions.hxx | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/include/unotools/dynamicmenuoptions.hxx b/include/unotools/dynamicmenuoptions.hxx index a2bb84e0acd8..c3526f9b141c 100644 --- a/include/unotools/dynamicmenuoptions.hxx +++ b/include/unotools/dynamicmenuoptions.hxx @@ -28,14 +28,16 @@ namespace com::sun::star::beans { struct PropertyValue; } namespace osl { class Mutex; } -/*-************************************************************************************************************ - @descr The method GetList() returns a list of property values. - Use follow defines to separate values by names. -*//*-*************************************************************************************************************/ -#define DYNAMICMENU_PROPERTYNAME_URL "URL" -#define DYNAMICMENU_PROPERTYNAME_TITLE "Title" -#define DYNAMICMENU_PROPERTYNAME_IMAGEIDENTIFIER "ImageIdentifier" -#define DYNAMICMENU_PROPERTYNAME_TARGETNAME "TargetName" +/*-**************************************************************************************************************** + @descr struct to hold information about one menu entry. +****************************************************************************************************************-*/ +struct SvtDynMenuEntry +{ + OUString sURL; + OUString sTitle; + OUString sImageIdentifier; + OUString sTargetName; +}; /*-************************************************************************************************************ @descr You can use these enum values to specify right menu if you call our interface methods. @@ -77,7 +79,7 @@ class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtDynamicMenuOptions final : public ut @onerror We return an empty list. *//*-*****************************************************************************************************/ - css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > GetMenu( EDynamicMenuType eMenu ) const; + std::vector< SvtDynMenuEntry > GetMenu( EDynamicMenuType eMenu ) const; private: /*-**************************************************************************************************** |