sync master with lastest vba changes
[ooovba.git] / binfilter / inc / bf_svx / hyznitem.hxx
blobb9afdf666bb118804e8292312314436cb8a06cef
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: hyznitem.hxx,v $
10 * $Revision: 1.8 $
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_HYZNITEM_HXX
31 #define _SVX_HYZNITEM_HXX
33 // include ---------------------------------------------------------------
35 #ifndef _SFXPOOLITEM_HXX //autogen
36 #include <bf_svtools/poolitem.hxx>
37 #endif
38 #ifndef _SVX_SVXIDS_HRC
39 #include <bf_svx/svxids.hrc>
40 #endif
42 namespace rtl
44 class OUString;
46 namespace binfilter {
47 class SvXMLUnitConverter;
48 // class SvxHyphenZoneItem -----------------------------------------------
51 [Beschreibung]
52 Dieses Item beschreibt ein Silbentrennungsattribut (Automatisch?, Anzahl der
53 Zeichen am Zeilenende und -anfang).
56 class SvxHyphenZoneItem : public SfxPoolItem
58 BOOL bHyphen: 1;
59 BOOL bPageEnd: 1;
60 BYTE nMinLead;
61 BYTE nMinTrail;
62 BYTE nMaxHyphens;
64 friend SvStream & operator<<( SvStream & aS, SvxHyphenZoneItem & );
66 public:
67 TYPEINFO();
69 SvxHyphenZoneItem( const BOOL bHyph = FALSE,
70 const USHORT nId = ITEMID_HYPHENZONE );
72 // "pure virtual Methoden" vom SfxPoolItem
73 virtual int operator==( const SfxPoolItem& ) const;
74 virtual sal_Bool QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
75 virtual sal_Bool PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
78 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
79 virtual SfxPoolItem* Create(SvStream &, USHORT) const;
80 virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
82 inline void SetHyphen( const BOOL bNew ) { bHyphen = bNew; }
83 inline BOOL IsHyphen() const { return bHyphen; }
85 inline void SetPageEnd( const BOOL bNew ) { bPageEnd = bNew; }
86 inline BOOL IsPageEnd() const { return bPageEnd; }
88 inline BYTE &GetMinLead() { return nMinLead; }
89 inline BYTE GetMinLead() const { return nMinLead; }
91 inline BYTE &GetMinTrail() { return nMinTrail; }
92 inline BYTE GetMinTrail() const { return nMinTrail; }
94 inline BYTE &GetMaxHyphens() { return nMaxHyphens; }
95 inline BYTE GetMaxHyphens() const { return nMaxHyphens; }
97 inline SvxHyphenZoneItem &operator=( const SvxHyphenZoneItem &rNew )
99 bHyphen = rNew.IsHyphen();
100 bPageEnd = rNew.IsPageEnd();
101 nMinLead = rNew.GetMinLead();
102 nMinTrail = rNew.GetMinTrail();
103 nMaxHyphens = rNew.GetMaxHyphens();
104 return *this;
108 }//end of namespace binfilter
109 #endif