LCOV - code coverage report
Current view: top level - sc/inc - chart2uno.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 1 2 50.0 %
Date: 2015-06-13 12:38:46 Functions: 2 4 50.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.11