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 /include | |
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 'include')
-rw-r--r-- | include/unotools/historyoptions.hxx | 48 | ||||
-rw-r--r-- | include/unotools/itemholderbase.hxx | 2 |
2 files changed, 15 insertions, 35 deletions
diff --git a/include/unotools/historyoptions.hxx b/include/unotools/historyoptions.hxx index 34e2c74ea4ec..088b2f51dc26 100644 --- a/include/unotools/historyoptions.hxx +++ b/include/unotools/historyoptions.hxx @@ -16,30 +16,14 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - -#ifndef INCLUDED_UNOTOOLS_HISTORYOPTIONS_HXX -#define INCLUDED_UNOTOOLS_HISTORYOPTIONS_HXX +#pragma once #include <unotools/unotoolsdllapi.h> #include <sal/types.h> -#include <com/sun/star/uno/Sequence.h> #include <rtl/ustring.hxx> -#include <unotools/options.hxx> -#include <memory> - +#include <vector> #include <optional> -namespace com::sun::star::beans { struct PropertyValue; } - -// The method GetList() returns a list of property values. -// Use follow defines to separate values by names. - -#define HISTORY_PROPERTYNAME_URL "URL" -#define HISTORY_PROPERTYNAME_FILTER "Filter" -#define HISTORY_PROPERTYNAME_TITLE "Title" -#define HISTORY_PROPERTYNAME_PASSWORD "Password" -#define HISTORY_PROPERTYNAME_THUMBNAIL "Thumbnail" - /// You can use these enum values to specify right history if you call our interface methods. enum class EHistoryType { @@ -47,8 +31,6 @@ enum class EHistoryType HelpBookmarks }; -class SvtHistoryOptions_Impl; - /** Collect information about history features. Interface methods to get and set value of config key "org.openoffice.Office.Common/History/..." @@ -56,24 +38,29 @@ class SvtHistoryOptions_Impl; key "PickList": The last used documents displayed in the file menu. key "History": The last opened documents general. */ -class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtHistoryOptions final : public utl::detail::Options +namespace SvtHistoryOptions { -public: - SvtHistoryOptions(); - virtual ~SvtHistoryOptions() override; /** Clear complete specified list. @param eHistory select right history. */ - void Clear(EHistoryType eHistory); + UNOTOOLS_DLLPUBLIC void Clear(EHistoryType eHistory); /** Return the complete specified history list. @param eHistory select right history. @return A list of history items is returned. */ - css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > GetList(EHistoryType eHistory) const; + struct HistoryItem + { + OUString sURL; + OUString sFilter; + OUString sTitle; + OUString sPassword; + OUString sThumbnail; + }; + UNOTOOLS_DLLPUBLIC std::vector< HistoryItem > GetList(EHistoryType eHistory); /** Append a new item to the specified list. @@ -84,18 +71,13 @@ public: @param sFilter filter name to save in history @param sTitle document title to save in history */ - void AppendItem(EHistoryType eHistory, + UNOTOOLS_DLLPUBLIC void AppendItem(EHistoryType eHistory, const OUString& sURL, const OUString& sFilter, const OUString& sTitle, const std::optional<OUString>& sThumbnail); /** Delete item from the specified list. */ - void DeleteItem(EHistoryType eHistory, const OUString& sURL); - -private: - std::shared_ptr<SvtHistoryOptions_Impl> m_pImpl; + UNOTOOLS_DLLPUBLIC void DeleteItem(EHistoryType eHistory, const OUString& sURL); }; -#endif // INCLUDED_UNOTOOLS_HISTORYOPTIONS_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/unotools/itemholderbase.hxx b/include/unotools/itemholderbase.hxx index 6503e3285e3b..b7a8a7bbc825 100644 --- a/include/unotools/itemholderbase.hxx +++ b/include/unotools/itemholderbase.hxx @@ -41,8 +41,6 @@ enum class EItem EventConfig , - HistoryOptions , - LinguConfig , MiscOptions , |