1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SW_SOURCE_CORE_INC_ENVIRONMENTOFANCHOREDOBJECT_HXX
21 #define INCLUDED_SW_SOURCE_CORE_INC_ENVIRONMENTOFANCHOREDOBJECT_HXX
26 namespace objectpositioning
28 class SwEnvironmentOfAnchoredObject
31 const bool mbFollowTextFlow
;
36 @param _bFollowTextFlow
37 input parameter - indicates, if the anchored object, for which
38 this environment is instantiated, follow the text flow or not
40 SwEnvironmentOfAnchoredObject(const bool _bFollowTextFlow
);
44 ~SwEnvironmentOfAnchoredObject();
46 /** determine environment layout frame for possible horizontal object
47 positions respectively for alignment to 'page areas'
49 this is, if object has to follow the text flow:
50 - cell frame, if anchored inside a cell
51 - fly frame, if anchored inside a fly frame
52 otherwise it's the page frame
54 this is, if object hasn't to follow the text flow:
56 - no exception any more. Thus remove
57 parameter <_bForPageAlignment>
59 @param _rHoriOrientFrame
60 input parameter - frame, at which the horizontal position is
61 oriented at (typically it's the anchor frame).
62 starting point for the search of the layout frame.
64 @return reference to the layout frame, which determines the
65 horizontal environment the object has to be positioned in.
67 const SwLayoutFrame
& GetHoriEnvironmentLayoutFrame(const SwFrame
& _rHoriOrientFrame
) const;
69 /** determine environment layout frame for possible vertical object
70 positions respectively for alignments to 'page areas'
72 this is, if object has to follow the text flow:
73 - cell frame, if anchored inside a cell
74 - fly frame, if anchored inside a fly frame
75 - header/footer frame, if anchored inside page header/footer
76 - footnote frame, if anchored inside footnote
77 otherwise it's the document body frame
79 this is, if object hasn't to follow the text flow:
81 - no exception any more. Thus remove
82 parameter <_bForPageAlignment>
84 @param _rVertOrientFrame
85 input parameter - frame, at which the vertical position is
86 oriented at (typically it's the anchor frame).
87 starting point for the search of the layout frame.
89 @return reference to the layout frame, which determines the
90 vertical environment the object has to be positioned in.
92 const SwLayoutFrame
& GetVertEnvironmentLayoutFrame(const SwFrame
& _rVertOrientFrame
) const;
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */