LCOV - code coverage report
Current view: top level - sw/source/core/access - acccell.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 4 4 100.0 %
Date: 2014-11-03 Functions: 2 2 100.0 %
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             : #ifndef INCLUDED_SW_SOURCE_CORE_ACCESS_ACCCELL_HXX
      21             : #define INCLUDED_SW_SOURCE_CORE_ACCESS_ACCCELL_HXX
      22             : 
      23             : #include "acccontext.hxx"
      24             : #include <com/sun/star/accessibility/XAccessibleValue.hpp>
      25             : #include <accselectionhelper.hxx>
      26             : 
      27             : class SwCellFrm;
      28             : class SwAccessibleTable;
      29             : class SwFrmFmt;
      30             : 
      31             : class SwAccessibleCell : public SwAccessibleContext,
      32             :                   ::com::sun::star::accessibility::XAccessibleValue,
      33             :                   ::com::sun::star::accessibility::XAccessibleSelection,
      34             :                     public  ::com::sun::star::accessibility::XAccessibleExtendedAttributes
      35             : {
      36             :     // Implementation for XAccessibleSelection interface
      37             :     SwAccessibleSelectionHelper aSelectionHelper;
      38             :     bool    bIsSelected;    // protected by base class mutex
      39             : 
      40             :     bool    IsSelected();
      41             : 
      42             :     bool _InvalidateMyCursorPos();
      43             :     bool _InvalidateChildrenCursorPos( const SwFrm *pFrm );
      44             : 
      45             :     rtl::Reference<SwAccessibleTable> m_pAccTable;
      46             : 
      47             : protected:
      48             :     // Set states for getAccessibleStateSet.
      49             :     // This derived class additionally sets SELECTABLE(1) and SELECTED(+)
      50             :     virtual void GetStates( ::utl::AccessibleStateSetHelper& rStateSet ) SAL_OVERRIDE;
      51             : 
      52             :     virtual void _InvalidateCursorPos() SAL_OVERRIDE;
      53             : 
      54             :     virtual ~SwAccessibleCell();
      55             : 
      56             : public:
      57             :     SwAccessibleCell( SwAccessibleMap* pInitMap, const SwCellFrm *pCellFrm );
      58             : 
      59             :     virtual bool HasCursor() SAL_OVERRIDE;   // required by map to remember that object
      60             : 
      61             :     // XAccessibleContext
      62             : 
      63             :     /// Return this object's description.
      64             :     virtual OUString SAL_CALL
      65             :         getAccessibleDescription (void)
      66             :         throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      67             : 
      68             :     // XServiceInfo
      69             : 
      70             :     // Returns an identifier for the implementation of this object.
      71             :     virtual OUString SAL_CALL
      72             :         getImplementationName (void)
      73             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      74             : 
      75             :     // Return whether the specified service is supported by this class.
      76             :     virtual sal_Bool SAL_CALL
      77             :         supportsService (const OUString& sServiceName)
      78             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      79             : 
      80             :     // Returns a list of all supported services.  In this case that is just
      81             :     // the AccessibleContext service.
      82             :     virtual ::com::sun::star::uno::Sequence< OUString> SAL_CALL
      83             :         getSupportedServiceNames (void)
      84             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      85             : 
      86             :     virtual void Dispose( bool bRecursive = false ) SAL_OVERRIDE;
      87             : 
      88             :     virtual void InvalidatePosOrSize( const SwRect& rFrm ) SAL_OVERRIDE;
      89             : 
      90             :     // XInterface
      91             : 
      92             :     // (XInterface methods need to be implemented to disambiguate
      93             :     // between those inherited through SwAcessibleContext and
      94             :     // XAccessibleValue).
      95             : 
      96             :     virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
      97             :         const ::com::sun::star::uno::Type& aType )
      98             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      99             : 
     100        1424 :     virtual void SAL_CALL acquire(  ) throw () SAL_OVERRIDE
     101        1424 :         { SwAccessibleContext::acquire(); };
     102             : 
     103        1424 :     virtual void SAL_CALL release(  ) throw () SAL_OVERRIDE
     104        1424 :         { SwAccessibleContext::release(); };
     105             : 
     106             :     // XTypeProvider
     107             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     108             :     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     109             : 
     110             :     // XAccessibleValue
     111             : 
     112             :     // XAccessibleExtendedAttributes
     113             :     ::com::sun::star::uno::Any SAL_CALL getExtendedAttributes()
     114             :         throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE ;
     115             : private:
     116             :     SwFrmFmt* GetTblBoxFormat() const;
     117             : 
     118             : public:
     119             :     virtual ::com::sun::star::uno::Any SAL_CALL getCurrentValue( )
     120             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     121             : 
     122             :     virtual sal_Bool SAL_CALL setCurrentValue(
     123             :         const ::com::sun::star::uno::Any& aNumber )
     124             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     125             : 
     126             :     virtual ::com::sun::star::uno::Any SAL_CALL getMaximumValue(  )
     127             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     128             : 
     129             :     virtual ::com::sun::star::uno::Any SAL_CALL getMinimumValue(  )
     130             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     131             :     // XAccessibleComponent
     132             :     sal_Int32 SAL_CALL getBackground()
     133             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     134             : 
     135             :     // XAccessibleSelection
     136             :     virtual void SAL_CALL selectAccessibleChild(
     137             :         sal_Int32 nChildIndex )
     138             :         throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
     139             :                 ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     140             : 
     141             :     virtual sal_Bool SAL_CALL isAccessibleChildSelected(
     142             :         sal_Int32 nChildIndex )
     143             :         throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
     144             :                 ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     145             :     virtual void SAL_CALL clearAccessibleSelection(  )
     146             :         throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     147             :     virtual void SAL_CALL selectAllAccessibleChildren(  )
     148             :         throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     149             :     virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount(  )
     150             :         throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     151             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild(
     152             :         sal_Int32 nSelectedChildIndex )
     153             :         throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
     154             :                 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     155             : 
     156             :     virtual void SAL_CALL deselectAccessibleChild(
     157             :         sal_Int32 nSelectedChildIndex )
     158             :         throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
     159             :                 ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     160             : };
     161             : 
     162             : #endif
     163             : 
     164             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10