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 :
20 : #ifndef INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEBROWSEBOXCELL_HXX
21 : #define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEBROWSEBOXCELL_HXX
22 :
23 : #include "accessibility/extended/AccessibleBrowseBoxBase.hxx"
24 : #include <svtools/AccessibleBrowseBoxObjType.hxx>
25 :
26 :
27 : namespace accessibility
28 : {
29 :
30 :
31 :
32 : // = AccessibleBrowseBoxCell
33 :
34 : /** common accessibility-functionality for browse box elements which occupy a cell
35 : */
36 : class AccessibleBrowseBoxCell : public AccessibleBrowseBoxBase
37 : {
38 : private:
39 : sal_Int32 m_nRowPos; // the row number of the table cell
40 : sal_uInt16 m_nColPos; // the column id of the table cell
41 :
42 : protected:
43 : // attribute access
44 0 : inline sal_Int32 getRowPos( ) const { return m_nRowPos; }
45 0 : inline sal_Int32 getColumnPos( ) const { return m_nColPos; }
46 :
47 : protected:
48 : // AccessibleBrowseBoxBase overridables
49 : virtual Rectangle implGetBoundingBox() SAL_OVERRIDE;
50 : virtual Rectangle implGetBoundingBoxOnScreen() SAL_OVERRIDE;
51 :
52 : // XAccessibleComponent
53 : virtual void SAL_CALL grabFocus() throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
54 :
55 : protected:
56 : AccessibleBrowseBoxCell(
57 : const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
58 : ::svt::IAccessibleTableProvider& _rBrowseBox,
59 : const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow,
60 : sal_Int32 _nRowPos,
61 : sal_uInt16 _nColPos,
62 : ::svt::AccessibleBrowseBoxObjType _eType = ::svt::BBTYPE_TABLECELL
63 : );
64 :
65 : virtual ~AccessibleBrowseBoxCell();
66 :
67 : private:
68 : AccessibleBrowseBoxCell( const AccessibleBrowseBoxCell& ) SAL_DELETED_FUNCTION;
69 : AccessibleBrowseBoxCell& operator=( const AccessibleBrowseBoxCell& ) SAL_DELETED_FUNCTION;
70 : };
71 :
72 :
73 : } // namespace accessibility
74 :
75 :
76 :
77 : #endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEBROWSEBOXCELL_HXX
78 :
79 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|