1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 // MARKER(update_precomp.py): autogen include statement, do not remove
29 #include "precompiled_svx.hxx"
30 
31 #include <svx/AccessibleShapeTreeInfo.hxx>
32 
33 using namespace ::com::sun::star;
34 using namespace ::com::sun::star::accessibility;
35 using ::com::sun::star::uno::Reference;
36 
37 namespace accessibility {
38 
39 AccessibleShapeTreeInfo::AccessibleShapeTreeInfo (
40     const Reference<XAccessibleComponent>& rxDocumentWindow,
41     const Reference<document::XEventBroadcaster>& rxModelBroadcaster)
42     : mxDocumentWindow (rxDocumentWindow),
43       mxModelBroadcaster (rxModelBroadcaster),
44       mpView (NULL),
45       mpWindow (NULL),
46       mpViewForwarder (NULL)
47 {
48     // Empty.
49 }
50 
51 
52 
53 
54 AccessibleShapeTreeInfo::AccessibleShapeTreeInfo (void)
55     : mpView (NULL),
56       mpWindow (NULL),
57       mpViewForwarder (NULL)
58 {
59     // Empty.
60 }
61 
62 
63 
64 
65 AccessibleShapeTreeInfo::AccessibleShapeTreeInfo (const AccessibleShapeTreeInfo& rInfo)
66     : mxDocumentWindow (rInfo.mxDocumentWindow),
67       mxModelBroadcaster (rInfo.mxModelBroadcaster),
68       mpView (rInfo.mpView),
69       mxController (rInfo.mxController),
70       mpWindow (rInfo.mpWindow),
71       mpViewForwarder (rInfo.mpViewForwarder)
72 {
73     // Empty.
74 }
75 
76 
77 
78 
79 AccessibleShapeTreeInfo& AccessibleShapeTreeInfo::operator= (const AccessibleShapeTreeInfo& rInfo)
80 {
81 	if ( this != &rInfo )
82 	{
83 		mxDocumentWindow = rInfo.mxDocumentWindow;
84 		mxModelBroadcaster = rInfo.mxModelBroadcaster;
85 		mpView = rInfo.mpView;
86 		mxController = rInfo.mxController,
87 		mpWindow = rInfo.mpWindow;
88 		mpViewForwarder = rInfo.mpViewForwarder;
89 	}
90     return *this;
91 }
92 
93 
94 
95 
96 AccessibleShapeTreeInfo::~AccessibleShapeTreeInfo (void)
97 {
98     //empty
99 }
100 
101 
102 
103 
104 void AccessibleShapeTreeInfo::SetDocumentWindow (
105     const Reference<XAccessibleComponent>& rxDocumentWindow)
106 {
107     if (mxDocumentWindow != rxDocumentWindow)
108         mxDocumentWindow = rxDocumentWindow;
109 }
110 
111 
112 
113 
114 uno::Reference<XAccessibleComponent>
115     AccessibleShapeTreeInfo::GetDocumentWindow (void) const
116 {
117     return mxDocumentWindow;
118 }
119 
120 
121 
122 
123 void AccessibleShapeTreeInfo::SetControllerBroadcaster (
124     const uno::Reference<document::XEventBroadcaster>& rxControllerBroadcaster)
125 {
126     mxModelBroadcaster = rxControllerBroadcaster;
127 }
128 
129 
130 
131 
132 uno::Reference<document::XEventBroadcaster>
133     AccessibleShapeTreeInfo::GetControllerBroadcaster (void) const
134 {
135     return mxModelBroadcaster;
136 }
137 
138 
139 
140 
141 void AccessibleShapeTreeInfo::SetModelBroadcaster (
142     const Reference<document::XEventBroadcaster>& rxModelBroadcaster)
143 {
144     mxModelBroadcaster = rxModelBroadcaster;
145 }
146 
147 
148 
149 
150 Reference<document::XEventBroadcaster>
151         AccessibleShapeTreeInfo::GetModelBroadcaster (void) const
152 {
153     return mxModelBroadcaster;
154 }
155 
156 
157 
158 
159 void AccessibleShapeTreeInfo::SetSdrView (SdrView* pView)
160 {
161     mpView = pView;
162 }
163 
164 
165 
166 
167 SdrView* AccessibleShapeTreeInfo::GetSdrView (void) const
168 {
169     return mpView;
170 }
171 
172 
173 
174 
175 void AccessibleShapeTreeInfo::SetController (
176     const Reference<frame::XController>& rxController)
177 {
178     mxController = rxController;
179 }
180 
181 
182 
183 
184 Reference<frame::XController>
185     AccessibleShapeTreeInfo::GetController (void) const
186 {
187     return mxController;
188 }
189 
190 
191 
192 
193 void AccessibleShapeTreeInfo::SetWindow (Window* pWindow)
194 {
195     mpWindow = pWindow;
196 }
197 
198 
199 
200 
201 Window* AccessibleShapeTreeInfo::GetWindow (void) const
202 {
203     return mpWindow;
204 }
205 
206 
207 
208 
209 void AccessibleShapeTreeInfo::SetViewForwarder (const IAccessibleViewForwarder* pViewForwarder)
210 {
211     mpViewForwarder = pViewForwarder;
212 }
213 
214 
215 
216 
217 const IAccessibleViewForwarder* AccessibleShapeTreeInfo::GetViewForwarder (void) const
218 {
219     return mpViewForwarder;
220 }
221 
222 
223 } // end of namespace accessibility
224