Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / include / sfx2 / AccessibilityIssue.hxx
blobac9ad6adb73b7e82c916f665720cba29e13aef8d
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 */
11 #pragma once
13 #include <sfx2/dllapi.h>
15 #include <vcl/weld.hxx>
16 #include <rtl/ustring.hxx>
18 #include <vector>
19 #include <memory>
21 namespace sfx
23 enum class AccessibilityIssueID
25 UNSPECIFIED, // TODO: remove - temporary
26 DOCUMENT_TITLE,
27 DOCUMENT_LANGUAGE,
28 DOCUMENT_BACKGROUND,
29 STYLE_LANGUAGE,
30 NO_ALT_OLE,
31 NO_ALT_GRAPHIC,
32 NO_ALT_SHAPE,
33 TABLE_MERGE_SPLIT,
34 TEXT_FORMATTING,
35 TABLE_FORMATTING,
36 HYPERLINK_IS_TEXT,
37 HYPERLINK_SHORT,
38 FAKE_FOOTNOTE,
39 FAKE_CAPTION,
40 MANUAL_NUMBERING
43 class SFX2_DLLPUBLIC AccessibilityIssue
45 public:
46 AccessibilityIssue(AccessibilityIssueID eIssueID = AccessibilityIssueID::UNSPECIFIED);
47 AccessibilityIssue(AccessibilityIssue const&) = default;
48 virtual ~AccessibilityIssue();
50 virtual bool canGotoIssue() const = 0;
51 virtual void gotoIssue() const = 0;
53 virtual bool canQuickFixIssue() const = 0;
54 virtual void quickFixIssue() const = 0;
56 void setParent(weld::Window* pParent) { m_pParent = pParent; }
58 AccessibilityIssue& operator=(const AccessibilityIssue&) = default;
60 AccessibilityIssueID m_eIssueID;
61 OUString m_aIssueText;
63 weld::Window* m_pParent;
66 class SFX2_DLLPUBLIC AccessibilityIssueCollection
68 private:
69 std::vector<std::shared_ptr<AccessibilityIssue>> m_aIssues;
71 public:
72 AccessibilityIssueCollection() = default;
74 std::vector<std::shared_ptr<AccessibilityIssue>>& getIssues();
76 void clear();
79 } // end sfx namespace
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */