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 _OBJECTFORMATTERLAYFRM_HXX
24 #define _OBJECTFORMATTERLAYFRM_HXX
25 
26 #include <objectformatter.hxx>
27 
28 class SwLayoutFrm;
29 
30 // -----------------------------------------------------------------------------
31 // Format floating screen objects, which are anchored at a given anchor text frame
32 // and registered at the given page frame.
33 // -----------------------------------------------------------------------------
34 class SwObjectFormatterLayFrm : public SwObjectFormatter
35 {
36     private:
37         // anchor layout frame
38         SwLayoutFrm& mrAnchorLayFrm;
39 
40         SwObjectFormatterLayFrm( SwLayoutFrm& _rAnchorLayFrm,
41                                  const SwPageFrm& _rPageFrm,
42                                  SwLayAction* _pLayAction );
43 
44         /** method to format all anchored objects, which are registered at
45             the page frame, whose 'anchor' isn't on this page frame and whose
46             anchor frame is valid.
47 
48             OD 2004-07-02 #i28701#
49 
50             @author OD
51 
52             @return boolean
53             indicates, if format was successfull
54         */
55         bool _AdditionalFormatObjsOnPage();
56 
57     protected:
58 
59         virtual SwFrm& GetAnchorFrm();
60 
61     public:
62         virtual ~SwObjectFormatterLayFrm();
63 
64         // --> OD 2005-01-10 #i40147# - add parameter <_bCheckForMovedFwd>.
65         // Not relevant for objects anchored at layout frame.
66         virtual bool DoFormatObj( SwAnchoredObject& _rAnchoredObj,
67                                   const bool _bCheckForMovedFwd = false );
68         // <--
69         virtual bool DoFormatObjs();
70 
71         static SwObjectFormatterLayFrm* CreateObjFormatter(
72                                                 SwLayoutFrm& _rAnchorLayFrm,
73                                                 const SwPageFrm& _rPageFrm,
74                                                 SwLayAction* _pLayAction );
75 };
76 
77 #endif
78