From c823c7007e041028e517d8837aac2093b1dca217 Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Thu, 5 Dec 2019 22:24:49 +0100 Subject: Accessibility check dialog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- include/svx/AccessibilityCheckDialog.hxx | 55 ++++++++++++++++++++++++++++++++ include/svx/AccessibilityIssue.hxx | 27 ++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 include/svx/AccessibilityCheckDialog.hxx create mode 100644 include/svx/AccessibilityIssue.hxx (limited to 'include') 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 +#include +#include +#include +#include +#include + +class SVX_DLLPUBLIC AccessibilityCheckEntry final +{ +private: + std::unique_ptr m_xBuilder; + std::unique_ptr m_xContainer; + std::unique_ptr 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 m_rAccessibilityIssueCollection; + std::vector> m_aAccessibilityCheckEntries; + + // Controls + std::unique_ptr m_xAccessibilityCheckBox; + +public: + AccessibilityCheckDialog( + weld::Window* pParent, + std::vector 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 + +namespace svx +{ +class SVX_DLLPUBLIC AccessibilityIssue +{ +public: + OUString m_aIssueText; +}; +} + +#endif // INCLUDED_SVX_ACCESSIBILITYISSUE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit