1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SVX_IACCESSIBLEPARENT_HXX
21 #define INCLUDED_SVX_IACCESSIBLEPARENT_HXX
23 #include <com/sun/star/uno/Reference.hxx>
24 #include <tools/long.hxx>
26 namespace accessibility
{ class AccessibleControlShape
; }
27 namespace com::sun::star::accessibility
{ class XAccessible
; }
28 namespace com::sun::star::beans
{ class XPropertySet
; }
29 namespace com::sun::star::drawing
{ class XShape
; }
31 namespace accessibility
{
33 class AccessibleShape
;
34 class AccessibleShapeTreeInfo
;
36 /** This interface contains methods missing from the
37 XAccessibleContext interface that allow the modification of
38 parent/child relationship.
40 class IAccessibleParent
43 /** Allow for a virtual destructor.
45 virtual ~IAccessibleParent(){};
47 /** A call to this method requests the implementor to replace one child
48 with another and send the appropriate notifications. That are two
49 child events: One notifying the removal of the current child and one
50 about the existence of the new child. The index of the new child is
51 implementation dependent, i.e. it is not guaranteed that the
52 replacement has the same index as the current child has.
54 <p>A default implementation can just use the ShapeTypeHandler::CreateAccessibleObject
55 to let a factory create the new instance with the parameters given, and then
56 place the new shape into the own structures.</p>
59 This child is about to be replaced.
62 The UNO shape which the old and new child represent
65 The IndexInParent of the old child. Note that the index in
66 parent of the replacement is not necessarily the same as
67 that of the current child.
69 @param _rShapeTreeInfo
70 The TreeInfo for the old child.
73 If the replacement has taken place successfully <TRUE/> is
74 returned. If the replacement can not be carried out or an error
75 occurs that does not result in an exception then <FALSE/> is
78 @throws RuntimeException
79 in case something went heavily wrong
81 virtual bool ReplaceChild (
82 AccessibleShape
* pCurrentChild
,
83 const css::uno::Reference
< css::drawing::XShape
>& _rxShape
,
84 const tools::Long _nIndex
,
85 const AccessibleShapeTreeInfo
& _rShapeTreeInfo
87 //Add this method to support Form Controls
88 /// @throws css::uno::RuntimeException
89 virtual AccessibleControlShape
* GetAccControlShapeFromModel
90 (css::beans::XPropertySet
*){return nullptr;};
91 /// @throws css::uno::RuntimeException
92 virtual css::uno::Reference
<
93 css::accessibility::XAccessible
>
94 GetAccessibleCaption (const css::uno::Reference
<
95 css::drawing::XShape
>&){return nullptr;};
96 virtual bool IsDocumentSelAll(){ return false; }
99 } // end of namespace accessibility
103 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */