xref: /AOO41X/main/sw/inc/txtflcnt.hxx (revision 707fc0d4d52eb4f69d89a98ffec6918ca5de6326)
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 _TXTFLCNT_HXX
24 #define _TXTFLCNT_HXX
25 
26 #include <txatbase.hxx>
27 
28 class SwFlyInCntFrm;
29 class SwFrm;
30 class SwTxtNode;
31 class SwDoc;
32 
33 // SWTXT_FLYCNT ********************************
34 // Attribut fuer zeilengebundene Frames (ohne Endindex)
35 
36 class SwTxtFlyCnt : public SwTxtAttr
37 {
38     SwFlyInCntFrm  *_GetFlyFrm( const SwFrm *pCurrFrm );
39 
40 public:
41     SwTxtFlyCnt( SwFmtFlyCnt& rAttr, xub_StrLen nStart );
42 
43     // Setzt den Anker im pFmt und
44     void    SetAnchor( const SwTxtNode *pNode );
45 
46     inline        SwFlyInCntFrm  *GetFlyFrm( const SwFrm *pCurrFrm );
47     inline const  SwFlyInCntFrm  *GetFlyFrm( const SwFrm *pCurrFrm ) const;
48 
49     // erzeugt sich ein neues FlyFrameFormat
50     void CopyFlyFmt( SwDoc* pDoc );
51 };
52 
53 inline SwFlyInCntFrm *SwTxtFlyCnt::GetFlyFrm( const SwFrm *pCurrFrm )
54 {
55     return _GetFlyFrm( pCurrFrm );
56 }
57 
58 inline const SwFlyInCntFrm *SwTxtFlyCnt::GetFlyFrm( const SwFrm *pCurrFrm ) const
59 {
60     return (const_cast<SwTxtFlyCnt*>(this))->_GetFlyFrm( pCurrFrm );
61 }
62 
63 #endif
64 
65