LCOV - code coverage report
Current view: top level - svx/source/accessibility - ChildrenManager.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 32 45 71.1 %
Date: 2014-11-03 Functions: 11 16 68.8 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : 
      20             : #include <svx/ChildrenManager.hxx>
      21             : #include "ChildrenManagerImpl.hxx"
      22             : #include <svx/AccessibleShape.hxx>
      23             : 
      24             : using namespace ::com::sun::star;
      25             : using namespace ::com::sun::star::accessibility;
      26             : using ::com::sun::star::uno::Reference;
      27             : 
      28             : namespace accessibility {
      29             : 
      30             : // AccessibleChildrenManager
      31           6 : ChildrenManager::ChildrenManager (
      32             :     const ::com::sun::star::uno::Reference<XAccessible>& rxParent,
      33             :     const ::com::sun::star::uno::Reference<drawing::XShapes>& rxShapeList,
      34             :     const AccessibleShapeTreeInfo& rShapeTreeInfo,
      35             :     AccessibleContextBase& rContext)
      36           6 :     : mpImpl (NULL)
      37             : {
      38           6 :     mpImpl = new ChildrenManagerImpl (rxParent, rxShapeList, rShapeTreeInfo, rContext);
      39           6 :     if (mpImpl != NULL)
      40           6 :         mpImpl->Init ();
      41             :     else
      42             :         throw uno::RuntimeException(
      43           0 :             "ChildrenManager::ChildrenManager can't create implementation object", NULL);
      44           6 : }
      45             : 
      46             : 
      47             : 
      48             : 
      49          18 : ChildrenManager::~ChildrenManager (void)
      50             : {
      51           6 :     if (mpImpl != NULL)
      52           6 :         mpImpl->dispose();
      53             : 
      54             :     // emtpy
      55             :     OSL_TRACE ("~ChildrenManager");
      56          12 : }
      57             : 
      58          34 : long ChildrenManager::GetChildCount (void) const throw ()
      59             : {
      60             :     assert(mpImpl != NULL);
      61          34 :     return mpImpl->GetChildCount();
      62             : }
      63             : 
      64          14 : ::com::sun::star::uno::Reference<XAccessible> ChildrenManager::GetChild (long nIndex)
      65             :     throw (::com::sun::star::uno::RuntimeException,
      66             :            ::com::sun::star::lang::IndexOutOfBoundsException)
      67             : {
      68             :     assert(mpImpl != NULL);
      69          14 :     return mpImpl->GetChild (nIndex);
      70             : }
      71             : 
      72           0 : Reference<XAccessible> ChildrenManager::GetChild (const Reference<drawing::XShape>& xShape)
      73             :     throw (::com::sun::star::uno::RuntimeException)
      74             : {
      75             :     assert(mpImpl != NULL);
      76           0 :     return mpImpl->GetChild (xShape);
      77             : }
      78             : 
      79             : ::com::sun::star::uno::Reference<
      80           0 :         ::com::sun::star::drawing::XShape> ChildrenManager::GetChildShape(long nIndex)
      81             :     throw (::com::sun::star::uno::RuntimeException,
      82             :            ::com::sun::star::lang::IndexOutOfBoundsException)
      83             : {
      84             :     assert(mpImpl != NULL);
      85           0 :     return mpImpl->GetChildShape(nIndex);
      86             : }
      87             : 
      88          14 : void ChildrenManager::Update (bool bCreateNewObjectsOnDemand)
      89             : {
      90             :     assert(mpImpl != NULL);
      91          14 :     mpImpl->Update (bCreateNewObjectsOnDemand);
      92          14 : }
      93             : 
      94           8 : void ChildrenManager::SetShapeList (const ::com::sun::star::uno::Reference<
      95             :     ::com::sun::star::drawing::XShapes>& xShapeList)
      96             : {
      97             :     assert(mpImpl != NULL);
      98           8 :     mpImpl->SetShapeList (xShapeList);
      99           8 : }
     100             : 
     101          14 : void ChildrenManager::AddAccessibleShape (css::uno::Reference<css::accessibility::XAccessible> const & shape)
     102             : {
     103             :     assert(mpImpl != NULL);
     104          14 :     mpImpl->AddAccessibleShape (shape);
     105          14 : }
     106             : 
     107           8 : void ChildrenManager::ClearAccessibleShapeList (void)
     108             : {
     109             :     assert(mpImpl != NULL);
     110           8 :     mpImpl->ClearAccessibleShapeList ();
     111           8 : }
     112             : 
     113           0 : void ChildrenManager::SetInfo (AccessibleShapeTreeInfo& rShapeTreeInfo)
     114             : {
     115             :     assert(mpImpl != NULL);
     116           0 :     mpImpl->SetInfo (rShapeTreeInfo);
     117           0 : }
     118             : 
     119           6 : void ChildrenManager::UpdateSelection (void)
     120             : {
     121             :     assert(mpImpl != NULL);
     122           6 :     mpImpl->UpdateSelection ();
     123           6 : }
     124             : 
     125           0 : bool ChildrenManager::HasFocus (void)
     126             : {
     127             :     assert(mpImpl != NULL);
     128           0 :     return mpImpl->HasFocus ();
     129             : }
     130             : 
     131           0 : void ChildrenManager::RemoveFocus (void)
     132             : {
     133             :     assert(mpImpl != NULL);
     134           0 :     mpImpl->RemoveFocus ();
     135           0 : }
     136             : 
     137             : // IAccessibleViewForwarderListener
     138          28 : void ChildrenManager::ViewForwarderChanged (ChangeType aChangeType,
     139             :         const IAccessibleViewForwarder* pViewForwarder)
     140             : {
     141             :     assert(mpImpl != NULL);
     142          28 :     mpImpl->ViewForwarderChanged (aChangeType, pViewForwarder);
     143          28 : }
     144             : 
     145             : } // end of namespace accessibility
     146             : 
     147             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10