summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-11-30 21:19:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-12-02 08:01:57 +0100
commit264498b4baeb4d451c17153ae354bf9c241709eb (patch)
tree1a04f7e410b1d427333578870e95d896fc55c6c6 /sfx2
parent70a7ed7fe8959988b58c0ef3c3f04a2a7db0625b (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 'sfx2')
-rw-r--r--sfx2/source/appl/shutdowniconaqua.mm11
-rw-r--r--sfx2/source/appl/shutdowniconw32.cxx13
2 files changed, 8 insertions, 16 deletions
diff --git a/sfx2/source/appl/shutdowniconaqua.mm b/sfx2/source/appl/shutdowniconaqua.mm
index 3fa4d61443a0..4a4404654eff 100644
--- a/sfx2/source/appl/shutdowniconaqua.mm
+++ b/sfx2/source/appl/shutdowniconaqua.mm
@@ -414,15 +414,12 @@ void aqua_init_systray()
// collect the URLs of the entries in the File/New menu
SvtModuleOptions aModuleOptions;
std::set< OUString > aFileNewAppsAvailable;
- SvtDynamicMenuOptions aOpt;
- css::uno::Sequence < css::uno::Sequence < css::beans::PropertyValue > > const aNewMenu = aOpt.GetMenu( EDynamicMenuType::NewMenu );
+ std::vector < SvtDynMenuEntry > const aNewMenu = SvtDynamicMenuOptions().GetMenu( EDynamicMenuType::NewMenu );
- for ( auto const & newMenuProp : aNewMenu )
+ for ( SvtDynMenuEntry const & newMenuProp : aNewMenu )
{
- comphelper::SequenceAsHashMap aEntryItems( newMenuProp );
- OUString sURL( aEntryItems.getUnpackedValueOrDefault( "URL", OUString() ) );
- if ( sURL.getLength() )
- aFileNewAppsAvailable.insert( sURL );
+ if ( !newMenuProp.sURL.isEmpty() )
+ aFileNewAppsAvailable.insert( newMenuProp.sURL );
}
// describe the menu entries for launching the applications
diff --git a/sfx2/source/appl/shutdowniconw32.cxx b/sfx2/source/appl/shutdowniconw32.cxx
index 05b855f4cad4..0f1aa36301d7 100644
--- a/sfx2/source/appl/shutdowniconw32.cxx
+++ b/sfx2/source/appl/shutdowniconw32.cxx
@@ -150,16 +150,11 @@ static HMENU createSystrayMenu( )
// collect the URLs of the entries in the File/New menu
::std::set< OUString > aFileNewAppsAvailable;
- SvtDynamicMenuOptions aOpt;
- Sequence < Sequence < PropertyValue > > const aNewMenu = aOpt.GetMenu( EDynamicMenuType::NewMenu );
- const OUString sURLKey( "URL" );
-
- for ( auto const & newMenuProp : aNewMenu )
+ std::vector< SvtDynMenuEntry > const aNewMenu = SvtDynamicMenuOptions().GetMenu( EDynamicMenuType::NewMenu );
+ for ( SvtDynMenuEntry const & newMenuProp : aNewMenu )
{
- ::comphelper::SequenceAsHashMap aEntryItems( newMenuProp );
- OUString sURL( aEntryItems.getUnpackedValueOrDefault( sURLKey, OUString() ) );
- if ( sURL.getLength() )
- aFileNewAppsAvailable.insert( sURL );
+ if ( !newMenuProp.sURL.isEmpty() )
+ aFileNewAppsAvailable.insert( newMenuProp.sURL );
}
// describe the menu entries for launching the applications