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 _FMTCNCT_HXX
24 #define _FMTCNCT_HXX
25
26 #include <hintids.hxx>
27 #include <svl/poolitem.hxx>
28 #include <format.hxx>
29 #include <calbck.hxx>
30
31
32 class SwFlyFrmFmt;
33 class IntlWrapper;
34
35 //Verbindung (Textfluss) zwischen zwei FlyFrms
36
37 class SW_DLLPUBLIC SwFmtChain: public SfxPoolItem
38 {
39 SwClient aPrev, //Vorgaenger (SwFlyFrmFmt), wenn es diesen gibt.
40 aNext; //Nachfolger (SwFlyFrmFmt), wenn es diesen gibt.
41
42
43 public:
SwFmtChain()44 SwFmtChain() : SfxPoolItem( RES_CHAIN ) {}
45 SwFmtChain( const SwFmtChain &rCpy );
46
47 inline SwFmtChain &operator=( const SwFmtChain& );
48
49 // "pure virtual Methoden" vom SfxPoolItem
50 virtual int operator==( const SfxPoolItem& ) const;
51 virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
52 virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
53 SfxMapUnit eCoreMetric,
54 SfxMapUnit ePresMetric,
55 String &rText,
56 const IntlWrapper* pIntl = 0 ) const;
57
58 virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
59
GetPrev() const60 SwFlyFrmFmt* GetPrev() const { return (SwFlyFrmFmt*)aPrev.GetRegisteredIn(); }
GetNext() const61 SwFlyFrmFmt* GetNext() const { return (SwFlyFrmFmt*)aNext.GetRegisteredIn(); }
62
63
64 void SetPrev( SwFlyFrmFmt *pFmt );
65 void SetNext( SwFlyFrmFmt *pFmt );
66 };
67
operator =(const SwFmtChain & rCpy)68 SwFmtChain &SwFmtChain::operator=( const SwFmtChain &rCpy )
69 {
70 SetPrev( rCpy.GetPrev() );
71 SetNext( rCpy.GetNext() );
72 return *this;
73 }
74
75
GetChain(sal_Bool bInP) const76 inline const SwFmtChain &SwAttrSet::GetChain(sal_Bool bInP) const
77 { return (const SwFmtChain&)Get( RES_CHAIN,bInP); }
78
GetChain(sal_Bool bInP) const79 inline const SwFmtChain &SwFmt::GetChain(sal_Bool bInP) const
80 { return aSet.GetChain(bInP); }
81
82 #endif
83
84