1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: algitem.hxx,v $
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_ALGITEM_HXX
31 #define _SVX_ALGITEM_HXX
33 // include ---------------------------------------------------------------
35 #include <bf_svx/svxids.hrc>
37 #ifndef _SFXPOOLITEM_HXX //autogen
38 #include <bf_svtools/poolitem.hxx>
40 #ifndef _SFXENUMITEM_HXX //autogen
41 #include <bf_svtools/eitem.hxx>
43 #ifndef _SVX_SVXENUM_HXX
44 #include <bf_svx/svxenum.hxx>
50 //------------------------------------------------------------------------
52 #ifdef ITEMID_HORJUSTIFY
54 class SvxHorJustifyItem
: public SfxEnumItem
60 const SvxCellHorJustify eJustify
= SVX_HOR_JUSTIFY_STANDARD
,
61 const USHORT nId
= ITEMID_HORJUSTIFY
);
64 virtual sal_Bool
QueryValue( ::com::sun::star::uno::Any
& rVal
, BYTE nMemberId
= 0 ) const;
65 virtual sal_Bool
PutValue( const ::com::sun::star::uno::Any
& rVal
, BYTE nMemberId
= 0 );
67 virtual USHORT
GetValueCount() const;
68 virtual SfxPoolItem
* Clone( SfxItemPool
*pPool
= 0 ) const;
69 virtual SfxPoolItem
* Create( SvStream
& rStream
, USHORT nVer
) const;
71 inline SvxHorJustifyItem
& operator=(const SvxHorJustifyItem
& rHorJustify
)
73 SetValue( rHorJustify
.GetValue() );
80 //------------------------------------------------------------------------
82 #ifdef ITEMID_VERJUSTIFY
84 class SvxVerJustifyItem
: public SfxEnumItem
90 const SvxCellVerJustify eJustify
= SVX_VER_JUSTIFY_STANDARD
,
91 const USHORT nId
= ITEMID_VERJUSTIFY
);
94 virtual sal_Bool
QueryValue( ::com::sun::star::uno::Any
& rVal
, BYTE nMemberId
= 0 ) const;
95 virtual sal_Bool
PutValue( const ::com::sun::star::uno::Any
& rVal
, BYTE nMemberId
= 0 );
97 virtual USHORT
GetValueCount() const;
98 virtual SfxPoolItem
* Clone( SfxItemPool
*pPool
= 0 ) const;
99 virtual SfxPoolItem
* Create( SvStream
& rStream
, USHORT nVer
) const;
101 inline SvxVerJustifyItem
& operator=(const SvxVerJustifyItem
& rVerJustify
)
103 SetValue( rVerJustify
.GetValue() );
110 //------------------------------------------------------------------------
112 #ifdef ITEMID_ORIENTATION
114 class SvxOrientationItem
: public SfxEnumItem
120 const SvxCellOrientation eOrientation
= SVX_ORIENTATION_STANDARD
,
121 const USHORT nId
= ITEMID_ORIENTATION
);
124 virtual sal_Bool
QueryValue( ::com::sun::star::uno::Any
& rVal
, BYTE nMemberId
= 0 ) const;
125 virtual sal_Bool
PutValue( const ::com::sun::star::uno::Any
& rVal
, BYTE nMemberId
= 0 );
127 virtual USHORT
GetValueCount() const;
128 virtual SfxPoolItem
* Clone( SfxItemPool
*pPool
= 0 ) const;
129 virtual SfxPoolItem
* Create( SvStream
& rStream
, USHORT nVer
) const;
131 inline SvxOrientationItem
& operator=(const SvxOrientationItem
& rOrientation
)
133 SetValue( rOrientation
.GetValue() );
140 //------------------------------------------------------------------------
144 class SvxMarginItem
: public SfxPoolItem
152 SvxMarginItem( const USHORT nId
= ITEMID_MARGIN
);
153 SvxMarginItem( INT16 nLeft
, INT16 nTop
= 0,
154 INT16 nRight
= 0, INT16 nBottom
= 0,
155 const USHORT nId
= ITEMID_MARGIN
);
156 SvxMarginItem( const SvxMarginItem
& );
159 virtual int operator==( const SfxPoolItem
& ) const;
160 virtual SfxPoolItem
* Clone( SfxItemPool
*pPool
= 0 ) const;
161 virtual SfxPoolItem
* Create( SvStream
& rStream
, USHORT nVer
) const;
162 virtual SvStream
& Store( SvStream
&, USHORT nItemVersion
) const;
164 virtual sal_Bool
QueryValue( ::com::sun::star::uno::Any
& rVal
, BYTE nMemberId
= 0 ) const;
165 virtual sal_Bool
PutValue( const ::com::sun::star::uno::Any
& rVal
, BYTE nMemberId
= 0 );
167 INT16
GetLeftMargin() const {return nLeftMargin
; }
168 INT16
GetTopMargin() const {return nTopMargin
; }
169 INT16
GetRightMargin() const {return nRightMargin
; }
170 INT16
GetBottomMargin() const {return nBottomMargin
; }
172 inline SvxMarginItem
& operator=(const SvxMarginItem
& rMargin
)
174 nLeftMargin
= rMargin
.nLeftMargin
;
175 nTopMargin
= rMargin
.nTopMargin
;
176 nRightMargin
= rMargin
.nRightMargin
;
177 nBottomMargin
= rMargin
.nBottomMargin
;
184 }//end of namespace binfilter