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 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_svx.hxx"
26
27 #include <svx/AccessibleShapeTreeInfo.hxx>
28
29 using namespace ::com::sun::star;
30 using namespace ::com::sun::star::accessibility;
31 using ::com::sun::star::uno::Reference;
32
33 namespace accessibility {
34
AccessibleShapeTreeInfo(const Reference<XAccessibleComponent> & rxDocumentWindow,const Reference<document::XEventBroadcaster> & rxModelBroadcaster)35 AccessibleShapeTreeInfo::AccessibleShapeTreeInfo (
36 const Reference<XAccessibleComponent>& rxDocumentWindow,
37 const Reference<document::XEventBroadcaster>& rxModelBroadcaster)
38 : mxDocumentWindow (rxDocumentWindow),
39 mxModelBroadcaster (rxModelBroadcaster),
40 mpView (NULL),
41 mpWindow (NULL),
42 mpViewForwarder (NULL)
43 {
44 // Empty.
45 }
46
47
48
49
AccessibleShapeTreeInfo(void)50 AccessibleShapeTreeInfo::AccessibleShapeTreeInfo (void)
51 : mpView (NULL),
52 mpWindow (NULL),
53 mpViewForwarder (NULL)
54 {
55 // Empty.
56 }
57
58
59
60
AccessibleShapeTreeInfo(const AccessibleShapeTreeInfo & rInfo)61 AccessibleShapeTreeInfo::AccessibleShapeTreeInfo (const AccessibleShapeTreeInfo& rInfo)
62 : mxDocumentWindow (rInfo.mxDocumentWindow),
63 mxModelBroadcaster (rInfo.mxModelBroadcaster),
64 mpView (rInfo.mpView),
65 mxController (rInfo.mxController),
66 mpWindow (rInfo.mpWindow),
67 mpViewForwarder (rInfo.mpViewForwarder)
68 {
69 // Empty.
70 }
71
72
73
74
operator =(const AccessibleShapeTreeInfo & rInfo)75 AccessibleShapeTreeInfo& AccessibleShapeTreeInfo::operator= (const AccessibleShapeTreeInfo& rInfo)
76 {
77 if ( this != &rInfo )
78 {
79 mxDocumentWindow = rInfo.mxDocumentWindow;
80 mxModelBroadcaster = rInfo.mxModelBroadcaster;
81 mpView = rInfo.mpView;
82 mxController = rInfo.mxController,
83 mpWindow = rInfo.mpWindow;
84 mpViewForwarder = rInfo.mpViewForwarder;
85 }
86 return *this;
87 }
88
89
90
91
~AccessibleShapeTreeInfo(void)92 AccessibleShapeTreeInfo::~AccessibleShapeTreeInfo (void)
93 {
94 //empty
95 }
96
97
98
99
SetDocumentWindow(const Reference<XAccessibleComponent> & rxDocumentWindow)100 void AccessibleShapeTreeInfo::SetDocumentWindow (
101 const Reference<XAccessibleComponent>& rxDocumentWindow)
102 {
103 if (mxDocumentWindow != rxDocumentWindow)
104 mxDocumentWindow = rxDocumentWindow;
105 }
106
107
108
109
110 uno::Reference<XAccessibleComponent>
GetDocumentWindow(void) const111 AccessibleShapeTreeInfo::GetDocumentWindow (void) const
112 {
113 return mxDocumentWindow;
114 }
115
116
117
118
SetControllerBroadcaster(const uno::Reference<document::XEventBroadcaster> & rxControllerBroadcaster)119 void AccessibleShapeTreeInfo::SetControllerBroadcaster (
120 const uno::Reference<document::XEventBroadcaster>& rxControllerBroadcaster)
121 {
122 mxModelBroadcaster = rxControllerBroadcaster;
123 }
124
125
126
127
128 uno::Reference<document::XEventBroadcaster>
GetControllerBroadcaster(void) const129 AccessibleShapeTreeInfo::GetControllerBroadcaster (void) const
130 {
131 return mxModelBroadcaster;
132 }
133
134
135
136
SetModelBroadcaster(const Reference<document::XEventBroadcaster> & rxModelBroadcaster)137 void AccessibleShapeTreeInfo::SetModelBroadcaster (
138 const Reference<document::XEventBroadcaster>& rxModelBroadcaster)
139 {
140 mxModelBroadcaster = rxModelBroadcaster;
141 }
142
143
144
145
146 Reference<document::XEventBroadcaster>
GetModelBroadcaster(void) const147 AccessibleShapeTreeInfo::GetModelBroadcaster (void) const
148 {
149 return mxModelBroadcaster;
150 }
151
152
153
154
SetSdrView(SdrView * pView)155 void AccessibleShapeTreeInfo::SetSdrView (SdrView* pView)
156 {
157 mpView = pView;
158 }
159
160
161
162
GetSdrView(void) const163 SdrView* AccessibleShapeTreeInfo::GetSdrView (void) const
164 {
165 return mpView;
166 }
167
168
169
170
SetController(const Reference<frame::XController> & rxController)171 void AccessibleShapeTreeInfo::SetController (
172 const Reference<frame::XController>& rxController)
173 {
174 mxController = rxController;
175 }
176
177
178
179
180 Reference<frame::XController>
GetController(void) const181 AccessibleShapeTreeInfo::GetController (void) const
182 {
183 return mxController;
184 }
185
186
187
188
SetWindow(Window * pWindow)189 void AccessibleShapeTreeInfo::SetWindow (Window* pWindow)
190 {
191 mpWindow = pWindow;
192 }
193
194
195
196
GetWindow(void) const197 Window* AccessibleShapeTreeInfo::GetWindow (void) const
198 {
199 return mpWindow;
200 }
201
202
203
204
SetViewForwarder(const IAccessibleViewForwarder * pViewForwarder)205 void AccessibleShapeTreeInfo::SetViewForwarder (const IAccessibleViewForwarder* pViewForwarder)
206 {
207 mpViewForwarder = pViewForwarder;
208 }
209
210
211
212
GetViewForwarder(void) const213 const IAccessibleViewForwarder* AccessibleShapeTreeInfo::GetViewForwarder (void) const
214 {
215 return mpViewForwarder;
216 }
217
218
219 } // end of namespace accessibility
220