summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-07-26 17:05:26 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-07-27 08:43:31 +0200
commitae34c3fe49267be34f9fb055ea1cb92240796a26 (patch)
treec9c5250268b5d574c45f6c7fa3fda1c2e4481063 /framework
parentdf2b617b612f24b1dd394faf6fd605bdc69790cb (diff)
use officecfg for SvtHistoryOptions
Change-Id: I5cfd3a51bc4026ccb66ee23eb6f49a5dff5fe042 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119525 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/uielement/recentfilesmenucontroller.cxx21
1 files changed, 5 insertions, 16 deletions
diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx
index b25c84256cc2..ef6b3f00e922 100644
--- a/framework/source/uielement/recentfilesmenucontroller.cxx
+++ b/framework/source/uielement/recentfilesmenucontroller.cxx
@@ -130,28 +130,17 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >
if ( !pVCLPopupMenu )
return;
- Sequence< Sequence< PropertyValue > > aHistoryList = SvtHistoryOptions().GetList( EHistoryType::PickList );
+ std::vector< SvtHistoryOptions::HistoryItem > aHistoryList = SvtHistoryOptions::GetList( EHistoryType::PickList );
- int nPickListMenuItems = std::min<sal_Int32>( aHistoryList.getLength(), MAX_MENU_ITEMS );
+ int nPickListMenuItems = std::min<sal_Int32>( aHistoryList.size(), MAX_MENU_ITEMS );
m_aRecentFilesItems.clear();
if (( nPickListMenuItems > 0 ) && !m_bDisabled )
{
for ( int i = 0; i < nPickListMenuItems; i++ )
{
- const Sequence< PropertyValue >& rPickListEntry = aHistoryList[i];
- OUString aURL;
-
- for ( PropertyValue const & prop : rPickListEntry )
- {
- if ( prop.Name == HISTORY_PROPERTYNAME_URL )
- {
- prop.Value >>= aURL;
- break;
- }
- }
-
- m_aRecentFilesItems.push_back( aURL );
+ const SvtHistoryOptions::HistoryItem& rPickListEntry = aHistoryList[i];
+ m_aRecentFilesItems.push_back( rPickListEntry.sURL );
}
}
@@ -308,7 +297,7 @@ void SAL_CALL RecentFilesMenuController::itemSelected( const css::awt::MenuEvent
if ( aCommand == CMD_CLEAR_LIST )
{
- SvtHistoryOptions().Clear( EHistoryType::PickList );
+ SvtHistoryOptions::Clear( EHistoryType::PickList );
dispatchCommand(
"vnd.org.libreoffice.recentdocs:ClearRecentFileList",
css::uno::Sequence< css::beans::PropertyValue >() );