merge the formfield patch from ooo-build
[ooovba.git] / svx / source / accessibility / AccessibleShapeTreeInfo.cxx
blob576275ec384c085d0f9efa8e671b18a46571292c
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: AccessibleShapeTreeInfo.cxx,v $
10 * $Revision: 1.13 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_svx.hxx"
34 #include <svx/AccessibleShapeTreeInfo.hxx>
36 using namespace ::com::sun::star;
37 using namespace ::com::sun::star::accessibility;
38 using ::com::sun::star::uno::Reference;
40 namespace accessibility {
42 AccessibleShapeTreeInfo::AccessibleShapeTreeInfo (
43 const Reference<XAccessibleComponent>& rxDocumentWindow,
44 const Reference<document::XEventBroadcaster>& rxModelBroadcaster)
45 : mxDocumentWindow (rxDocumentWindow),
46 mxModelBroadcaster (rxModelBroadcaster),
47 mpView (NULL),
48 mpWindow (NULL),
49 mpViewForwarder (NULL)
51 // Empty.
57 AccessibleShapeTreeInfo::AccessibleShapeTreeInfo (void)
58 : mpView (NULL),
59 mpWindow (NULL),
60 mpViewForwarder (NULL)
62 // Empty.
68 AccessibleShapeTreeInfo::AccessibleShapeTreeInfo (const AccessibleShapeTreeInfo& rInfo)
69 : mxDocumentWindow (rInfo.mxDocumentWindow),
70 mxModelBroadcaster (rInfo.mxModelBroadcaster),
71 mpView (rInfo.mpView),
72 mxController (rInfo.mxController),
73 mpWindow (rInfo.mpWindow),
74 mpViewForwarder (rInfo.mpViewForwarder)
76 // Empty.
82 AccessibleShapeTreeInfo& AccessibleShapeTreeInfo::operator= (const AccessibleShapeTreeInfo& rInfo)
84 if ( this != &rInfo )
86 mxDocumentWindow = rInfo.mxDocumentWindow;
87 mxModelBroadcaster = rInfo.mxModelBroadcaster;
88 mpView = rInfo.mpView;
89 mxController = rInfo.mxController,
90 mpWindow = rInfo.mpWindow;
91 mpViewForwarder = rInfo.mpViewForwarder;
93 return *this;
99 AccessibleShapeTreeInfo::~AccessibleShapeTreeInfo (void)
101 //empty
107 void AccessibleShapeTreeInfo::SetDocumentWindow (
108 const Reference<XAccessibleComponent>& rxDocumentWindow)
110 if (mxDocumentWindow != rxDocumentWindow)
111 mxDocumentWindow = rxDocumentWindow;
117 uno::Reference<XAccessibleComponent>
118 AccessibleShapeTreeInfo::GetDocumentWindow (void) const
120 return mxDocumentWindow;
126 void AccessibleShapeTreeInfo::SetControllerBroadcaster (
127 const uno::Reference<document::XEventBroadcaster>& rxControllerBroadcaster)
129 mxModelBroadcaster = rxControllerBroadcaster;
135 uno::Reference<document::XEventBroadcaster>
136 AccessibleShapeTreeInfo::GetControllerBroadcaster (void) const
138 return mxModelBroadcaster;
144 void AccessibleShapeTreeInfo::SetModelBroadcaster (
145 const Reference<document::XEventBroadcaster>& rxModelBroadcaster)
147 mxModelBroadcaster = rxModelBroadcaster;
153 Reference<document::XEventBroadcaster>
154 AccessibleShapeTreeInfo::GetModelBroadcaster (void) const
156 return mxModelBroadcaster;
162 void AccessibleShapeTreeInfo::SetSdrView (SdrView* pView)
164 mpView = pView;
170 SdrView* AccessibleShapeTreeInfo::GetSdrView (void) const
172 return mpView;
178 void AccessibleShapeTreeInfo::SetController (
179 const Reference<frame::XController>& rxController)
181 mxController = rxController;
187 Reference<frame::XController>
188 AccessibleShapeTreeInfo::GetController (void) const
190 return mxController;
196 void AccessibleShapeTreeInfo::SetWindow (Window* pWindow)
198 mpWindow = pWindow;
204 Window* AccessibleShapeTreeInfo::GetWindow (void) const
206 return mpWindow;
212 void AccessibleShapeTreeInfo::SetViewForwarder (const IAccessibleViewForwarder* pViewForwarder)
214 mpViewForwarder = pViewForwarder;
220 const IAccessibleViewForwarder* AccessibleShapeTreeInfo::GetViewForwarder (void) const
222 return mpViewForwarder;
226 } // end of namespace accessibility