diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-07-26 17:05:26 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-27 08:43:31 +0200 |
commit | ae34c3fe49267be34f9fb055ea1cb92240796a26 (patch) | |
tree | c9c5250268b5d574c45f6c7fa3fda1c2e4481063 /dbaccess | |
parent | df2b617b612f24b1dd394faf6fd605bdc69790cb (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 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/app/AppController.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/control/opendoccontrols.cxx | 14 |
2 files changed, 7 insertions, 9 deletions
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index b704fdca97a9..a8fd1cec3c94 100644 --- a/dbaccess/source/ui/app/AppController.cxx +++ b/dbaccess/source/ui/app/AppController.cxx @@ -357,7 +357,7 @@ void SAL_CALL OApplicationController::disposing() aFilter = pFilter->GetFilterName(); // add to svtool history options - SvtHistoryOptions().AppendItem( EHistoryType::PickList, + SvtHistoryOptions::AppendItem( EHistoryType::PickList, aURL.GetURLNoPass( INetURLObject::DecodeMechanism::NONE ), aFilter, getStrippedDatabaseName(), diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx index 99be8a42763d..bf958d4a30b7 100644 --- a/dbaccess/source/ui/control/opendoccontrols.cxx +++ b/dbaccess/source/ui/control/opendoccontrols.cxx @@ -130,22 +130,20 @@ namespace dbaui { OSL_ENSURE( _pAsciiModuleName, "OpenDocumentListBox::impl_init: invalid module name!" ); - Sequence< Sequence< PropertyValue> > aHistory = SvtHistoryOptions().GetList( EHistoryType::PickList ); + std::vector< SvtHistoryOptions::HistoryItem > aHistory = SvtHistoryOptions::GetList( EHistoryType::PickList ); Reference< XNameAccess > xFilterFactory; xFilterFactory.set(::comphelper::getProcessServiceFactory()->createInstance( "com.sun.star.document.FilterFactory" ), css::uno::UNO_QUERY); - sal_uInt32 nCount = aHistory.getLength(); - for ( sal_uInt32 nItem = 0; nItem < nCount; ++nItem ) + for ( const SvtHistoryOptions::HistoryItem& rHistoryItem : aHistory ) { try { // Get the current history item's properties. - ::comphelper::SequenceAsHashMap aItemProperties( aHistory[ nItem ] ); - OUString sURL = aItemProperties.getUnpackedValueOrDefault( HISTORY_PROPERTYNAME_URL, OUString() ); - OUString sFilter = aItemProperties.getUnpackedValueOrDefault( HISTORY_PROPERTYNAME_FILTER, OUString() ); - OUString sTitle = aItemProperties.getUnpackedValueOrDefault( HISTORY_PROPERTYNAME_TITLE, OUString() ); - OUString sPassword = aItemProperties.getUnpackedValueOrDefault( HISTORY_PROPERTYNAME_PASSWORD, OUString() ); + OUString sURL = rHistoryItem.sURL; + OUString sFilter = rHistoryItem.sFilter; + OUString sTitle = rHistoryItem.sTitle; + OUString sPassword = rHistoryItem.sPassword; // If the entry is an impress file then insert it into the // history list and the list box. |