LCOV - code coverage report
Current view: top level - sw/inc - unotbl.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 9 9 100.0 %
Date: 2014-11-03 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             :                                 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       10720 :     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      206918 :     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       16796 :     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           6 :     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          14 :     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             :     bool                    bIsDescriptor;
     316             :     unsigned short              nRows;
     317             :     unsigned short              nColumns;
     318             : 
     319             :     bool                        bFirstRowAsLabel    :1;
     320             :     bool                        bFirstColumnAsLabel :1;
     321             : protected:
     322             :     virtual ~SwXTextTable();
     323             :     SwXTextTable();
     324             :     SwXTextTable(SwFrmFmt& rFrmFmt);
     325             : 
     326             : public:
     327             :     static css::uno::Reference<css::text::XTextTable>
     328             :             CreateXTextTable(SwFrmFmt * pFrmFmt);
     329             : 
     330             :     SW_DLLPUBLIC static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
     331             : 
     332             :     //XUnoTunnel
     333             :     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;
     334             : 
     335             :     TYPEINFO_OVERRIDE();
     336             : 
     337             :     //XTextTable
     338             :     virtual void SAL_CALL initialize( sal_Int32 nRows, sal_Int32 nColumns ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     339             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XTableRows > SAL_CALL getRows(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     340             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XTableColumns > SAL_CALL getColumns(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     341             :     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;
     342             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getCellNames(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     343             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextTableCursor > SAL_CALL createCursorByCellName( const OUString& aCellName )
     344             :         throw (::com::sun::star::uno::RuntimeException,
     345             :                std::exception) SAL_OVERRIDE;
     346             : 
     347             :     //XTextContent
     348             :     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;
     349             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     350             : 
     351             :     //XComponent
     352             :     virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     353             :     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;
     354             :     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;
     355             : 
     356             :     //XCellRange
     357             :     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;
     358             :     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 )
     359             :         throw (com::sun::star::lang::IndexOutOfBoundsException,
     360             :                ::com::sun::star::uno::RuntimeException,
     361             :                std::exception) SAL_OVERRIDE;
     362             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL getCellRangeByName( const OUString& aRange )
     363             :         throw (::com::sun::star::uno::RuntimeException,
     364             :                std::exception) SAL_OVERRIDE;
     365             : 
     366             :     //XChartDataArray
     367             :     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;
     368             :     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;
     369             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getRowDescriptions(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     370             :     virtual void SAL_CALL setRowDescriptions( const ::com::sun::star::uno::Sequence< OUString >& aRowDescriptions ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     371             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getColumnDescriptions(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     372             :     virtual void SAL_CALL setColumnDescriptions( const ::com::sun::star::uno::Sequence< OUString >& aColumnDescriptions ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     373             : 
     374             :     //XChartData
     375             :     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;
     376             :     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;
     377             :     virtual double SAL_CALL getNotANumber(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     378             :     virtual sal_Bool SAL_CALL isNotANumber( double nNumber ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     379             : 
     380             :     //XSortable
     381             :     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;
     382             :     virtual void SAL_CALL sort(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xDescriptor)
     383             :         throw (::com::sun::star::uno::RuntimeException,
     384             :                std::exception) SAL_OVERRIDE;
     385             : 
     386             :     //XAutoFormattable
     387             :     virtual void SAL_CALL autoFormat(const OUString& aName)
     388             :         throw (::com::sun::star::lang::IllegalArgumentException,
     389             :                ::com::sun::star::uno::RuntimeException,
     390             :                std::exception) SAL_OVERRIDE;
     391             : 
     392             :     //XPropertySet
     393             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     394             :     virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue )
     395             :         throw(::com::sun::star::beans::UnknownPropertyException,
     396             :               ::com::sun::star::beans::PropertyVetoException,
     397             :               ::com::sun::star::lang::IllegalArgumentException,
     398             :               ::com::sun::star::lang::WrappedTargetException,
     399             :               ::com::sun::star::uno::RuntimeException,
     400             :               std::exception) SAL_OVERRIDE;
     401             :     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName )
     402             :         throw (::com::sun::star::beans::UnknownPropertyException,
     403             :                ::com::sun::star::lang::WrappedTargetException,
     404             :                ::com::sun::star::uno::RuntimeException,
     405             :                std::exception) SAL_OVERRIDE;
     406             :     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;
     407             :     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;
     408             :     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;
     409             :     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;
     410             : 
     411             :     //XNamed
     412             :     virtual OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     413             :     virtual void SAL_CALL setName(const OUString& Name_) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     414             : 
     415             :     //XCellRangeData
     416             :     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;
     417             :     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;
     418             : 
     419             :     //XServiceInfo
     420             :     virtual OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     421             :     virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     422             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     423             : 
     424             :     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 );
     425             : 
     426             :     sal_uInt16          getRowCount(void);
     427             :     sal_uInt16          getColumnCount(void);
     428             :     ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange >     GetRangeByName(SwFrmFmt* pFmt, SwTable* pTable,
     429             :                         const OUString& sTLName, const OUString& sBRName,
     430             :                         SwRangeDescriptor& rDesc);
     431             : 
     432             :     //SwClient
     433             :    virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) SAL_OVERRIDE;
     434             : 
     435       39084 :     SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
     436             : };
     437             : 
     438             : class SwXCellRange : public cppu::WeakImplHelper7
     439             : <
     440             :     ::com::sun::star::table::XCellRange,
     441             :     ::com::sun::star::lang::XServiceInfo,
     442             :     ::com::sun::star::lang::XUnoTunnel,
     443             :     ::com::sun::star::beans::XPropertySet,
     444             :     ::com::sun::star::chart::XChartDataArray,
     445             :     ::com::sun::star::util::XSortable,
     446             :     ::com::sun::star::sheet::XCellRangeData
     447             : >,
     448             :     public SwClient
     449             : {
     450             :     SwDepend                        aCursorDepend; //the cursor is removed after the doc has been removed
     451             :     ::osl::Mutex m_Mutex;
     452             :     ::cppu::OInterfaceContainerHelper m_ChartListeners;
     453             : 
     454             :     SwRangeDescriptor           aRgDesc;
     455             :     const SfxItemPropertySet*   m_pPropSet;
     456             : 
     457             :     SwUnoCrsr*                  pTblCrsr;
     458             : 
     459             :     bool                        bFirstRowAsLabel    :1;
     460             :     bool                        bFirstColumnAsLabel :1;
     461             : 
     462             : public:
     463             :     SwXCellRange(SwUnoCrsr* pCrsr, SwFrmFmt& rFrmFmt, SwRangeDescriptor& rDesc);
     464             :     virtual ~SwXCellRange();
     465             : 
     466             :     TYPEINFO_OVERRIDE();
     467             : 
     468             :     static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
     469             : 
     470             :     //XUnoTunnel
     471             :     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;
     472             : 
     473             :     //XCellRange
     474             :     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;
     475             :     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 )
     476             :         throw (::com::sun::star::lang::IndexOutOfBoundsException,
     477             :                ::com::sun::star::uno::RuntimeException,
     478             :                std::exception) SAL_OVERRIDE;
     479             :     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;
     480             : 
     481             :     //XPropertySet
     482             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     483             :     virtual void SAL_CALL setPropertyValue(const OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue)
     484             :         throw (::com::sun::star::beans::UnknownPropertyException,
     485             :                ::com::sun::star::beans::PropertyVetoException,
     486             :                ::com::sun::star::lang::IllegalArgumentException,
     487             :                ::com::sun::star::lang::WrappedTargetException,
     488             :                ::com::sun::star::uno::RuntimeException,
     489             :                std::exception) SAL_OVERRIDE;
     490             :     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(const OUString& PropertyName)
     491             :         throw (::com::sun::star::beans::UnknownPropertyException,
     492             :                ::com::sun::star::lang::WrappedTargetException,
     493             :                ::com::sun::star::uno::RuntimeException,
     494             :                std::exception) SAL_OVERRIDE;
     495             :     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;
     496             :     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;
     497             :     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;
     498             :     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;
     499             : 
     500             :     //XChartData
     501             :     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;
     502             :     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;
     503             :     virtual double SAL_CALL getNotANumber(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     504             :     virtual sal_Bool SAL_CALL isNotANumber( double nNumber ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     505             : 
     506             :     //XChartDataArray
     507             :     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;
     508             :     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;
     509             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getRowDescriptions(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     510             :     virtual void SAL_CALL setRowDescriptions( const ::com::sun::star::uno::Sequence< OUString >& aRowDescriptions ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     511             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getColumnDescriptions(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     512             :     virtual void SAL_CALL setColumnDescriptions( const ::com::sun::star::uno::Sequence< OUString >& aColumnDescriptions ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     513             : 
     514             :     //XSortable
     515             :     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;
     516             :     virtual void SAL_CALL sort(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xDescriptor)
     517             :         throw (::com::sun::star::uno::RuntimeException,
     518             :                std::exception) SAL_OVERRIDE;
     519             : 
     520             :     //XCellRangeData
     521             :     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;
     522             :     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;
     523             : 
     524             :     //XServiceInfo
     525             :     virtual OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     526             :     virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     527             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     528             : 
     529             :     //SwClient
     530             :    virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) SAL_OVERRIDE;
     531             : 
     532         596 :     SwFrmFmt*   GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
     533             :     sal_uInt16      getRowCount(void);
     534             :     sal_uInt16      getColumnCount(void);
     535             : 
     536             :     const SwUnoCrsr* GetTblCrsr() const;
     537             : 
     538             :     // for SwChartDataSequence
     539             :     void GetDataSequence(
     540             :             ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > *pAnySeq,
     541             :             ::com::sun::star::uno::Sequence< OUString > *pTxtSeq,
     542             :             ::com::sun::star::uno::Sequence< double > *pDblSeq,
     543             :             bool bForceNumberResults = false ) throw (::com::sun::star::uno::RuntimeException);
     544             : 
     545             : };
     546             : 
     547             : class SwXTableRows : public cppu::WeakImplHelper2
     548             : <
     549             :     ::com::sun::star::table::XTableRows,
     550             :     ::com::sun::star::lang::XServiceInfo
     551             : >,
     552             :     public SwClient
     553             : 
     554             : {
     555       11852 :     SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
     556             : protected:
     557             :     virtual ~SwXTableRows();
     558             : public:
     559             :     SwXTableRows(SwFrmFmt& rFrmFmt);
     560             : 
     561             :     TYPEINFO_OVERRIDE();
     562             : 
     563             :     //XIndexAccess
     564             :     virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     565             :     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;
     566             : 
     567             :     //XElementAccess
     568             :     virtual ::com::sun::star::uno::Type SAL_CALL getElementType(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     569             :     virtual sal_Bool SAL_CALL hasElements(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     570             : 
     571             :     //XTableRows
     572             :     virtual void SAL_CALL insertByIndex(sal_Int32 nIndex, sal_Int32 nCount)
     573             :         throw (::com::sun::star::uno::RuntimeException,
     574             :                std::exception) SAL_OVERRIDE;
     575             :     virtual void SAL_CALL removeByIndex(sal_Int32 nIndex, sal_Int32 nCount)
     576             :         throw (::com::sun::star::uno::RuntimeException,
     577             :                std::exception) SAL_OVERRIDE;
     578             : 
     579             :     //XServiceInfo
     580             :     virtual OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     581             :     virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     582             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     583             : 
     584             :     //SwClient
     585             :    virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) SAL_OVERRIDE;
     586             : };
     587             : 
     588             : class SwXTableColumns : public cppu::WeakImplHelper2
     589             : <
     590             :     ::com::sun::star::table::XTableColumns,
     591             :     ::com::sun::star::lang::XServiceInfo
     592             : >,
     593             :     public SwClient
     594             : 
     595             : {
     596          18 :     SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
     597             : protected:
     598             :     virtual ~SwXTableColumns();
     599             : public:
     600             :     SwXTableColumns(SwFrmFmt& rFrmFmt);
     601             : 
     602             :     TYPEINFO_OVERRIDE();
     603             : 
     604             :     //XIndexAccess
     605             :     virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     606             :     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;
     607             : 
     608             :     //XElementAccess
     609             :     virtual ::com::sun::star::uno::Type SAL_CALL getElementType(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     610             :     virtual sal_Bool SAL_CALL hasElements(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     611             : 
     612             :     //XTableColumns
     613             :     virtual void SAL_CALL insertByIndex(sal_Int32 nIndex, sal_Int32 nCount)
     614             :         throw (::com::sun::star::uno::RuntimeException,
     615             :                std::exception) SAL_OVERRIDE;
     616             :     virtual void SAL_CALL removeByIndex(sal_Int32 nIndex, sal_Int32 nCount)
     617             :         throw (::com::sun::star::uno::RuntimeException,
     618             :                std::exception) SAL_OVERRIDE;
     619             : 
     620             :     //XServiceInfo
     621             :     virtual OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     622             :     virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     623             :     virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     624             : 
     625             :     //SwClient
     626             :    virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) SAL_OVERRIDE;
     627             : };
     628             : 
     629             : int sw_CompareCellRanges(
     630             :         const OUString &rRange1StartCell, const OUString &rRange1EndCell,
     631             :         const OUString &rRange2StartCell, const OUString &rRange2EndCell,
     632             :         bool bCmpColsFirst );
     633             : 
     634             : void sw_NormalizeRange( OUString &rCell1, OUString &rCell2 );
     635             : 
     636             : void sw_GetCellPosition( const OUString &rCellName, sal_Int32 &rColumn, sal_Int32 &rRow);
     637             : 
     638             : OUString sw_GetCellName( sal_Int32 nColumn, sal_Int32 nRow );
     639             : 
     640             : int sw_CompareCellsByColFirst( const OUString &rCellName1, const OUString &rCellName2 );
     641             : 
     642             : #endif
     643             : 
     644             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10