LibreOffice Module unotools (master) 1
historyoptions.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#pragma once
20
22#include <rtl/ustring.hxx>
23#include <vector>
24#include <optional>
25
27enum class EHistoryType
28{
31};
32
40namespace SvtHistoryOptions
41{
42
48
55 {
56 OUString sURL;
57 OUString sFilter;
58 OUString sTitle;
59 OUString sPassword;
60 OUString sThumbnail;
61 bool isReadOnly = false;
62 bool isPinned = false;
63 };
64 UNOTOOLS_DLLPUBLIC std::vector< HistoryItem > GetList(EHistoryType eHistory);
65
77 UNOTOOLS_DLLPUBLIC void AppendItem(EHistoryType eHistory, const OUString& sURL,
78 const OUString& sFilter, const OUString& sTitle,
79 const std::optional<OUString>& sThumbnail,
80 std::optional<bool> oIsReadOnly);
81
84 UNOTOOLS_DLLPUBLIC void DeleteItem(EHistoryType eHistory, const OUString& sURL);
85
86 // tdf#38742 - toggle pinned state of an item
87 UNOTOOLS_DLLPUBLIC void TogglePinItem(EHistoryType eHistory, const OUString& sURL);
88};
89
90/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
EHistoryType
You can use these enum values to specify right history if you call our interface methods.
Collect information about history features.
void Clear(EHistoryType eHistory)
Clear complete specified list.
void DeleteItem(EHistoryType eHistory, const OUString &sURL)
Delete item from the specified list.
void TogglePinItem(EHistoryType eHistory, const OUString &sURL)
std::vector< HistoryItem > GetList(EHistoryType eHistory)
void AppendItem(EHistoryType eHistory, const OUString &sURL, const OUString &sFilter, const OUString &sTitle, const std::optional< OUString > &sThumbnail, ::std::optional< bool > const oIsReadOnly)
Return the complete specified history list.
#define UNOTOOLS_DLLPUBLIC