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 _FMTWRAPINFLUENCEONOBJPOS_HXX
24 #define _FMTWRAPINFLUENCEONOBJPOS_HXX
25 
26 #include <hintids.hxx>
27 #include <format.hxx>
28 #include <svl/poolitem.hxx>
29 #include <com/sun/star/text/WrapInfluenceOnPosition.hpp>
30 
31 class SW_DLLPUBLIC SwFmtWrapInfluenceOnObjPos: public SfxPoolItem
32 {
33 private:
34     sal_Int16 mnWrapInfluenceOnPosition;
35 
36 public:
37     TYPEINFO();
38 
39     // --> OD 2004-10-18 #i35017# - constant name has changed
40     SwFmtWrapInfluenceOnObjPos(
41             sal_Int16 _nWrapInfluenceOnPosition =
42             com::sun::star::text::WrapInfluenceOnPosition::ONCE_CONCURRENT );
43     // <--
44     SwFmtWrapInfluenceOnObjPos(
45             const SwFmtWrapInfluenceOnObjPos& _rCpy );
46     ~SwFmtWrapInfluenceOnObjPos();
47 
48     SwFmtWrapInfluenceOnObjPos& operator=(
49             const SwFmtWrapInfluenceOnObjPos& _rSource );
50 
51     // pure virtual methods of class <SfxPoolItem>
52     virtual int operator==( const SfxPoolItem& _rAttr ) const;
53     virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
54 
55     virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
56     virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
57 
58     // direct accessors to data
59     void SetWrapInfluenceOnObjPos( sal_Int16 _nWrapInfluenceOnPosition );
60     // --> OD 2004-10-18 #i35017# - add parameter <_bIterativeAsOnceConcurrent>
61     // to control, if value <ITERATIVE> has to be treated as <ONCE_CONCURRENT>
62     sal_Int16 GetWrapInfluenceOnObjPos(
63                         const bool _bIterativeAsOnceConcurrent = false ) const;
64     // <--
65 };
66 
GetWrapInfluenceOnObjPos(sal_Bool bInP) const67 inline const SwFmtWrapInfluenceOnObjPos& SwAttrSet::GetWrapInfluenceOnObjPos(sal_Bool bInP) const
68     { return (const SwFmtWrapInfluenceOnObjPos&)Get( RES_WRAP_INFLUENCE_ON_OBJPOS,bInP); }
69 
GetWrapInfluenceOnObjPos(sal_Bool bInP) const70  inline const SwFmtWrapInfluenceOnObjPos& SwFmt::GetWrapInfluenceOnObjPos(sal_Bool bInP) const
71     { return aSet.GetWrapInfluenceOnObjPos(bInP); }
72 
73 #endif
74