[Libreoffice-commits] core.git: include/svx svx/source sw/source
Tomaž Vajngerl (via logerrit)
logerrit at kemper.freedesktop.org
Thu Dec 26 12:55:02 UTC 2019
include/svx/AccessibilityCheck.hxx | 41 +++++++++++++++++++++++++
include/svx/AccessibilityCheckDialog.hxx | 6 +++
svx/source/dialog/AccessibilityCheckDialog.cxx | 6 +++
sw/source/core/access/AccessibilityCheck.cxx | 6 +++
sw/source/core/inc/AccessibilityCheck.hxx | 16 ++++-----
sw/source/uibase/shells/basesh.cxx | 4 +-
6 files changed, 67 insertions(+), 12 deletions(-)
New commits:
commit 49978d521b262595f9214cc7c2eac6ea824c511e
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sun Dec 8 12:00:49 2019 +0100
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Thu Dec 26 13:54:22 2019 +0100
AccessibilityCheck iface, namespaces
This adds AccessibilityCheck interface into svx, which also
requires addition of namespaces as there is now AccessibilityCheck
interface and the implementation in sw (sw::AccessibilityCheck).
Change-Id: If7065cdab90b02478c57f22afb7ca716d70b8dce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85837
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/include/svx/AccessibilityCheck.hxx b/include/svx/AccessibilityCheck.hxx
new file mode 100644
index 000000000000..32970112d5e9
--- /dev/null
+++ b/include/svx/AccessibilityCheck.hxx
@@ -0,0 +1,41 @@
+/* -*- 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_ACCESSIBILITYCHECK_HXX
+#define INCLUDED_SVX_ACCESSIBILITYCHECK_HXX
+
+#include <vector>
+#include <rtl/ustring.hxx>
+#include <svx/svxdllapi.h>
+#include <svx/AccessibilityIssue.hxx>
+
+namespace svx
+{
+class SVX_DLLPUBLIC AccessibilityCheck
+{
+protected:
+ std::vector<AccessibilityIssue> m_aAccessibilityIssueCollection;
+
+public:
+ virtual ~AccessibilityCheck() {}
+
+ virtual void check() = 0;
+
+ std::vector<svx::AccessibilityIssue> const& getIssueCollecton()
+ {
+ return m_aAccessibilityIssueCollection;
+ }
+};
+
+} // end svx namespace
+
+#endif // INCLUDED_SVX_ACCESSIBILITYCHECKDIALOG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/AccessibilityCheckDialog.hxx b/include/svx/AccessibilityCheckDialog.hxx
index 12b0262ded0f..c55d69cbc696 100644
--- a/include/svx/AccessibilityCheckDialog.hxx
+++ b/include/svx/AccessibilityCheckDialog.hxx
@@ -11,13 +11,15 @@
#ifndef INCLUDED_SVX_ACCESSIBILITYCHECKDIALOG_HXX
#define INCLUDED_SVX_ACCESSIBILITYCHECKDIALOG_HXX
+#include <svx/AccessibilityCheck.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>
+namespace svx
+{
class SVX_DLLPUBLIC AccessibilityCheckEntry final
{
private:
@@ -50,6 +52,8 @@ public:
virtual short run() override;
};
+} // end svx namespace
+
#endif // INCLUDED_SVX_ACCESSIBILITYCHECKDIALOG_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/AccessibilityCheckDialog.cxx b/svx/source/dialog/AccessibilityCheckDialog.cxx
index 27e013507f5d..06ab21d7611b 100644
--- a/svx/source/dialog/AccessibilityCheckDialog.cxx
+++ b/svx/source/dialog/AccessibilityCheckDialog.cxx
@@ -12,8 +12,10 @@
#include <svx/AccessibilityIssue.hxx>
#include <vcl/svapp.hxx>
+namespace svx
+{
AccessibilityCheckEntry::AccessibilityCheckEntry(weld::Container* pParent,
- svx::AccessibilityIssue const& rAccessibilityIssue)
+ AccessibilityIssue const& rAccessibilityIssue)
: m_xBuilder(Application::CreateBuilder(pParent, "svx/ui/accessibilitycheckentry.ui"))
, m_xContainer(m_xBuilder->weld_container("accessibilityCheckEntryBox"))
, m_xLabel(m_xBuilder->weld_label("accessibilityCheckEntryLabel"))
@@ -49,4 +51,6 @@ short AccessibilityCheckDialog::run()
return GenericDialogController::run();
}
+} // end svx namespace
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/AccessibilityCheck.cxx b/sw/source/core/access/AccessibilityCheck.cxx
index 31cd12c8b07e..165b3da43483 100644
--- a/sw/source/core/access/AccessibilityCheck.cxx
+++ b/sw/source/core/access/AccessibilityCheck.cxx
@@ -11,13 +11,17 @@
#include <AccessibilityCheck.hxx>
#include <ndgrf.hxx>
#include <ndole.hxx>
+#include <ndtxt.hxx>
#include <IDocumentDrawModelAccess.hxx>
#include <drawdoc.hxx>
#include <svx/svdpage.hxx>
#include <swtable.hxx>
+namespace sw
+{
namespace
{
+// TODO move these to string file and look for a better name.
OUString sNoAlt("No alt text for graphic '%OBJECT_NAME%'");
OUString sTableMergeSplit("Table '%OBJECT_NAME%' contains merges or splits");
}
@@ -145,4 +149,6 @@ void AccessibilityCheck::check()
}
}
+} // end sw namespace
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/AccessibilityCheck.hxx b/sw/source/core/inc/AccessibilityCheck.hxx
index 5d268856d67e..513e862e7e6f 100644
--- a/sw/source/core/inc/AccessibilityCheck.hxx
+++ b/sw/source/core/inc/AccessibilityCheck.hxx
@@ -11,14 +11,16 @@
#ifndef INCLUDED_SW_SOURCE_CORE_ACCESSIBILITYCHECK_HXX
#define INCLUDED_SW_SOURCE_CORE_ACCESSIBILITYCHECK_HXX
+#include <svx/AccessibilityCheck.hxx>
#include <doc.hxx>
-#include <svx/AccessibilityIssue.hxx>
#include <node.hxx>
-class AccessibilityCheck
+namespace sw
{
+class AccessibilityCheck final : public svx::AccessibilityCheck
+{
+private:
SwDoc* m_pDoc;
- std::vector<svx::AccessibilityIssue> m_aAccessibilityIssueCollection;
public:
AccessibilityCheck(SwDoc* pDoc)
@@ -26,17 +28,15 @@ public:
{
}
- std::vector<svx::AccessibilityIssue> const& getIssueCollecton()
- {
- return m_aAccessibilityIssueCollection;
- }
+ void check() override;
- void check();
void checkTableNode(SwTableNode* pTableNode);
void checkNoTextNode(SwNoTextNode* pNoTextNode);
void checkObject(SdrObject* pObject);
};
+} // end sw namespace
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index c0c71f403be3..e5dbc9f9eb3a 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -2681,9 +2681,9 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
break;
case SID_ACCESSIBILITY_CHECK:
{
- AccessibilityCheck aCheck(rSh.GetDoc());
+ sw::AccessibilityCheck aCheck(rSh.GetDoc());
aCheck.check();
- AccessibilityCheckDialog aDialog(pMDI, aCheck.getIssueCollecton());
+ svx::AccessibilityCheckDialog aDialog(pMDI, aCheck.getIssueCollecton());
aDialog.run();
}
break;
More information about the Libreoffice-commits
mailing list