LibreOffice Module sw (master) 1
objectformattertxtfrm.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#ifndef INCLUDED_SW_SOURCE_CORE_LAYOUT_OBJECTFORMATTERTXTFRM_HXX
20#define INCLUDED_SW_SOURCE_CORE_LAYOUT_OBJECTFORMATTERTXTFRM_HXX
21
22#include <objectformatter.hxx>
23#include <sal/types.h>
24
25class SwTextFrame;
26
27// #i28701#
28// Format floating screen objects, which are anchored at a given anchor text frame
29// and registered at the given page frame.
31{
32 private:
33 // anchor text frame
35
36 // 'master' anchor text frame
38
39 SwObjectFormatterTextFrame( SwTextFrame& _rAnchorTextFrame,
40 const SwPageFrame& _rPageFrame,
41 SwTextFrame* _pMasterAnchorTextFrame,
42 SwLayAction* _pLayAction );
43
51 void InvalidatePrevObjs( SwAnchoredObject& _rAnchoredObj );
52
60 void InvalidateFollowObjs( SwAnchoredObject& _rAnchoredObj );
61
97 const sal_Int16 _nWrapInfluenceOnPosition,
98 sal_uInt32& _noToPageNum,
99 bool& _boInFollow,
100 bool& o_rbPageHasFlysAnchoredBelowThis);
101
107
112
113 protected:
114
115 virtual SwFrame& GetAnchorFrame() override;
116
117 public:
118 virtual ~SwObjectFormatterTextFrame() override;
119
120 // #i40147# - add parameter <_bCheckForMovedFwd>.
121 virtual bool DoFormatObj( SwAnchoredObject& _rAnchoredObj,
122 const bool _bCheckForMovedFwd = false ) override;
123 virtual bool DoFormatObjs() override;
124
128 static std::unique_ptr<SwObjectFormatterTextFrame> CreateObjFormatter(
129 SwTextFrame& _rAnchorTextFrame,
130 const SwPageFrame& _rPageFrame,
131 SwLayAction* _pLayAction );
132
145 static void FormatAnchorFrameAndItsPrevs( SwTextFrame& _rAnchorTextFrame );
146
180 static bool CheckMovedFwdCondition( SwAnchoredObject& _rAnchoredObj,
181 SwPageFrame const& rFromPageFrame,
182 const bool _bAnchoredAtMasterBeforeFormatAnchor,
183 sal_uInt32& _noToPageNum,
184 bool& _boInFollow,
185 bool& o_rbPageHasFlysAnchoredBelowThis);
186};
187
188#endif
189
190/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
wrapper class for the positioning of Writer fly frames and drawing objects
Base class of the Writer layout elements.
Definition: frame.hxx:315
The usage of LayAction is always the same:
Definition: layact.hxx:59
void InvalidateFollowObjs(SwAnchoredObject &_rAnchoredObj)
method to invalidate objects, anchored after the given object at the page frame
SwObjectFormatterTextFrame(SwTextFrame &_rAnchorTextFrame, const SwPageFrame &_rPageFrame, SwTextFrame *_pMasterAnchorTextFrame, SwLayAction *_pLayAction)
SwAnchoredObject * GetFirstObjWithMovedFwdAnchor(const sal_Int16 _nWrapInfluenceOnPosition, sal_uInt32 &_noToPageNum, bool &_boInFollow, bool &o_rbPageHasFlysAnchoredBelowThis)
method to determine first anchored object, whose 'anchor is moved forward'.
virtual bool DoFormatObjs() override
intrinsic method to format all floating screen objects
void InvalidatePrevObjs(SwAnchoredObject &_rAnchoredObj)
method to invalidate objects, anchored previous to given object at the anchor text frame
bool AtLeastOneObjIsTmpConsiderWrapInfluence()
method to determine if at least one anchored object has state <temporarily consider wrapping style in...
static void FormatAnchorFrameAndItsPrevs(SwTextFrame &_rAnchorTextFrame)
method to format given anchor text frame and its previous frames
virtual ~SwObjectFormatterTextFrame() override
virtual bool DoFormatObj(SwAnchoredObject &_rAnchoredObj, const bool _bCheckForMovedFwd=false) override
intrinsic method to format a certain floating screen object
virtual SwFrame & GetAnchorFrame() override
static std::unique_ptr< SwObjectFormatterTextFrame > CreateObjFormatter(SwTextFrame &_rAnchorTextFrame, const SwPageFrame &_rPageFrame, SwLayAction *_pLayAction)
method to create an instance of <SwObjectFormatterTextFrame> is necessary.
void FormatAnchorFrameForCheckMoveFwd()
method to format the anchor frame for checking of the move forward condition
static bool CheckMovedFwdCondition(SwAnchoredObject &_rAnchoredObj, SwPageFrame const &rFromPageFrame, const bool _bAnchoredAtMasterBeforeFormatAnchor, sal_uInt32 &_noToPageNum, bool &_boInFollow, bool &o_rbPageHasFlysAnchoredBelowThis)
method to check the conditions, if 'anchor is moved forward'
A page of the document layout.
Definition: pagefrm.hxx:60
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:168