1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
3 * This file is part of the LibreOffice project.
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/.
12 #include <test/testdllapi.hxx>
16 #include <com/sun/star/accessibility/XAccessibleContext.hpp>
17 #include <com/sun/star/uno/Reference.hxx>
19 #include <rtl/ustrbuf.hxx>
20 #include <rtl/ustring.hxx>
22 #include "accessibletestbase.hxx"
26 class OOO_DLLPUBLIC_TEST SwAccessibleTestBase
: public AccessibleTestBase
29 void collectText(const css::uno::Reference
<css::accessibility::XAccessibleContext
>& xContext
,
30 rtl::OUStringBuffer
& buffer
, bool onlyChildren
= false);
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
);
39 * This fetches regular children plus siblings linked with FLOWS_TO/FLOWS_FROM which are not
40 * already in the regular children set. This is required because most offscreen children of the
41 * document contents are not listed as part of their parent children, but as FLOWS_* reference
42 * from one to the next.
43 * There is currently no guarantee all children will be listed, and it is fairly likely
44 * offscreen frames and tables might be missing for example.
46 virtual std::deque
<css::uno::Reference
<css::accessibility::XAccessibleContext
>> getAllChildren(
47 const css::uno::Reference
<css::accessibility::XAccessibleContext
>& xContext
) override
;
49 /** Collects contents of @p xContext in a dummy markup form */
51 collectText(const css::uno::Reference
<css::accessibility::XAccessibleContext
>& xContext
);
53 /** Collects contents of the current document */
54 OUString
collectText() { return collectText(getDocumentAccessibleContext()); }
58 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */