| 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 |
* This file incorporates work covered by the following license notice: |
| 10 |
* |
| 11 |
* Licensed to the Apache Software Foundation (ASF) under one or more |
| 12 |
* contributor license agreements. See the NOTICE file distributed |
| 13 |
* with this work for additional information regarding copyright |
| 14 |
* ownership. The ASF licenses this file to you under the Apache |
| 15 |
* License, Version 2.0 (the "License"); you may not use this file |
| 16 |
* except in compliance with the License. You may obtain a copy of |
| 17 |
* the License at http://www.apache.org/licenses/LICENSE-2.0 . |
| 18 |
*/ |
| 19 |
|
| 20 |
#pragma once |
| 21 |
|
| 22 |
#include <com/sun/star/uno/Reference.hxx> |
| 23 |
#include <com/sun/star/accessibility/XAccessibleContext.hpp> |
| 24 |
#include <com/sun/star/accessibility/XAccessibleText.hpp> |
| 25 |
#include <test/testdllapi.hxx> |
| 26 |
|
| 27 |
class OOO_DLLPUBLIC_TEST XAccessibleTextTester |
| 28 |
{ |
| 29 |
protected: |
| 30 |
const css::uno::Reference<css::accessibility::XAccessibleContext> m_xContext; |
| 31 |
const css::uno::Reference<css::accessibility::XAccessibleText> m_xText; |
| 32 |
|
| 33 |
public: |
| 34 |
XAccessibleTextTester( |
| 35 |
const css::uno::Reference<css::accessibility::XAccessibleContext>& xContext) |
| 36 |
: m_xContext(xContext) |
| 37 |
, m_xText(m_xContext, css::uno::UNO_QUERY_THROW) |
| 38 |
{ |
| 39 |
} |
| 40 |
|
| 41 |
void testGetCaretPosition(); |
| 42 |
void testSetCaretPosition(); |
| 43 |
void testGetCharacter(); |
| 44 |
void testGetCharacterAttributes(); |
| 45 |
void testGetCharacterBounds(); |
| 46 |
void testGetCharacterCount(); |
| 47 |
void testGetIndexAtPoint(); |
| 48 |
void testGetSelectedText(); |
| 49 |
void testGetSelectionStart(); |
| 50 |
void testGetSelectionEnd(); |
| 51 |
void testSetSelection(); |
| 52 |
void testGetText(); |
| 53 |
void testGetTextRange(); |
| 54 |
void testGetTextAtIndex(); |
| 55 |
void testGetTextBeforeIndex(); |
| 56 |
void testGetTextBehindIndex(); |
| 57 |
void testCopyText(); |
| 58 |
|
| 59 |
void testAll() |
| 60 |
{ |
| 61 |
testGetCaretPosition(); |
| 62 |
testSetCaretPosition(); |
| 63 |
testGetCharacter(); |
| 64 |
testGetCharacterAttributes(); |
| 65 |
testGetCharacterBounds(); |
| 66 |
testGetCharacterCount(); |
| 67 |
testGetIndexAtPoint(); |
| 68 |
testGetSelectedText(); |
| 69 |
testGetSelectionStart(); |
| 70 |
testGetSelectionEnd(); |
| 71 |
testSetSelection(); |
| 72 |
testGetText(); |
| 73 |
testGetTextRange(); |
| 74 |
testGetTextAtIndex(); |
| 75 |
testGetTextBeforeIndex(); |
| 76 |
testGetTextBehindIndex(); |
| 77 |
testCopyText(); |
| 78 |
} |
| 79 |
|
| 80 |
private: |
| 81 |
static OUString getSystemClipboardText(); |
| 82 |
}; |
| 83 |
|
| 84 |
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |