LCOV - code coverage report
Current view: top level - libreoffice/sc/inc - fillinfo.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 8 21 38.1 %
Date: 2012-12-27 Functions: 3 6 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 SC_FILLINFO_HXX
      21             : #define SC_FILLINFO_HXX
      22             : 
      23             : #include <svx/framelinkarray.hxx>
      24             : #include "global.hxx"
      25             : #include "colorscale.hxx"
      26             : 
      27             : class SfxItemSet;
      28             : class SvxBrushItem;
      29             : class SvxBoxItem;
      30             : class SvxLineItem;
      31             : class SvxShadowItem;
      32             : class Color;
      33             : 
      34             : class ScBaseCell;
      35             : class ScPatternAttr;
      36             : 
      37             : const sal_uInt8 SC_ROTDIR_NONE       = 0;
      38             : const sal_uInt8 SC_ROTDIR_STANDARD   = 1;
      39             : const sal_uInt8 SC_ROTDIR_LEFT       = 2;
      40             : const sal_uInt8 SC_ROTDIR_RIGHT      = 3;
      41             : const sal_uInt8 SC_ROTDIR_CENTER     = 4;
      42             : 
      43             : const sal_uInt8 SC_CLIPMARK_NONE     = 0;
      44             : const sal_uInt8 SC_CLIPMARK_LEFT     = 1;
      45             : const sal_uInt8 SC_CLIPMARK_RIGHT    = 2;
      46             : const sal_uInt8 SC_CLIPMARK_SIZE     = 64;
      47             : 
      48             : enum ScShadowPart
      49             : {
      50             :     SC_SHADOW_HSTART,
      51             :     SC_SHADOW_VSTART,
      52             :     SC_SHADOW_HORIZ,
      53             :     SC_SHADOW_VERT,
      54             :     SC_SHADOW_CORNER
      55             : };
      56             : 
      57           0 : struct ScDataBarInfo
      58             : {
      59             :     double mnZero; // 0 to 100
      60             :     Color maColor;
      61             :     double mnLength; // -100 to 100
      62             :     bool mbGradient;
      63             :     bool mbShowValue;
      64             :     Color maAxisColor;
      65             : 
      66           0 :     bool operator==(const ScDataBarInfo& r) const
      67             :     {
      68           0 :         if( mnZero != r.mnZero )
      69           0 :             return false;
      70           0 :         if( maColor != r.maColor )
      71           0 :             return false;
      72           0 :         if(mnLength != r.mnLength)
      73           0 :             return false;
      74           0 :         if (mbGradient != r.mbGradient)
      75           0 :             return false;
      76             : 
      77           0 :         return true;
      78             :     }
      79             : 
      80           0 :     bool operator!=(const ScDataBarInfo& r) const
      81             :     {
      82           0 :         return !(*this == r);
      83             :     }
      84             : };
      85             : 
      86             : struct ScIconSetInfo
      87             : {
      88             :     sal_Int32 nIconIndex;
      89             :     ScIconSetType eIconSetType;
      90             : };
      91             : 
      92             : struct CellInfo
      93             : {
      94             :     ScBaseCell*                 pCell;
      95             : 
      96             :     const ScPatternAttr*        pPatternAttr;
      97             :     const SfxItemSet*           pConditionSet;
      98             :     const Color*                pColorScale;
      99             :     const ScDataBarInfo*        pDataBar;
     100             :     const ScIconSetInfo*        pIconSet;
     101             : 
     102             :     const SvxBrushItem*         pBackground;
     103             : 
     104             :     const SvxBoxItem*           pLinesAttr;         /// original item from document.
     105             :     const SvxLineItem*          mpTLBRLine;         /// original item from document.
     106             :     const SvxLineItem*          mpBLTRLine;         /// original item from document.
     107             : 
     108             :     const SvxShadowItem*        pShadowAttr;            // original item (internal)
     109             : 
     110             :     const SvxShadowItem*        pHShadowOrigin;
     111             :     const SvxShadowItem*        pVShadowOrigin;
     112             : 
     113             :     ScShadowPart                eHShadowPart : 4;           // shadow effective for drawing
     114             :     ScShadowPart                eVShadowPart : 4;
     115             :     sal_uInt8                        nClipMark;
     116             :     sal_uInt16                      nWidth;
     117             :     sal_uInt8                        nRotateDir;
     118             : 
     119             :     sal_Bool                        bMarked : 1;
     120             :     sal_Bool                        bEmptyCellText : 1;
     121             : 
     122             :     sal_Bool                        bMerged : 1;
     123             :     sal_Bool                        bHOverlapped : 1;
     124             :     sal_Bool                        bVOverlapped : 1;
     125             :     sal_Bool                        bAutoFilter : 1;
     126             :     bool                        bPivotButton:1;
     127             :     bool                        bPivotPopupButton:1;
     128             :     bool                        bFilterActive:1;
     129             : 
     130             :     sal_Bool                        bPrinted : 1;               // when required (pagebreak mode)
     131             : 
     132             :     sal_Bool                        bHideGrid : 1;              // output-internal
     133             :     sal_Bool                        bEditEngine : 1;            // output-internal
     134             : 
     135         174 :     CellInfo():
     136             :         pColorScale(NULL),
     137             :         pDataBar(NULL),
     138         174 :         pIconSet(NULL) {}
     139             : 
     140         174 :     ~CellInfo()
     141             :     {
     142         174 :         delete pColorScale;
     143         174 :         delete pDataBar;
     144         174 :         delete pIconSet;
     145         174 :     }
     146             : };
     147             : 
     148             : const SCCOL SC_ROTMAX_NONE = SCCOL_MAX;
     149             : 
     150             : struct RowInfo
     151             : {
     152             :     CellInfo*           pCellInfo;
     153             : 
     154             :     sal_uInt16              nHeight;
     155             :     SCROW               nRowNo;
     156             :     SCCOL               nRotMaxCol;         // SC_ROTMAX_NONE, if nothing
     157             : 
     158             :     bool                bEmptyBack:1;
     159             :     bool                bEmptyText:1;
     160             :     bool                bAutoFilter:1;
     161             :     bool                bPivotButton:1;
     162             :     bool                bChanged:1;           // TRUE, if not tested
     163             : 
     164        1024 :     inline explicit     RowInfo() : pCellInfo( 0 ) {}
     165             : 
     166             : private:
     167             :                     RowInfo( const RowInfo& );
     168             :     RowInfo&        operator=( const RowInfo& );
     169             : };
     170             : 
     171             : struct ScTableInfo
     172             : {
     173             :     svx::frame::Array   maArray;
     174             :     RowInfo*            mpRowInfo;
     175             :     sal_uInt16              mnArrCount;
     176             :     bool                mbPageMode;
     177             : 
     178             :     explicit            ScTableInfo();
     179             :                         ~ScTableInfo();
     180             : 
     181             : private:
     182             :                         ScTableInfo( const ScTableInfo& );
     183             :     ScTableInfo&        operator=( const ScTableInfo& );
     184             : };
     185             : 
     186             : #endif
     187             : 
     188             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10