summaryrefslogtreecommitdiff
path: root/vcl/inc
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2018-10-04 15:11:27 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2018-10-08 08:12:23 +0200
commited1eff2bcbc6324f8ea635e0a11512ff0f117019 (patch)
treecc62fb581fe344ce556f9d53dc9cb9e43f3454a0 /vcl/inc
parent1a6397030381a45f27ab7a2a02e6e6d0f9987c84 (diff)
Qt5AccessibleWidget: Add stub for QAccessibleTextInterface
Change-Id: Iee80b40d2c33a0464abfc285360e76774c644b32 Reviewed-on: https://gerrit.libreoffice.org/61372 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'vcl/inc')
-rw-r--r--vcl/inc/qt5/Qt5AccessibleText.hxx62
-rw-r--r--vcl/inc/qt5/Qt5AccessibleWidget.hxx2
2 files changed, 64 insertions, 0 deletions
diff --git a/vcl/inc/qt5/Qt5AccessibleText.hxx b/vcl/inc/qt5/Qt5AccessibleText.hxx
new file mode 100644
index 000000000000..2f9e50381009
--- /dev/null
+++ b/vcl/inc/qt5/Qt5AccessibleText.hxx
@@ -0,0 +1,62 @@
+/* -*- 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/.
+ */
+
+#pragma once
+
+#include <vclpluginapi.h>
+
+#include "Qt5AccessibleWidget.hxx"
+
+#include <QtCore/QObject>
+#include <QtCore/QPair>
+#include <QtCore/QString>
+#include <QtCore/QStringList>
+#include <QtCore/QVector>
+#include <QtGui/QAccessible>
+#include <QtGui/QAccessibleActionInterface>
+#include <QtGui/QAccessibleInterface>
+#include <QtGui/QAccessibleValueInterface>
+#include <QtGui/QColor>
+#include <QtGui/QWindow>
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+
+class Qt5Frame;
+class Qt5Widget;
+
+class VCLPLUG_QT5_PUBLIC Qt5AccessibleText : public QAccessibleTextInterface
+{
+public:
+ Qt5AccessibleText(const css::uno::Reference<css::accessibility::XAccessible> xAccessible);
+
+ void addSelection(int startOffset, int endOffset) override;
+ QString attributes(int offset, int* startOffset, int* endOffset) const override;
+ int characterCount() const override;
+ QRect characterRect(int offset) const override;
+ int cursorPosition() const override;
+ int offsetAtPoint(const QPoint& point) const override;
+ void removeSelection(int selectionIndex) override;
+ void scrollToSubstring(int startIndex, int endIndex) override;
+ void selection(int selectionIndex, int* startOffset, int* endOffset) const override;
+ int selectionCount() const override;
+ void setCursorPosition(int position) override;
+ void setSelection(int selectionIndex, int startOffset, int endOffset) override;
+ QString text(int startOffset, int endOffset) const override;
+ QString textAfterOffset(int offset, QAccessible::TextBoundaryType boundaryType,
+ int* startOffset, int* endOffset) const override;
+ QString textAtOffset(int offset, QAccessible::TextBoundaryType boundaryType, int* startOffset,
+ int* endOffset) const override;
+ QString textBeforeOffset(int offset, QAccessible::TextBoundaryType boundaryType,
+ int* startOffset, int* endOffset) const override;
+
+private:
+ css::uno::Reference<css::accessibility::XAccessible> m_xAccessible;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/qt5/Qt5AccessibleWidget.hxx b/vcl/inc/qt5/Qt5AccessibleWidget.hxx
index 980c464b9658..1e372479e479 100644
--- a/vcl/inc/qt5/Qt5AccessibleWidget.hxx
+++ b/vcl/inc/qt5/Qt5AccessibleWidget.hxx
@@ -19,6 +19,7 @@
#include <QtGui/QAccessible>
#include <QtGui/QAccessibleActionInterface>
#include <QtGui/QAccessibleInterface>
+#include <QtGui/QAccessibleTextInterface>
#include <QtGui/QAccessibleValueInterface>
#include <QtGui/QColor>
#include <QtGui/QWindow>
@@ -68,6 +69,7 @@ public:
QStringList keyBindingsForAction(const QString& actionName) const override;
QAccessibleValueInterface* valueInterface();
+ QAccessibleTextInterface* textInterface();
// Factory
static QAccessibleInterface* customFactory(const QString& classname, QObject* object);