xref: /aoo42x/main/sw/inc/fmtcntnt.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 _FMTCNTNT_HXX
24 #define _FMTCNTNT_HXX
25 
26 #include <svl/poolitem.hxx>
27 #include <hintids.hxx>
28 #include <format.hxx>
29 
30 class SwNodeIndex;
31 class SwStartNode;
32 
33 //Cntnt, Inhalt des Frame (Header, Footer, Fly) ----
34 
35 class SW_DLLPUBLIC SwFmtCntnt: public SfxPoolItem
36 {
37 	SwNodeIndex *pStartNode;
38 
39 	SwFmtCntnt &operator=( const SwFmtCntnt & ); //Kopieren verboten
40 
41 public:
42 //	SwFmtCntnt( const SwNodeIndex *pStartNodeIdx = 0 );
43 	SwFmtCntnt( const SwStartNode* pStartNode = 0 );
44 	SwFmtCntnt( const SwFmtCntnt &rCpy );
45 	~SwFmtCntnt();
46 
47 	// "pure virtual Methoden" vom SfxPoolItem
48 	virtual int             operator==( const SfxPoolItem& ) const;
49 	virtual SfxPoolItem*	Clone( SfxItemPool* pPool = 0 ) const;
50 
GetCntntIdx() const51 	const SwNodeIndex *GetCntntIdx() const { return pStartNode; }
52 	void SetNewCntntIdx( const SwNodeIndex *pIdx );
53 };
54 
GetCntnt(sal_Bool bInP) const55 inline const SwFmtCntnt &SwAttrSet::GetCntnt(sal_Bool bInP) const
56 	{ return (const SwFmtCntnt&)Get( RES_CNTNT,bInP); }
57 
GetCntnt(sal_Bool bInP) const58 inline const SwFmtCntnt &SwFmt::GetCntnt(sal_Bool bInP) const
59 	{ return aSet.GetCntnt(bInP); }
60 
61 #endif
62 
63