LCOV - code coverage report
Current view: top level - accessibility/inc/accessibility/extended - AccessibleGridControlHeader.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 2 0.0 %
Date: 2015-06-13 12:38:46 Functions: 0 1 0.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             : 
      21             : #ifndef INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEGRIDCONTROLHEADER_HXX
      22             : #define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEGRIDCONTROLHEADER_HXX
      23             : 
      24             : 
      25             : #include "accessibility/extended/AccessibleGridControlHeaderCell.hxx"
      26             : #include "accessibility/extended/AccessibleGridControlTableBase.hxx"
      27             : 
      28             : 
      29             : 
      30             : namespace accessibility {
      31             : 
      32             : 
      33             : 
      34             : /** This class represents the accessible object of a header bar of a Grid Control
      35             :    (row or column header bar). This object supports the
      36             :     XAccessibleSelection interface. Selecting a child of this object selects
      37             :     complete rows or columns of the data table. */
      38             : class AccessibleGridControlHeader : public AccessibleGridControlTableBase
      39             : {
      40             : public:
      41             :     /** @param eObjType  One of the two allowed types TCTYPE_ROWHEADERBAR or
      42             :                          TCTYPE_COLUMNHEADERBAR. */
      43             :     AccessibleGridControlHeader(
      44             :         const ::com::sun::star::uno::Reference<
      45             :             ::com::sun::star::accessibility::XAccessible >& rxParent,
      46             :             ::svt::table::IAccessibleTable& rTable,
      47             :             ::svt::table::AccessibleTableControlObjType  eObjType );
      48             : 
      49             : protected:
      50             :     virtual ~AccessibleGridControlHeader();
      51             : 
      52             : public:
      53             :     // XAccessibleContext -----------------------------------------------------
      54             : 
      55             :     /** @return
      56             :         The XAccessible interface of the specified child.
      57             :     */
      58             :     virtual ::com::sun::star::uno::Reference<
      59             :         ::com::sun::star::accessibility::XAccessible > SAL_CALL
      60             :     getAccessibleChild( sal_Int32 nChildIndex )
      61             :         throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
      62             :                 ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
      63             : 
      64             :     /** @return  The index of this object among the parent's children. */
      65             :     virtual sal_Int32 SAL_CALL getAccessibleIndexInParent()
      66             :         throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
      67             : 
      68             :     // XAccessibleComponent ---------------------------------------------------
      69             : 
      70             :     /** @return  The accessible child rendered under the given point. */
      71             :     virtual ::com::sun::star::uno::Reference<
      72             :         ::com::sun::star::accessibility::XAccessible > SAL_CALL
      73             :     getAccessibleAtPoint( const ::com::sun::star::awt::Point& rPoint )
      74             :         throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
      75             : 
      76             :     /** Grabs the focus to (the current cell of) the data table. */
      77             :     virtual void SAL_CALL grabFocus()
      78             :         throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
      79             : 
      80             :     // XAccessibleTable -------------------------------------------------------
      81             : 
      82             :     /** @return  The description text of the specified row. */
      83             :     virtual OUString SAL_CALL
      84             :     getAccessibleRowDescription( sal_Int32 nRow )
      85             :         throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
      86             :                 ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
      87             : 
      88             :     /** @return  The description text of the specified column. */
      89             :     virtual OUString SAL_CALL
      90             :     getAccessibleColumnDescription( sal_Int32 nColumn )
      91             :         throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
      92             :                 ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
      93             : 
      94             :     /** @return  The XAccessibleTable interface of the row header bar. */
      95             :     virtual ::com::sun::star::uno::Reference<
      96             :         ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL
      97             :     getAccessibleRowHeaders()
      98             :         throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
      99             : 
     100             :     /** @return  The XAccessibleTable interface of the column header bar. */
     101             :     virtual ::com::sun::star::uno::Reference<
     102             :         ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL
     103             :     getAccessibleColumnHeaders()
     104             :         throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     105             : 
     106             :     /** @return  An index list of completely selected rows. */
     107             :     virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL
     108             :     getSelectedAccessibleRows()
     109             :         throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     110             : 
     111             :     /** @return  An index list of completely selected columns. */
     112             :     virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL
     113             :     getSelectedAccessibleColumns()
     114             :         throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     115             : 
     116             :     /** @return  <TRUE/>, if the specified row is completely selected. */
     117             :     virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow )
     118             :         throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
     119             :                 ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     120             : 
     121             :     /** @return  <TRUE/>, if the specified column is completely selected. */
     122             :     virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn )
     123             :         throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
     124             :                 ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     125             : 
     126             :     /** @return The XAccessible interface of the cell object at the specified
     127             :                 cell position. */
     128             :     virtual ::com::sun::star::uno::Reference<
     129             :         ::com::sun::star::accessibility::XAccessible > SAL_CALL
     130             :     getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn )
     131             :         throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
     132             :                 ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     133             : 
     134             :     /** @return  <TRUE/>, if the specified cell is selected. */
     135             :     virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn )
     136             :         throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
     137             :                 ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     138             : 
     139             :     // XServiceInfo -----------------------------------------------------------
     140             : 
     141             :     /** @return  The name of this class. */
     142             :     virtual OUString SAL_CALL getImplementationName()
     143             :         throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     144             : 
     145             :     /** @return  An unique implementation ID. */
     146             :     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
     147             :         throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     148             : 
     149             : protected:
     150             :     // internal virtual methods -----------------------------------------------
     151             :     /** @attention  This method requires locked mutex's and a living object.
     152             :         @return  The absolute child index from the index of selected children.
     153             :         @throws <type>IndexOutOfBoundsException</type>
     154             :         If the specified index is invalid. */
     155             :     //sal_Int32 implGetChildIndexFromSelectedIndex( sal_Int32 nSelectedChildIndex )
     156             :     //    throw ( ::com::sun::star::lang::IndexOutOfBoundsException );
     157             : 
     158             :     /** Returns the specified row or column. Uses one of the parameters,
     159             :         depending on object type.
     160             :         @attention  This method requires locked mutex's and a living object.
     161             :         @return  The XAccessible interface of the specified column/row. */
     162             :     ::com::sun::star::uno::Reference<
     163             :         ::com::sun::star::accessibility::XAccessible >
     164             :     implGetChild( sal_Int32 nRow, sal_uInt32 nColumnPos );
     165             :     /** @attention  This method requires locked mutex's and a living object.
     166             :         @return  The bounding box (VCL rect.) relative to the parent window. */
     167             :     virtual Rectangle implGetBoundingBox() SAL_OVERRIDE;
     168             :    /** @attention  This method requires locked mutex's and a living object.
     169             :         @return  The bounding box (VCL rect.) in screen coordinates. */
     170             :     virtual Rectangle implGetBoundingBoxOnScreen() SAL_OVERRIDE;
     171             : 
     172             :     // internal helper methods ------------------------------------------------
     173             : 
     174             :     /** @return  <TRUE/>, if the objects is a header bar for rows. */
     175             :     inline bool isRowBar() const;
     176             :     /** @return  <TRUE/>, if the objects is a header bar for columns. */
     177             :     inline bool isColumnBar() const;
     178             : };
     179             : 
     180             : // inlines --------------------------------------------------------------------
     181             : 
     182             : inline bool AccessibleGridControlHeader::isRowBar() const
     183             : {
     184             :     return getType() == ::svt::table::TCTYPE_ROWHEADERBAR;
     185             : }
     186             : 
     187           0 : inline bool AccessibleGridControlHeader::isColumnBar() const
     188             : {
     189           0 :     return getType() == ::svt::table::TCTYPE_COLUMNHEADERBAR;
     190             : }
     191             : 
     192             : 
     193             : 
     194             : } // namespace accessibility
     195             : 
     196             : 
     197             : 
     198             : #endif // ACCESSIBILITY_EXT_ACCESSIBILEGRIDCONTROLHEADER_HXX
     199             : 
     200             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11