Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 : : #ifndef ACCESSIBILITY_EXT_ACCESSIBILEBROWSEBOXTABLECELL_HXX
20 : : #define ACCESSIBILITY_EXT_ACCESSIBILEBROWSEBOXTABLECELL_HXX
21 : :
22 : : #include "accessibility/extended/accessiblebrowseboxcell.hxx"
23 : : #include <comphelper/accessibletexthelper.hxx>
24 : : #include <cppuhelper/implbase2.hxx>
25 : :
26 : : namespace accessibility
27 : : {
28 : : typedef ::cppu::ImplHelper2 < ::com::sun::star::accessibility::XAccessibleText
29 : : , ::com::sun::star::accessibility::XAccessible
30 : : > AccessibleTextHelper_BASE;
31 : :
32 : : // implementation of a table cell of BrowseBox
33 [ # # ][ # # ]: 0 : class AccessibleBrowseBoxTableCell :public AccessibleBrowseBoxCell
34 : : ,public AccessibleTextHelper_BASE
35 : : ,public ::comphelper::OCommonAccessibleText
36 : : {
37 : : private:
38 : : sal_Int32 m_nOffset;
39 : :
40 : : protected:
41 : : // OCommonAccessibleText
42 : : virtual ::rtl::OUString implGetText();
43 : : virtual ::com::sun::star::lang::Locale implGetLocale();
44 : : virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex );
45 : :
46 : : public:
47 : : AccessibleBrowseBoxTableCell( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
48 : : ::svt::IAccessibleTableProvider& _rBrowseBox,
49 : : const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow,
50 : : sal_Int32 _nRowId,
51 : : sal_uInt16 _nColId,
52 : : sal_Int32 _nOffset );
53 : :
54 : : void nameChanged( const ::rtl::OUString& rNewName, const ::rtl::OUString& rOldName );
55 : :
56 : : // XInterface -------------------------------------------------------------
57 : :
58 : : /** Queries for a new interface. */
59 : : ::com::sun::star::uno::Any SAL_CALL queryInterface(
60 : : const ::com::sun::star::uno::Type& rType )
61 : : throw ( ::com::sun::star::uno::RuntimeException );
62 : :
63 : : /** Aquires the object (calls acquire() on base class). */
64 : : virtual void SAL_CALL acquire() throw ();
65 : :
66 : : /** Releases the object (calls release() on base class). */
67 : : virtual void SAL_CALL release() throw ();
68 : :
69 : : // XEventListener
70 : : using AccessibleBrowseBoxBase::disposing;
71 : : virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source )
72 : : throw(::com::sun::star::uno::RuntimeException);
73 : :
74 : : /** @return The index of this object among the parent's children. */
75 : : virtual sal_Int32 SAL_CALL getAccessibleIndexInParent()
76 : : throw ( ::com::sun::star::uno::RuntimeException );
77 : :
78 : : /** @return
79 : : The name of this class.
80 : : */
81 : : virtual ::rtl::OUString SAL_CALL getImplementationName()
82 : : throw ( ::com::sun::star::uno::RuntimeException );
83 : :
84 : : /** @return
85 : : The count of visible children.
86 : : */
87 : : virtual sal_Int32 SAL_CALL getAccessibleChildCount()
88 : : throw ( ::com::sun::star::uno::RuntimeException );
89 : :
90 : : /** @return
91 : : The XAccessible interface of the specified child.
92 : : */
93 : : virtual ::com::sun::star::uno::Reference<
94 : : ::com::sun::star::accessibility::XAccessible > SAL_CALL
95 : : getAccessibleChild( sal_Int32 nChildIndex )
96 : : throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
97 : : ::com::sun::star::uno::RuntimeException );
98 : :
99 : : /** Creates a new AccessibleStateSetHelper and fills it with states of the
100 : : current object.
101 : : @return
102 : : A filled AccessibleStateSetHelper.
103 : : */
104 : : ::utl::AccessibleStateSetHelper* implCreateStateSetHelper();
105 : :
106 : : // XAccessible ------------------------------------------------------------
107 : :
108 : : /** @return The XAccessibleContext interface of this object. */
109 : : virtual ::com::sun::star::uno::Reference<
110 : : ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL
111 : : getAccessibleContext()
112 : : throw ( ::com::sun::star::uno::RuntimeException );
113 : :
114 : : // XAccessibleText
115 : : virtual sal_Int32 SAL_CALL getCaretPosition() throw (::com::sun::star::uno::RuntimeException);
116 : : virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
117 : : virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
118 : : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
119 : : virtual ::com::sun::star::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
120 : : virtual sal_Int32 SAL_CALL getCharacterCount() throw (::com::sun::star::uno::RuntimeException);
121 : : virtual sal_Int32 SAL_CALL getIndexAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
122 : : virtual ::rtl::OUString SAL_CALL getSelectedText() throw (::com::sun::star::uno::RuntimeException);
123 : : virtual sal_Int32 SAL_CALL getSelectionStart() throw (::com::sun::star::uno::RuntimeException);
124 : : virtual sal_Int32 SAL_CALL getSelectionEnd() throw (::com::sun::star::uno::RuntimeException);
125 : : virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
126 : : virtual ::rtl::OUString SAL_CALL getText() throw (::com::sun::star::uno::RuntimeException);
127 : : virtual ::rtl::OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
128 : : virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
129 : : virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
130 : : virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
131 : : virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
132 : : };
133 : : }
134 : : #endif // ACCESSIBILITY_EXT_ACCESSIBILEBROWSEBOXTABLECELL_HXX
135 : :
136 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|