xref: /trunk/main/sw/inc/fmtfordr.hxx (revision cea84f56765a2ac06f0f5a2718f45f6430edc781)
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     SwFmtFillOrder(const SwFmtFillOrder&) = default;
48 
49     // "pure virtual Methoden" vom SfxPoolItem
50     virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
51     virtual sal_uInt16          GetValueCount() const;
52 
GetFillOrder() const53     SwFillOrder GetFillOrder() const { return SwFillOrder(GetValue()); }
54 };
55 
operator =(const SwFmtFillOrder & rCpy)56 inline SwFmtFillOrder &SwFmtFillOrder::operator=( const SwFmtFillOrder &rCpy )
57 {
58     SetValue( rCpy.GetValue() );
59     return *this;
60 }
61 
GetFillOrder(sal_Bool bInP) const62 inline const SwFmtFillOrder &SwAttrSet::GetFillOrder(sal_Bool bInP) const
63     { return (const SwFmtFillOrder&)Get( RES_FILL_ORDER,bInP); }
64 
GetFillOrder(sal_Bool bInP) const65 inline const SwFmtFillOrder &SwFmt::GetFillOrder(sal_Bool bInP) const
66     { return aSet.GetFillOrder(bInP); }
67 
68 #endif
69