xref: /trunk/main/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx (revision 91144cd0085a7583d2099b982122deb2184ab956)
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 
65     virtual void SAL_CALL grabFocus(  );
66 
67     ///=====  XAccessibleContext  ==============================================
68 
69     /// Return the number of currently visible children.
70     virtual sal_Int32 SAL_CALL
71         getAccessibleChildCount(void);
72 
73     /// Return the specified child or NULL if index is invalid.
74     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
75         getAccessibleChild(sal_Int32 nIndex);
76 
77     /// Return the set of current states.
78     virtual ::com::sun::star::uno::Reference<
79             ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL
80         getAccessibleStateSet(void);
81 
82     virtual ::rtl::OUString SAL_CALL getAccessibleName(void);
83     ///=====  XServiceInfo  ====================================================
84 
85     /** Returns an identifier for the implementation of this object.
86     */
87     virtual ::rtl::OUString SAL_CALL
88         getImplementationName(void);
89 
90     /** Returns a list of all supported services.
91     */
92     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
93         getSupportedServiceNames(void);
94 
95     ///=====  XTypeProvider  ===================================================
96 
97     /** Returns a implementation id.
98     */
99     virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
100         getImplementationId(void);
101 
102     ///=====  internal  ========================================================
103 
104 //UNUSED2009-05 com::sun::star::uno::Reference < com::sun::star::accessibility::XAccessible >
105 //UNUSED2009-05     GetCurrentAccessibleTable();
106 
107 //UNUSED2009-05 void ChildCountChanged();
108 
109 protected:
110     /// Return this object's description.
111     virtual ::rtl::OUString SAL_CALL
112         createAccessibleDescription(void);
113 
114     /// Return the object's current name.
115     virtual ::rtl::OUString SAL_CALL
116         createAccessibleName(void);
117 
118 public: // needed in ScShapeChilds
119     /// Return the object's current bounding box relative to the desktop.
120     virtual Rectangle GetBoundingBoxOnScreen(void) const;
121 
122 protected:
123     /// Return the object's current bounding box relative to the parent object.
124     virtual Rectangle GetBoundingBox(void) const;
125 
126 private:
127     ScPreviewShell* mpViewShell;
128     ScNotesChilds* mpNotesChilds;
129     ScShapeChilds* mpShapeChilds;
130     ScAccessiblePreviewTable* mpTable;
131     ScAccessiblePageHeader* mpHeader;
132     ScAccessiblePageHeader* mpFooter;
133 
134     sal_Bool IsDefunc(
135         const com::sun::star::uno::Reference<
136         ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
137 
138     ScNotesChilds* GetNotesChilds();
139     ScShapeChilds* GetShapeChilds();
140 };
141 
142 
143 #endif
144