1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
9 * This file incorporates work covered by the following license notice:
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 .
22 #include <com/sun/star/accessibility/AccessibleScrollType.hpp>
23 #include <toolkit/awt/vclxaccessiblecomponent.hxx>
24 #include <comphelper/accessibletexthelper.hxx>
29 typedef ::cppu::ImplHelper1
<
30 css::accessibility::XAccessibleText
> VCLXAccessibleTextComponent_BASE
;
32 class VCLXAccessibleTextComponent
: public VCLXAccessibleComponent
,
33 public ::comphelper::OCommonAccessibleText
,
34 public VCLXAccessibleTextComponent_BASE
39 void SetText( const OUString
& sText
);
41 virtual void ProcessWindowEvent( const VclWindowEvent
& rVclWindowEvent
) override
;
43 // OCommonAccessibleText
44 virtual OUString
implGetText() override
;
45 virtual css::lang::Locale
implGetLocale() override
;
46 virtual void implGetSelection( sal_Int32
& nStartIndex
, sal_Int32
& nEndIndex
) override
;
49 virtual void SAL_CALL
disposing() override
;
52 VCLXAccessibleTextComponent( VCLXWindow
* pVCLXWindow
);
58 DECLARE_XTYPEPROVIDER()
61 virtual sal_Int32 SAL_CALL
getCaretPosition() override
;
62 virtual sal_Bool SAL_CALL
setCaretPosition( sal_Int32 nIndex
) override
;
63 virtual sal_Unicode SAL_CALL
getCharacter( sal_Int32 nIndex
) override
;
64 virtual css::uno::Sequence
< css::beans::PropertyValue
> SAL_CALL
getCharacterAttributes( sal_Int32 nIndex
, const css::uno::Sequence
< OUString
>& aRequestedAttributes
) override
;
65 virtual css::awt::Rectangle SAL_CALL
getCharacterBounds( sal_Int32 nIndex
) override
;
66 virtual sal_Int32 SAL_CALL
getCharacterCount() override
;
67 virtual sal_Int32 SAL_CALL
getIndexAtPoint( const css::awt::Point
& aPoint
) override
;
68 virtual OUString SAL_CALL
getSelectedText() override
;
69 virtual sal_Int32 SAL_CALL
getSelectionStart() override
;
70 virtual sal_Int32 SAL_CALL
getSelectionEnd() override
;
71 virtual sal_Bool SAL_CALL
setSelection( sal_Int32 nStartIndex
, sal_Int32 nEndIndex
) override
;
72 virtual OUString SAL_CALL
getText() override
;
73 virtual OUString SAL_CALL
getTextRange( sal_Int32 nStartIndex
, sal_Int32 nEndIndex
) override
;
74 virtual css::accessibility::TextSegment SAL_CALL
getTextAtIndex( sal_Int32 nIndex
, sal_Int16 aTextType
) override
;
75 virtual css::accessibility::TextSegment SAL_CALL
getTextBeforeIndex( sal_Int32 nIndex
, sal_Int16 aTextType
) override
;
76 virtual css::accessibility::TextSegment SAL_CALL
getTextBehindIndex( sal_Int32 nIndex
, sal_Int16 aTextType
) override
;
77 virtual sal_Bool SAL_CALL
copyText( sal_Int32 nStartIndex
, sal_Int32 nEndIndex
) override
;
78 virtual sal_Bool SAL_CALL
scrollSubstringTo( sal_Int32 nStartIndex
, sal_Int32 nEndIndex
, css::accessibility::AccessibleScrollType aScrollType
) override
;
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */