summaryrefslogtreecommitdiff
path: root/cui
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 /cui
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 'cui')
-rw-r--r--cui/source/dialogs/hldocntp.cxx18
1 files changed, 4 insertions, 14 deletions
diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx
index 1a201f8421c3..3a582764f40e 100644
--- a/cui/source/dialogs/hldocntp.cxx
+++ b/cui/source/dialogs/hldocntp.cxx
@@ -157,23 +157,13 @@ void SvxHyperlinkNewDocTp::FillDocumentList()
{
weld::WaitObject aWaitObj(mpDialog->getDialog());
- uno::Sequence< uno::Sequence< beans::PropertyValue > >
- aDynamicMenuEntries( SvtDynamicMenuOptions().GetMenu( EDynamicMenuType::NewMenu ) );
+ std::vector<SvtDynMenuEntry> aDynamicMenuEntries( SvtDynamicMenuOptions().GetMenu( EDynamicMenuType::NewMenu ) );
- sal_uInt32 i, nCount = aDynamicMenuEntries.getLength();
- for ( i = 0; i < nCount; i++ )
+ for ( const SvtDynMenuEntry & rDynamicMenuEntry : aDynamicMenuEntries )
{
- const uno::Sequence< beans::PropertyValue >& rDynamicMenuEntry = aDynamicMenuEntries[ i ];
+ OUString aDocumentUrl = rDynamicMenuEntry.sURL;
+ OUString aTitle = rDynamicMenuEntry.sTitle;
- OUString aDocumentUrl, aTitle;
-
- for ( const beans::PropertyValue& e : rDynamicMenuEntry )
- {
- if ( e.Name == DYNAMICMENU_PROPERTYNAME_URL )
- e.Value >>= aDocumentUrl;
- else if ( e.Name == DYNAMICMENU_PROPERTYNAME_TITLE )
- e.Value >>= aTitle;
- }
//#i96822# business cards, labels and database should not be inserted here
if( aDocumentUrl == "private:factory/swriter?slot=21051" ||
aDocumentUrl == "private:factory/swriter?slot=21052" ||