bump product version to 6.3.0.0.beta1
[LibreOffice.git] / include / unotools / historyoptions.hxx
blob8d628a67254ba72359674e1d89db6c0db920477b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_UNOTOOLS_HISTORYOPTIONS_HXX
21 #define INCLUDED_UNOTOOLS_HISTORYOPTIONS_HXX
23 #include <unotools/unotoolsdllapi.h>
24 #include <sal/types.h>
25 #include <com/sun/star/uno/Sequence.h>
26 #include <rtl/ustring.hxx>
27 #include <unotools/options.hxx>
28 #include <memory>
30 namespace com { namespace sun { namespace star { namespace beans { struct PropertyValue; } } } }
31 namespace boost { template <class T> class optional; }
33 // The method GetList() returns a list of property values.
34 // Use follow defines to separate values by names.
36 #define HISTORY_PROPERTYNAME_URL "URL"
37 #define HISTORY_PROPERTYNAME_FILTER "Filter"
38 #define HISTORY_PROPERTYNAME_TITLE "Title"
39 #define HISTORY_PROPERTYNAME_PASSWORD "Password"
40 #define HISTORY_PROPERTYNAME_THUMBNAIL "Thumbnail"
42 /// You can use these enum values to specify right history if you call our interface methods.
43 enum EHistoryType
45 ePICKLIST = 0,
46 eHELPBOOKMARKS = 1
49 class SvtHistoryOptions_Impl;
51 /** Collect information about history features.
53 Interface methods to get and set value of config key "org.openoffice.Office.Common/History/..."
55 key "PickList": The last used documents displayed in the file menu.
56 key "History": The last opened documents general.
58 class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtHistoryOptions : public utl::detail::Options
60 public:
61 SvtHistoryOptions();
62 virtual ~SvtHistoryOptions() override;
64 /** Clear complete specified list.
66 @param eHistory select right history.
68 void Clear(EHistoryType eHistory);
70 /** Return the complete specified history list.
72 @param eHistory select right history.
73 @return A list of history items is returned.
75 css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > GetList(EHistoryType eHistory) const;
77 /** Append a new item to the specified list.
79 The oldest entry is deleted automatically when the size reaches the maximum.
81 @param eHistory select right history.
82 @param sURL URL to save in history
83 @param sFilter filter name to save in history
84 @param sTitle document title to save in history
86 void AppendItem(EHistoryType eHistory,
87 const OUString& sURL, const OUString& sFilter, const OUString& sTitle,
88 const boost::optional<OUString>& sThumbnail);
90 /** Delete item from the specified list.
92 void DeleteItem(EHistoryType eHistory, const OUString& sURL);
94 private:
95 std::shared_ptr<SvtHistoryOptions_Impl> m_pImpl;
98 #endif // INCLUDED_UNOTOOLS_HISTORYOPTIONS_HXX
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */