LCOV - code coverage report
Current view: top level - libreoffice/svx/inc/svx - chrtitem.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 6 18 33.3 %
Date: 2012-12-17 Functions: 12 32 37.5 %
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             : #ifndef _SVX_CHRTITEM_HXX
      20             : #define _SVX_CHRTITEM_HXX
      21             : 
      22             : #include <svl/eitem.hxx>
      23             : #include "svx/svxdllapi.h"
      24             : 
      25             : //------------------------------------------------------------------------
      26             : 
      27             : enum SvxChartStyle
      28             : {
      29             :     CHSTYLE_2D_LINE,
      30             :     CHSTYLE_2D_STACKEDLINE,
      31             :     CHSTYLE_2D_PERCENTLINE,
      32             :     CHSTYLE_2D_COLUMN,
      33             :     CHSTYLE_2D_STACKEDCOLUMN,
      34             :     CHSTYLE_2D_PERCENTCOLUMN,
      35             :     CHSTYLE_2D_BAR,
      36             :     CHSTYLE_2D_STACKEDBAR,
      37             :     CHSTYLE_2D_PERCENTBAR,
      38             :     CHSTYLE_2D_AREA,
      39             :     CHSTYLE_2D_STACKEDAREA,
      40             :     CHSTYLE_2D_PERCENTAREA,
      41             :     CHSTYLE_2D_PIE,
      42             :     CHSTYLE_3D_STRIPE,
      43             :     CHSTYLE_3D_COLUMN,
      44             :     CHSTYLE_3D_FLATCOLUMN,
      45             :     CHSTYLE_3D_STACKEDFLATCOLUMN,
      46             :     CHSTYLE_3D_PERCENTFLATCOLUMN,
      47             :     CHSTYLE_3D_AREA,
      48             :     CHSTYLE_3D_STACKEDAREA,
      49             :     CHSTYLE_3D_PERCENTAREA,
      50             :     CHSTYLE_3D_SURFACE,
      51             :     CHSTYLE_3D_PIE,
      52             :     CHSTYLE_2D_XY,
      53             :     CHSTYLE_3D_XYZ,
      54             :     CHSTYLE_2D_LINESYMBOLS,
      55             :     CHSTYLE_2D_STACKEDLINESYM,
      56             :     CHSTYLE_2D_PERCENTLINESYM,
      57             :     CHSTYLE_2D_XYSYMBOLS,
      58             :     CHSTYLE_3D_XYZSYMBOLS,
      59             :     CHSTYLE_2D_DONUT1,
      60             :     CHSTYLE_2D_DONUT2,
      61             :     CHSTYLE_3D_BAR,
      62             :     CHSTYLE_3D_FLATBAR,
      63             :     CHSTYLE_3D_STACKEDFLATBAR,
      64             :     CHSTYLE_3D_PERCENTFLATBAR,
      65             :     CHSTYLE_2D_PIE_SEGOF1,
      66             :     CHSTYLE_2D_PIE_SEGOFALL,
      67             :     CHSTYLE_2D_NET,
      68             :     CHSTYLE_2D_NET_SYMBOLS,
      69             :     CHSTYLE_2D_NET_STACK,
      70             :     CHSTYLE_2D_NET_SYMBOLS_STACK,
      71             :     CHSTYLE_2D_NET_PERCENT,
      72             :     CHSTYLE_2D_NET_SYMBOLS_PERCENT,
      73             :     CHSTYLE_2D_CUBIC_SPLINE,
      74             :     CHSTYLE_2D_CUBIC_SPLINE_SYMBOL,
      75             :     CHSTYLE_2D_B_SPLINE,
      76             :     CHSTYLE_2D_B_SPLINE_SYMBOL,
      77             :     CHSTYLE_2D_CUBIC_SPLINE_XY,
      78             :     CHSTYLE_2D_CUBIC_SPLINE_SYMBOL_XY,
      79             :     CHSTYLE_2D_B_SPLINE_XY,
      80             :     CHSTYLE_2D_B_SPLINE_SYMBOL_XY,
      81             :     CHSTYLE_2D_XY_LINE,
      82             :     CHSTYLE_2D_LINE_COLUMN,
      83             :     CHSTYLE_2D_LINE_STACKEDCOLUMN,
      84             :     CHSTYLE_2D_STOCK_1,
      85             :     CHSTYLE_2D_STOCK_2,
      86             :     CHSTYLE_2D_STOCK_3,
      87             :     CHSTYLE_2D_STOCK_4,
      88             :     CHSTYLE_ADDIN
      89             : };
      90             : 
      91             : #define CHSTYLE_COUNT   (CHSTYLE_ADDIN + 1)
      92             : 
      93             : enum SvxChartDataDescr
      94             : {
      95             :     CHDESCR_NONE,
      96             :     CHDESCR_VALUE,
      97             :     CHDESCR_PERCENT,
      98             :     CHDESCR_TEXT,
      99             :     CHDESCR_TEXTANDPERCENT,
     100             :     CHDESCR_NUMFORMAT_PERCENT,
     101             :     CHDESCR_NUMFORMAT_VALUE,
     102             :     CHDESCR_TEXTANDVALUE
     103             : };
     104             : 
     105             : #define CHDESCR_COUNT   (CHDESCR_TEXTANDVALUE + 1)
     106             : 
     107             : enum SvxChartTextOrder
     108             : {
     109             :     CHTXTORDER_SIDEBYSIDE,
     110             :     CHTXTORDER_UPDOWN,
     111             :     CHTXTORDER_DOWNUP,
     112             :     CHTXTORDER_AUTO
     113             : };
     114             : 
     115             : #define CHTXTORDER_COUNT    (CHTXTORDER_AUTO + 1)
     116             : 
     117             : enum SvxChartTextOrient
     118             : {
     119             :     CHTXTORIENT_AUTOMATIC,
     120             :     CHTXTORIENT_STANDARD,
     121             :     CHTXTORIENT_BOTTOMTOP,
     122             :     CHTXTORIENT_STACKED,
     123             :     CHTXTORIENT_TOPBOTTOM
     124             : };
     125             : 
     126             : #define CHTXTORIENT_COUNT   (CHTXTORIENT_TOPBOTTOM + 1)
     127             : 
     128             : enum SvxChartKindError
     129             : {
     130             :     CHERROR_NONE,
     131             :     CHERROR_VARIANT,
     132             :     CHERROR_SIGMA,
     133             :     CHERROR_PERCENT,
     134             :     CHERROR_BIGERROR,
     135             :     CHERROR_CONST,
     136             :     CHERROR_STDERROR,
     137             :     CHERROR_RANGE
     138             : };
     139             : 
     140             : #define CHERROR_COUNT   (CHERROR_RANGE + 1)
     141             : 
     142             : enum SvxChartIndicate
     143             : {
     144             :     CHINDICATE_NONE,
     145             :     CHINDICATE_BOTH,
     146             :     CHINDICATE_UP,
     147             :     CHINDICATE_DOWN
     148             : };
     149             : 
     150             : #define CHINDICATE_COUNT    (CHINDICATE_DOWN + 1)
     151             : 
     152             : enum SvxChartRegress
     153             : {
     154             :     CHREGRESS_NONE,
     155             :     CHREGRESS_LINEAR,
     156             :     CHREGRESS_LOG,
     157             :     CHREGRESS_EXP,
     158             :     CHREGRESS_POWER
     159             : };
     160             : 
     161             : #define CHREGRESS_COUNT (CHREGRESS_POWER + 1)
     162             : 
     163             : //------------------------------------------------------------------
     164             : 
     165         164 : class SVX_DLLPUBLIC SvxChartStyleItem : public SfxEnumItem
     166             : {
     167             : public:
     168             :     TYPEINFO();
     169             :     SvxChartStyleItem(SvxChartStyle eStyle /*= CHSTYLE_2D_LINE*/,
     170             :                       sal_uInt16 nId );
     171             :     SvxChartStyleItem(SvStream& rIn, sal_uInt16 nId );
     172             : 
     173             :     virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
     174             :     virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const;
     175             : 
     176           0 :     sal_uInt16 GetValueCount() const { return CHSTYLE_COUNT; }
     177             :     SvxChartStyle GetValue() const
     178             :         { return (SvxChartStyle)SfxEnumItem::GetValue(); }
     179             : };
     180             : 
     181             : //------------------------------------------------------------------
     182             : 
     183         164 : class SVX_DLLPUBLIC SvxChartRegressItem : public SfxEnumItem
     184             : {
     185             : public:
     186             :     TYPEINFO();
     187             :     SvxChartRegressItem(SvxChartRegress eRegress /*= CHREGRESS_LINEAR*/,
     188             :                         sal_uInt16 nId );
     189             :     SvxChartRegressItem(SvStream& rIn, sal_uInt16 nId );
     190             : 
     191             :     virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
     192             :     virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const;
     193             : 
     194           0 :     sal_uInt16 GetValueCount() const { return CHREGRESS_COUNT; }
     195             :     SvxChartRegress GetValue() const
     196             :         { return (SvxChartRegress)SfxEnumItem::GetValue(); }
     197             :     sal_uInt16 GetVersion (sal_uInt16 nFileFormatVersion) const;
     198             : };
     199             : 
     200             : //------------------------------------------------------------------
     201             : 
     202           0 : class SVX_DLLPUBLIC SvxChartDataDescrItem : public SfxEnumItem
     203             : {
     204             : public:
     205             :     TYPEINFO();
     206             :     SvxChartDataDescrItem(SvStream& rIn,
     207             :                           sal_uInt16 nId );
     208             : 
     209             :     virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
     210             :     virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const;
     211             : 
     212           0 :     sal_uInt16 GetValueCount() const { return CHDESCR_COUNT; }
     213             :     SvxChartDataDescr GetValue() const
     214             :         { return (SvxChartDataDescr)SfxEnumItem::GetValue(); }
     215             : };
     216             : 
     217             : //------------------------------------------------------------------
     218             : 
     219         164 : class SVX_DLLPUBLIC SvxChartTextOrderItem : public SfxEnumItem
     220             : {
     221             : public:
     222             :     TYPEINFO();
     223             :     SvxChartTextOrderItem(SvxChartTextOrder eOrder /*= CHTXTORDER_SIDEBYSIDE*/,
     224             :                           sal_uInt16 nId );
     225             :     SvxChartTextOrderItem(SvStream& rIn,
     226             :                           sal_uInt16 nId );
     227             : 
     228             :     virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
     229             :     virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const;
     230             : 
     231             :     virtual bool         QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
     232             :     virtual bool         PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
     233             : 
     234           0 :     sal_uInt16 GetValueCount() const { return CHTXTORDER_COUNT; }
     235           0 :     SvxChartTextOrder GetValue() const
     236           0 :         { return (SvxChartTextOrder)SfxEnumItem::GetValue(); }
     237             : };
     238             : 
     239             : //------------------------------------------------------------------
     240             : 
     241           0 : class SVX_DLLPUBLIC SvxChartTextOrientItem : public SfxEnumItem
     242             : {
     243             : public:
     244             :     TYPEINFO();
     245             :     SvxChartTextOrientItem(SvStream& rIn,
     246             :                            sal_uInt16 nId );
     247             : 
     248             :     virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
     249             :     virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const;
     250             : 
     251           0 :     sal_uInt16 GetValueCount() const { return CHTXTORDER_COUNT; }
     252             :     SvxChartTextOrient GetValue() const
     253             :         { return (SvxChartTextOrient)SfxEnumItem::GetValue(); }
     254             : };
     255             : 
     256             : //------------------------------------------------------------------
     257             : 
     258         164 : class SVX_DLLPUBLIC SvxChartKindErrorItem : public SfxEnumItem
     259             : {
     260             : public:
     261             :     TYPEINFO();
     262             :     SvxChartKindErrorItem(SvxChartKindError /*eOrient = CHERROR_NONE*/,
     263             :                            sal_uInt16 nId );
     264             :     SvxChartKindErrorItem(SvStream& rIn,
     265             :                            sal_uInt16 nId );
     266             : 
     267             :     virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
     268             :     virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const;
     269             : 
     270           0 :     sal_uInt16 GetValueCount() const { return CHERROR_COUNT; }
     271             :     SvxChartKindError GetValue() const
     272             :         { return (SvxChartKindError)SfxEnumItem::GetValue(); }
     273             : 
     274             :     sal_uInt16 GetVersion (sal_uInt16 nFileFormatVersion) const;
     275             : };
     276             : 
     277             : //------------------------------------------------------------------
     278             : 
     279         164 : class SVX_DLLPUBLIC SvxChartIndicateItem : public SfxEnumItem
     280             : {
     281             : public:
     282             :     TYPEINFO();
     283             :     SvxChartIndicateItem(SvxChartIndicate eOrient /*= CHINDICATE_NONE*/,
     284             :                            sal_uInt16 nId );
     285             :     SvxChartIndicateItem(SvStream& rIn,
     286             :                            sal_uInt16 nId );
     287             : 
     288             :     virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
     289             :     virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const;
     290             : 
     291           0 :     sal_uInt16 GetValueCount() const { return CHINDICATE_COUNT; }
     292             :     SvxChartIndicate GetValue() const
     293             :         { return (SvxChartIndicate)SfxEnumItem::GetValue(); }
     294             : 
     295             :     sal_uInt16 GetVersion (sal_uInt16 nFileFormatVersion) const;
     296             : };
     297             : 
     298             : //------------------------------------------------------------------
     299             : 
     300        1476 : class SVX_DLLPUBLIC SvxDoubleItem : public SfxPoolItem
     301             : {
     302             :     double fVal;
     303             : 
     304             : public:
     305             :     TYPEINFO();
     306             :     SvxDoubleItem(double fValue /*= 0.0*/, sal_uInt16 nId );
     307             :     SvxDoubleItem(const SvxDoubleItem& rItem);
     308             : 
     309             :     virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
     310             :     virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
     311             : 
     312             :     virtual String GetValueText() const;
     313             :     virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres,
     314             :                                     SfxMapUnit eCoreMetric,
     315             :                                     SfxMapUnit ePresMetric,
     316             :                                     String &rText, const IntlWrapper * = 0) const;
     317             : 
     318             :     virtual int              operator == (const SfxPoolItem&) const;
     319             :     virtual SfxPoolItem* Clone(SfxItemPool *pPool = NULL) const;
     320             :     virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVersion) const;
     321             :     virtual SvStream& Store(SvStream& rOut, sal_uInt16 nItemVersion ) const;
     322             : 
     323             :     virtual double GetMin() const;
     324             :     virtual double GetMax() const;
     325             : 
     326             :     virtual SfxFieldUnit GetUnit() const;
     327             : 
     328           0 :     double GetValue() const { return fVal; }
     329             :     void SetValue(double fNewVal) { fVal = fNewVal; }
     330             : };
     331             : 
     332             : #endif   // _SVX_CHRTITEM_HXX
     333             : 
     334             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10