LCOV - code coverage report
Current view: top level - solver/unxlngi6.pro/inc/editeng - bulitem.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 5 17 29.4 %
Date: 2012-08-25 Functions: 5 17 29.4 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : #ifndef _SVX_BULITEM_HXX
      29                 :            : #define _SVX_BULITEM_HXX
      30                 :            : 
      31                 :            : #include "editeng/editengdllapi.h"
      32                 :            : 
      33                 :            : 
      34                 :            : // define ----------------------------------------------------------------
      35                 :            : 
      36                 :            : // Styles
      37                 :            : #define BS_ABC_BIG          0
      38                 :            : #define BS_ABC_SMALL        1
      39                 :            : #define BS_ROMAN_BIG        2
      40                 :            : #define BS_ROMAN_SMALL      3
      41                 :            : #define BS_123              4
      42                 :            : #define BS_NONE             5
      43                 :            : #define BS_BULLET           6
      44                 :            : #define BS_BMP              128
      45                 :            : 
      46                 :            : // Justification
      47                 :            : #define BJ_HLEFT            0x01
      48                 :            : #define BJ_HRIGHT           0x02
      49                 :            : #define BJ_HCENTER          0x04
      50                 :            : #define BJ_VTOP             0x08
      51                 :            : #define BJ_VBOTTOM          0x10
      52                 :            : #define BJ_VCENTER          0x20
      53                 :            : 
      54                 :            : // Valid-Bits
      55                 :            : // First, only the values that are changed by the dialogue ...
      56                 :            : #define VALID_FONTCOLOR     0x0001
      57                 :            : #define VALID_FONTNAME      0x0002
      58                 :            : #define VALID_SYMBOL        0x0004
      59                 :            : #define VALID_BITMAP        0x0008
      60                 :            : #define VALID_SCALE         0x0010
      61                 :            : #define VALID_START         0x0020
      62                 :            : #define VALID_STYLE         0x0040
      63                 :            : #define VALID_PREVTEXT      0x0080
      64                 :            : #define VALID_FOLLOWTEXT    0x0100
      65                 :            : #include <svl/poolitem.hxx>
      66                 :            : #include <vcl/font.hxx>
      67                 :            : #include <svtools/grfmgr.hxx>
      68                 :            : 
      69                 :            : // class SvxBulletItem ---------------------------------------------------
      70                 :            : 
      71                 :            : class EDITENG_DLLPUBLIC SvxBulletItem : public SfxPoolItem
      72                 :            : {
      73                 :            :     Font            aFont;
      74                 :            :     GraphicObject*  pGraphicObject;
      75                 :            :     String          aPrevText;
      76                 :            :     String          aFollowText;
      77                 :            :     sal_uInt16          nStart;
      78                 :            :     sal_uInt16          nStyle;
      79                 :            :     long            nWidth;
      80                 :            :     sal_uInt16          nScale;
      81                 :            :     sal_Unicode     cSymbol;
      82                 :            :     sal_uInt8       nJustify;
      83                 :            :     sal_uInt16      nValidMask; // Only temporary for GetAttribs / setAttribs,
      84                 :            :                                 // because of the large Bullets
      85                 :            : 
      86                 :            : #ifdef _SVX_BULITEM_CXX
      87                 :            :     void    SetDefaultFont_Impl();
      88                 :            :     void    SetDefaults_Impl();
      89                 :            : #endif
      90                 :            : 
      91                 :            : public:
      92                 :            :     TYPEINFO();
      93                 :            : 
      94                 :            :     SvxBulletItem( sal_uInt16 nWhich = 0 );
      95                 :            :     SvxBulletItem( SvStream& rStrm, sal_uInt16 nWhich = 0 );
      96                 :            :     SvxBulletItem( const SvxBulletItem& );
      97                 :            :     ~SvxBulletItem();
      98                 :            : 
      99                 :            :     virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
     100                 :            :     virtual SfxPoolItem*    Create( SvStream&, sal_uInt16 nVersion ) const;
     101                 :            :     virtual SvStream&       Store( SvStream & , sal_uInt16 nItemVersion ) const;
     102                 :            : 
     103                 :            :     String              GetFullText() const;
     104                 :          0 :     sal_Unicode         GetSymbol() const { return cSymbol; }
     105                 :          0 :     String              GetPrevText() const { return aPrevText; }
     106                 :          0 :     String              GetFollowText() const { return aFollowText; }
     107                 :            : 
     108                 :          0 :     sal_uInt16              GetStart() const { return nStart; }
     109                 :          0 :     long                GetWidth() const { return nWidth; }
     110                 :          0 :     sal_uInt16              GetStyle() const { return nStyle; }
     111                 :            :     sal_uInt8                GetJustification() const { return nJustify; }
     112                 :          0 :     Font                GetFont() const { return aFont; }
     113                 :          0 :     sal_uInt16              GetScale() const { return nScale; }
     114                 :            : 
     115                 :            :     const GraphicObject& GetGraphicObject() const;
     116                 :            :     void                 SetGraphicObject( const GraphicObject& rGraphicObject );
     117                 :            : 
     118                 :        335 :     void                SetSymbol( sal_Unicode c) { cSymbol = c; }
     119                 :          0 :     void                SetPrevText( const String& rStr) { aPrevText = rStr;}
     120                 :          0 :     void                SetFollowText(const String& rStr) { aFollowText=rStr;}
     121                 :            : 
     122                 :        335 :     void                SetStart( sal_uInt16 nNew ) { nStart = nNew; }
     123                 :          0 :     void                SetWidth( long nNew ) { nWidth = nNew; }
     124                 :        335 :     void                SetStyle( sal_uInt16 nNew ) { nStyle = nNew; }
     125                 :            :     void                SetJustification( sal_uInt8 nNew ) { nJustify = nNew; }
     126                 :        335 :     void                SetFont( const Font& rNew) { aFont = rNew; }
     127                 :        335 :     void                SetScale( sal_uInt16 nNew ) { nScale = nNew; }
     128                 :            : 
     129                 :            :     virtual sal_uInt16      GetVersion(sal_uInt16 nFileVersion) const;
     130                 :            :     virtual int         operator==( const SfxPoolItem& ) const;
     131                 :            :     virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
     132                 :            :                                     SfxMapUnit eCoreMetric,
     133                 :            :                                     SfxMapUnit ePresMetric,
     134                 :            :                                     String &rText, const IntlWrapper * = 0 ) const;
     135                 :            : 
     136                 :            :     static void         StoreFont( SvStream&, const Font& );
     137                 :            :     static Font         CreateFont( SvStream&, sal_uInt16 nVer );
     138                 :            : 
     139                 :            :     sal_uInt16&             GetValidMask()                  { return nValidMask;    }
     140                 :            :     sal_uInt16              GetValidMask() const            { return nValidMask;    }
     141                 :          0 :     sal_uInt16              IsValid( sal_uInt16 nFlag ) const   { return nValidMask & nFlag; }
     142                 :            :     void                SetValid( sal_uInt16 nFlag, sal_Bool bValid )
     143                 :            :                         {
     144                 :            :                             if ( bValid )
     145                 :            :                                 nValidMask |= nFlag;
     146                 :            :                             else
     147                 :            :                                 nValidMask &= ~nFlag;
     148                 :            :                         }
     149                 :            :     void                CopyValidProperties( const SvxBulletItem& rCopyFrom );
     150                 :            : };
     151                 :            : 
     152                 :            : 
     153                 :            : #endif
     154                 :            : 
     155                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10