update dev300-m58
[ooovba.git] / sw / source / core / inc / environmentofanchoredobject.hxx
blobca39c31c2c9017a7cae3ff1ded25917d8aeea406
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: environmentofanchoredobject.hxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _ENVIRONMENTOFANCHOREDOBJECT_HXX
31 #define _ENVIRONMENTOFANCHOREDOBJECT_HXX
33 class SwFrm;
34 class SwLayoutFrm;
36 namespace objectpositioning
38 class SwEnvironmentOfAnchoredObject
40 private:
41 const bool mbFollowTextFlow;
43 public:
44 /** construtor
46 OD 05.11.2003
48 @author OD
50 @param _bFollowTextFlow
51 input parameter - indicates, if the anchored object, for which
52 this environment is instantiated, follow the text flow or not
54 SwEnvironmentOfAnchoredObject( const bool _bFollowTextFlow );
56 /** destructor
58 OD 05.11.2003
60 @author OD
62 ~SwEnvironmentOfAnchoredObject();
64 /** determine environment layout frame for possible horizontal object
65 positions respectively for alignment to 'page areas'
67 OD 05.11.2003
68 this is, if object has to follow the text flow:
69 - cell frame, if anchored inside a cell
70 - fly frame, if anchored inside a fly frame
71 otherwise it's the page frame
73 this is, if object hasn't to follow the text flow:
74 - page frame.
75 OD 2005-01-20 #118546# - no exception any more. Thus remove
76 parameter <_bForPageAlignment>
78 @author OD
80 @param _rHoriOrientFrm
81 input parameter - frame, at which the horizontal position is
82 oriented at (typically it's the anchor frame).
83 starting point for the search of the layout frame.
85 @return reference to the layout frame, which determines the
86 the horizontal environment the object has to be positioned in.
88 const SwLayoutFrm& GetHoriEnvironmentLayoutFrm( const SwFrm& _rHoriOrientFrm ) const;
90 /** determine environment layout frame for possible vertical object
91 positions respectively for alignments to 'page areas'
93 OD 05.11.2003
94 this is, if object has to follow the text flow:
95 - cell frame, if anchored inside a cell
96 - fly frame, if anchored inside a fly frame
97 - header/footer frame, if anchored inside page header/footer
98 - footnote frame, if anchored inside footnote
99 otherwise it's the document body frame
101 this is, if object hasn't to follow the text flow:
102 - page frame.
103 OD 2005-01-20 #118546# - no exception any more. Thus remove
104 parameter <_bForPageAlignment>
106 @author OD
108 @param _rVertOrientFrm
109 input parameter - frame, at which the vertical position is
110 oriented at (typically it's the anchor frame).
111 starting point for the search of the layout frame.
113 @return reference to the layout frame, which determines the
114 the vertical environment the object has to be positioned in.
116 const SwLayoutFrm& GetVertEnvironmentLayoutFrm( const SwFrm& _rVertOrientFrm ) const;
118 } // namespace objectpositioning
120 #endif