LibreOffice Module test (master) 1
Protected Member Functions | Static Protected Member Functions | Private Member Functions | List of all members
test::SwAccessibleTestBase Class Reference

#include <swaccessibletestbase.hxx>

Inheritance diagram for test::SwAccessibleTestBase:
[legend]
Collaboration diagram for test::SwAccessibleTestBase:
[legend]

Protected Member Functions

virtual std::deque< css::uno::Reference< css::accessibility::XAccessibleContext > > getAllChildren (const css::uno::Reference< css::accessibility::XAccessibleContext > &xContext) override
 This fetches regular children plus siblings linked with FLOWS_TO/FLOWS_FROM which are not already in the regular children set. More...
 
OUString collectText (const css::uno::Reference< css::accessibility::XAccessibleContext > &xContext)
 Collects contents of xContext in a dummy markup form. More...
 
OUString collectText ()
 Collects contents of the current document. More...
 
- Protected Member Functions inherited from test::AccessibleTestBase
virtual void load (const rtl::OUString &sURL)
 
virtual void loadFromSrc (const rtl::OUString &sSrcPath)
 
void close ()
 
css::uno::Reference< css::accessibility::XAccessibleContext > getWindowAccessibleContext ()
 
virtual css::uno::Reference< css::accessibility::XAccessibleContext > getDocumentAccessibleContext ()
 
void documentPostKeyEvent (int nType, int nCharCode, int nKeyCode)
 
virtual std::deque< css::uno::Reference< css::accessibility::XAccessibleContext > > getAllChildren (const css::uno::Reference< css::accessibility::XAccessibleContext > &xContext)
 Tries to list all children of an accessible. More...
 
void dumpA11YTree (const css::uno::Reference< css::accessibility::XAccessibleContext > &xContext, const int depth=0)
 Prints the tree of accessible objects starting at xContext to stdout. More...
 
css::uno::Reference< css::accessibility::XAccessibleContext > getItemFromName (const css::uno::Reference< css::accessibility::XAccessibleContext > &xMenuCtx, std::u16string_view name)
 
bool activateMenuItem (const css::uno::Reference< css::accessibility::XAccessibleAction > &xAction)
 
bool activateMenuItem (const css::uno::Reference< css::accessibility::XAccessibleContext > &xCtx)
 
template<typename... Ts>
css::uno::Reference< css::accessibility::XAccessibleContext > getItemFromName (const css::uno::Reference< css::accessibility::XAccessibleContext > &xMenuCtx, std::u16string_view name, Ts... names)
 
template<typename... Ts>
bool activateMenuItem (const css::uno::Reference< css::accessibility::XAccessibleContext > &xMenuCtx, Ts... names)
 
template<typename... Ts>
bool activateMenuItem (Ts... names)
 

Static Protected Member Functions

static css::uno::Reference< css::accessibility::XAccessibleContext > getPreviousFlowingSibling (const css::uno::Reference< css::accessibility::XAccessibleContext > &xContext)
 
static css::uno::Reference< css::accessibility::XAccessibleContext > getNextFlowingSibling (const css::uno::Reference< css::accessibility::XAccessibleContext > &xContext)
 
- Static Protected Member Functions inherited from test::AccessibleTestBase
static bool isDocumentRole (const sal_Int16 role)
 
static css::uno::Reference< css::accessibility::XAccessibleContext > getFirstRelationTargetOfType (const css::uno::Reference< css::accessibility::XAccessibleContext > &xContext, sal_Int16 relationType)
 
static css::uno::Reference< css::accessibility::XAccessibleContext > getFocusedObject (const css::uno::Reference< css::accessibility::XAccessibleContext > &xCtx)
 Gets the focused accessible object at xAcc level or below. More...
 
static css::uno::Reference< css::accessibility::XAccessibleContext > getFocusedObject (const css::uno::Reference< css::accessibility::XAccessible > &xAcc)
 
static css::uno::Reference< css::accessibility::XAccessibleContext > tabTo (const css::uno::Reference< css::accessibility::XAccessible > &xRoot, const sal_Int16 role, const std::u16string_view name, const EventPosterHelperBase *pEventPosterHelper=nullptr)
 Navigates through focusable elements using the Tab keyboard shortcut. More...
 
static bool tabTo (const css::uno::Reference< css::accessibility::XAccessible > &xRoot, const css::uno::Reference< css::accessibility::XAccessibleContext > &xChild, const EventPosterHelperBase *pEventPosterHelper=nullptr)
 
static std::shared_ptr< DialogWaiterawaitDialog (const std::u16string_view name, std::function< void(Dialog &)> callback, bool bAutoClose=true)
 Helper to call user code when a given dialog opens. More...
 
