xref: /trunk/main/sw/inc/fmtfordr.hxx (revision 1d2dbeb0)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _FMTFORDR_HXX
24 #define _FMTFORDR_HXX
25 
26 #include <svl/eitem.hxx>
27 #include <hintids.hxx>
28 #include <format.hxx>
29 
30 //Die FillOrder ---------------------------------
31 
32 enum SwFillOrder
33 {
34 	SW_FILL_ORDER_BEGIN,
35 	ATT_TOP_DOWN = SW_FILL_ORDER_BEGIN,
36 	ATT_BOTTOM_UP,
37 	ATT_LEFT_TO_RIGHT,
38 	ATT_RIGHT_TO_LEFT,
39 	SW_FILL_ORDER_END
40 };
41 
42 class SwFmtFillOrder: public SfxEnumItem
43 {
44 public:
45 	SwFmtFillOrder( SwFillOrder = ATT_TOP_DOWN );
46 	inline SwFmtFillOrder &operator=( const SwFmtFillOrder &rCpy );
47 
48 	// "pure virtual Methoden" vom SfxPoolItem
49 	virtual SfxPoolItem*	Clone( SfxItemPool *pPool = 0 ) const;
50 	virtual sal_uInt16			GetValueCount() const;
51 
GetFillOrder() const52 	SwFillOrder GetFillOrder() const { return SwFillOrder(GetValue()); }
53 };
54 
operator =(const SwFmtFillOrder & rCpy)55 inline SwFmtFillOrder &SwFmtFillOrder::operator=( const SwFmtFillOrder &rCpy )
56 {
57 	SetValue( rCpy.GetValue() );
58 	return *this;
59 }
60 
GetFillOrder(sal_Bool bInP) const61 inline const SwFmtFillOrder &SwAttrSet::GetFillOrder(sal_Bool bInP) const
62 	{ return (const SwFmtFillOrder&)Get( RES_FILL_ORDER,bInP); }
63 
GetFillOrder(sal_Bool bInP) const64 inline const SwFmtFillOrder &SwFmt::GetFillOrder(sal_Bool bInP) const
65 	{ return aSet.GetFillOrder(bInP); }
66 
67 #endif
68 
69