LibreOffice Module test (master) 1
swaccessibletestbase.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9
10#pragma once
11
12#include <test/testdllapi.hxx>
13
14#include <deque>
15
16#include <com/sun/star/accessibility/XAccessibleContext.hpp>
17#include <com/sun/star/uno/Reference.hxx>
18
19#include <rtl/ustrbuf.hxx>
20#include <rtl/ustring.hxx>
21
23
24namespace test
25{
27{
28private:
29 void collectText(const css::uno::Reference<css::accessibility::XAccessibleContext>& xContext,
30 rtl::OUStringBuffer& buffer, bool onlyChildren = false);
31
32protected:
33 static css::uno::Reference<css::accessibility::XAccessibleContext> getPreviousFlowingSibling(
34 const css::uno::Reference<css::accessibility::XAccessibleContext>& xContext);
35 static css::uno::Reference<css::accessibility::XAccessibleContext> getNextFlowingSibling(
36 const css::uno::Reference<css::accessibility::XAccessibleContext>& xContext);
37
46 virtual std::deque<css::uno::Reference<css::accessibility::XAccessibleContext>> getAllChildren(
47 const css::uno::Reference<css::accessibility::XAccessibleContext>& xContext) override;
48
50 OUString
51 collectText(const css::uno::Reference<css::accessibility::XAccessibleContext>& xContext);
52
54 OUString collectText() { return collectText(getDocumentAccessibleContext()); }
55};
56}
57
58/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
void collectText(const css::uno::Reference< css::accessibility::XAccessibleContext > &xContext, rtl::OUStringBuffer &buffer, bool onlyChildren=false)
OUString collectText(const css::uno::Reference< css::accessibility::XAccessibleContext > &xContext)
Collects contents of xContext in a dummy markup form.
OUString collectText()
Collects contents of the current document.
#define OOO_DLLPUBLIC_TEST
Definition: testdllapi.hxx:28