LCOV - code coverage report
Current view: top level - sw/inc - unotbl.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 9 9 100.0 %
Date: 2014-04-11 Functions: 9 9 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_INC_UNOTBL_HXX
      21             : #define INCLUDED_SW_INC_UNOTBL_HXX
      22             : 
      23             : #include <com/sun/star/container/XNamed.hpp>
      24             : #include <com/sun/star/container/XEnumerationAccess.hpp>
      25             : #include <com/sun/star/util/XSortable.hpp>
      26             : #include <com/sun/star/chart/XChartData.hpp>
      27             : #include <com/sun/star/chart/XChartDataArray.hpp>
      28             : #include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
      29             : #include <com/sun/star/text/XTextTableCursor.hpp>
      30             : #include <com/sun/star/text/XTextTable.hpp>
      31             : #include <com/sun/star/table/XCellRange.hpp>
      32             : #include <com/sun/star/sheet/XCellRangeData.hpp>
      33             : #include <com/sun/star/table/XAutoFormattable.hpp>
      34             : 
      35             : #include <cppuhelper/implbase3.hxx>
      36             : #include <cppuhelper/implbase4.hxx>
      37             : #include <cppuhelper/implbase5.hxx>
      38             : #include <cppuhelper/implbase7.hxx>
      39             : #include <cppuhelper/implbase10.hxx>
      40             : #include <cppuhelper/interfacecontainer.h>
      41             : 
      42             : #include <comphelper/uno3.hxx>
      43             : 
      44             : #include <calbck.hxx>
      45             : #include <TextCursorHelper.hxx>
      46             : #include <unotext.hxx>
      47             : 
      48             : class SwUnoCrsr;
      49             : class SwTable;
      50             : class SwTableBox;
      51             : class SwTableLine;
      52             : class SwTableCursor;
      53             : class SwTableBoxFmt;
      54             : class SwChartDataProvider;
      55             : class SwFrmFmt;
      56             : 
      57             : typedef
      58             : cppu::WeakImplHelper4
      59             : <
      60             :     ::com::sun::star::table::XCell,
      61             :     ::com::sun::star::lang::XServiceInfo,
      62             :     ::com::sun::star::beans::XPropertySet,
      63             :     ::com::sun::star::container::XEnumerationAccess
      64             : >
      65             : SwXCellBaseClass;
      66             : class SwXCell : public SwXCellBaseClass,
      67             :     public SwXText,
      68             :     public SwClient
      69             : {
      70             :     friend void   sw_setString( SwXCell &rCell, const OUString &rTxt,
      71             :                                  sal_Bool bKeepNumberFmt );
      72             :     friend double sw_getValue( SwXCell &rCell );
      73             :     friend void   sw_setValue( SwXCell &rCell, double nVal );
      74             : 
      75             :     const SfxItemPropertySet*   m_pPropSet;
      76             :     SwTableBox*                 pBox;       // only set in non-XML import
      77             :     const SwStartNode*      pStartNode; // only set in XML import
      78             : 
      79             :     // table position where pBox was found last
      80             :     size_t nFndPos;
      81             :     static size_t const NOTFOUND = SAL_MAX_SIZE;
      82             : 
      83             : protected:
      84             :     virtual const SwStartNode *GetStartNode() const SAL_OVERRIDE;
      85             : 
      86             :     virtual ::com::sun::star::uno::Reference<
      87             :                 ::com::sun::star::text::XTextCursor >
      88             :         CreateCursor()
      89             :         throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
      90             : 
      91             :     bool IsValid() const;
      92             : 
      93             :     virtual ~SwXCell();
      94             : 
      95             :     //SwClient
      96             :    virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) SAL_OVERRIDE;
      97             : 
      98             : public:
      99             :     SwXCell(SwFrmFmt* pTblFmt, SwTableBox* pBox, size_t nPos = NOTFOUND);
     100             :     SwXCell(SwFrmFmt* pTblFmt, const SwStartNode& rStartNode); // XML import interface
     101             : 
     102             :     TYPEINFO_OVERRIDE();
     103             : 
     104             :     static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
     105             : 
     106             :     //XUnoTunnel
     107             :     virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     108             : 
     109             :     virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     110             :     virtual void SAL_CALL acquire(  ) throw() SAL_OVERRIDE;
     111             :     virtual void SAL_CALL release(  ) throw() SAL_OVERRIDE;
     112             : 
     113             :     //XTypeProvider
     114             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     115             :     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     116             : 
     117             :     //XCell
     118             :     virtual OUString SAL_CALL getFormula(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     119             :     virtual void SAL_CALL setFormula( const OUString& aFormula ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     120             :     virtual double SAL_CALL getValue(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     121             :     virtual void SAL_CALL setValue( double nValue ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     122             :     virtual ::com::sun::star::table::CellContentType SAL_CALL getType(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     123             :     virtual sal_Int32 SAL_CALL getError(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     124             : 
     125             :     //XText
     126             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor >  SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     127             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor >  SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     128             :     virtual void SAL_CALL  setString(const OUString& aString) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     129             : 
     130             :     //XPropertySet
     131             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     132             :     virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     133             :     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     134             :     virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     135             :     virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     136             :     virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     137             :     virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     138             : 
     139             :     //XServiceInfo
     140             :     virtual OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     141             :     virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     142             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     143             : 
     144             :     //XEnumerationAccess - was: XParagraphEnumerationAccess
     145             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration >  SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     146             : 
     147             :     //XElementAccess
     148             :     virtual ::com::sun::star::uno::Type SAL_CALL getElementType(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     149             :     virtual sal_Bool SAL_CALL hasElements(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     150             : 
     151        5169 :     SwTableBox*   GetTblBox()const {return pBox;}
     152             :     static SwXCell*     CreateXCell(SwFrmFmt* pTblFmt, SwTableBox* pBox, SwTable *pTbl = 0 );
     153             :     SwTableBox*     FindBox(SwTable* pTable, SwTableBox* pBox);
     154             : 
     155       78836 :     SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
     156             : };
     157             : 
     158             : class SwXTextTableRow : public cppu::WeakImplHelper2
     159             : <
     160             :     ::com::sun::star::beans::XPropertySet,
     161             :     ::com::sun::star::lang::XServiceInfo
     162             : >,
     163             :     public SwClient
     164             : {
     165             :     const SfxItemPropertySet*   m_pPropSet;
     166             :     SwTableLine*            pLine;
     167             : 
     168        6873 :     SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
     169             : protected:
     170             :     virtual ~SwXTextTableRow();
     171             :     //SwClient
     172             :    virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) SAL_OVERRIDE;
     173             : 
     174             : public:
     175             :     SwXTextTableRow(SwFrmFmt* pFmt, SwTableLine* pLine);
     176             : 
     177             :     TYPEINFO_OVERRIDE();
     178             : 
     179             :     //XPropertySet
     180             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     181             :     virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue )
     182             :         throw(::com::sun::star::beans::UnknownPropertyException,
     183             :               ::com::sun::star::beans::PropertyVetoException,
     184             :               ::com::sun::star::lang::IllegalArgumentException,
     185             :               ::com::sun::star::lang::WrappedTargetException,
     186             :               ::com::sun::star::uno::RuntimeException,
     187             :               std::exception) SAL_OVERRIDE;
     188             :     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     189             :     virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     190             :     virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     191             :     virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     192             :     virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     193             : 
     194             :     //XServiceInfo
     195             :     virtual OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     196             :     virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     197             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     198             : 
     199           3 :     const SwTableLine*  GetTblRow() const {return pLine;}
     200             :     static SwTableLine* FindLine(SwTable* pTable, SwTableLine* pLine);
     201             : };
     202             : 
     203             : typedef cppu::WeakImplHelper3<
     204             :                                 ::com::sun::star::text::XTextTableCursor,
     205             :                                 ::com::sun::star::lang::XServiceInfo,
     206             :                                 ::com::sun::star::beans::XPropertySet
     207             :                             > SwXTextTableCursor_Base;
     208             : class SW_DLLPUBLIC SwXTextTableCursor : public SwXTextTableCursor_Base
     209             :     ,public SwClient
     210             :     ,public OTextCursorHelper
     211             : {
     212             :     SwDepend                aCrsrDepend;
     213             :     const SfxItemPropertySet*   m_pPropSet;
     214             : 
     215             : protected:
     216             :     virtual ~SwXTextTableCursor();
     217             : public:
     218             :     SwXTextTableCursor(SwFrmFmt* pFmt, SwTableBox* pBox);
     219             :     SwXTextTableCursor(SwFrmFmt& rTableFmt,
     220             :                         const SwTableCursor* pTableSelection);
     221             : 
     222             :     DECLARE_XINTERFACE()
     223             : 
     224             :     //XTextTableCursor
     225             :     virtual OUString SAL_CALL getRangeName()
     226             :         throw (::com::sun::star::uno::RuntimeException,
     227             :                std::exception) SAL_OVERRIDE;
     228             :     virtual sal_Bool SAL_CALL gotoCellByName( const OUString& aCellName, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     229             :     virtual sal_Bool SAL_CALL goLeft( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     230             :     virtual sal_Bool SAL_CALL goRight( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     231             :     virtual sal_Bool SAL_CALL goUp( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     232             :     virtual sal_Bool SAL_CALL goDown( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     233             :     virtual void SAL_CALL gotoStart( sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     234             :     virtual void SAL_CALL gotoEnd( sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     235             :     virtual sal_Bool SAL_CALL mergeRange()
     236             :         throw (::com::sun::star::uno::RuntimeException,
     237             :                std::exception) SAL_OVERRIDE;
     238             :     virtual sal_Bool SAL_CALL splitRange( sal_Int16 Count, sal_Bool Horizontal )
     239             :         throw (::com::sun::star::uno::RuntimeException,
     240             :                std::exception) SAL_OVERRIDE;
     241             : 
     242             :     //XPropertySet
     243             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     244             :     virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue )
     245             :         throw (::com::sun::star::beans::UnknownPropertyException,
     246             :                ::com::sun::star::beans::PropertyVetoException,
     247             :                ::com::sun::star::lang::IllegalArgumentException,
     248             :                ::com::sun::star::lang::WrappedTargetException,
     249             :                ::com::sun::star::uno::RuntimeException,
     250             :                std::exception) SAL_OVERRIDE;
     251             :     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName )
     252             :         throw (::com::sun::star::beans::UnknownPropertyException,
     253             :                ::com::sun::star::lang::WrappedTargetException,
     254             :                ::com::sun::star::uno::RuntimeException,
     255             :                std::exception) SAL_OVERRIDE;
     256             :     virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     257             :     virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     258             :     virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     259             :     virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     260             : 
     261             :     //XServiceInfo
     262             :     virtual OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     263             :     virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     264             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     265             : 
     266             :     //SwClient
     267             :    virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) SAL_OVERRIDE;
     268             : 
     269             :     // ITextCursorHelper
     270             :     virtual const SwPaM*        GetPaM() const SAL_OVERRIDE;
     271             :     virtual SwPaM*              GetPaM() SAL_OVERRIDE;
     272             :     virtual const SwDoc*        GetDoc() const SAL_OVERRIDE;
     273             :     virtual SwDoc*              GetDoc() SAL_OVERRIDE;
     274             : 
     275             :     const SwUnoCrsr*            GetCrsr() const;
     276             :     SwUnoCrsr*                  GetCrsr();
     277           7 :     SwFrmFmt*       GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
     278             : };
     279             : 
     280             : struct SwRangeDescriptor
     281             : {
     282             :     sal_Int32 nTop;
     283             :     sal_Int32 nLeft;
     284             :     sal_Int32 nBottom;
     285             :     sal_Int32 nRight;
     286             : 
     287             :     void Normalize();
     288             : };
     289             : 
     290             : class SwTableProperties_Impl;
     291             : class SwXTextTable : public cppu::WeakImplHelper10
     292             : <
     293             :     ::com::sun::star::text::XTextTable,
     294             :     ::com::sun::star::lang::XServiceInfo,
     295             :     ::com::sun::star::table::XCellRange,
     296             :     ::com::sun::star::chart::XChartDataArray,
     297             :     ::com::sun::star::beans::XPropertySet,
     298             :     ::com::sun::star::container::XNamed,
     299             :     ::com::sun::star::table::XAutoFormattable,
     300             :     ::com::sun::star::util::XSortable,
     301             :     ::com::sun::star::lang::XUnoTunnel,
     302             :     ::com::sun::star::sheet::XCellRangeData
     303             : >,
     304             :     public SwClient
     305             : {
     306             : private:
     307             :     class Impl;
     308             :     ::sw::UnoImplPtr<Impl> m_pImpl;
     309             : 
     310             :     const SfxItemPropertySet*       m_pPropSet;
     311             : 
     312             :     // Descriptor-interface
     313             :     SwTableProperties_Impl*     pTableProps;
     314             :     OUString                    m_sTableName;
     315             :     sal_Bool                    bIsDescriptor;
     316             :     unsigned short              nRows;
     317             :     unsigned short              nColumns;
     318             : 
     319             :     sal_Bool                        bFirstRowAsLabel    :1;
     320             :     sal_Bool                        bFirstColumnAsLabel :1;
     321             : protected:
     322             :     virtual ~SwXTextTable();
     323             : public:
     324             :     SwXTextTable();
     325             :     SwXTextTable(SwFrmFmt& rFrmFmt);
     326             : 
     327             :     SW_DLLPUBLIC static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
     328             : 
     329             :     //XUnoTunnel
     330             :     virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     331             : 
     332             :     TYPEINFO_OVERRIDE();
     333             : 
     334             :     //XTextTable
     335             :     virtual void SAL_CALL initialize( sal_Int32 nRows, sal_Int32 nColumns ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     336             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XTableRows > SAL_CALL getRows(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     337             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XTableColumns > SAL_CALL getColumns(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     338             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > SAL_CALL getCellByName( const OUString& aCellName ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     339             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getCellNames(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     340             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextTableCursor > SAL_CALL createCursorByCellName( const OUString& aCellName )
     341             :         throw (::com::sun::star::uno::RuntimeException,
     342             :                std::exception) SAL_OVERRIDE;
     343             : 
     344             :     //XTextContent
     345             :     virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     346             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     347             : 
     348             :     //XComponent
     349             :     virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     350             :     virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     351             :     virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     352             : 
     353             :     //XCellRange
     354             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > SAL_CALL getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow ) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     355             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom )
     356             :         throw (com::sun::star::lang::IndexOutOfBoundsException,
     357             :                ::com::sun::star::uno::RuntimeException,
     358             :                std::exception) SAL_OVERRIDE;
     359             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL getCellRangeByName( const OUString& aRange )
     360             :         throw (::com::sun::star::uno::RuntimeException,
     361             :                std::exception) SAL_OVERRIDE;
     362             : 
     363             :     //XChartDataArray
     364             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > > SAL_CALL getData(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     365             :     virtual void SAL_CALL setData( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > >& aData ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     366             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getRowDescriptions(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     367             :     virtual void SAL_CALL setRowDescriptions( const ::com::sun::star::uno::Sequence< OUString >& aRowDescriptions ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     368             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getColumnDescriptions(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     369             :     virtual void SAL_CALL setColumnDescriptions( const ::com::sun::star::uno::Sequence< OUString >& aColumnDescriptions ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     370             : 
     371             :     //XChartData
     372             :     virtual void SAL_CALL addChartDataChangeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDataChangeEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     373             :     virtual void SAL_CALL removeChartDataChangeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDataChangeEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     374             :     virtual double SAL_CALL getNotANumber(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     375             :     virtual sal_Bool SAL_CALL isNotANumber( double nNumber ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     376             : 
     377             :     //XSortable
     378             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL createSortDescriptor(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     379             :     virtual void SAL_CALL sort(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xDescriptor)
     380             :         throw (::com::sun::star::uno::RuntimeException,
     381             :                std::exception) SAL_OVERRIDE;
     382             : 
     383             :     //XAutoFormattable
     384             :     virtual void SAL_CALL autoFormat(const OUString& aName)
     385             :         throw (::com::sun::star::lang::IllegalArgumentException,
     386             :                ::com::sun::star::uno::RuntimeException,
     387             :                std::exception) SAL_OVERRIDE;
     388             : 
     389             :     //XPropertySet
     390             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     391             :     virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue )
     392             :         throw(::com::sun::star::beans::UnknownPropertyException,
     393             :               ::com::sun::star::beans::PropertyVetoException,
     394             :               ::com::sun::star::lang::IllegalArgumentException,
     395             :               ::com::sun::star::lang::WrappedTargetException,
     396             :               ::com::sun::star::uno::RuntimeException,
     397             :               std::exception) SAL_OVERRIDE;
     398             :     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName )
     399             :         throw (::com::sun::star::beans::UnknownPropertyException,
     400             :                ::com::sun::star::lang::WrappedTargetException,
     401             :                ::com::sun::star::uno::RuntimeException,
     402             :                std::exception) SAL_OVERRIDE;
     403             :     virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     404             :     virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     405             :     virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     406             :     virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     407             : 
     408             :     //XNamed
     409             :     virtual OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     410             :     virtual void SAL_CALL setName(const OUString& Name_) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     411             : 
     412             :     //XCellRangeData
     413             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > > SAL_CALL getDataArray(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     414             :     virtual void SAL_CALL setDataArray( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >& aArray ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     415             : 
     416             :     //XServiceInfo
     417             :     virtual OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     418             :     virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     419             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     420             : 
     421             :     void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
     422             : 
     423             :     sal_uInt16          getRowCount(void);
     424             :     sal_uInt16          getColumnCount(void);
     425             :     ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange >     GetRangeByName(SwFrmFmt* pFmt, SwTable* pTable,
     426             :                         const OUString& sTLName, const OUString& sBRName,
     427             :                         SwRangeDescriptor& rDesc);
     428             : 
     429             :     //SwClient
     430             :    virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) SAL_OVERRIDE;
     431             : 
     432       15872 :     SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
     433             : };
     434             : 
     435             : class SwXCellRange : public cppu::WeakImplHelper7
     436             : <
     437             :     ::com::sun::star::table::XCellRange,
     438             :     ::com::sun::star::lang::XServiceInfo,
     439             :     ::com::sun::star::lang::XUnoTunnel,
     440             :     ::com::sun::star::beans::XPropertySet,
     441             :     ::com::sun::star::chart::XChartDataArray,
     442             :     ::com::sun::star::util::XSortable,
     443             :     ::com::sun::star::sheet::XCellRangeData
     444             : >,
     445             :     public SwClient
     446             : {
     447             :     SwDepend                        aCursorDepend; //the cursor is removed after the doc has been removed
     448             :     ::osl::Mutex m_Mutex;
     449             :     ::cppu::OInterfaceContainerHelper m_ChartListeners;
     450             : 
     451             :     SwRangeDescriptor           aRgDesc;
     452             :     const SfxItemPropertySet*   m_pPropSet;
     453             : 
     454             :     SwUnoCrsr*                  pTblCrsr;
     455             : 
     456             :     sal_Bool                        bFirstRowAsLabel    :1;
     457             :     sal_Bool                        bFirstColumnAsLabel :1;
     458             : 
     459             : public:
     460             :     SwXCellRange(SwUnoCrsr* pCrsr, SwFrmFmt& rFrmFmt, SwRangeDescriptor& rDesc);
     461             :     virtual ~SwXCellRange();
     462             : 
     463             :     TYPEINFO_OVERRIDE();
     464             : 
     465             :     static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
     466             : 
     467             :     //XUnoTunnel
     468             :     virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     469             : 
     470             :     //XCellRange
     471             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > SAL_CALL getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow ) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     472             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom )
     473             :         throw (::com::sun::star::lang::IndexOutOfBoundsException,
     474             :                ::com::sun::star::uno::RuntimeException,
     475             :                std::exception) SAL_OVERRIDE;
     476             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL getCellRangeByName( const OUString& aRange ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     477             : 
     478             :     //XPropertySet
     479             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     480             :     virtual void SAL_CALL setPropertyValue(const OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue)
     481             :         throw (::com::sun::star::beans::UnknownPropertyException,
     482             :                ::com::sun::star::beans::PropertyVetoException,
     483             :                ::com::sun::star::lang::IllegalArgumentException,
     484             :                ::com::sun::star::lang::WrappedTargetException,
     485             :                ::com::sun::star::uno::RuntimeException,
     486             :                std::exception) SAL_OVERRIDE;
     487             :     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(const OUString& PropertyName)
     488             :         throw (::com::sun::star::beans::UnknownPropertyException,
     489             :                ::com::sun::star::lang::WrappedTargetException,
     490             :                ::com::sun::star::uno::RuntimeException,
     491             :                std::exception) SAL_OVERRIDE;
     492             :     virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     493             :     virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     494             :     virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     495             :     virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     496             : 
     497             :     //XChartData
     498             :     virtual void SAL_CALL addChartDataChangeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDataChangeEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     499             :     virtual void SAL_CALL removeChartDataChangeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDataChangeEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     500             :     virtual double SAL_CALL getNotANumber(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     501             :     virtual sal_Bool SAL_CALL isNotANumber( double nNumber ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     502             : 
     503             :     //XChartDataArray
     504             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > > SAL_CALL getData(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     505             :     virtual void SAL_CALL setData( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > >& aData ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     506             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getRowDescriptions(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     507             :     virtual void SAL_CALL setRowDescriptions( const ::com::sun::star::uno::Sequence< OUString >& aRowDescriptions ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     508             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getColumnDescriptions(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     509             :     virtual void SAL_CALL setColumnDescriptions( const ::com::sun::star::uno::Sequence< OUString >& aColumnDescriptions ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     510             : 
     511             :     //XSortable
     512             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL createSortDescriptor(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     513             :     virtual void SAL_CALL sort(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xDescriptor)
     514             :         throw (::com::sun::star::uno::RuntimeException,
     515             :                std::exception) SAL_OVERRIDE;
     516             : 
     517             :     //XCellRangeData
     518             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > > SAL_CALL getDataArray(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     519             :     virtual void SAL_CALL setDataArray( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >& aArray ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     520             : 
     521             :     //XServiceInfo
     522             :     virtual OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     523             :     virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     524             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     525             : 
     526             :     //SwClient
     527             :    virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) SAL_OVERRIDE;
     528             : 
     529         298 :     SwFrmFmt*   GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
     530             :     sal_uInt16      getRowCount(void);
     531             :     sal_uInt16      getColumnCount(void);
     532             : 
     533             :     const SwUnoCrsr* GetTblCrsr() const;
     534             : 
     535             :     // for SwChartDataSequence
     536             :     void GetDataSequence(
     537             :             ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > *pAnySeq,
     538             :             ::com::sun::star::uno::Sequence< OUString > *pTxtSeq,
     539             :             ::com::sun::star::uno::Sequence< double > *pDblSeq,
     540             :             sal_Bool bForceNumberResults = sal_False ) throw (::com::sun::star::uno::RuntimeException);
     541             : 
     542             : };
     543             : 
     544             : class SwXTableRows : public cppu::WeakImplHelper2
     545             : <
     546             :     ::com::sun::star::table::XTableRows,
     547             :     ::com::sun::star::lang::XServiceInfo
     548             : >,
     549             :     public SwClient
     550             : 
     551             : {
     552        4770 :     SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
     553             : protected:
     554             :     virtual ~SwXTableRows();
     555             : public:
     556             :     SwXTableRows(SwFrmFmt& rFrmFmt);
     557             : 
     558             :     TYPEINFO_OVERRIDE();
     559             : 
     560             :     //XIndexAccess
     561             :     virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     562             :     virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     563             : 
     564             :     //XElementAccess
     565             :     virtual ::com::sun::star::uno::Type SAL_CALL getElementType(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     566             :     virtual sal_Bool SAL_CALL hasElements(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     567             : 
     568             :     //XTableRows
     569             :     virtual void SAL_CALL insertByIndex(sal_Int32 nIndex, sal_Int32 nCount)
     570             :         throw (::com::sun::star::uno::RuntimeException,
     571             :                std::exception) SAL_OVERRIDE;
     572             :     virtual void SAL_CALL removeByIndex(sal_Int32 nIndex, sal_Int32 nCount)
     573             :         throw (::com::sun::star::uno::RuntimeException,
     574             :                std::exception) SAL_OVERRIDE;
     575             : 
     576             :     //XServiceInfo
     577             :     virtual OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     578             :     virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     579             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     580             : 
     581             :     //SwClient
     582             :    virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) SAL_OVERRIDE;
     583             : };
     584             : 
     585             : class SwXTableColumns : public cppu::WeakImplHelper2
     586             : <
     587             :     ::com::sun::star::table::XTableColumns,
     588             :     ::com::sun::star::lang::XServiceInfo
     589             : >,
     590             :     public SwClient
     591             : 
     592             : {
     593           7 :     SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
     594             : protected:
     595             :     virtual ~SwXTableColumns();
     596             : public:
     597             :     SwXTableColumns(SwFrmFmt& rFrmFmt);
     598             : 
     599             :     TYPEINFO_OVERRIDE();
     600             : 
     601             :     //XIndexAccess
     602             :     virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     603             :     virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     604             : 
     605             :     //XElementAccess
     606             :     virtual ::com::sun::star::uno::Type SAL_CALL getElementType(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     607             :     virtual sal_Bool SAL_CALL hasElements(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     608             : 
     609             :     //XTableColumns
     610             :     virtual void SAL_CALL insertByIndex(sal_Int32 nIndex, sal_Int32 nCount)
     611             :         throw (::com::sun::star::uno::RuntimeException,
     612             :                std::exception) SAL_OVERRIDE;
     613             :     virtual void SAL_CALL removeByIndex(sal_Int32 nIndex, sal_Int32 nCount)
     614             :         throw (::com::sun::star::uno::RuntimeException,
     615             :                std::exception) SAL_OVERRIDE;
     616             : 
     617             :     //XServiceInfo
     618             :     virtual OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     619             :     virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     620             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     621             : 
     622             :     //SwClient
     623             :    virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) SAL_OVERRIDE;
     624             : };
     625             : 
     626             : #endif
     627             : 
     628             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10