1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: environmentofanchoredobject.hxx,v $
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
36 namespace objectpositioning
38 class SwEnvironmentOfAnchoredObject
41 const bool mbFollowTextFlow
;
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
);
62 ~SwEnvironmentOfAnchoredObject();
64 /** determine environment layout frame for possible horizontal object
65 positions respectively for alignment to 'page areas'
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:
75 OD 2005-01-20 #118546# - no exception any more. Thus remove
76 parameter <_bForPageAlignment>
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'
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:
103 OD 2005-01-20 #118546# - no exception any more. Thus remove
104 parameter <_bForPageAlignment>
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