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 <comphelper/accessibletexthelper.hxx>
24 #include <cppuhelper/implbase.hxx>
25 #include <vcl/accessibility/vclxaccessiblecomponent.hxx>
30 class VCLXAccessibleTextComponent
: public cppu::ImplInheritanceHelper
<
31 VCLXAccessibleComponent
,
32 css::accessibility::XAccessibleText
>,
33 public ::comphelper::OCommonAccessibleText
37 // accessible name the object had when SetText was called last time
41 void SetText( const OUString
& sText
);
43 // Whether text segments for old/new value in AccessibleEventId::TEXT_CHANGED
44 // event should always include the whole old and new text instead of just
45 // the characters that changed between the two
46 virtual bool PreferFullTextInTextChangedEvent() { return false; };
48 virtual void ProcessWindowEvent( const VclWindowEvent
& rVclWindowEvent
) override
;
50 // OCommonAccessibleText
51 virtual OUString
implGetText() override
;
52 virtual css::lang::Locale
implGetLocale() override
;
53 virtual void implGetSelection( sal_Int32
& nStartIndex
, sal_Int32
& nEndIndex
) override
;
56 virtual void SAL_CALL
disposing() override
;
59 VCLXAccessibleTextComponent(vcl::Window
* pWindow
);
62 virtual sal_Int32 SAL_CALL
getCaretPosition() override
;
63 virtual sal_Bool SAL_CALL
setCaretPosition( sal_Int32 nIndex
) override
;
64 virtual sal_Unicode SAL_CALL
getCharacter( sal_Int32 nIndex
) override
;
65 virtual css::uno::Sequence
< css::beans::PropertyValue
> SAL_CALL
getCharacterAttributes( sal_Int32 nIndex
, const css::uno::Sequence
< OUString
>& aRequestedAttributes
) override
;
66 virtual css::awt::Rectangle SAL_CALL
getCharacterBounds( sal_Int32 nIndex
) override
;
67 virtual sal_Int32 SAL_CALL
getCharacterCount() override
;
68 virtual sal_Int32 SAL_CALL
getIndexAtPoint( const css::awt::Point
& aPoint
) override
;
69 virtual OUString SAL_CALL
getSelectedText() override
;
70 virtual sal_Int32 SAL_CALL
getSelectionStart() override
;
71 virtual sal_Int32 SAL_CALL
getSelectionEnd() override
;
72 virtual sal_Bool SAL_CALL
setSelection( sal_Int32 nStartIndex
, sal_Int32 nEndIndex
) override
;
73 virtual OUString SAL_CALL
getText() override
;
74 virtual OUString SAL_CALL
getTextRange( sal_Int32 nStartIndex
, sal_Int32 nEndIndex
) override
;
75 virtual css::accessibility::TextSegment SAL_CALL
getTextAtIndex( sal_Int32 nIndex
, sal_Int16 aTextType
) override
;
76 virtual css::accessibility::TextSegment SAL_CALL
getTextBeforeIndex( sal_Int32 nIndex
, sal_Int16 aTextType
) override
;
77 virtual css::accessibility::TextSegment SAL_CALL
getTextBehindIndex( sal_Int32 nIndex
, sal_Int16 aTextType
) override
;
78 virtual sal_Bool SAL_CALL
copyText( sal_Int32 nStartIndex
, sal_Int32 nEndIndex
) override
;
79 virtual sal_Bool SAL_CALL
scrollSubstringTo( sal_Int32 nStartIndex
, sal_Int32 nEndIndex
, css::accessibility::AccessibleScrollType aScrollType
) override
;
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */