Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / sw / source / core / inc / AccessibilityIssue.hxx
blob151d565399f1061faa61137bc538a1a3099fb2ea
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 #ifndef INCLUDED_SW_SOURCE_CORE_ACCESSIBILITYISSUE_HXX
12 #define INCLUDED_SW_SOURCE_CORE_ACCESSIBILITYISSUE_HXX
14 #include <sfx2/AccessibilityIssue.hxx>
15 #include <doc.hxx>
16 #include <txtftn.hxx>
18 namespace sw
20 enum class IssueObject
22 UNKNOWN,
23 GRAPHIC,
24 OLE,
25 SHAPE,
26 FORM,
27 TABLE,
28 TEXT,
29 DOCUMENT_TITLE,
30 DOCUMENT_BACKGROUND,
31 LANGUAGE_NOT_SET,
32 FOOTENDNOTE,
33 TEXTFRAME,
36 class SW_DLLPUBLIC AccessibilityIssue final : public sfx::AccessibilityIssue
38 private:
39 IssueObject m_eIssueObject;
40 SwDoc* m_pDoc;
41 OUString m_sObjectID;
42 std::vector<OUString> m_aIssueAdditionalInfo;
43 SwNode* m_pNode;
44 SwTextFootnote* m_pTextFootnote;
46 sal_Int32 m_nStart;
47 sal_Int32 m_nEnd;
49 public:
50 AccessibilityIssue(sfx::AccessibilityIssueID eIssueID = sfx::AccessibilityIssueID::UNSPECIFIED);
51 AccessibilityIssue(AccessibilityIssue const&) = default;
53 void setIssueObject(IssueObject eIssueObject);
54 void setDoc(SwDoc& rDoc);
55 void setObjectID(OUString const& rID);
56 void setNode(SwNode* pNode) { m_pNode = pNode; }
57 void setTextFootnote(SwTextFootnote* pTextFootnote) { m_pTextFootnote = pTextFootnote; }
59 void setStart(sal_Int32 nStart) { m_nStart = nStart; }
61 void setEnd(sal_Int32 nEnd) { m_nEnd = nEnd; }
63 std::vector<OUString> const& getAdditionalInfo() const { return m_aIssueAdditionalInfo; }
65 void setAdditionalInfo(std::vector<OUString>&& rIssueAdditionalInfo)
67 m_aIssueAdditionalInfo = std::move(rIssueAdditionalInfo);
70 bool canGotoIssue() const override;
71 void gotoIssue() const override;
73 bool canQuickFixIssue() const override;
74 void quickFixIssue() const override;
76 sal_Int32 getStart() { return m_nStart; }
77 sal_Int32 getEnd() { return m_nEnd; }
78 SwNode* getNode() { return m_pNode; }
79 SwTextFootnote* getTextFootnote() { return m_pTextFootnote; }
81 AccessibilityIssue& operator=(const AccessibilityIssue&) = default;
84 } // end sw namespace
86 #endif
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */