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

Generated by: LCOV version 1.11