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