- Static Protected Member Functions inherited from test::BootstrapFixture
static bool IsDefaultDPI ()
 
static std::pair< double, double > getDPIScaling ()
 

Private Member Functions

void collectText (const css::uno::Reference< css::accessibility::XAccessibleContext > &xContext, rtl::OUStringBuffer &buffer, bool onlyChildren=false)
 

Additional Inherited Members

- Public Member Functions inherited from test::AccessibleTestBase
virtual void setUp () override
 
virtual void tearDown () override
 
- Public Member Functions inherited from test::BootstrapFixture
 DECL_DLLPRIVATE_STATIC_LINK (BootstrapFixture, ImplInitFilterHdl, ConvertData &, bool)
 
 BootstrapFixture (bool bAssertOnDialog=true, bool bNeedUCB=true)
 
virtual ~BootstrapFixture () override
 
virtual void setUp () override
 
void validate (const OUString &rURL, ValidationFormat) const
 
- Public Member Functions inherited from test::BootstrapFixtureBase
 BootstrapFixtureBase ()
 
virtual ~BootstrapFixtureBase () override
 
const css::uno::Reference< css::uno::XComponentContext > & getComponentContext () const
 
const css::uno::Reference< css::lang::XMultiServiceFactory > & getMultiServiceFactory () const
 
virtual void setUp () override
 
virtual void tearDown () override
 
- Static Public Member Functions inherited from test::BootstrapFixture
static sal_uInt16 getDefaultDeviceBitCount ()
 
- Protected Attributes inherited from test::AccessibleTestBase
css::uno::Reference< css::frame::XDesktop2 > mxDesktop
 
css::uno::Reference< css::lang::XComponent > mxDocument
 
css::uno::Reference< css::awt::XWindow > mxWindow
 
- Protected Attributes inherited from test::BootstrapFixture
css::uno::Reference< css::uno::XComponentContext > mxComponentContext
 
- Protected Attributes inherited from test::BootstrapFixtureBase
Directories m_directories
 
css::uno::Reference< css::uno::XComponentContext > m_xContext
 
css::uno::Reference< css::lang::XMultiServiceFactory > m_xSFactory
 
css::uno::Reference< css::lang::XMultiComponentFactory > m_xFactory
 

Detailed Description

Definition at line 26 of file swaccessibletestbase.hxx.

Member Function Documentation

◆ collectText() [1/3]

OUString test::SwAccessibleTestBase::collectText ( )
inlineprotected

Collects contents of the current document.

Definition at line 54 of file swaccessibletestbase.hxx.

References collectText().

Referenced by collectText().

◆ collectText() [2/3]

OUString test::SwAccessibleTestBase::collectText ( const css::uno::Reference< css::accessibility::XAccessibleContext > &  xContext)
protected

Collects contents of xContext in a dummy markup form.

◆ collectText() [3/3]

void test::SwAccessibleTestBase::collectText ( const css::uno::Reference< css::accessibility::XAccessibleContext > &  xContext,
rtl::OUStringBuffer &  buffer,
bool  onlyChildren = false 
)
private

◆ getAllChildren()

std::deque< uno::Reference< accessibility::XAccessibleContext > > test::SwAccessibleTestBase::getAllChildren ( const css::uno::Reference< css::accessibility::XAccessibleContext > &  xContext)
overrideprotectedvirtual

This fetches regular children plus siblings linked with FLOWS_TO/FLOWS_FROM which are not already in the regular children set.

This is required because most offscreen children of the document contents are not listed as part of their parent children, but as FLOWS_* reference from one to the next. There is currently no guarantee all children will be listed, and it is fairly likely offscreen frames and tables might be missing for example.

Reimplemented from test::AccessibleTestBase.

Definition at line 41 of file swaccessibletestbase.cxx.

References AccessibilityTools::equals(), test::AccessibleTestBase::getAllChildren(), and AccessibilityTools::MAX_CHILDREN.

◆ getNextFlowingSibling()

uno::Reference< accessibility::XAccessibleContext > test::SwAccessibleTestBase::getNextFlowingSibling ( const css::uno::Reference< css::accessibility::XAccessibleContext > &  xContext)
staticprotected

Definition at line 31 of file swaccessibletestbase.cxx.

◆ getPreviousFlowingSibling()

uno::Reference< accessibility::XAccessibleContext > test::SwAccessibleTestBase::getPreviousFlowingSibling ( const css::uno::Reference< css::accessibility::XAccessibleContext > &  xContext)
staticprotected

The documentation for this class was generated from the following files: