1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: AccessibleShapeTreeInfo.cxx,v $
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
),
49 mpViewForwarder (NULL
)
57 AccessibleShapeTreeInfo::AccessibleShapeTreeInfo (void)
60 mpViewForwarder (NULL
)
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
)
82 AccessibleShapeTreeInfo
& AccessibleShapeTreeInfo::operator= (const AccessibleShapeTreeInfo
& 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
;
99 AccessibleShapeTreeInfo::~AccessibleShapeTreeInfo (void)
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
)
170 SdrView
* AccessibleShapeTreeInfo::GetSdrView (void) const
178 void AccessibleShapeTreeInfo::SetController (
179 const Reference
<frame::XController
>& rxController
)
181 mxController
= rxController
;
187 Reference
<frame::XController
>
188 AccessibleShapeTreeInfo::GetController (void) const
196 void AccessibleShapeTreeInfo::SetWindow (Window
* pWindow
)
204 Window
* AccessibleShapeTreeInfo::GetWindow (void) const
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