summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2019-12-05 22:24:49 +0100
committerTomaž Vajngerl <quikee@gmail.com>2019-12-26 11:32:20 +0100
commitc823c7007e041028e517d8837aac2093b1dca217 (patch)
treee58f60111c5a0cd5258c8cced84d1806f4ba927e /include
parent1abfc8e2f677024ea058e96f3133e503ba89ea02 (diff)
Accessibility check dialog
This adds the accessibility check dialog which is responsible to show all the accessibility check issues in the current document. Currently this just shows the text message in a list that comes from AccessibilityCheck. Change-Id: I8fd27038e3d85cd31fe172eee5e391fd4b7243ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85821 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/svx/AccessibilityCheckDialog.hxx55
-rw-r--r--include/svx/AccessibilityIssue.hxx27
2 files changed, 82 insertions, 0 deletions
diff --git a/include/svx/AccessibilityCheckDialog.hxx b/include/svx/AccessibilityCheckDialog.hxx
new file mode 100644
index 000000000000..12b0262ded0f
--- /dev/null
+++ b/include/svx/AccessibilityCheckDialog.hxx
@@ -0,0 +1,55 @@
+/* -*- 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/.
+ *
+ */
+
+#ifndef INCLUDED_SVX_ACCESSIBILITYCHECKDIALOG_HXX
+#define INCLUDED_SVX_ACCESSIBILITYCHECKDIALOG_HXX
+
+#include <sal/types.h>
+#include <svx/svxdllapi.h>
+#include <tools/gen.hxx>
+#include <tools/link.hxx>
+#include <vcl/weld.hxx>
+#include <svx/AccessibilityIssue.hxx>
+
+class SVX_DLLPUBLIC AccessibilityCheckEntry final
+{
+private:
+ std::unique_ptr<weld::Builder> m_xBuilder;
+ std::unique_ptr<weld::Container> m_xContainer;
+ std::unique_ptr<weld::Label> m_xLabel;
+
+ svx::AccessibilityIssue const& m_rAccessibilityIssue;
+
+public:
+ AccessibilityCheckEntry(weld::Container* pParent,
+ svx::AccessibilityIssue const& rAccessibilityIssue);
+ weld::Widget* get_widget() const { return m_xContainer.get(); }
+};
+
+class SVX_DLLPUBLIC AccessibilityCheckDialog final : public weld::GenericDialogController
+{
+private:
+ std::vector<svx::AccessibilityIssue> m_rAccessibilityIssueCollection;
+ std::vector<std::unique_ptr<AccessibilityCheckEntry>> m_aAccessibilityCheckEntries;
+
+ // Controls
+ std::unique_ptr<weld::Box> m_xAccessibilityCheckBox;
+
+public:
+ AccessibilityCheckDialog(
+ weld::Window* pParent,
+ std::vector<svx::AccessibilityIssue> const& rAccessibilityIssueCollection);
+ virtual ~AccessibilityCheckDialog() override;
+ virtual short run() override;
+};
+
+#endif // INCLUDED_SVX_ACCESSIBILITYCHECKDIALOG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/AccessibilityIssue.hxx b/include/svx/AccessibilityIssue.hxx
new file mode 100644
index 000000000000..894439c54fec
--- /dev/null
+++ b/include/svx/AccessibilityIssue.hxx
@@ -0,0 +1,27 @@
+/* -*- 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/.
+ *
+ */
+
+#ifndef INCLUDED_SVX_ACCESSIBILITYISSUE_HXX
+#define INCLUDED_SVX_ACCESSIBILITYISSUE_HXX
+
+#include <svx/svxdllapi.h>
+
+namespace svx
+{
+class SVX_DLLPUBLIC AccessibilityIssue
+{
+public:
+ OUString m_aIssueText;
+};
+}
+
+#endif // INCLUDED_SVX_ACCESSIBILITYISSUE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */