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 
25 class 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 
106 
111 
112  protected:
113 
114  virtual SwFrame& GetAnchorFrame() override;
115 
116  public:
117  virtual ~SwObjectFormatterTextFrame() override;
118 
119  // #i40147# - add parameter <_bCheckForMovedFwd>.
120  virtual bool DoFormatObj( SwAnchoredObject& _rAnchoredObj,
121  const bool _bCheckForMovedFwd = false ) override;
122  virtual bool DoFormatObjs() override;
123 
127  static std::unique_ptr<SwObjectFormatterTextFrame> CreateObjFormatter(
128  SwTextFrame& _rAnchorTextFrame,
129  const SwPageFrame& _rPageFrame,
130  SwLayAction* _pLayAction );
131 
144  static void FormatAnchorFrameAndItsPrevs( SwTextFrame& _rAnchorTextFrame );
145 
176  static bool CheckMovedFwdCondition( SwAnchoredObject& _rAnchoredObj,
177  const sal_uInt32 _nFromPageNum,
178  const bool _bAnchoredAtMasterBeforeFormatAnchor,
179  sal_uInt32& _noToPageNum,
180  bool& _boInFollow );
181 };
182 
183 #endif
184 
185 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static bool CheckMovedFwdCondition(SwAnchoredObject &_rAnchoredObj, const sal_uInt32 _nFromPageNum, const bool _bAnchoredAtMasterBeforeFormatAnchor, sal_uInt32 &_noToPageNum, bool &_boInFollow)
method to check the conditions, if 'anchor is moved forward'
virtual bool DoFormatObj(SwAnchoredObject &_rAnchoredObj, const bool _bCheckForMovedFwd=false) override
intrinsic method to format a certain floating screen object
Base class of the Writer layout elements.
Definition: frame.hxx:295
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:149
SwAnchoredObject * GetFirstObjWithMovedFwdAnchor(const sal_Int16 _nWrapInfluenceOnPosition, sal_uInt32 &_noToPageNum, bool &_boInFollow)
method to determine first anchored object, whose 'anchor is moved forward'.
virtual SwFrame & GetAnchorFrame() override
static std::unique_ptr< SwObjectFormatterTextFrame > CreateObjFormatter(SwTextFrame &_rAnchorTextFrame, const SwPageFrame &_rPageFrame, SwLayAction *_pLayAction)
method to create an instance of is necessary.
bool AtLeastOneObjIsTmpConsiderWrapInfluence()
method to determine if at least one anchored object has state
wrapper class for the positioning of Writer fly frames and drawing objects
void InvalidatePrevObjs(SwAnchoredObject &_rAnchoredObj)
method to invalidate objects, anchored previous to given object at the anchor text frame ...
SwTextFrame *const mpMasterAnchorTextFrame
The usage of LayAction is always the same:
Definition: layact.hxx:56
void FormatAnchorFrameForCheckMoveFwd()
method to format the anchor frame for checking of the move forward condition
A page of the document layout.
Definition: pagefrm.hxx:40
void InvalidateFollowObjs(SwAnchoredObject &_rAnchoredObj)
method to invalidate objects, anchored after the given object at the page frame
virtual ~SwObjectFormatterTextFrame() override
static void FormatAnchorFrameAndItsPrevs(SwTextFrame &_rAnchorTextFrame)
method to format given anchor text frame and its previous frames
virtual bool DoFormatObjs() override
intrinsic method to format all floating screen objects
SwObjectFormatterTextFrame(SwTextFrame &_rAnchorTextFrame, const SwPageFrame &_rPageFrame, SwTextFrame *_pMasterAnchorTextFrame, SwLayAction *_pLayAction)