LCOV - code coverage report
Current view: top level - libreoffice/sc/source/filter/inc - xeextlst.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 1 8 12.5 %
Date: 2012-12-27 Functions: 2 15 13.3 %
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             : 
      10             : #ifndef SC_EXCEL_EXTLST_HXX
      11             : #define SC_EXCEL_EXTLST_HXX
      12             : 
      13             : #include "xerecord.hxx"
      14             : #include "xeroot.hxx"
      15             : 
      16             : #include "colorscale.hxx"
      17             : 
      18             : #include <boost/scoped_ptr.hpp>
      19             : 
      20             : enum XclExpExtType
      21             : {
      22             :     XclExpExtDataBarType
      23             : };
      24             : 
      25             : /**
      26             :  * Base class for ext entries. Extend this class to provide the needed functionality
      27             :  *
      28             :  * Right now the only supported subclass is XclExpExtCondFormat
      29             :  */
      30           0 : class XclExpExt : public XclExpRecordBase, public XclExpRoot
      31             : {
      32             : public:
      33             :     explicit XclExpExt( const XclExpRoot& rRoot );
      34             :     virtual XclExpExtType GetType() = 0;
      35             : 
      36             : protected:
      37             :     rtl::OString maURI;
      38             : };
      39             : 
      40           0 : class XclExpExtCfvo : public XclExpRecordBase, protected XclExpRoot
      41             : {
      42             : public:
      43             :     XclExpExtCfvo( const XclExpRoot& rRoot, const ScColorScaleEntry& rEntry, const ScAddress& rPos, bool bFirst );
      44             :     virtual void SaveXml( XclExpXmlStream& rStrm );
      45             : 
      46             : private:
      47             :     ScColorScaleEntryType meType;
      48             :     rtl::OString maValue;
      49             :     bool mbFirst;
      50             : };
      51             : 
      52             : class XclExpExtNegativeColor
      53             : {
      54             : public:
      55             :     XclExpExtNegativeColor( const Color& rColor );
      56             :     void SaveXml( XclExpXmlStream& rStrm);
      57             : 
      58             : private:
      59             :     Color maColor;
      60             : };
      61             : 
      62             : class XclExpExtAxisColor
      63             : {
      64             : public:
      65             :     XclExpExtAxisColor( const Color& maColor );
      66             :     void SaveXml( XclExpXmlStream& rStrm );
      67             : 
      68             : private:
      69             :     Color maAxisColor;
      70             : };
      71             : 
      72           0 : class XclExpExtDataBar : public XclExpRecordBase, protected XclExpRoot
      73             : {
      74             : public:
      75             :     explicit XclExpExtDataBar( const XclExpRoot& rRoot, const ScDataBarFormat& rFormat, const ScAddress& rPos );
      76             :     virtual void SaveXml( XclExpXmlStream& rStrm );
      77             : 
      78             : private:
      79             :     databar::ScAxisPostion meAxisPosition;
      80             : 
      81             :     boost::scoped_ptr<XclExpExtCfvo> mpLowerLimit;
      82             :     boost::scoped_ptr<XclExpExtCfvo> mpUpperLimit;
      83             :     boost::scoped_ptr<XclExpExtNegativeColor> mpNegativeColor;
      84             :     boost::scoped_ptr<XclExpExtAxisColor> mpAxisColor;
      85             : 
      86             : };
      87             : 
      88             : typedef boost::shared_ptr<XclExpExtDataBar> XclExpExtDataBarRef;
      89             : 
      90           0 : class XclExpExtCfRule : public XclExpRecordBase, protected XclExpRoot
      91             : {
      92             : public:
      93             :     XclExpExtCfRule( const XclExpRoot& rRoot, const ScDataBarFormat& rFormat, const ScAddress& rPos, const rtl::OString& rId );
      94             :     virtual void SaveXml( XclExpXmlStream& rStrm );
      95             : 
      96             : private:
      97             :     XclExpExtDataBarRef maDataBar;
      98             :     rtl::OString maId;
      99             : };
     100             : 
     101             : typedef boost::shared_ptr<XclExpExt> XclExpExtRef;
     102             : typedef boost::shared_ptr<XclExpExtCfRule> XclExpExtCfRuleRef;
     103             : 
     104           0 : class XclExpExtConditionalFormatting : public XclExpRecordBase, protected XclExpRoot
     105             : {
     106             : public:
     107             :     explicit XclExpExtConditionalFormatting( const XclExpRoot& rRoot, const ScDataBarFormat& rFormat, const ScAddress& rPos, const rtl::OString& rId );
     108             :     virtual void SaveXml( XclExpXmlStream& rStrm );
     109             : 
     110             : private:
     111             :     XclExpExtCfRuleRef maCfRule;
     112             :     ScRangeList maRange;
     113             : };
     114             : 
     115             : typedef boost::shared_ptr<XclExpExtConditionalFormatting> XclExpExtConditionalFormattingRef;
     116             : 
     117           0 : class XclExpExtCondFormat : public XclExpExt
     118             : {
     119             : public:
     120             :     XclExpExtCondFormat( const XclExpRoot& rRoot );
     121             :     virtual void SaveXml( XclExpXmlStream& rStrm );
     122             : 
     123           0 :     virtual XclExpExtType GetType() { return XclExpExtDataBarType; }
     124             : 
     125             :     void AddRecord( XclExpExtConditionalFormattingRef aFormat );
     126             : 
     127             : private:
     128             :     XclExpRecordList< XclExpExtConditionalFormatting > maCF;
     129             : };
     130             : 
     131           4 : class XclExtLst : public XclExpRecordBase, public XclExpRoot
     132             : {
     133             : public:
     134             :     explicit XclExtLst( const XclExpRoot& rRoot);
     135             :     virtual void SaveXml( XclExpXmlStream& rStrm );
     136             : 
     137             :     void AddRecord( XclExpExtRef aEntry );
     138             : 
     139             :     XclExpExtRef GetItem( XclExpExtType eType );
     140             : 
     141             : private:
     142             :     XclExpRecordList< XclExpExt > maExtEntries;
     143             : };
     144             : 
     145             : typedef boost::shared_ptr< XclExtLst > XclExtLstRef;
     146             : 
     147             : #endif
     148             : 
     149             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10