LCOV - code coverage report
Current view: top level - libreoffice/solver/unxlngi6.pro/inc/editeng - bulitem.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 5 17 29.4 %
Date: 2012-12-27 Functions: 5 17 29.4 %
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_BULITEM_HXX
      20             : #define _SVX_BULITEM_HXX
      21             : 
      22             : #include "editeng/editengdllapi.h"
      23             : 
      24             : 
      25             : // define ----------------------------------------------------------------
      26             : 
      27             : // Styles
      28             : #define BS_ABC_BIG          0
      29             : #define BS_ABC_SMALL        1
      30             : #define BS_ROMAN_BIG        2
      31             : #define BS_ROMAN_SMALL      3
      32             : #define BS_123              4
      33             : #define BS_NONE             5
      34             : #define BS_BULLET           6
      35             : #define BS_BMP              128
      36             : 
      37             : // Justification
      38             : #define BJ_HLEFT            0x01
      39             : #define BJ_HRIGHT           0x02
      40             : #define BJ_HCENTER          0x04
      41             : #define BJ_VTOP             0x08
      42             : #define BJ_VBOTTOM          0x10
      43             : #define BJ_VCENTER          0x20
      44             : 
      45             : // Valid-Bits
      46             : // First, only the values that are changed by the dialogue ...
      47             : #define VALID_FONTCOLOR     0x0001
      48             : #define VALID_FONTNAME      0x0002
      49             : #define VALID_SYMBOL        0x0004
      50             : #define VALID_BITMAP        0x0008
      51             : #define VALID_SCALE         0x0010
      52             : #define VALID_START         0x0020
      53             : #define VALID_STYLE         0x0040
      54             : #define VALID_PREVTEXT      0x0080
      55             : #define VALID_FOLLOWTEXT    0x0100
      56             : #include <svl/poolitem.hxx>
      57             : #include <vcl/font.hxx>
      58             : #include <svtools/grfmgr.hxx>
      59             : 
      60             : // class SvxBulletItem ---------------------------------------------------
      61             : 
      62             : class EDITENG_DLLPUBLIC SvxBulletItem : public SfxPoolItem
      63             : {
      64             :     Font            aFont;
      65             :     GraphicObject*  pGraphicObject;
      66             :     String          aPrevText;
      67             :     String          aFollowText;
      68             :     sal_uInt16          nStart;
      69             :     sal_uInt16          nStyle;
      70             :     long            nWidth;
      71             :     sal_uInt16          nScale;
      72             :     sal_Unicode     cSymbol;
      73             :     sal_uInt8       nJustify;
      74             :     sal_uInt16      nValidMask; // Only temporary for GetAttribs / setAttribs,
      75             :                                 // because of the large Bullets
      76             : 
      77             : #ifdef _SVX_BULITEM_CXX
      78             :     void    SetDefaultFont_Impl();
      79             :     void    SetDefaults_Impl();
      80             : #endif
      81             : 
      82             : public:
      83             :     TYPEINFO();
      84             : 
      85             :     explicit SvxBulletItem( sal_uInt16 nWhich = 0 );
      86             :     explicit SvxBulletItem( SvStream& rStrm, sal_uInt16 nWhich = 0 );
      87             :     SvxBulletItem( const SvxBulletItem& );
      88             :     ~SvxBulletItem();
      89             : 
      90             :     virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
      91             :     virtual SfxPoolItem*    Create( SvStream&, sal_uInt16 nVersion ) const;
      92             :     virtual SvStream&       Store( SvStream & , sal_uInt16 nItemVersion ) const;
      93             : 
      94             :     String              GetFullText() const;
      95           0 :     sal_Unicode         GetSymbol() const { return cSymbol; }
      96           0 :     String              GetPrevText() const { return aPrevText; }
      97           0 :     String              GetFollowText() const { return aFollowText; }
      98             : 
      99           0 :     sal_uInt16              GetStart() const { return nStart; }
     100           0 :     long                GetWidth() const { return nWidth; }
     101           0 :     sal_uInt16              GetStyle() const { return nStyle; }
     102             :     sal_uInt8                GetJustification() const { return nJustify; }
     103           0 :     Font                GetFont() const { return aFont; }
     104           0 :     sal_uInt16              GetScale() const { return nScale; }
     105             : 
     106             :     const GraphicObject& GetGraphicObject() const;
     107             :     void                 SetGraphicObject( const GraphicObject& rGraphicObject );
     108             : 
     109          33 :     void                SetSymbol( sal_Unicode c) { cSymbol = c; }
     110           0 :     void                SetPrevText( const String& rStr) { aPrevText = rStr;}
     111           0 :     void                SetFollowText(const String& rStr) { aFollowText=rStr;}
     112             : 
     113          33 :     void                SetStart( sal_uInt16 nNew ) { nStart = nNew; }
     114           0 :     void                SetWidth( long nNew ) { nWidth = nNew; }
     115          33 :     void                SetStyle( sal_uInt16 nNew ) { nStyle = nNew; }
     116             :     void                SetJustification( sal_uInt8 nNew ) { nJustify = nNew; }
     117          33 :     void                SetFont( const Font& rNew) { aFont = rNew; }
     118          33 :     void                SetScale( sal_uInt16 nNew ) { nScale = nNew; }
     119             : 
     120             :     virtual sal_uInt16      GetVersion(sal_uInt16 nFileVersion) const;
     121             :     virtual int         operator==( const SfxPoolItem& ) const;
     122             :     virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
     123             :                                     SfxMapUnit eCoreMetric,
     124             :                                     SfxMapUnit ePresMetric,
     125             :                                     String &rText, const IntlWrapper * = 0 ) const;
     126             : 
     127             :     static void         StoreFont( SvStream&, const Font& );
     128             :     static Font         CreateFont( SvStream&, sal_uInt16 nVer );
     129             : 
     130             :     sal_uInt16&             GetValidMask()                  { return nValidMask;    }
     131             :     sal_uInt16              GetValidMask() const            { return nValidMask;    }
     132           0 :     sal_uInt16              IsValid( sal_uInt16 nFlag ) const   { return nValidMask & nFlag; }
     133             :     void                SetValid( sal_uInt16 nFlag, sal_Bool bValid )
     134             :                         {
     135             :                             if ( bValid )
     136             :                                 nValidMask |= nFlag;
     137             :                             else
     138             :                                 nValidMask &= ~nFlag;
     139             :                         }
     140             :     void                CopyValidProperties( const SvxBulletItem& rCopyFrom );
     141             : };
     142             : 
     143             : 
     144             : #endif
     145             : 
     146             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10