LCOV - code coverage report
Current view: top level - sc/inc - chart2uno.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 1 0.0 %
Date: 2014-04-14 Functions: 0 3 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef SC_CHART2UNO_HXX
      21             : #define SC_CHART2UNO_HXX
      22             : 
      23             : #include "cellsuno.hxx"
      24             : #include "rangelst.hxx"
      25             : #include "externalrefmgr.hxx"
      26             : #include "types.hxx"
      27             : #include "chartlis.hxx"
      28             : 
      29             : #include <svl/lstner.hxx>
      30             : #include <com/sun/star/chart/ChartDataRowSource.hpp>
      31             : #include <com/sun/star/chart2/data/XDataProvider.hpp>
      32             : #include <com/sun/star/chart2/data/XSheetDataProvider.hpp>
      33             : #include <com/sun/star/chart2/data/XRangeXMLConversion.hpp>
      34             : #include <com/sun/star/chart2/data/XDataSource.hpp>
      35             : #include <com/sun/star/chart2/data/XDataSequence.hpp>
      36             : #include <com/sun/star/chart2/data/XTextualDataSequence.hpp>
      37             : #include <com/sun/star/chart2/data/XNumericalDataSequence.hpp>
      38             : #include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
      39             : #include <com/sun/star/chart2/data/DataSequenceRole.hpp>
      40             : #include <com/sun/star/chart2/XTimeBased.hpp>
      41             : #include <com/sun/star/lang/XServiceInfo.hpp>
      42             : #include <com/sun/star/beans/XPropertySet.hpp>
      43             : #include <com/sun/star/util/XCloneable.hpp>
      44             : #include <com/sun/star/util/XModifyBroadcaster.hpp>
      45             : #include <cppuhelper/implbase2.hxx>
      46             : #include <cppuhelper/implbase5.hxx>
      47             : #include <cppuhelper/implbase8.hxx>
      48             : #include <rtl/ustring.hxx>
      49             : #include <svl/itemprop.hxx>
      50             : 
      51             : #include <list>
      52             : #include <vector>
      53             : #include <boost/shared_ptr.hpp>
      54             : #include <boost/unordered_set.hpp>
      55             : #include <boost/noncopyable.hpp>
      56             : #include <boost/scoped_ptr.hpp>
      57             : 
      58             : class ScDocument;
      59             : 
      60             : // DataProvider
      61             : class ScChart2DataProvider : public
      62             :                 ::cppu::WeakImplHelper5<
      63             :                     ::com::sun::star::chart2::data::XDataProvider,
      64             :                     ::com::sun::star::chart2::data::XSheetDataProvider,
      65             :                     ::com::sun::star::chart2::data::XRangeXMLConversion,
      66             :                     ::com::sun::star::beans::XPropertySet,
      67             :                     ::com::sun::star::lang::XServiceInfo>,
      68             :                 SfxListener
      69             : {
      70             : public:
      71             : 
      72             :     explicit ScChart2DataProvider( ScDocument* pDoc );
      73             :     virtual ~ScChart2DataProvider();
      74             :     virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
      75             : 
      76             :     // XDataProvider
      77             :     virtual sal_Bool SAL_CALL createDataSourcePossible(
      78             :         const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArguments )
      79             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      80             : 
      81             :     virtual ::com::sun::star::uno::Reference<
      82             :         ::com::sun::star::chart2::data::XDataSource > SAL_CALL createDataSource(
      83             :             const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArguments )
      84             :             throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      85             : 
      86             :     virtual ::com::sun::star::uno::Sequence<
      87             :         ::com::sun::star::beans::PropertyValue > SAL_CALL detectArguments(
      88             :             const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSource >& xDataSource )
      89             :             throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      90             : 
      91             :     virtual sal_Bool SAL_CALL createDataSequenceByRangeRepresentationPossible(
      92             :         const OUString& aRangeRepresentation )
      93             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      94             : 
      95             :     virtual ::com::sun::star::uno::Reference<
      96             :         ::com::sun::star::chart2::data::XDataSequence > SAL_CALL createDataSequenceByRangeRepresentation(
      97             :             const OUString& aRangeRepresentation )
      98             :             throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      99             : 
     100             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XRangeSelection > SAL_CALL getRangeSelection()
     101             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     102             : 
     103             :     // XSheetDataProvider
     104             :     virtual sal_Bool SAL_CALL createDataSequenceByFormulaTokensPossible(
     105             :         const ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::FormulaToken >& aTokens )
     106             :             throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     107             : 
     108             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >
     109             :         SAL_CALL createDataSequenceByFormulaTokens(
     110             :             const ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::FormulaToken >& aTokens )
     111             :                 throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     112             : 
     113             :     // XRangeXMLConversion
     114             :     virtual OUString SAL_CALL convertRangeToXML( const OUString& sRangeRepresentation )
     115             :         throw ( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException, std::exception ) SAL_OVERRIDE;
     116             : 
     117             :     virtual OUString SAL_CALL convertRangeFromXML( const OUString& sXMLRange )
     118             :         throw ( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException, std::exception ) SAL_OVERRIDE;
     119             : 
     120             :     // XPropertySet
     121             :     virtual ::com::sun::star::uno::Reference<
     122             :         ::com::sun::star::beans::XPropertySetInfo> SAL_CALL
     123             :         getPropertySetInfo() throw( ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     124             : 
     125             :     virtual void SAL_CALL setPropertyValue(
     126             :             const OUString& rPropertyName,
     127             :             const ::com::sun::star::uno::Any& rValue)
     128             :         throw( ::com::sun::star::beans::UnknownPropertyException,
     129             :                 ::com::sun::star::beans::PropertyVetoException,
     130             :                 ::com::sun::star::lang::IllegalArgumentException,
     131             :                 ::com::sun::star::lang::WrappedTargetException,
     132             :                 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     133             : 
     134             :     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
     135             :             const OUString& rPropertyName)
     136             :         throw( ::com::sun::star::beans::UnknownPropertyException,
     137             :                 ::com::sun::star::lang::WrappedTargetException,
     138             :                 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     139             : 
     140             :     virtual void SAL_CALL addPropertyChangeListener(
     141             :             const OUString& rPropertyName,
     142             :             const ::com::sun::star::uno::Reference<
     143             :             ::com::sun::star::beans::XPropertyChangeListener>& xListener)
     144             :         throw( ::com::sun::star::beans::UnknownPropertyException,
     145             :                 ::com::sun::star::lang::WrappedTargetException,
     146             :                 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     147             : 
     148             :     virtual void SAL_CALL removePropertyChangeListener(
     149             :             const OUString& rPropertyName,
     150             :             const ::com::sun::star::uno::Reference<
     151             :             ::com::sun::star::beans::XPropertyChangeListener>& rListener)
     152             :         throw( ::com::sun::star::beans::UnknownPropertyException,
     153             :                 ::com::sun::star::lang::WrappedTargetException,
     154             :                 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     155             : 
     156             :     virtual void SAL_CALL addVetoableChangeListener(
     157             :             const OUString& rPropertyName,
     158             :             const ::com::sun::star::uno::Reference<
     159             :             ::com::sun::star::beans::XVetoableChangeListener>& rListener)
     160             :         throw( ::com::sun::star::beans::UnknownPropertyException,
     161             :                 ::com::sun::star::lang::WrappedTargetException,
     162             :                 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     163             : 
     164             :     virtual void SAL_CALL removeVetoableChangeListener(
     165             :             const OUString& rPropertyName,
     166             :             const ::com::sun::star::uno::Reference<
     167             :             ::com::sun::star::beans::XVetoableChangeListener>& rListener)
     168             :         throw( ::com::sun::star::beans::UnknownPropertyException,
     169             :                 ::com::sun::star::lang::WrappedTargetException,
     170             :                 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     171             : 
     172             :     // XServiceInfo
     173             :     virtual OUString SAL_CALL getImplementationName() throw(
     174             :             ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     175             : 
     176             :     virtual sal_Bool SAL_CALL supportsService( const OUString&
     177             :             rServiceName) throw( ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     178             : 
     179             :     virtual ::com::sun::star::uno::Sequence< OUString> SAL_CALL
     180             :         getSupportedServiceNames() throw(
     181             :                 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     182             : 
     183             : private:
     184             : 
     185             :     ScDocument*                 m_pDocument;
     186             :     SfxItemPropertySet          m_aPropSet;
     187             :     bool                        m_bIncludeHiddenCells;
     188             : };
     189             : 
     190             : // DataSource
     191             : class ScChart2DataSource : public
     192             :                 ::cppu::WeakImplHelper2<
     193             :                     ::com::sun::star::chart2::data::XDataSource,
     194             :                     ::com::sun::star::lang::XServiceInfo>,
     195             :                 SfxListener
     196             : {
     197             : public:
     198             : 
     199             :     explicit ScChart2DataSource( ScDocument* pDoc);
     200             :     virtual ~ScChart2DataSource();
     201             :     virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
     202             : 
     203             :     // XDataSource
     204             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference<
     205             :             ::com::sun::star::chart2::data::XLabeledDataSequence > > SAL_CALL
     206             :         getDataSequences() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     207             : 
     208             :     // XServiceInfo
     209             :     virtual OUString SAL_CALL getImplementationName() throw(
     210             :             ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     211             : 
     212             :     virtual sal_Bool SAL_CALL supportsService( const OUString&
     213             :             rServiceName) throw( ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     214             : 
     215             :     virtual ::com::sun::star::uno::Sequence< OUString> SAL_CALL
     216             :         getSupportedServiceNames() throw(
     217             :                 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     218             : 
     219             :     // implementation
     220             : 
     221             :     void AddLabeledSequence(const com::sun::star::uno::Reference < com::sun::star::chart2::data::XLabeledDataSequence >& xNew);
     222             : 
     223             : private:
     224             : 
     225             :     ScDocument*                 m_pDocument;
     226             :     typedef std::list < com::sun::star::uno::Reference< com::sun::star::chart2::data::XLabeledDataSequence > >  LabeledList;
     227             :     LabeledList                 m_aLabeledSequences;
     228             : 
     229             : };
     230             : 
     231             : // DataSequence
     232             : class ScChart2DataSequence : public
     233             :                 ::cppu::WeakImplHelper8<
     234             :                     ::com::sun::star::chart2::data::XDataSequence,
     235             :                     ::com::sun::star::chart2::data::XTextualDataSequence,
     236             :                     ::com::sun::star::chart2::data::XNumericalDataSequence,
     237             :                     com::sun::star::chart2::XTimeBased,
     238             :                     ::com::sun::star::util::XCloneable,
     239             :                     ::com::sun::star::util::XModifyBroadcaster,
     240             :                     ::com::sun::star::beans::XPropertySet,
     241             :                     ::com::sun::star::lang::XServiceInfo>,
     242             :                 SfxListener,
     243             :                 boost::noncopyable
     244             : {
     245             : public:
     246             :     explicit ScChart2DataSequence( ScDocument* pDoc,
     247             :             const com::sun::star::uno::Reference< com::sun::star::chart2::data::XDataProvider >& xDP,
     248             :             ::std::vector<ScTokenRef>* pTokens, bool bIncludeHiddenCells );
     249             : 
     250             :     virtual ~ScChart2DataSequence();
     251             :     virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
     252             : 
     253             :     // XDataSequence
     254             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
     255             :         SAL_CALL getData()
     256             :             throw (::com::sun::star::uno::RuntimeException,
     257             :                    std::exception) SAL_OVERRIDE;
     258             :     virtual OUString SAL_CALL getSourceRangeRepresentation()
     259             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     260             :     virtual ::com::sun::star::uno::Sequence< OUString >
     261             :         SAL_CALL generateLabel(::com::sun::star::chart2::data::LabelOrigin nOrigin)
     262             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     263             :     virtual ::sal_Int32 SAL_CALL getNumberFormatKeyByIndex( ::sal_Int32 nIndex )
     264             :         throw (::com::sun::star::lang::IndexOutOfBoundsException,
     265             :                ::com::sun::star::uno::RuntimeException,
     266             :                std::exception) SAL_OVERRIDE;
     267             : 
     268             :     // XNumericalDataSequence
     269             :     virtual ::com::sun::star::uno::Sequence< double >
     270             :         SAL_CALL getNumericalData()
     271             :             throw (::com::sun::star::uno::RuntimeException,
     272             :                    std::exception) SAL_OVERRIDE;
     273             : 
     274             :     // XTextualDataSequence
     275             :     virtual ::com::sun::star::uno::Sequence< OUString >
     276             :         SAL_CALL getTextualData()
     277             :             throw (::com::sun::star::uno::RuntimeException,
     278             :                    std::exception) SAL_OVERRIDE;
     279             : 
     280             :     // XTimeBased
     281             :     virtual sal_Bool SAL_CALL switchToNext(sal_Bool bWrap) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     282             :     virtual sal_Bool SAL_CALL setToPointInTime(sal_Int32 nPoint) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     283             : 
     284             :     virtual void SAL_CALL setRange(sal_Int32 nStart, sal_Int32 nEnd) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     285             : 
     286             :     // XPropertySet
     287             :     virtual ::com::sun::star::uno::Reference<
     288             :         ::com::sun::star::beans::XPropertySetInfo> SAL_CALL
     289             :         getPropertySetInfo() throw( ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     290             : 
     291             :     virtual void SAL_CALL setPropertyValue(
     292             :             const OUString& rPropertyName,
     293             :             const ::com::sun::star::uno::Any& rValue)
     294             :         throw( ::com::sun::star::beans::UnknownPropertyException,
     295             :                 ::com::sun::star::beans::PropertyVetoException,
     296             :                 ::com::sun::star::lang::IllegalArgumentException,
     297             :                 ::com::sun::star::lang::WrappedTargetException,
     298             :                 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     299             : 
     300             :     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
     301             :             const OUString& rPropertyName)
     302             :         throw(::com::sun::star::beans::UnknownPropertyException,
     303             :               ::com::sun::star::lang::WrappedTargetException,
     304             :               ::com::sun::star::uno::RuntimeException,
     305             :               std::exception) SAL_OVERRIDE;
     306             : 
     307             :     virtual void SAL_CALL addPropertyChangeListener(
     308             :             const OUString& rPropertyName,
     309             :             const ::com::sun::star::uno::Reference<
     310             :             ::com::sun::star::beans::XPropertyChangeListener>& xListener)
     311             :         throw( ::com::sun::star::beans::UnknownPropertyException,
     312             :                 ::com::sun::star::lang::WrappedTargetException,
     313             :                 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     314             : 
     315             :     virtual void SAL_CALL removePropertyChangeListener(
     316             :             const OUString& rPropertyName,
     317             :             const ::com::sun::star::uno::Reference<
     318             :             ::com::sun::star::beans::XPropertyChangeListener>& rListener)
     319             :         throw( ::com::sun::star::beans::UnknownPropertyException,
     320             :                 ::com::sun::star::lang::WrappedTargetException,
     321             :                 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     322             : 
     323             :     virtual void SAL_CALL addVetoableChangeListener(
     324             :             const OUString& rPropertyName,
     325             :             const ::com::sun::star::uno::Reference<
     326             :             ::com::sun::star::beans::XVetoableChangeListener>& rListener)
     327             :         throw( ::com::sun::star::beans::UnknownPropertyException,
     328             :                 ::com::sun::star::lang::WrappedTargetException,
     329             :                 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     330             : 
     331             :     virtual void SAL_CALL removeVetoableChangeListener(
     332             :             const OUString& rPropertyName,
     333             :             const ::com::sun::star::uno::Reference<
     334             :             ::com::sun::star::beans::XVetoableChangeListener>& rListener)
     335             :         throw( ::com::sun::star::beans::UnknownPropertyException,
     336             :                 ::com::sun::star::lang::WrappedTargetException,
     337             :                 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     338             : 
     339             :     // XCloneable
     340             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone()
     341             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     342             : 
     343             :     // XModifyBroadcaster
     344             :     virtual void SAL_CALL addModifyListener(
     345             :         const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
     346             :         throw (::com::sun::star::uno::RuntimeException,
     347             :                std::exception) SAL_OVERRIDE;
     348             :     virtual void SAL_CALL removeModifyListener(
     349             :         const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
     350             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     351             : 
     352             :     // XServiceInfo
     353             :     virtual OUString SAL_CALL getImplementationName() throw(
     354             :             ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     355             : 
     356             :     virtual sal_Bool SAL_CALL supportsService( const OUString&
     357             :             rServiceName) throw( ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     358             : 
     359             :     virtual ::com::sun::star::uno::Sequence< OUString> SAL_CALL
     360             :         getSupportedServiceNames() throw(
     361             :                 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     362             : 
     363             : private:
     364             :     void setDataChangedHint(bool b);
     365             : 
     366             :     // Implementation
     367             :     void    RefChanged();
     368             :     DECL_LINK( ValueListenerHdl, SfxHint* );
     369             : 
     370             : private:
     371             :     ScChart2DataSequence(); // disabled
     372             :     ScChart2DataSequence(const ScChart2DataSequence& r); // disabled
     373             : 
     374             :     class ExternalRefListener : public ScExternalRefManager::LinkListener
     375             :     {
     376             :     public:
     377             :         ExternalRefListener(ScChart2DataSequence& rParent, ScDocument* pDoc);
     378             :         virtual ~ExternalRefListener();
     379             :         virtual void notify(sal_uInt16 nFileId, ScExternalRefManager::LinkUpdateType eType) SAL_OVERRIDE;
     380             :         void addFileId(sal_uInt16 nFileId);
     381             :         void removeFileId(sal_uInt16 nFileId);
     382             :         const ::boost::unordered_set<sal_uInt16>& getAllFileIds();
     383             : 
     384             :     private:
     385             :         ExternalRefListener();
     386             :         ExternalRefListener(const ExternalRefListener& r);
     387             : 
     388             :         ScChart2DataSequence&       mrParent;
     389             :         ::boost::unordered_set<sal_uInt16> maFileIds;
     390             :         ScDocument*                 mpDoc;
     391             :     };
     392             : 
     393             :     /**
     394             :      * Build an internal data array to cache the data ranges, and other
     395             :      * information such as hidden values.
     396             :      */
     397             :     void BuildDataCache();
     398             : 
     399             :     void RebuildDataCache();
     400             : 
     401             :     sal_Int32 FillCacheFromExternalRef(const ScTokenRef& pToken);
     402             : 
     403             :     void UpdateTokensFromRanges(const ScRangeList& rRanges);
     404             : 
     405             :     ExternalRefListener* GetExtRefListener();
     406             : 
     407             :     void StopListeningToAllExternalRefs();
     408             : 
     409             :     void CopyData(const ScChart2DataSequence& r);
     410             : 
     411             : private:
     412             : 
     413             :     // data array
     414           0 :     struct Item
     415             :     {
     416             :         double              mfValue;
     417             :         OUString     maString;
     418             :         bool                mbIsValue;
     419             :         Item();
     420             :     };
     421             : 
     422             :     class HiddenRangeListener : public ScChartHiddenRangeListener
     423             :     {
     424             :     public:
     425             :         HiddenRangeListener(ScChart2DataSequence& rParent);
     426             :         virtual ~HiddenRangeListener();
     427             : 
     428             :         virtual void notify() SAL_OVERRIDE;
     429             : 
     430             :     private:
     431             :         ScChart2DataSequence& mrParent;
     432             :     };
     433             : 
     434             :     ::std::list<Item>           m_aDataArray;
     435             : 
     436             :     /**
     437             :      * Cached data for getData.  We may also need to cache data for the
     438             :      * numerical and textural data series if they turn out to be bottlenecks
     439             :      * under certain scenarios.
     440             :      */
     441             :     ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > m_aMixedDataCache;
     442             : 
     443             :     ::com::sun::star::uno::Sequence<sal_Int32>  m_aHiddenValues;
     444             : 
     445             :     // properties
     446             :     ::com::sun::star::chart2::data::DataSequenceRole  m_aRole;
     447             :     bool                        m_bIncludeHiddenCells;
     448             : 
     449             :     // internals
     450             :     typedef boost::scoped_ptr<std::vector<ScTokenRef> >  TokenListPtr;
     451             :     typedef boost::scoped_ptr<std::vector<sal_uInt32> >  RangeIndexMapPtr;
     452             :     typedef boost::scoped_ptr<ExternalRefListener>       ExtRefListenerPtr;
     453             : 
     454             :     sal_Int64                   m_nObjectId;
     455             :     ScDocument*                 m_pDocument;
     456             :     TokenListPtr                m_pTokens;
     457             :     RangeIndexMapPtr            m_pRangeIndices;
     458             :     ExtRefListenerPtr           m_pExtRefListener;
     459             :     com::sun::star::uno::Reference < com::sun::star::chart2::data::XDataProvider > m_xDataProvider;
     460             :     SfxItemPropertySet          m_aPropSet;
     461             : 
     462             :     boost::scoped_ptr<HiddenRangeListener> m_pHiddenListener;
     463             : 
     464             :     ScLinkListener*             m_pValueListener;
     465             :     XModifyListenerArr_Impl     m_aValueListeners;
     466             : 
     467             :     bool                        m_bGotDataChangedHint;
     468             :     bool                        m_bExtDataRebuildQueued;
     469             : 
     470             :     bool mbTimeBased;
     471             :     SCTAB mnTimeBasedStart;
     472             :     SCTAB mnTimeBasedEnd;
     473             :     SCTAB mnCurrentTab;
     474             : 
     475             : };
     476             : 
     477             : #endif // SC_CHART2UNO_HXX
     478             : 
     479             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10