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 #include <svx/ChildrenManager.hxx>
21 #include "ChildrenManagerImpl.hxx"
22 #include <svx/AccessibleShape.hxx>
23 #include <sal/log.hxx>
25 using namespace ::com::sun::star
;
26 using namespace ::com::sun::star::accessibility
;
27 using ::com::sun::star::uno::Reference
;
29 namespace accessibility
{
31 // AccessibleChildrenManager
32 ChildrenManager::ChildrenManager (
33 const css::uno::Reference
<XAccessible
>& rxParent
,
34 const css::uno::Reference
<drawing::XShapes
>& rxShapeList
,
35 const AccessibleShapeTreeInfo
& rShapeTreeInfo
,
36 AccessibleContextBase
& rContext
)
38 new ChildrenManagerImpl(
39 rxParent
, rxShapeList
, rShapeTreeInfo
, rContext
))
45 ChildrenManager::~ChildrenManager()
50 SAL_INFO("svx", "~ChildrenManager");
53 long ChildrenManager::GetChildCount() const throw ()
55 return mpImpl
->GetChildCount();
58 css::uno::Reference
<XAccessible
> ChildrenManager::GetChild (long nIndex
)
60 return mpImpl
->GetChild (nIndex
);
63 Reference
<XAccessible
> ChildrenManager::GetChild (const Reference
<drawing::XShape
>& xShape
)
65 return mpImpl
->GetChild (xShape
);
68 css::uno::Reference
<css::drawing::XShape
> ChildrenManager::GetChildShape(long nIndex
)
70 return mpImpl
->GetChildShape(nIndex
);
73 void ChildrenManager::Update (bool bCreateNewObjectsOnDemand
)
75 mpImpl
->Update (bCreateNewObjectsOnDemand
);
78 void ChildrenManager::SetShapeList (const css::uno::Reference
<css::drawing::XShapes
>& xShapeList
)
80 mpImpl
->SetShapeList (xShapeList
);
83 void ChildrenManager::AddAccessibleShape (css::uno::Reference
<css::accessibility::XAccessible
> const & shape
)
85 mpImpl
->AddAccessibleShape (shape
);
88 void ChildrenManager::ClearAccessibleShapeList()
90 mpImpl
->ClearAccessibleShapeList ();
93 void ChildrenManager::SetInfo (AccessibleShapeTreeInfo
const & rShapeTreeInfo
)
95 mpImpl
->SetInfo (rShapeTreeInfo
);
98 void ChildrenManager::UpdateSelection()
100 mpImpl
->UpdateSelection ();
103 bool ChildrenManager::HasFocus() const
105 return mpImpl
->HasFocus ();
108 void ChildrenManager::RemoveFocus()
110 mpImpl
->RemoveFocus ();
113 // IAccessibleViewForwarderListener
114 void ChildrenManager::ViewForwarderChanged()
116 mpImpl
->ViewForwarderChanged();
119 } // end of namespace accessibility
121 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */