LibreOffice Module sw (master)  1
frmtool.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 
20 #ifndef INCLUDED_SW_SOURCE_CORE_INC_FRMTOOL_HXX
21 #define INCLUDED_SW_SOURCE_CORE_INC_FRMTOOL_HXX
22 
23 #include <swtypes.hxx>
24 #include "frame.hxx"
25 #include "txtfrm.hxx"
26 #include "swcache.hxx"
27 #include <swatrset.hxx>
28 
29 class SwLayoutFrame;
30 class SwFont;
31 class SwTextFrame;
32 class SwFormatAnchor;
33 class SwViewShell;
34 class SwPageFrame;
35 class SwFlyFrame;
36 class SwContentFrame;
37 class SwRootFrame;
38 class SwDoc;
39 class SdrObject;
40 class SvxBrushItem;
41 class SdrMarkList;
42 class SwNodeIndex;
43 class GraphicObject;
44 class GraphicAttr;
45 class SwPageDesc;
46 class SwFrameFormats;
47 class SwRegionRects;
48 class SwTextNode;
49 namespace sw { struct Extent; }
50 namespace basegfx { namespace utils { class B2DClipState; } }
51 
52 #define FAR_AWAY (SAL_MAX_INT32 - 20000) // initial position of a Fly
53 #define BROWSE_HEIGHT (56700L * 10L) // 10 Meters
54 #define GRFNUM_NO 0
55 #define GRFNUM_YES 1
56 #define GRFNUM_REPLACE 2
57 
58 void AppendObjs( const SwFrameFormats *pTable, sal_uLong nIndex,
59  SwFrame *pFrame, SwPageFrame *pPage, SwDoc* doc );
60 
61 void AppendObjsOfNode(SwFrameFormats const* pTable, sal_uLong nIndex,
62  SwFrame * pFrame, SwPageFrame * pPage, SwDoc * pDoc,
63  std::vector<sw::Extent>::const_iterator const* pIter,
64  std::vector<sw::Extent>::const_iterator const* pEnd,
65  SwTextNode const* pFirstNode, SwTextNode const* pLastNode);
66 
67 void RemoveHiddenObjsOfNode(SwTextNode const& rNode,
68  std::vector<sw::Extent>::const_iterator const* pIter,
69  std::vector<sw::Extent>::const_iterator const* pEnd,
70  SwTextNode const* pFirstNode, SwTextNode const* pLastNode);
71 
72 bool IsAnchoredObjShown(SwTextFrame const& rFrame, SwFormatAnchor const& rAnchor);
73 
74 void AppendAllObjs(const SwFrameFormats* pTable, const SwFrame* pSib);
75 
76 // draw background with brush or graphics
77 // The 6th parameter indicates that the method should consider background
78 // transparency, saved in the color of the brush item.
79 void DrawGraphic(
80  const SvxBrushItem *,
82  const SwRect &rOrg,
83  const SwRect &rOut,
84  const sal_uInt8 nGrfNum = GRFNUM_NO,
85  const bool bConsiderBackgroundTransparency = false );
88  const SwRect& rOriginalLayoutRect,
89  const SwRegionRects& rPaintRegion,
90  const basegfx::utils::B2DClipState& rClipState,
91  vcl::RenderContext& rOut);
92 
93 // RotGrfFlyFrame: Adapted to rotation
95  vcl::RenderContext & rOutputDevice,
96  GraphicObject const& rGraphicObj,
97  GraphicAttr const& rGraphicAttr,
98  const basegfx::B2DHomMatrix& rGraphicTransform,
99  const OUString& rName,
100  const OUString& rTitle,
101  const OUString& rDescription);
102 
103 // method to align rectangle.
104 // Created declaration here to avoid <extern> declarations
105 void SwAlignRect( SwRect &rRect, const SwViewShell *pSh, const vcl::RenderContext* pRenderContext );
106 
107 // method to align graphic rectangle
108 // Created declaration here to avoid <extern> declarations
109 void SwAlignGrfRect( SwRect *pGrfRect, const vcl::RenderContext &rOut );
110 
121 void PaintCharacterBorder(const SwFont& rFont, const SwRect& rPaintArea, const bool bVerticalLayout,
122  const bool bVerticalLayoutLRBT, const bool bJoinWithPrev,
123  const bool bJoinWithNext);
124 
125 // get Fly, if no List is given use the current shell
126 // Implementation in feshview.cxx
127 SwFlyFrame *GetFlyFromMarked( const SdrMarkList *pLst, SwViewShell *pSh );
128 
129 SwFrame *SaveContent( SwLayoutFrame *pLay, SwFrame *pStart = nullptr );
130 void RestoreContent( SwFrame *pSav, SwLayoutFrame *pParent, SwFrame *pSibling );
131 
132 // Get ContentNodes, create ContentFrames, and add them to LayFrame.
133 void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, sal_uLong nIndex,
134  bool bPages = false, sal_uLong nEndIndex = 0,
135  SwFrame *pPrv = nullptr, sw::FrameMode eMode = sw::FrameMode::New);
136 
137 // Creation of frames for a specific section (uses InsertCnt_)
138 void MakeFrames( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
139  const SwNodeIndex &rEndIdx );
140 
141 extern bool bObjsDirect;
142 
143 // prevent creation of Flys in InsertCnt_, e.g. for table headlines
144 extern bool bDontCreateObjects;
145 
146 // for FlyCnts, see SwFlyAtContentFrame::MakeAll()
148 
149 // for table settings via keyboard
151 long CalcHeightWithFlys( const SwFrame *pFrame );
152 
153 SwPageFrame *InsertNewPage( SwPageDesc &rDesc, SwFrame *pUpper,
154  bool bOdd, bool bFirst, bool bInsertEmpty, bool bFootnote,
155  SwFrame *pSibling );
156 
157 // connect Flys with page
158 void RegistFlys( SwPageFrame*, const SwLayoutFrame* );
159 
160 // notification of Fly's background if needed
161 void Notify( SwFlyFrame *pFly, SwPageFrame *pOld, const SwRect &rOld,
162  const SwRect* pOldRect = nullptr );
163 
164 void Notify_Background( const SdrObject* pObj,
165  SwPageFrame* pPage,
166  const SwRect& rRect,
167  const PrepareHint eHint,
168  const bool bInva );
169 
170 const SwFrame* GetVirtualUpper( const SwFrame* pFrame, const Point& rPos );
171 
172 bool Is_Lower_Of( const SwFrame *pCurrFrame, const SdrObject* pObj );
173 
174 // FIXME: EasyHack (refactoring): rename method and parameter name in all files
175 const SwFrame *FindContext( const SwFrame *pFrame, SwFrameType nAdditionalContextTyp );
176 
177 bool IsFrameInSameContext( const SwFrame *pInnerFrame, const SwFrame *pFrame );
178 
179 const SwFrame * FindPage( const SwRect &rRect, const SwFrame *pPage );
180 
193 SwFrame* GetFrameOfModify( const SwRootFrame* pLayout,
194  SwModify const&,
195  SwFrameType const nFrameType,
196  const SwPosition *pPos = nullptr,
197  std::pair<Point, bool> const* pViewPosAndCalcFrame = nullptr);
198 
199 // Should extra data (redline stroke, line numbers) be painted?
200 bool IsExtraData( const SwDoc *pDoc );
201 
202 // #i11760# - method declaration <CalcContent(..)>
203 void CalcContent( SwLayoutFrame *pLay, bool bNoColl = false );
204 
205 // Notify classes memorize the current sizes in their constructor and do
206 // the necessary notifications in their destructor if needed
208 {
209 protected:
212  const SwRect maPrt;
217  bool const mbValidSize;
218 
219 public:
220  SwFrameNotify( SwFrame *pFrame );
221  ~SwFrameNotify() COVERITY_NOEXCEPT_FALSE;
222 
223  const SwRect &getFrameArea() const { return maFrame; }
224  void SetInvaKeep() { mbInvaKeep = true; }
225 };
226 
228 {
230 
231 public:
232  SwLayNotify( SwLayoutFrame *pLayFrame );
233  ~SwLayNotify();
234 
235  void SetLowersComplete( bool b ) { m_bLowersComplete = b; }
237 };
238 
239 class SwFlyNotify : public SwLayNotify
240 {
243 
244 public:
245  SwFlyNotify( SwFlyFrame *pFlyFrame );
246  ~SwFlyNotify();
247 };
248 
250 {
251 private:
252  // #i11859#
255 
256  // #i25029#
259 
260 public:
261  SwContentNotify( SwContentFrame *pContentFrame );
263 
264  // #i25029#
266  {
267  mbInvalidatePrevPrtArea = true;
268  }
269 
271  {
272  mbBordersJoinedWithPrev = true;
273  }
274 };
275 
276 // SwBorderAttrs encapsulates the calculation for margin attributes including
277 // border. The whole class is cached.
278 
279 // WARNING! If more attributes should be cached also adjust the method
280 // Modify::Modify!
281 class SwBorderAttrs : public SwCacheObj
282 {
285  // #i96772#
286  std::shared_ptr<SvxLRSpaceItem> m_rLR;
290 
291  // the following bool values set the cached values to INVALID - until they
292  // are calculated for the first time
293  bool m_bTopLine : 1;
294  bool m_bBottomLine : 1;
295  bool m_bLeftLine : 1;
296  bool m_bRightLine : 1;
297  bool m_bTop : 1;
298  bool m_bBottom : 1;
299  bool m_bLine : 1;
300 
301  bool m_bIsLine : 1; // border on at least one side?
302 
303  bool m_bCacheGetLine : 1; // cache GetTopLine(), GetBottomLine()?
304  bool m_bCachedGetTopLine : 1; // is GetTopLine() cached?
305  bool m_bCachedGetBottomLine : 1; // is GetBottomLine() cached?
306  // Booleans indicate that <m_bJoinedWithPrev> and <m_bJoinedWithNext> are
307  // cached and valid.
308  // Caching depends on value of <m_bCacheGetLine>.
309  mutable bool m_bCachedJoinedWithPrev : 1;
310  mutable bool m_bCachedJoinedWithNext : 1;
311  // Booleans indicate that borders are joined with previous/next frame.
314 
315  // The cached values (un-defined until calculated for the first time)
316  sal_uInt16 m_nTopLine,
318  m_nLeftLine,
319  m_nRightLine,
320  m_nTop,
321  m_nBottom,
324 
325  // only calculate lines and shadow
326  void CalcTopLine_();
327  void CalcBottomLine_();
328  void CalcLeftLine_();
329  void CalcRightLine_();
330 
331  // lines + shadow + margin
332  void CalcTop_();
333  void CalcBottom_();
334 
335  void IsLine_();
336 
337  // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
338  // borders/shadow have to be joined with previous frame.
339  void GetTopLine_ ( const SwFrame& _rFrame,
340  const SwFrame* _pPrevFrame );
341  void GetBottomLine_( const SwFrame& _rFrame );
342 
343  // calculate cached values <m_bJoinedWithPrev> and <m_bJoinedWithNext>
344  // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
345  // borders/shadow have to be joined with previous frame.
346  void CalcJoinedWithPrev( const SwFrame& _rFrame,
347  const SwFrame* _pPrevFrame );
348  void CalcJoinedWithNext( const SwFrame& _rFrame );
349 
350  // internal helper method for CalcJoinedWithPrev and CalcJoinedWithNext
351  bool JoinWithCmp( const SwFrame& _rCallerFrame,
352  const SwFrame& _rCmpFrame ) const;
353 
354  // Are the left and right line and the LRSpace equal?
355  bool CmpLeftRight( const SwBorderAttrs &rCmpAttrs,
356  const SwFrame *pCaller,
357  const SwFrame *pCmp ) const;
358 
359 public:
360  SwBorderAttrs( const SwModify *pOwner, const SwFrame *pConstructor );
361  virtual ~SwBorderAttrs() override;
362 
363  const SwAttrSet &GetAttrSet() const { return m_rAttrSet; }
364  const SvxULSpaceItem &GetULSpace() const { return m_rUL; }
365  const SvxBoxItem &GetBox() const { return m_rBox; }
366  const SvxShadowItem &GetShadow() const { return m_rShadow; }
367 
368  inline sal_uInt16 CalcTopLine() const;
369  inline sal_uInt16 CalcBottomLine() const;
370  inline sal_uInt16 CalcLeftLine() const;
371  inline sal_uInt16 CalcRightLine() const;
372  inline sal_uInt16 CalcTop() const;
373  inline sal_uInt16 CalcBottom() const;
374  long CalcLeft( const SwFrame *pCaller ) const;
375  long CalcRight( const SwFrame *pCaller ) const;
376 
377  inline bool IsLine() const;
378 
379  const Size &GetSize() const { return m_aFrameSize; }
380 
381  // Should upper (or lower) border be evaluated for this frame?
382  // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
383  // borders/shadow have to be joined with previous frame.
384  inline sal_uInt16 GetTopLine ( const SwFrame& _rFrame,
385  const SwFrame* _pPrevFrame = nullptr ) const;
386  inline sal_uInt16 GetBottomLine( const SwFrame& _rFrame ) const;
387  inline void SetGetCacheLine( bool bNew ) const;
388 
389  // Accessors for cached values <m_bJoinedWithPrev> and <m_bJoinedWithNext>
390  // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
391  // borders/shadow have to be joined with previous frame.
392  bool JoinedWithPrev( const SwFrame& _rFrame,
393  const SwFrame* _pPrevFrame = nullptr ) const;
394  bool JoinedWithNext( const SwFrame& _rFrame ) const;
395 };
396 
398 {
399  const SwFrame *m_pConstructor; //opt: for passing on to SwBorderAttrs
400 
401 protected:
402  virtual SwCacheObj *NewObj() override;
403 
404 public:
405  SwBorderAttrAccess( SwCache &rCache, const SwFrame *pOwner );
406 
407  SwBorderAttrs *Get();
408 };
409 
410 // Iterator for draw objects of a page. The objects will be iterated sorted by
411 // their Z-order. Iterating is not cheap since for each operation the _whole_
412 // SortArray needs to be traversed.
414 {
417 
418 public:
419  SwOrderIter( const SwPageFrame *pPage );
420 
421  void Current( const SdrObject *pNew ) { m_pCurrent = pNew; }
422  const SdrObject *operator()() const { return m_pCurrent; }
423  void Top();
424  const SdrObject *Bottom();
425  const SdrObject *Next();
426  void Prev();
427 };
428 
430 {
431  static sal_uInt8 nCnt;
432  static bool bLocked;
433 
434 public:
436  {
437  if ( ++StackHack::nCnt > 50 )
438  StackHack::bLocked = true;
439  }
441  {
442  if ( --StackHack::nCnt < 5 )
443  StackHack::bLocked = false;
444  }
445 
446  static bool IsLocked() { return StackHack::bLocked; }
447  static sal_uInt8 Count() { return StackHack::nCnt; }
448 };
449 
450 // Should upper (or lower) border be evaluated for this frame?
451 // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
452 // borders/shadow have to be joined with previous frame.
453 inline sal_uInt16 SwBorderAttrs::GetTopLine ( const SwFrame& _rFrame,
454  const SwFrame* _pPrevFrame ) const
455 {
456  if ( !m_bCachedGetTopLine || _pPrevFrame )
457  {
458  const_cast<SwBorderAttrs*>(this)->GetTopLine_( _rFrame, _pPrevFrame );
459  }
460  return m_nGetTopLine;
461 }
462 inline sal_uInt16 SwBorderAttrs::GetBottomLine( const SwFrame& _rFrame ) const
463 {
464  if ( !m_bCachedGetBottomLine )
465  const_cast<SwBorderAttrs*>(this)->GetBottomLine_( _rFrame );
466  return m_nGetBottomLine;
467 }
468 inline void SwBorderAttrs::SetGetCacheLine( bool bNew ) const
469 {
470  const_cast<SwBorderAttrs*>(this)->m_bCacheGetLine = bNew;
471  const_cast<SwBorderAttrs*>(this)->m_bCachedGetBottomLine =
472  const_cast<SwBorderAttrs*>(this)->m_bCachedGetTopLine = false;
473  // invalidate cache for values <m_bJoinedWithPrev> and <m_bJoinedWithNext>
474  m_bCachedJoinedWithPrev = false;
475  m_bCachedJoinedWithNext = false;
476 }
477 
478 inline sal_uInt16 SwBorderAttrs::CalcTopLine() const
479 {
480  if ( m_bTopLine )
481  const_cast<SwBorderAttrs*>(this)->CalcTopLine_();
482  return m_nTopLine;
483 }
484 inline sal_uInt16 SwBorderAttrs::CalcBottomLine() const
485 {
486  if ( m_bBottomLine )
487  const_cast<SwBorderAttrs*>(this)->CalcBottomLine_();
488  return m_nBottomLine;
489 }
490 inline sal_uInt16 SwBorderAttrs::CalcLeftLine() const
491 {
492  if ( m_bLeftLine )
493  const_cast<SwBorderAttrs*>(this)->CalcLeftLine_();
494  return m_nLeftLine;
495 }
496 inline sal_uInt16 SwBorderAttrs::CalcRightLine() const
497 {
498  if ( m_bRightLine )
499  const_cast<SwBorderAttrs*>(this)->CalcRightLine_();
500  return m_nRightLine;
501 }
502 inline sal_uInt16 SwBorderAttrs::CalcTop() const
503 {
504  if ( m_bTop )
505  const_cast<SwBorderAttrs*>(this)->CalcTop_();
506  return m_nTop;
507 }
508 inline sal_uInt16 SwBorderAttrs::CalcBottom() const
509 {
510  if ( m_bBottom )
511  const_cast<SwBorderAttrs*>(this)->CalcBottom_();
512  return m_nBottom;
513 }
514 inline bool SwBorderAttrs::IsLine() const
515 {
516  if ( m_bLine )
517  const_cast<SwBorderAttrs*>(this)->IsLine_();
518  return m_bIsLine;
519 }
520 
540 void GetSpacingValuesOfFrame( const SwFrame& rFrame,
541  SwTwips& onLowerSpacing,
542  SwTwips& onLineSpacing,
543  bool& obIsLineSpacingProportional );
544 
557 const SwContentFrame* GetCellContent( const SwLayoutFrame& rCell_ );
558 
565 {
566 private:
567  const SwFrame* mpFrame;
569 
570 public:
571  SwDeletionChecker(const SwFrame* pFrame);
572 
578  bool HasBeenDeleted();
579 };
580 
581 #endif
582 
583 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool m_bJoinedWithPrev
Definition: frmtool.hxx:312
SwTwips mnFlyAnchorOfstNoWrap
Definition: frmtool.hxx:214
void SetInvalidatePrevPrtArea()
Definition: frmtool.hxx:265
sal_uInt16 CalcBottomLine() const
Definition: frmtool.hxx:484
Base class of the Writer layout elements.
Definition: frame.hxx:295
SwFlyNotify(SwFlyFrame *pFlyFrame)
Definition: frmtool.cxx:627
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:149
bool m_bBottom
Definition: frmtool.hxx:298
void RestoreContent(SwFrame *pSav, SwLayoutFrame *pParent, SwFrame *pSibling)
Definition: frmtool.cxx:2782
const SdrObject * Next()
Definition: frmtool.cxx:2504
const SvxBoxItem & m_rBox
Definition: frmtool.hxx:287
sal_uInt16 m_nLeftLine
Definition: frmtool.hxx:316
bool m_bTopLine
Definition: frmtool.hxx:293
void SetInvaKeep()
Definition: frmtool.hxx:224
Marks a position in the document model.
Definition: pam.hxx:35
void InsertCnt_(SwLayoutFrame *pLay, SwDoc *pDoc, sal_uLong nIndex, bool bPages=false, sal_uLong nEndIndex=0, SwFrame *pPrv=nullptr, sw::FrameMode eMode=sw::FrameMode::New)
Definition: frmtool.cxx:1381
SwFrame * mpFrame
Definition: frmtool.hxx:210
const SwFrame * m_pConstructor
Definition: frmtool.hxx:399
const SwFrame * FindContext(const SwFrame *pFrame, SwFrameType nAdditionalContextTyp)
provides the area of a frame in that no Fly from another area can overlap
Definition: frmtool.cxx:3377
void DrawGraphic(const SvxBrushItem *, vcl::RenderContext *, const SwRect &rOrg, const SwRect &rOut, const sal_uInt8 nGrfNum=GRFNUM_NO, const bool bConsiderBackgroundTransparency=false)
Definition: paintfrm.cxx:1793
const SwPageFrame * m_pPage
Definition: frmtool.hxx:415
bool m_bRightLine
Definition: frmtool.hxx:296
void Notify(SwFlyFrame *pFly, SwPageFrame *pOld, const SwRect &rOld, const SwRect *pOldRect=nullptr)
Notify the background based on the difference between old and new rectangle.
Definition: frmtool.cxx:2987
const SwRect & getFrameArea() const
Definition: frmtool.hxx:223
~SwFrameNotify() COVERITY_NOEXCEPT_FALSE
Definition: frmtool.cxx:108
SwTwips mnHeightOfLastLine
Definition: frmtool.hxx:254
bool bDontCreateObjects
Definition: frmtool.cxx:81
void Current(const SdrObject *pNew)
Definition: frmtool.hxx:421
const SwFrame * FindPage(const SwRect &rRect, const SwFrame *pPage)
Definition: frmtool.cxx:3475
sal_uIntPtr sal_uLong
std::shared_ptr< SvxLRSpaceItem > m_rLR
Definition: frmtool.hxx:286
bool IsAnchoredObjShown(SwTextFrame const &rFrame, SwFormatAnchor const &rAnchor)
Definition: frmtool.cxx:1265
bool JoinedWithPrev(const SwFrame &_rFrame, const SwFrame *_pPrevFrame=nullptr) const
Definition: frmtool.cxx:2360
static sal_uInt8 nCnt
Definition: frmtool.hxx:431
Definition: doc.hxx:185
SwLayNotify(SwLayoutFrame *pLayFrame)
Definition: frmtool.cxx:415
bool m_bJoinedWithNext
Definition: frmtool.hxx:313
void Prev()
Definition: frmtool.cxx:2532
const SvxShadowItem & GetShadow() const
Definition: frmtool.hxx:366
SwFrameNotify(SwFrame *pFrame)
Definition: frmtool.cxx:87
bool JoinWithCmp(const SwFrame &_rCallerFrame, const SwFrame &_rCmpFrame) const
Definition: frmtool.cxx:2272
~StackHack()
Definition: frmtool.hxx:440
long CalcHeightWithFlys(const SwFrame *pFrame)
Definition: tabfrm.cxx:3793
long SwTwips
Definition: swtypes.hxx:49
sal_uInt16 CalcTopLine() const
Definition: frmtool.hxx:478
void SetBordersJoinedWithPrev()
Definition: frmtool.hxx:270
Dialog to specify the properties of date form field.
Definition: accfrmobj.cxx:40
sal_uInt16 m_nRightLine
Definition: frmtool.hxx:316
void Top()
Definition: frmtool.cxx:2451
Of course Writer needs its own rectangles.
Definition: swrect.hxx:34
long CalcRight(const SwFrame *pCaller) const
Definition: frmtool.cxx:2108
void Notify_Background(const SdrObject *pObj, SwPageFrame *pPage, const SwRect &rRect, const PrepareHint eHint, const bool bInva)
Definition: frmtool.cxx:3135
The root element of a Writer document layout.
Definition: rootfrm.hxx:79
SwFlyFrame * GetFlyFromMarked(const SdrMarkList *pLst, SwViewShell *pSh)
Definition: feshview.cxx:147
static bool bFootnote
Definition: insfnote.cxx:40
bool bSetCompletePaintOnInvalidate
Definition: frmtool.cxx:82
virtual SwCacheObj * NewObj() override
Can be use in NewObj.
Definition: frmtool.cxx:2434
void CalcBottomLine_()
Definition: frmtool.cxx:2214
long CalcLeft(const SwFrame *pCaller) const
Definition: frmtool.cxx:2156
sal_uInt16 CalcLeftLine() const
Definition: frmtool.hxx:490
void SwAlignRect(SwRect &rRect, const SwViewShell *pSh, const vcl::RenderContext *pRenderContext)
Function is also used outside this file.
Definition: paintfrm.cxx:1103
SwBorderAttrs(const SwModify *pOwner, const SwFrame *pConstructor)
Definition: frmtool.cxx:2036
bool m_bCachedGetBottomLine
Definition: frmtool.hxx:305
bool DrawFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr &rFillAttributes, const SwRect &rOriginalLayoutRect, const SwRegionRects &rPaintRegion, const basegfx::utils::B2DClipState &rClipState, vcl::RenderContext &rOut)
Definition: paintfrm.cxx:1696
const SvxShadowItem & m_rShadow
Definition: frmtool.hxx:288
bool IsFrameInSameContext(const SwFrame *pInnerFrame, const SwFrame *pFrame)
Definition: frmtool.cxx:3391
std::shared_ptr< SdrAllFillAttributesHelper > SdrAllFillAttributesHelperPtr
Definition: format.hxx:38
void CalcJoinedWithNext(const SwFrame &_rFrame)
Definition: frmtool.cxx:2329
void CalcTopLine_()
Definition: frmtool.cxx:2207
void CalcJoinedWithPrev(const SwFrame &_rFrame, const SwFrame *_pPrevFrame)
Definition: frmtool.cxx:2294
bool mbHadFollow
Definition: frmtool.hxx:215
void GetSpacingValuesOfFrame(const SwFrame &rFrame, SwTwips &onLowerSpacing, SwTwips &onLineSpacing, bool &obIsLineSpacingProportional)
method to determine the spacing values of a frame
Definition: frmtool.cxx:3672
void GetTopLine_(const SwFrame &_rFrame, const SwFrame *_pPrevFrame)
Definition: frmtool.cxx:2384
bool m_bLeftLine
Definition: frmtool.hxx:295
const SwAttrSet & m_rAttrSet
Definition: frmtool.hxx:283
bool mbInvaKeep
Definition: frmtool.hxx:216
const SwRect aFrameAndSpace
Definition: frmtool.hxx:242
const SwRect maPrt
Definition: frmtool.hxx:212
const SwRect maFrame
Definition: frmtool.hxx:211
SwFrame * SaveContent(SwLayoutFrame *pLay, SwFrame *pStart=nullptr)
Definition: frmtool.cxx:2619
helper class to check if a frame has been deleted during an operation WARNING! This should only be us...
Definition: frmtool.hxx:564
void MakeFrames(SwDoc *pDoc, const SwNodeIndex &rSttIdx, const SwNodeIndex &rEndIdx)
Definition: frmtool.cxx:1831
SwPageFrame *const pOldPage
Definition: frmtool.hxx:241
Specific frame formats (frames, DrawObjects).
Definition: docary.hxx:201
SwPageFrame * InsertNewPage(SwPageDesc &rDesc, SwFrame *pUpper, bool bOdd, bool bFirst, bool bInsertEmpty, bool bFootnote, SwFrame *pSibling)
Definition: frmtool.cxx:2870
FrameMode
Definition: txtfrm.hxx:102
void CalcContent(SwLayoutFrame *pLay, bool bNoColl=false)
Definition: fly.cxx:1368
void SetGetCacheLine(bool bNew) const
Definition: frmtool.hxx:468
PrepareHint
Definition: swtypes.hxx:204
sal_uInt16 GetBottomLine(const SwFrame &_rFrame) const
Definition: frmtool.hxx:462
SwFrameType
Definition: frame.hxx:72
bool m_bLowersComplete
Definition: frmtool.hxx:229
sal_uInt16 m_nTopLine
Definition: frmtool.hxx:316
bool CmpLeftRight(const SwBorderAttrs &rCmpAttrs, const SwFrame *pCaller, const SwFrame *pCmp) const
Definition: frmtool.cxx:2261
SwOrderIter(const SwPageFrame *pPage)
Definition: frmtool.cxx:2445
FlyAnchors.
Definition: fmtanchr.hxx:34
const SvxBoxItem & GetBox() const
Definition: frmtool.hxx:365
const SwFrame * mpFrame
Definition: frmtool.hxx:567
SwBorderAttrAccess(SwCache &rCache, const SwFrame *pOwner)
Definition: frmtool.cxx:2426
static sal_uInt8 Count()
Definition: frmtool.hxx:447
void PaintCharacterBorder(const SwFont &rFont, const SwRect &rPaintArea, const bool bVerticalLayout, const bool bVerticalLayoutLRBT, const bool bJoinWithPrev, const bool bJoinWithNext)
Paint border around a run of characters using frame painting code.
Definition: paintfrm.cxx:4723
static bool bLocked
Definition: frmtool.hxx:432
const SwAttrSet & GetAttrSet() const
Definition: frmtool.hxx:363
sal_uInt16 m_nBottom
Definition: frmtool.hxx:316
sal_uInt16 GetTopLine(const SwFrame &_rFrame, const SwFrame *_pPrevFrame=nullptr) const
Definition: frmtool.hxx:453
const SdrObject * m_pCurrent
Definition: frmtool.hxx:416
Marks a node in the document model.
Definition: ndindex.hxx:31
bool IsExtraData(const SwDoc *pDoc)
Definition: frmtool.cxx:3629
bool m_bCachedJoinedWithNext
Definition: frmtool.hxx:310
bool IsLine() const
Definition: frmtool.hxx:514
bool bObjsDirect
Definition: frmtool.cxx:80
SwContentNotify(SwContentFrame *pContentFrame)
Definition: frmtool.cxx:732
bool mbBordersJoinedWithPrev
Definition: frmtool.hxx:258
A page of the document layout.
Definition: pagefrm.hxx:40
bool mbChkHeightOfLastLine
Definition: frmtool.hxx:253
SwDeletionChecker(const SwFrame *pFrame)
Definition: frmtool.cxx:3729
bool IsLowersComplete()
Definition: frmtool.hxx:236
void CalcRightLine_()
Definition: frmtool.cxx:2228
sal_uInt16 CalcTop() const
Definition: frmtool.hxx:502
SwBorderAttrs * Get()
Definition: frmtool.cxx:2440
bool m_bCacheGetLine
Definition: frmtool.hxx:303
SwTwips mnFlyAnchorOfst
Definition: frmtool.hxx:213
void CalcTop_()
Definition: frmtool.cxx:2096
const SwContentFrame * GetCellContent(const SwLayoutFrame &rCell_)
method to get the content of the table cell
Definition: frmtool.cxx:3703
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
const SwModify * mpRegIn
Definition: frmtool.hxx:568
bool Is_Lower_Of(const SwFrame *pCurrFrame, const SdrObject *pObj)
Definition: frmtool.cxx:3345
general base class for all free-flowing frames
Definition: flyfrm.hxx:60
void IsLine_()
Definition: frmtool.cxx:2235
const Size m_aFrameSize
Definition: frmtool.hxx:289
void AppendAllObjs(const SwFrameFormats *pTable, const SwFrame *pSib)
Definition: frmtool.cxx:1306
const SvxULSpaceItem & m_rUL
Definition: frmtool.hxx:284
unsigned char sal_uInt8
const SdrObject * operator()() const
Definition: frmtool.hxx:422
The Cache object base class Users of the Cache must derive a class from the SwCacheObj and store thei...
Definition: swcache.hxx:133
void SetLowersComplete(bool b)
Definition: frmtool.hxx:235
void SwAlignGrfRect(SwRect *pGrfRect, const vcl::RenderContext &rOut)
Method to pixel-align rectangle for drawing graphic object.
Definition: paintfrm.cxx:1209
sal_uInt16 CalcBottom() const
Definition: frmtool.hxx:508
sal_uInt16 m_nBottomLine
Definition: frmtool.hxx:316
void GetBottomLine_(const SwFrame &_rFrame)
Definition: frmtool.cxx:2401
void CalcLeftLine_()
Definition: frmtool.cxx:2221
bool JoinedWithNext(const SwFrame &_rFrame) const
Definition: frmtool.cxx:2372
bool mbInvalidatePrevPrtArea
Definition: frmtool.hxx:257
const SwFrame * GetVirtualUpper(const SwFrame *pFrame, const Point &rPos)
Provides the Upper of an anchor in paragraph-bound objects.
Definition: frmtool.cxx:3313
bool m_bBottomLine
Definition: frmtool.hxx:294
bool HasBeenDeleted()
return true if mpFrame != 0 and mpFrame is not client of pRegIn false otherwise
Definition: frmtool.cxx:3741
static bool IsLocked()
Definition: frmtool.hxx:446
void RemoveHiddenObjsOfNode(SwTextNode const &rNode, std::vector< sw::Extent >::const_iterator const *pIter, std::vector< sw::Extent >::const_iterator const *pEnd, SwTextNode const *pFirstNode, SwTextNode const *pLastNode)
Definition: frmtool.cxx:1141
void AppendObjsOfNode(SwFrameFormats const *pTable, sal_uLong nIndex, SwFrame *pFrame, SwPageFrame *pPage, SwDoc *pDoc, std::vector< sw::Extent >::const_iterator const *pIter, std::vector< sw::Extent >::const_iterator const *pEnd, SwTextNode const *pFirstNode, SwTextNode const *pLastNode)
Definition: frmtool.cxx:1167
const Size & GetSize() const
Definition: frmtool.hxx:379
void paintGraphicUsingPrimitivesHelper(vcl::RenderContext &rOutputDevice, GraphicObject const &rGraphicObj, GraphicAttr const &rGraphicAttr, const basegfx::B2DHomMatrix &rGraphicTransform, const OUString &rName, const OUString &rTitle, const OUString &rDescription)
Definition: notxtfrm.cxx:930
bool m_bIsLine
Definition: frmtool.hxx:301
Access class for the Cache.
Definition: swcache.hxx:194
void RegistFlys(SwPageFrame *, const SwLayoutFrame *)
Definition: frmtool.cxx:2971
bool m_bCachedGetTopLine
Definition: frmtool.hxx:304
#define GRFNUM_NO
Definition: frmtool.hxx:54
sal_uInt16 m_nGetBottomLine
Definition: frmtool.hxx:316
virtual ~SwBorderAttrs() override
Definition: frmtool.cxx:2086
sal_uInt16 m_nTop
Definition: frmtool.hxx:316
void AppendObjs(const SwFrameFormats *pTable, sal_uLong nIndex, SwFrame *pFrame, SwPageFrame *pPage, SwDoc *doc)
Definition: frmtool.cxx:1214
sal_uInt16 m_nGetTopLine
Definition: frmtool.hxx:316
SwFrame * GetFrameOfModify(const SwRootFrame *pLayout, SwModify const &, SwFrameType const nFrameType, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr)
const SdrObject * Bottom()
Definition: frmtool.cxx:2477
bool m_bCachedJoinedWithPrev
Definition: frmtool.hxx:309
const SvxULSpaceItem & GetULSpace() const
Definition: frmtool.hxx:364
sal_uInt16 CalcRightLine() const
Definition: frmtool.hxx:496
void CalcBottom_()
Definition: frmtool.cxx:2102
bool const mbValidSize
Definition: frmtool.hxx:217
SwTwips CalcRowRstHeight(SwLayoutFrame *pRow)
Definition: frmtool.cxx:3459