LCOV - code coverage report
Current view: top level - accessibility/inc/accessibility/extended - AccessibleGridControlHeader.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 4 0.0 %
Date: 2012-08-25 Functions: 0 2 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     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 ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROLHEADER_HXX
      22                 :            : #define ACCESSIBILITY_EXT_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 );
      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 );
      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 );
      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 );
      79                 :            : 
      80                 :            :     /** @return  The key bindings associated with this object. */
      81                 :            :     virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleKeyBinding()
      82                 :            :         throw ( ::com::sun::star::uno::RuntimeException );
      83                 :            : 
      84                 :            :     // XAccessibleTable -------------------------------------------------------
      85                 :            : 
      86                 :            :     /** @return  The description text of the specified row. */
      87                 :            :     virtual ::rtl::OUString SAL_CALL
      88                 :            :     getAccessibleRowDescription( sal_Int32 nRow )
      89                 :            :         throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
      90                 :            :                 ::com::sun::star::uno::RuntimeException );
      91                 :            : 
      92                 :            :     /** @return  The description text of the specified column. */
      93                 :            :     virtual ::rtl::OUString SAL_CALL
      94                 :            :     getAccessibleColumnDescription( sal_Int32 nColumn )
      95                 :            :         throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
      96                 :            :                 ::com::sun::star::uno::RuntimeException );
      97                 :            : 
      98                 :            :     /** @return  The XAccessibleTable interface of the row header bar. */
      99                 :            :     virtual ::com::sun::star::uno::Reference<
     100                 :            :         ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL
     101                 :            :     getAccessibleRowHeaders()
     102                 :            :         throw ( ::com::sun::star::uno::RuntimeException );
     103                 :            : 
     104                 :            :     /** @return  The XAccessibleTable interface of the column header bar. */
     105                 :            :     virtual ::com::sun::star::uno::Reference<
     106                 :            :         ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL
     107                 :            :     getAccessibleColumnHeaders()
     108                 :            :         throw ( ::com::sun::star::uno::RuntimeException );
     109                 :            : 
     110                 :            :     /** @return  An index list of completely selected rows. */
     111                 :            :     virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL
     112                 :            :     getSelectedAccessibleRows()
     113                 :            :         throw ( ::com::sun::star::uno::RuntimeException );
     114                 :            : 
     115                 :            :     /** @return  An index list of completely selected columns. */
     116                 :            :     virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL
     117                 :            :     getSelectedAccessibleColumns()
     118                 :            :         throw ( ::com::sun::star::uno::RuntimeException );
     119                 :            : 
     120                 :            :     /** @return  <TRUE/>, if the specified row is completely selected. */
     121                 :            :     virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow )
     122                 :            :         throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
     123                 :            :                 ::com::sun::star::uno::RuntimeException );
     124                 :            : 
     125                 :            :     /** @return  <TRUE/>, if the specified column is completely selected. */
     126                 :            :     virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn )
     127                 :            :         throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
     128                 :            :                 ::com::sun::star::uno::RuntimeException );
     129                 :            : 
     130                 :            :     /** @return The XAccessible interface of the cell object at the specified
     131                 :            :                 cell position. */
     132                 :            :     virtual ::com::sun::star::uno::Reference<
     133                 :            :         ::com::sun::star::accessibility::XAccessible > SAL_CALL
     134                 :            :     getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn )
     135                 :            :         throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
     136                 :            :                 ::com::sun::star::uno::RuntimeException );
     137                 :            : 
     138                 :            :     /** @return  <TRUE/>, if the specified cell is selected. */
     139                 :            :     virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn )
     140                 :            :         throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
     141                 :            :                 ::com::sun::star::uno::RuntimeException );
     142                 :            : 
     143                 :            :     // XServiceInfo -----------------------------------------------------------
     144                 :            : 
     145                 :            :     /** @return  The name of this class. */
     146                 :            :     virtual ::rtl::OUString SAL_CALL getImplementationName()
     147                 :            :         throw ( ::com::sun::star::uno::RuntimeException );
     148                 :            : 
     149                 :            :     /** @return  An unique implementation ID. */
     150                 :            :     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
     151                 :            :         throw ( ::com::sun::star::uno::RuntimeException );
     152                 :            : 
     153                 :            : protected:
     154                 :            :     // internal virtual methods -----------------------------------------------
     155                 :            :     /** @attention  This method requires locked mutex's and a living object.
     156                 :            :         @return  The absolute child index from the index of selected children.
     157                 :            :         @throws <type>IndexOutOfBoundsException</type>
     158                 :            :         If the specified index is invalid. */
     159                 :            :     //sal_Int32 implGetChildIndexFromSelectedIndex( sal_Int32 nSelectedChildIndex )
     160                 :            :     //    throw ( ::com::sun::star::lang::IndexOutOfBoundsException );
     161                 :            : 
     162                 :            :     /** Returns the specified row or column. Uses one of the parameters,
     163                 :            :         depending on object type.
     164                 :            :         @attention  This method requires locked mutex's and a living object.
     165                 :            :         @return  The XAccessible interface of the specified column/row. */
     166                 :            :     ::com::sun::star::uno::Reference<
     167                 :            :         ::com::sun::star::accessibility::XAccessible >
     168                 :            :     implGetChild( sal_Int32 nRow, sal_uInt32 nColumnPos );
     169                 :            :     /** @attention  This method requires locked mutex's and a living object.
     170                 :            :         @return  The bounding box (VCL rect.) relative to the parent window. */
     171                 :            :     virtual Rectangle implGetBoundingBox();
     172                 :            :    /** @attention  This method requires locked mutex's and a living object.
     173                 :            :         @return  The bounding box (VCL rect.) in screen coordinates. */
     174                 :            :     virtual Rectangle implGetBoundingBoxOnScreen();
     175                 :            : 
     176                 :            :     /** @attention  This method requires locked mutex's and a living object.
     177                 :            :         @return  The count of used rows. */
     178                 :            :     virtual sal_Int32 implGetRowCount() const;
     179                 :            :     /** @attention  This method requires locked mutex's and a living object.
     180                 :            :         @return  The count of used columns. */
     181                 :            :     virtual sal_Int32 implGetColumnCount() const;
     182                 :            : 
     183                 :            :     // internal helper methods ------------------------------------------------
     184                 :            : 
     185                 :            :     /** @return  <TRUE/>, if the objects is a header bar for rows. */
     186                 :            :     inline sal_Bool isRowBar() const;
     187                 :            :     /** @return  <TRUE/>, if the objects is a header bar for columns. */
     188                 :            :     inline sal_Bool isColumnBar() const;
     189                 :            : };
     190                 :            : 
     191                 :            : // inlines --------------------------------------------------------------------
     192                 :            : 
     193                 :          0 : inline sal_Bool AccessibleGridControlHeader::isRowBar() const
     194                 :            : {
     195                 :          0 :     return getType() == ::svt::table::TCTYPE_ROWHEADERBAR;
     196                 :            : }
     197                 :            : 
     198                 :          0 : inline sal_Bool AccessibleGridControlHeader::isColumnBar() const
     199                 :            : {
     200                 :          0 :     return getType() == ::svt::table::TCTYPE_COLUMNHEADERBAR;
     201                 :            : }
     202                 :            : 
     203                 :            : // ============================================================================
     204                 :            : 
     205                 :            : } // namespace accessibility
     206                 :            : 
     207                 :            : // ============================================================================
     208                 :            : 
     209                 :            : #endif // ACCESSIBILITY_EXT_ACCESSIBILEGRIDCONTROLHEADER_HXX
     210                 :            : 
     211                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10