summaryrefslogtreecommitdiff
path: root/sw/source/core/access/AccessibilityCheckResult.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/access/AccessibilityCheckResult.cxx')
-rw-r--r--sw/source/core/access/AccessibilityCheckResult.cxx58
1 files changed, 58 insertions, 0 deletions
diff --git a/sw/source/core/access/AccessibilityCheckResult.cxx b/sw/source/core/access/AccessibilityCheckResult.cxx
new file mode 100644
index 000000000000..6d85cb040f0c
--- /dev/null
+++ b/sw/source/core/access/AccessibilityCheckResult.cxx
@@ -0,0 +1,58 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#include <AccessibilityCheckResult.hxx>
+#include <wrtsh.hxx>
+#include <docsh.hxx>
+
+namespace sw
+{
+AccessibilityCheckResult::AccessibilityCheckResult(svx::AccessibilityIssueID eIssueID)
+ : svx::AccessibilityCheckResult(eIssueID)
+ , m_eIssueObject(IssueObject::UNKNOWN)
+ , m_pDoc(nullptr)
+{
+}
+
+void AccessibilityCheckResult::setIssueObject(IssueObject eIssueObject)
+{
+ m_eIssueObject = eIssueObject;
+}
+
+void AccessibilityCheckResult::setDoc(SwDoc* pDoc) { m_pDoc = pDoc; }
+
+void AccessibilityCheckResult::setObjectID(OUString const& rID) { m_sObjectID = rID; }
+
+bool AccessibilityCheckResult::canGotoIssue() const
+{
+ if (m_eIssueObject != IssueObject::UNKNOWN)
+ return true;
+ return false;
+}
+
+void AccessibilityCheckResult::gotoIssue() const
+{
+ switch (m_eIssueObject)
+ {
+ case IssueObject::GRAPHIC:
+ case IssueObject::OLE:
+ {
+ SwWrtShell* pWrtShell = m_pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->GotoFly(m_sObjectID, FLYCNTTYPE_ALL, true);
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+} // end sw namespace
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */