LCOV - code coverage report
Current view: top level - accessibility/inc/accessibility/extended - AccessibleGridControlTableCell.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 3 0.0 %
Date: 2015-06-13 12:38:46 Functions: 0 4 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             : #ifndef INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEGRIDCONTROLTABLECELL_HXX
      20             : #define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEGRIDCONTROLTABLECELL_HXX
      21             : 
      22             : #include <comphelper/accessibletexthelper.hxx>
      23             : #include <cppuhelper/implbase2.hxx>
      24             : #include "accessibility/extended/AccessibleGridControlBase.hxx"
      25             : #include <svtools/accessibletable.hxx>
      26             : 
      27             : namespace accessibility
      28             : {
      29             :     class AccessibleGridControlCell : public AccessibleGridControlBase
      30             :     {
      31             :     private:
      32             :         sal_Int32               m_nRowPos;      // the row number of the table cell
      33             :         sal_Int32               m_nColPos;      // the column id of the table cell
      34             : 
      35             :     protected:
      36             :         // attribute access
      37           0 :         inline sal_Int32    getRowPos( ) const { return m_nRowPos; }
      38           0 :         inline sal_Int32    getColumnPos( ) const { return m_nColPos; }
      39             : 
      40             :         // XAccessibleComponent
      41             :         virtual void SAL_CALL grabFocus() throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
      42             : 
      43             :     protected:
      44             :         AccessibleGridControlCell(
      45             :             const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
      46             :             ::svt::table::IAccessibleTable& _rTable,
      47             :             sal_Int32 _nRowPos,
      48             :             sal_uInt16 _nColPos,
      49             :             ::svt::table::AccessibleTableControlObjType _eType
      50             :         );
      51             : 
      52             :         virtual ~AccessibleGridControlCell();
      53             : 
      54             :     private:
      55             :         AccessibleGridControlCell( const AccessibleGridControlCell& ) SAL_DELETED_FUNCTION;
      56             :         AccessibleGridControlCell& operator=( const AccessibleGridControlCell& ) SAL_DELETED_FUNCTION;
      57             :     };
      58             : 
      59             :     typedef ::cppu::ImplHelper2 <   ::com::sun::star::accessibility::XAccessibleText
      60             :                                 ,   ::com::sun::star::accessibility::XAccessible
      61             :                                 >   AccessibleTextHelper_BASE;
      62             :     // implementation of a table cell of GridControl
      63           0 :     class AccessibleGridControlTableCell    :public AccessibleGridControlCell
      64             :                                         ,public AccessibleTextHelper_BASE
      65             :                                         ,public ::comphelper::OCommonAccessibleText
      66             :     {
      67             :     protected:
      68             :         // OCommonAccessibleText
      69             :         virtual OUString                        implGetText() SAL_OVERRIDE;
      70             :         virtual ::com::sun::star::lang::Locale  implGetLocale() SAL_OVERRIDE;
      71             :         virtual void                            implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) SAL_OVERRIDE;
      72             :         virtual Rectangle implGetBoundingBox() SAL_OVERRIDE;
      73             :         virtual Rectangle implGetBoundingBoxOnScreen() SAL_OVERRIDE;
      74             : 
      75             :     public:
      76             :         AccessibleGridControlTableCell( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
      77             :                                     ::svt::table::IAccessibleTable& _rTable,
      78             :                                     sal_Int32 _nRowId,
      79             :                                     sal_uInt16 _nColId,
      80             :                                     svt::table::AccessibleTableControlObjType  eObjType);
      81             : 
      82             :         // XInterface -------------------------------------------------------------
      83             : 
      84             :         /** Queries for a new interface. */
      85             :         ::com::sun::star::uno::Any SAL_CALL queryInterface(
      86             :                 const ::com::sun::star::uno::Type& rType )
      87             :             throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
      88             : 
      89             :         /** Aquires the object (calls acquire() on base class). */
      90             :         virtual void SAL_CALL acquire() throw () SAL_OVERRIDE;
      91             : 
      92             :         /** Releases the object (calls release() on base class). */
      93             :         virtual void SAL_CALL release() throw () SAL_OVERRIDE;
      94             : 
      95             :         /** @return  The index of this object among the parent's children. */
      96             :         virtual sal_Int32 SAL_CALL getAccessibleIndexInParent()
      97             :             throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
      98             : 
      99             :         /** @return
     100             :                 The name of this class.
     101             :         */
     102             :         virtual OUString SAL_CALL getImplementationName()
     103             :             throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     104             : 
     105             :         /** @return
     106             :                 The count of visible children.
     107             :         */
     108             :         virtual sal_Int32 SAL_CALL getAccessibleChildCount()
     109             :             throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     110             : 
     111             :         /** @return
     112             :                 The XAccessible interface of the specified child.
     113             :         */
     114             :         virtual ::com::sun::star::uno::Reference<
     115             :             ::com::sun::star::accessibility::XAccessible > SAL_CALL
     116             :             getAccessibleChild( sal_Int32 nChildIndex )
     117             :                 throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
     118             :                         ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     119             : 
     120             :         /** Creates a new AccessibleStateSetHelper and fills it with states of the
     121             :             current object.
     122             :             @return
     123             :                 A filled AccessibleStateSetHelper.
     124             :         */
     125             :         ::utl::AccessibleStateSetHelper* implCreateStateSetHelper() SAL_OVERRIDE;
     126             : 
     127             :         // XAccessible ------------------------------------------------------------
     128             : 
     129             :         /** @return  The XAccessibleContext interface of this object. */
     130             :         virtual ::com::sun::star::uno::Reference<
     131             :             ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL
     132             :         getAccessibleContext()
     133             :             throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     134             : 
     135             :         // XAccessibleText
     136             :         virtual sal_Int32 SAL_CALL getCaretPosition() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     137             :         virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     138             :         virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     139             :         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< OUString >& aRequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     140             :         virtual ::com::sun::star::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     141             :         virtual sal_Int32 SAL_CALL getCharacterCount() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     142             :         virtual sal_Int32 SAL_CALL getIndexAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     143             :         virtual OUString SAL_CALL getSelectedText() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     144             :         virtual sal_Int32 SAL_CALL getSelectionStart() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     145             :         virtual sal_Int32 SAL_CALL getSelectionEnd() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     146             :         virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     147             :         virtual OUString SAL_CALL getText() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     148             :         virtual OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     149             :         virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     150             :         virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     151             :         virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     152             :         virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     153             :     };
     154             : }
     155             : #endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEGRIDCONTROLTABLECELL_HXX
     156             : 
     157             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11