Update ooo320-m1
[ooovba.git] / binfilter / inc / bf_svx / bulitem.hxx
blob44d05875f9a78e531eae820fe359c20690168e86
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: bulitem.hxx,v $
10 * $Revision: 1.7 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SVX_BULITEM_HXX
31 #define _SVX_BULITEM_HXX
32 namespace binfilter {
34 // include ---------------------------------------------------------------
36 // define ----------------------------------------------------------------
38 // Styles
39 #define BS_ABC_BIG 0
40 #define BS_ABC_SMALL 1
41 #define BS_ROMAN_BIG 2
42 #define BS_ROMAN_SMALL 3
43 #define BS_123 4
44 #define BS_NONE 5
45 #define BS_BULLET 6
46 #define BS_BMP 128
48 // Justification
49 #define BJ_HLEFT 0x01
50 #define BJ_HRIGHT 0x02
51 #define BJ_HCENTER 0x04
52 #define BJ_VTOP 0x08
53 #define BJ_VBOTTOM 0x10
54 #define BJ_VCENTER 0x20
56 // Valid-Bits
57 // Erstmal nur die Werte, die vom Dialog geaendert werden...
58 #define VALID_FONTCOLOR 0x0001
59 #define VALID_FONTNAME 0x0002
60 #define VALID_SYMBOL 0x0004
61 #define VALID_BITMAP 0x0008
62 #define VALID_SCALE 0x0010
63 #define VALID_START 0x0020
64 #define VALID_STYLE 0x0040
65 #define VALID_PREVTEXT 0x0080
66 #define VALID_FOLLOWTEXT 0x0100
67 }//end of namespace binfilter
68 #ifndef _SFXPOOLITEM_HXX //autogen
69 #include <bf_svtools/poolitem.hxx>
70 #endif
71 #ifndef _VCL_FONT_HXX //autogen
72 #include <vcl/font.hxx>
73 #endif
74 #ifndef _BF_GOODIES_GRAPHICOBJECT_HXX //autogen
75 #include <bf_goodies/graphicobject.hxx>
76 #endif
78 // class SvxBulletItem ---------------------------------------------------
79 namespace binfilter {
80 class SvxBulletItem : public SfxPoolItem
82 Font aFont;
83 BfGraphicObject* pGraphicObject;
84 String aPrevText;
85 String aFollowText;
86 USHORT nStart;
87 USHORT nStyle;
88 long nWidth;
89 USHORT nScale;
90 sal_Unicode cSymbol;
91 BYTE nJustify;
92 USHORT nValidMask; // Nur temporaer fuer GetAttribs/SetAttribs, wegen des grossen Bullets
94 #ifdef _SVX_BULITEM_CXX
95 void SetDefaultFont_Impl();
96 void SetDefaults_Impl();
97 #endif
99 public:
100 TYPEINFO();
102 SvxBulletItem( USHORT nWhich = 0 );
103 SvxBulletItem( SvStream& rStrm, USHORT nWhich = 0 );
104 SvxBulletItem( const SvxBulletItem& );
105 ~SvxBulletItem();
107 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
108 virtual SfxPoolItem* Create( SvStream&, USHORT nVersion ) const;
109 virtual SvStream& Store( SvStream & , USHORT nItemVersion ) const;
111 sal_Unicode GetSymbol() const { return cSymbol; }
112 String GetPrevText() const { return aPrevText; }
113 String GetFollowText() const { return aFollowText; }
115 USHORT GetStart() const { return nStart; }
116 long GetWidth() const { return nWidth; }
117 USHORT GetStyle() const { return nStyle; }
118 BYTE GetJustification() const { return nJustify; }
119 Font GetFont() const { return aFont; }
120 USHORT GetScale() const { return nScale; }
124 void SetSymbol( sal_Unicode c) { cSymbol = c; }
125 void SetPrevText( const String& rStr) { aPrevText = rStr;}
126 void SetFollowText(const String& rStr) { aFollowText=rStr;}
128 void SetStart( USHORT nNew ) { nStart = nNew; }
129 void SetWidth( long nNew ) { nWidth = nNew; }
130 void SetStyle( USHORT nNew ) { nStyle = nNew; }
131 void SetJustification( BYTE nNew ) { nJustify = nNew; }
132 void SetFont( const Font& rNew) { aFont = rNew; }
133 void SetScale( USHORT nNew ) { nScale = nNew; }
135 virtual USHORT GetVersion(USHORT nFileVersion) const;
136 virtual int operator==( const SfxPoolItem& ) const;
138 static void StoreFont( SvStream&, const Font& );
139 static Font CreateFont( SvStream&, USHORT nVer );
141 USHORT& GetValidMask() { return nValidMask; }
142 USHORT GetValidMask() const { return nValidMask; }
143 USHORT IsValid( USHORT nFlag ) const { return nValidMask & nFlag; }
144 void SetValid( USHORT nFlag, BOOL bValid )
146 if ( bValid )
147 nValidMask |= nFlag;
148 else
149 nValidMask &= ~nFlag;
153 }//end of namespace binfilter
154 #endif