xref: /AOO41X/main/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx (revision 4d7c9de063a797b8b4f3d45e3561e82ad1f8ef1f)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 
25 #ifndef _SC_ACCESSIBLEDOCUMENTPAGEPREVIEW_HXX
26 #define _SC_ACCESSIBLEDOCUMENTPAGEPREVIEW_HXX
27 
28 #include "AccessibleDocumentBase.hxx"
29 
30 class ScPreviewShell;
31 class ScNotesChilds;
32 class ScShapeChilds;
33 class ScAccessiblePreviewTable;
34 class ScAccessiblePageHeader;
35 
36 class ScAccessibleDocumentPagePreview
37     :   public ScAccessibleDocumentBase
38 {
39 public:
40     //=====  internal  ========================================================
41     ScAccessibleDocumentPagePreview(
42         const ::com::sun::star::uno::Reference<
43             ::com::sun::star::accessibility::XAccessible>& rxParent,
44         ScPreviewShell* pViewShell );
45 protected:
46     virtual ~ScAccessibleDocumentPagePreview(void);
47 
48     using ScAccessibleDocumentBase::IsDefunc;
49 
50 public:
51     using ScAccessibleContextBase::disposing;
52 
53     virtual void SAL_CALL disposing();
54 
55    ///=====  SfxListener  =====================================================
56 
57     virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
58 
59     ///=====  XAccessibleComponent  ============================================
60 
61     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
62         SAL_CALL getAccessibleAtPoint(
63         const ::com::sun::star::awt::Point& rPoint )
64         throw (::com::sun::star::uno::RuntimeException);
65 
66     virtual void SAL_CALL grabFocus(  )
67         throw (::com::sun::star::uno::RuntimeException);
68 
69     ///=====  XAccessibleContext  ==============================================
70 
71     /// Return the number of currently visible children.
72     virtual sal_Int32 SAL_CALL
73         getAccessibleChildCount(void)
74         throw (::com::sun::star::uno::RuntimeException);
75 
76     /// Return the specified child or NULL if index is invalid.
77     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
78         getAccessibleChild(sal_Int32 nIndex)
79         throw (::com::sun::star::uno::RuntimeException,
80                 ::com::sun::star::lang::IndexOutOfBoundsException);
81 
82     /// Return the set of current states.
83     virtual ::com::sun::star::uno::Reference<
84             ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL
85         getAccessibleStateSet(void)
86         throw (::com::sun::star::uno::RuntimeException);
87 
88     virtual ::rtl::OUString SAL_CALL getAccessibleName(void)
89         throw (::com::sun::star::uno::RuntimeException);
90     ///=====  XServiceInfo  ====================================================
91 
92     /** Returns an identifier for the implementation of this object.
93     */
94     virtual ::rtl::OUString SAL_CALL
95         getImplementationName(void)
96         throw (::com::sun::star::uno::RuntimeException);
97 
98     /** Returns a list of all supported services.
99     */
100     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
101         getSupportedServiceNames(void)
102         throw (::com::sun::star::uno::RuntimeException);
103 
104     ///=====  XTypeProvider  ===================================================
105 
106     /** Returns a implementation id.
107     */
108     virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
109         getImplementationId(void)
110         throw (::com::sun::star::uno::RuntimeException);
111 
112     ///=====  internal  ========================================================
113 
114 //UNUSED2009-05 com::sun::star::uno::Reference < com::sun::star::accessibility::XAccessible >
115 //UNUSED2009-05     GetCurrentAccessibleTable();
116 
117 //UNUSED2009-05 void ChildCountChanged();
118 
119 protected:
120     /// Return this object's description.
121     virtual ::rtl::OUString SAL_CALL
122         createAccessibleDescription(void)
123         throw (::com::sun::star::uno::RuntimeException);
124 
125     /// Return the object's current name.
126     virtual ::rtl::OUString SAL_CALL
127         createAccessibleName(void)
128         throw (::com::sun::star::uno::RuntimeException);
129 
130 public: // needed in ScShapeChilds
131     /// Return the object's current bounding box relative to the desktop.
132     virtual Rectangle GetBoundingBoxOnScreen(void) const
133         throw (::com::sun::star::uno::RuntimeException);
134 
135 protected:
136     /// Return the object's current bounding box relative to the parent object.
137     virtual Rectangle GetBoundingBox(void) const
138         throw (::com::sun::star::uno::RuntimeException);
139 
140 private:
141     ScPreviewShell* mpViewShell;
142     ScNotesChilds* mpNotesChilds;
143     ScShapeChilds* mpShapeChilds;
144     ScAccessiblePreviewTable* mpTable;
145     ScAccessiblePageHeader* mpHeader;
146     ScAccessiblePageHeader* mpFooter;
147 
148     sal_Bool IsDefunc(
149         const com::sun::star::uno::Reference<
150         ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
151 
152     ScNotesChilds* GetNotesChilds();
153     ScShapeChilds* GetShapeChilds();
154 };
155 
156 
157 #endif
158