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 <BorderCacheOwner.hxx>
25 #include "frame.hxx"
26 #include "txtfrm.hxx"
27 #include "swcache.hxx"
28 #include <swatrset.hxx>
29 
30 class SwLayoutFrame;
31 class SwFont;
32 class SwTextFrame;
33 class SwFormatAnchor;
34 class SwViewShell;
35 class SwPageFrame;
36 class SwFlyFrame;
37 class SwContentFrame;
38 class SwRootFrame;
39 class SwDoc;
40 class SdrObject;
41 class SvxBrushItem;
42 class SdrMarkList;
43 class SwNodeIndex;
44 class GraphicObject;
45 class GraphicAttr;
46 class SwPageDesc;
47 class SwFrameFormats;
48 class SwRegionRects;
49 class SwTextNode;
50 namespace sw { struct Extent; }
51 namespace basegfx::utils { class B2DClipState; }
52 
53 #define FAR_AWAY (SAL_MAX_INT32 - 20000) // initial position of a Fly
54 constexpr tools::Long BROWSE_HEIGHT = 56700 * 10; // 10 Meters
55 #define GRFNUM_NO 0
56 #define GRFNUM_YES 1
57 #define GRFNUM_REPLACE 2
58 
59 void AppendObjs( const SwFrameFormats *pTable, sal_uLong nIndex,
60  SwFrame *pFrame, SwPageFrame *pPage, SwDoc* doc );
61 
62 void AppendObjsOfNode(SwFrameFormats const* pTable, sal_uLong nIndex,
63  SwFrame * pFrame, SwPageFrame * pPage, SwDoc * pDoc,
64  std::vector<sw::Extent>::const_iterator const* pIter,
65  std::vector<sw::Extent>::const_iterator const* pEnd,
66  SwTextNode const* pFirstNode, SwTextNode const* pLastNode);
67 
68 void RemoveHiddenObjsOfNode(SwTextNode const& rNode,
69  std::vector<sw::Extent>::const_iterator const* pIter,
70  std::vector<sw::Extent>::const_iterator const* pEnd,
71  SwTextNode const* pFirstNode, SwTextNode const* pLastNode);
72 
73 bool IsAnchoredObjShown(SwTextFrame const& rFrame, SwFormatAnchor const& rAnchor);
74 
75 void AppendAllObjs(const SwFrameFormats* pTable, const SwFrame* pSib);
76 
77 // draw background with brush or graphics
78 // The 6th parameter indicates that the method should consider background
79 // transparency, saved in the color of the brush item.
80 void DrawGraphic(
81  const SvxBrushItem *,
83  const SwRect &rOrg,
84  const SwRect &rOut,
85  const sal_uInt8 nGrfNum = GRFNUM_NO,
86  const bool bConsiderBackgroundTransparency = false );
89  const SwRect& rOriginalLayoutRect,
90  const SwRegionRects& rPaintRegion,
91  const basegfx::utils::B2DClipState& rClipState,
92  vcl::RenderContext& rOut);
93 
94 // RotGrfFlyFrame: Adapted to rotation
96  vcl::RenderContext & rOutputDevice,
97  GraphicObject const& rGraphicObj,
98  GraphicAttr const& rGraphicAttr,
99  const basegfx::B2DHomMatrix& rGraphicTransform,
100  const OUString& rName,
101  const OUString& rTitle,
102  const OUString& rDescription);
103 
104 // MM02 new VOC and primitive-based version
106  vcl::RenderContext & rOutputDevice,
108  const basegfx::B2DHomMatrix& rGraphicTransform,
109  const OUString& rName,
110  const OUString& rTitle,
111  const OUString& rDescription);
112 
113 // method to align rectangle.
114 // Created declaration here to avoid <extern> declarations
115 void SwAlignRect( SwRect &rRect, const SwViewShell *pSh, const vcl::RenderContext* pRenderContext );
116 
117 // method to align graphic rectangle
118 // Created declaration here to avoid <extern> declarations
119 void SwAlignGrfRect( SwRect *pGrfRect, const vcl::RenderContext &rOut );
120 
131 void PaintCharacterBorder(const SwFont& rFont, const SwRect& rPaintArea, const bool bVerticalLayout,
132  const bool bVerticalLayoutLRBT, const bool bJoinWithPrev,
133  const bool bJoinWithNext);
134 
135 // get Fly, if no List is given use the current shell
136 // Implementation in feshview.cxx
137 SwFlyFrame *GetFlyFromMarked( const SdrMarkList *pLst, SwViewShell *pSh );
138 
139 SwFrame *SaveContent( SwLayoutFrame *pLay, SwFrame *pStart = nullptr );
140 void RestoreContent( SwFrame *pSav, SwLayoutFrame *pParent, SwFrame *pSibling );
141 
142 // Get ContentNodes, create ContentFrames, and add them to LayFrame.
143 void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, sal_uLong nIndex,
144  bool bPages = false, sal_uLong nEndIndex = 0,
145  SwFrame *pPrv = nullptr, sw::FrameMode eMode = sw::FrameMode::New);
146 
147 // Creation of frames for a specific section (uses InsertCnt_)
148 void MakeFrames( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
149  const SwNodeIndex &rEndIdx );
150 
151 extern bool bObjsDirect;
152 
153 // for FlyCnts, see SwFlyAtContentFrame::MakeAll()
155 
156 // for table settings via keyboard
158 tools::Long CalcHeightWithFlys( const SwFrame *pFrame );
159 
160 namespace sw {
161  bool IsRightPageByNumber(SwRootFrame const& rLayout, sal_uInt16 nPageNum);
163  {
165  public:
166  FlyCreationSuppressor(bool isAlreadySuppressedAllowed = true);
168  };
169 } // namespace sw
170 
171 SwPageFrame *InsertNewPage( SwPageDesc &rDesc, SwFrame *pUpper,
172  bool isRightPage, bool bFirst, bool bInsertEmpty, bool bFootnote,
173  SwFrame *pSibling, bool bVeryFirstPage = false );
174 
175 // connect Flys with page
176 void RegistFlys( SwPageFrame*, const SwLayoutFrame* );
177 
178 // notification of Fly's background if needed
179 void Notify( SwFlyFrame *pFly, SwPageFrame *pOld, const SwRect &rOld,
180  const SwRect* pOldRect = nullptr );
181 
182 void Notify_Background( const SdrObject* pObj,
183  SwPageFrame* pPage,
184  const SwRect& rRect,
185  const PrepareHint eHint,
186  const bool bInva );
187 
188 const SwFrame* GetVirtualUpper( const SwFrame* pFrame, const Point& rPos );
189 
190 bool Is_Lower_Of( const SwFrame *pCurrFrame, const SdrObject* pObj );
191 
192 // FIXME: EasyHack (refactoring): rename method and parameter name in all files
193 const SwFrame *FindContext( const SwFrame *pFrame, SwFrameType nAdditionalContextTyp );
194 
195 bool IsFrameInSameContext( const SwFrame *pInnerFrame, const SwFrame *pFrame );
196 
197 const SwFrame * FindPage( const SwRect &rRect, const SwFrame *pPage );
198 
211 SwFrame* GetFrameOfModify( const SwRootFrame* pLayout,
212  sw::BroadcastingModify const&,
213  SwFrameType const nFrameType,
214  const SwPosition *pPos = nullptr,
215  std::pair<Point, bool> const* pViewPosAndCalcFrame = nullptr);
216 
217 // Should extra data (redline stroke, line numbers) be painted?
218 bool IsExtraData( const SwDoc *pDoc );
219 
220 // #i11760# - method declaration <CalcContent(..)>
221 void CalcContent( SwLayoutFrame *pLay, bool bNoColl = false );
222 
223 // Notify classes memorize the current sizes in their constructor and do
224 // the necessary notifications in their destructor if needed
226 {
227 protected:
230  const SwRect maPrt;
236 
237 public:
238  SwFrameNotify( SwFrame *pFrame );
239  ~SwFrameNotify() COVERITY_NOEXCEPT_FALSE;
240 
241  const SwRect &getFrameArea() const { return maFrame; }
242  void SetInvaKeep() { mbInvaKeep = true; }
243 };
244 
246 {
248 
249 public:
250  SwLayNotify( SwLayoutFrame *pLayFrame );
251  ~SwLayNotify();
252 
253  void SetLowersComplete( bool b ) { m_bLowersComplete = b; }
254  bool IsLowersComplete() const { return m_bLowersComplete; }
255 };
256 
257 class SwFlyNotify : public SwLayNotify
258 {
261 
262 public:
263  SwFlyNotify( SwFlyFrame *pFlyFrame );
264  ~SwFlyNotify();
265 };
266 
268 {
269 private:
270  // #i11859#
273 
274  // #i25029#
277 
278 public:
279  SwContentNotify( SwContentFrame *pContentFrame );
281 
282  // #i25029#
284  {
285  mbInvalidatePrevPrtArea = true;
286  }
287 
289  {
290  mbBordersJoinedWithPrev = true;
291  }
292 };
293 
294 // SwBorderAttrs encapsulates the calculation for margin attributes including
295 // border. The whole class is cached.
296 
297 // WARNING! If more attributes should be cached also adjust the method
298 // Modify::Modify!
299 class SwBorderAttrs final : public SwCacheObj
300 {
303  // #i96772#
304  std::shared_ptr<SvxLRSpaceItem> m_rLR;
308 
309  // the following bool values set the cached values to INVALID - until they
310  // are calculated for the first time
311  bool m_bTopLine : 1;
312  bool m_bBottomLine : 1;
313  bool m_bLeftLine : 1;
314  bool m_bRightLine : 1;
315  bool m_bTop : 1;
316  bool m_bBottom : 1;
317  bool m_bLine : 1;
318  bool m_bLineSpacing : 1;
319 
320  bool m_bIsLine : 1; // border on at least one side?
321 
322  bool m_bCacheGetLine : 1; // cache GetTopLine(), GetBottomLine()?
323  bool m_bCachedGetTopLine : 1; // is GetTopLine() cached?
324  bool m_bCachedGetBottomLine : 1; // is GetBottomLine() cached?
325  // Booleans indicate that <m_bJoinedWithPrev> and <m_bJoinedWithNext> are
326  // cached and valid.
327  // Caching depends on value of <m_bCacheGetLine>.
328  mutable bool m_bCachedJoinedWithPrev : 1;
329  mutable bool m_bCachedJoinedWithNext : 1;
330  // Booleans indicate that borders are joined with previous/next frame.
333 
334  // The cached values (un-defined until calculated for the first time)
335  sal_uInt16 m_nTopLine,
337  m_nLeftLine,
338  m_nRightLine,
339  m_nTop,
340  m_nBottom,
344 
345  // only calculate lines and shadow
346  void CalcTopLine_();
347  void CalcBottomLine_();
348  void CalcLeftLine_();
349  void CalcRightLine_();
350 
351  // lines + shadow + margin
352  void CalcTop_();
353  void CalcBottom_();
354 
355  void IsLine_();
356 
357  // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
358  // borders/shadow have to be joined with previous frame.
359  void GetTopLine_ ( const SwFrame& _rFrame,
360  const SwFrame* _pPrevFrame );
361  void GetBottomLine_( const SwFrame& _rFrame );
362 
363  // calculate cached values <m_bJoinedWithPrev> and <m_bJoinedWithNext>
364  // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
365  // borders/shadow have to be joined with previous frame.
366  void CalcJoinedWithPrev( const SwFrame& _rFrame,
367  const SwFrame* _pPrevFrame );
368  void CalcJoinedWithNext( const SwFrame& _rFrame );
369 
370  // internal helper method for CalcJoinedWithPrev and CalcJoinedWithNext
371  bool JoinWithCmp( const SwFrame& _rCallerFrame,
372  const SwFrame& _rCmpFrame ) const;
373 
374  // Are the left and right line and the LRSpace equal?
375  bool CmpLeftRight( const SwBorderAttrs &rCmpAttrs,
376  const SwFrame *pCaller,
377  const SwFrame *pCmp ) const;
378 
379  // tdf#125300 line spacing before cell border
380  void CalcLineSpacing_();
381 
382 public:
383  SwBorderAttrs( const sw::BorderCacheOwner* pOwner, const SwFrame *pConstructor );
384  virtual ~SwBorderAttrs() override;
385 
386  const SwAttrSet &GetAttrSet() const { return m_rAttrSet; }
387  const SvxULSpaceItem &GetULSpace() const { return m_rUL; }
388  const SvxBoxItem &GetBox() const { return m_rBox; }
389  const SvxShadowItem &GetShadow() const { return m_rShadow; }
390 
391  inline sal_uInt16 CalcTopLine() const;
392  inline sal_uInt16 CalcBottomLine() const;
393  inline sal_uInt16 CalcLeftLine() const;
394  inline sal_uInt16 CalcRightLine() const;
395  inline sal_uInt16 CalcTop() const;
396  inline sal_uInt16 CalcBottom() const;
397  inline sal_uInt16 CalcLineSpacing() const;
398  tools::Long CalcLeft( const SwFrame *pCaller ) const;
399  tools::Long CalcRight( const SwFrame *pCaller ) const;
400 
401  inline bool IsLine() const;
402 
403  const Size &GetSize() const { return m_aFrameSize; }
404 
405  // Should upper (or lower) border be evaluated for this frame?
406  // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
407  // borders/shadow have to be joined with previous frame.
408  inline sal_uInt16 GetTopLine ( const SwFrame& _rFrame,
409  const SwFrame* _pPrevFrame = nullptr ) const;
410  inline sal_uInt16 GetBottomLine( const SwFrame& _rFrame ) const;
411  inline void SetGetCacheLine( bool bNew ) const;
412 
413  // Accessors for cached values <m_bJoinedWithPrev> and <m_bJoinedWithNext>
414  // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
415  // borders/shadow have to be joined with previous frame.
416  bool JoinedWithPrev( const SwFrame& _rFrame,
417  const SwFrame* _pPrevFrame = nullptr ) const;
418  bool JoinedWithNext( const SwFrame& _rFrame ) const;
419 };
420 
421 class SwBorderAttrAccess final : public SwCacheAccess
422 {
423  const SwFrame *m_pConstructor; //opt: for passing on to SwBorderAttrs
424 
425  virtual SwCacheObj *NewObj() override;
426 
427 public:
428  SwBorderAttrAccess( SwCache &rCache, const SwFrame *pOwner );
429 
430  SwBorderAttrs *Get();
431 };
432 
433 // Iterator for draw objects of a page. The objects will be iterated sorted by
434 // their Z-order. Iterating is not cheap since for each operation the _whole_
435 // SortArray needs to be traversed.
437 {
440 
441 public:
442  SwOrderIter( const SwPageFrame *pPage );
443 
444  void Current( const SdrObject *pNew ) { m_pCurrent = pNew; }
445  const SdrObject *operator()() const { return m_pCurrent; }
446  void Top();
447  const SdrObject *Bottom();
448  const SdrObject *Next();
449  void Prev();
450 };
451 
453 {
455  static bool s_bLocked;
456 
457 public:
459  {
460  if ( ++StackHack::s_nCnt > 50 )
461  StackHack::s_bLocked = true;
462  }
464  {
465  if ( --StackHack::s_nCnt < 5 )
466  StackHack::s_bLocked = false;
467  }
468 
469  static bool IsLocked() { return StackHack::s_bLocked; }
470  static sal_uInt8 Count() { return StackHack::s_nCnt; }
471 };
472 
473 // Should upper (or lower) border be evaluated for this frame?
474 // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
475 // borders/shadow have to be joined with previous frame.
476 inline sal_uInt16 SwBorderAttrs::GetTopLine ( const SwFrame& _rFrame,
477  const SwFrame* _pPrevFrame ) const
478 {
479  if ( !m_bCachedGetTopLine || _pPrevFrame )
480  {
481  const_cast<SwBorderAttrs*>(this)->GetTopLine_( _rFrame, _pPrevFrame );
482  }
483  return m_nGetTopLine;
484 }
485 inline sal_uInt16 SwBorderAttrs::GetBottomLine( const SwFrame& _rFrame ) const
486 {
487  if ( !m_bCachedGetBottomLine )
488  const_cast<SwBorderAttrs*>(this)->GetBottomLine_( _rFrame );
489  return m_nGetBottomLine;
490 }
491 inline void SwBorderAttrs::SetGetCacheLine( bool bNew ) const
492 {
493  const_cast<SwBorderAttrs*>(this)->m_bCacheGetLine = bNew;
494  const_cast<SwBorderAttrs*>(this)->m_bCachedGetBottomLine =
495  const_cast<SwBorderAttrs*>(this)->m_bCachedGetTopLine = false;
496  // invalidate cache for values <m_bJoinedWithPrev> and <m_bJoinedWithNext>
497  m_bCachedJoinedWithPrev = false;
498  m_bCachedJoinedWithNext = false;
499 }
500 
501 inline sal_uInt16 SwBorderAttrs::CalcTopLine() const
502 {
503  if ( m_bTopLine )
504  const_cast<SwBorderAttrs*>(this)->CalcTopLine_();
505  return m_nTopLine;
506 }
507 inline sal_uInt16 SwBorderAttrs::CalcBottomLine() const
508 {
509  if ( m_bBottomLine )
510  const_cast<SwBorderAttrs*>(this)->CalcBottomLine_();
511  return m_nBottomLine;
512 }
513 inline sal_uInt16 SwBorderAttrs::CalcLeftLine() const
514 {
515  if ( m_bLeftLine )
516  const_cast<SwBorderAttrs*>(this)->CalcLeftLine_();
517  return m_nLeftLine;
518 }
519 inline sal_uInt16 SwBorderAttrs::CalcRightLine() const
520 {
521  if ( m_bRightLine )
522  const_cast<SwBorderAttrs*>(this)->CalcRightLine_();
523  return m_nRightLine;
524 }
525 inline sal_uInt16 SwBorderAttrs::CalcTop() const
526 {
527  if ( m_bTop )
528  const_cast<SwBorderAttrs*>(this)->CalcTop_();
529  return m_nTop;
530 }
531 inline sal_uInt16 SwBorderAttrs::CalcBottom() const
532 {
533  if ( m_bBottom )
534  const_cast<SwBorderAttrs*>(this)->CalcBottom_();
535  return m_nBottom;
536 }
537 inline sal_uInt16 SwBorderAttrs::CalcLineSpacing() const
538 {
539  if ( m_bLineSpacing )
540  const_cast<SwBorderAttrs*>(this)->CalcLineSpacing_();
541  return m_nLineSpacing;
542 }
543 inline bool SwBorderAttrs::IsLine() const
544 {
545  if ( m_bLine )
546  const_cast<SwBorderAttrs*>(this)->IsLine_();
547  return m_bIsLine;
548 }
549 
571 void GetSpacingValuesOfFrame( const SwFrame& rFrame,
572  SwTwips& onLowerSpacing,
573  SwTwips& onLineSpacing,
574  bool& obIsLineSpacingProportional,
575  bool bIdenticalStyles );
576 
589 const SwContentFrame* GetCellContent( const SwLayoutFrame& rCell_ );
590 
597 {
598 private:
599  const SwFrame* mpFrame;
601 
602 public:
603  SwDeletionChecker(const SwFrame* pFrame);
604 
610  bool HasBeenDeleted() const;
611 };
612 
613 #endif
614 
615 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool m_bJoinedWithPrev
Definition: frmtool.hxx:331
SwTwips mnFlyAnchorOfstNoWrap
Definition: frmtool.hxx:232
void SetInvalidatePrevPrtArea()
Definition: frmtool.hxx:283
sal_uInt16 CalcBottomLine() const
Definition: frmtool.hxx:507
static bool s_bLocked
Definition: frmtool.hxx:455
Base class of the Writer layout elements.
Definition: frame.hxx:313
sal_uInt16 m_nLineSpacing
Definition: frmtool.hxx:335
SwFlyNotify(SwFlyFrame *pFlyFrame)
Definition: frmtool.cxx:645
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:158
FlyCreationSuppressor(bool isAlreadySuppressedAllowed=true)
Definition: frmtool.cxx:87
bool m_bBottom
Definition: frmtool.hxx:316
void RestoreContent(SwFrame *pSav, SwLayoutFrame *pParent, SwFrame *pSibling)
Definition: frmtool.cxx:2969
const SdrObject * Next()
Definition: frmtool.cxx:2694
const SvxBoxItem & m_rBox
Definition: frmtool.hxx:305
sal_uInt16 m_nLeftLine
Definition: frmtool.hxx:335
bool m_bTopLine
Definition: frmtool.hxx:311
void SetInvaKeep()
Definition: frmtool.hxx:242
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:1458
SwFrame * mpFrame
Definition: frmtool.hxx:228
const SwFrame * m_pConstructor
Definition: frmtool.hxx:423
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:3580
const SwPageFrame * m_pPage
Definition: frmtool.hxx:438
bool m_bRightLine
Definition: frmtool.hxx:314
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:3191
const SwRect & getFrameArea() const
Definition: frmtool.hxx:241
~SwFrameNotify() COVERITY_NOEXCEPT_FALSE
Definition: frmtool.cxx:127
SwTwips mnHeightOfLastLine
Definition: frmtool.hxx:272
void Current(const SdrObject *pNew)
Definition: frmtool.hxx:444
const SwFrame * FindPage(const SwRect &rRect, const SwFrame *pPage)
Definition: frmtool.cxx:3677
sal_uIntPtr sal_uLong
long Long
std::shared_ptr< SvxLRSpaceItem > m_rLR
Definition: frmtool.hxx:304
bool IsAnchoredObjShown(SwTextFrame const &rFrame, SwFormatAnchor const &rAnchor)
Definition: frmtool.cxx:1297
tools::Long CalcRight(const SwFrame *pCaller) const
Definition: frmtool.cxx:2258
bool mbValidSize
Definition: frmtool.hxx:235
bool JoinedWithPrev(const SwFrame &_rFrame, const SwFrame *_pPrevFrame=nullptr) const
Definition: frmtool.cxx:2538
Definition: doc.hxx:188
SwLayNotify(SwLayoutFrame *pLayFrame)
Definition: frmtool.cxx:433
bool m_bJoinedWithNext
Definition: frmtool.hxx:332
void Prev()
Definition: frmtool.cxx:2722
const SvxShadowItem & GetShadow() const
Definition: frmtool.hxx:389
SwFrameNotify(SwFrame *pFrame)
Definition: frmtool.cxx:106
bool JoinWithCmp(const SwFrame &_rCallerFrame, const SwFrame &_rCmpFrame) const
Definition: frmtool.cxx:2450
~StackHack()
Definition: frmtool.hxx:463
sal_uInt16 CalcTopLine() const
Definition: frmtool.hxx:501
void SetBordersJoinedWithPrev()
Definition: frmtool.hxx:288
Dialog to specify the properties of date form field.
sal_uInt16 m_nRightLine
Definition: frmtool.hxx:335
void Top()
Definition: frmtool.cxx:2641
Of course Writer needs its own rectangles.
Definition: swrect.hxx:34
void Notify_Background(const SdrObject *pObj, SwPageFrame *pPage, const SwRect &rRect, const PrepareHint eHint, const bool bInva)
Definition: frmtool.cxx:3338
The root element of a Writer document layout.
Definition: rootfrm.hxx:82
SwFlyFrame * GetFlyFromMarked(const SdrMarkList *pLst, SwViewShell *pSh)
Definition: feshview.cxx:139
static bool bFootnote
Definition: insfnote.cxx:33
bool bSetCompletePaintOnInvalidate
Definition: frmtool.cxx:101
virtual SwCacheObj * NewObj() override
Can be use in NewObj.
Definition: frmtool.cxx:2624
void CalcBottomLine_()
Definition: frmtool.cxx:2392
tools::Long CalcHeightWithFlys(const SwFrame *pFrame)
Definition: tabfrm.cxx:4002
sal_uInt16 CalcLeftLine() const
Definition: frmtool.hxx:513
bool m_bLineSpacing
Definition: frmtool.hxx:318
void SwAlignRect(SwRect &rRect, const SwViewShell *pSh, const vcl::RenderContext *pRenderContext)
Function is also used outside this file.
Definition: paintfrm.cxx:1127
bool IsLowersComplete() const
Definition: frmtool.hxx:254
bool m_bCachedGetBottomLine
Definition: frmtool.hxx:324
bool DrawFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr &rFillAttributes, const SwRect &rOriginalLayoutRect, const SwRegionRects &rPaintRegion, const basegfx::utils::B2DClipState &rClipState, vcl::RenderContext &rOut)
Definition: paintfrm.cxx:1719
const SvxShadowItem & m_rShadow
Definition: frmtool.hxx:306
bool IsFrameInSameContext(const SwFrame *pInnerFrame, const SwFrame *pFrame)
Definition: frmtool.cxx:3594
std::shared_ptr< SdrAllFillAttributesHelper > SdrAllFillAttributesHelperPtr
Definition: format.hxx:41
void CalcJoinedWithNext(const SwFrame &_rFrame)
Definition: frmtool.cxx:2507
void CalcTopLine_()
Definition: frmtool.cxx:2385
void CalcJoinedWithPrev(const SwFrame &_rFrame, const SwFrame *_pPrevFrame)
Definition: frmtool.cxx:2472
bool mbHadFollow
Definition: frmtool.hxx:233
void GetTopLine_(const SwFrame &_rFrame, const SwFrame *_pPrevFrame)
Definition: frmtool.cxx:2562
bool m_bLeftLine
Definition: frmtool.hxx:313
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:1811
const SwAttrSet & m_rAttrSet
Definition: frmtool.hxx:301
bool mbInvaKeep
Definition: frmtool.hxx:234
const SwRect aFrameAndSpace
Definition: frmtool.hxx:260
const SwRect maPrt
Definition: frmtool.hxx:230
const SwRect maFrame
Definition: frmtool.hxx:229
SwFrame * SaveContent(SwLayoutFrame *pLay, SwFrame *pStart=nullptr)
Definition: frmtool.cxx:2807
helper class to check if a frame has been deleted during an operation WARNING! This should only be us...
Definition: frmtool.hxx:596
void MakeFrames(SwDoc *pDoc, const SwNodeIndex &rSttIdx, const SwNodeIndex &rEndIdx)
Definition: frmtool.cxx:1965
void CalcLineSpacing_()
Definition: frmtool.cxx:2594
Specific frame formats (frames, DrawObjects).
FrameMode
Definition: txtfrm.hxx:103
const bool m_wasAlreadySuppressed
Definition: frmtool.hxx:164
void CalcContent(SwLayoutFrame *pLay, bool bNoColl=false)
Definition: fly.cxx:1411
void SetGetCacheLine(bool bNew) const
Definition: frmtool.hxx:491
PrepareHint
Definition: swtypes.hxx:193
SwBorderAttrs(const sw::BorderCacheOwner *pOwner, const SwFrame *pConstructor)
Definition: frmtool.cxx:2170
sal_uInt16 GetBottomLine(const SwFrame &_rFrame) const
Definition: frmtool.hxx:485
SwFrameType
Definition: frame.hxx:73
SwFrame * GetFrameOfModify(const SwRootFrame *pLayout, sw::BroadcastingModify const &, SwFrameType const nFrameType, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr)
bool m_bLowersComplete
Definition: frmtool.hxx:247
tools::Long CalcLeft(const SwFrame *pCaller) const
Definition: frmtool.cxx:2320
sal_uInt16 m_nTopLine
Definition: frmtool.hxx:335
bool CmpLeftRight(const SwBorderAttrs &rCmpAttrs, const SwFrame *pCaller, const SwFrame *pCmp) const
Definition: frmtool.cxx:2439
SwOrderIter(const SwPageFrame *pPage)
Definition: frmtool.cxx:2635
FlyAnchors.
Definition: fmtanchr.hxx:34
const SvxBoxItem & GetBox() const
Definition: frmtool.hxx:388
const SwFrame * mpFrame
Definition: frmtool.hxx:599
SwBorderAttrAccess(SwCache &rCache, const SwFrame *pOwner)
Definition: frmtool.cxx:2616
static sal_uInt8 Count()
Definition: frmtool.hxx:470
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:4863
constexpr tools::Long BROWSE_HEIGHT
Definition: frmtool.hxx:54
const SwAttrSet & GetAttrSet() const
Definition: frmtool.hxx:386
sal_uInt16 m_nBottom
Definition: frmtool.hxx:335
sal_uInt16 GetTopLine(const SwFrame &_rFrame, const SwFrame *_pPrevFrame=nullptr) const
Definition: frmtool.hxx:476
const SdrObject * m_pCurrent
Definition: frmtool.hxx:439
Marks a node in the document model.
Definition: ndindex.hxx:31
bool IsExtraData(const SwDoc *pDoc)
Definition: frmtool.cxx:3839
Bookkeeping helper for SwCache caching writer borders.
bool m_bCachedJoinedWithNext
Definition: frmtool.hxx:329
bool IsLine() const
Definition: frmtool.hxx:543
bool bObjsDirect
Definition: frmtool.cxx:100
SwContentNotify(SwContentFrame *pContentFrame)
Definition: frmtool.cxx:760
bool mbBordersJoinedWithPrev
Definition: frmtool.hxx:276
A page of the document layout.
Definition: pagefrm.hxx:57
bool mbChkHeightOfLastLine
Definition: frmtool.hxx:271
SwDeletionChecker(const SwFrame *pFrame)
Definition: frmtool.cxx:3944
tools::Long SwTwips
Definition: swtypes.hxx:50
void CalcRightLine_()
Definition: frmtool.cxx:2406
sal_uInt16 CalcTop() const
Definition: frmtool.hxx:525
SwBorderAttrs * Get()
Definition: frmtool.cxx:2630
bool m_bCacheGetLine
Definition: frmtool.hxx:322
SwTwips mnFlyAnchorOfst
Definition: frmtool.hxx:231
void CalcTop_()
Definition: frmtool.cxx:2234
const SwContentFrame * GetCellContent(const SwLayoutFrame &rCell_)
method to get the content of the table cell
Definition: frmtool.cxx:3918
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
SwPageFrame * pOldPage
Definition: frmtool.hxx:259
const sw::BroadcastingModify * mpRegIn
Definition: frmtool.hxx:600
bool Is_Lower_Of(const SwFrame *pCurrFrame, const SdrObject *pObj)
Definition: frmtool.cxx:3548
general base class for all free-flowing frames
Definition: flyfrm.hxx:78
void IsLine_()
Definition: frmtool.cxx:2413
bool IsRightPageByNumber(SwRootFrame const &rLayout, sal_uInt16 nPageNum)
Definition: frmtool.cxx:3059
sal_uInt16 CalcLineSpacing() const
Definition: frmtool.hxx:537
const Size m_aFrameSize
Definition: frmtool.hxx:307
void AppendAllObjs(const SwFrameFormats *pTable, const SwFrame *pSib)
Definition: frmtool.cxx:1349
const SvxULSpaceItem & m_rUL
Definition: frmtool.hxx:302
unsigned char sal_uInt8
const SdrObject * operator()() const
Definition: frmtool.hxx:445
The Cache object base class Users of the Cache must derive a class from the SwCacheObj and store thei...
Definition: swcache.hxx:134
void SetLowersComplete(bool b)
Definition: frmtool.hxx:253
void SwAlignGrfRect(SwRect *pGrfRect, const vcl::RenderContext &rOut)
Method to pixel-align rectangle for drawing graphic object.
Definition: paintfrm.cxx:1233
sal_uInt16 CalcBottom() const
Definition: frmtool.hxx:531
sal_uInt16 m_nBottomLine
Definition: frmtool.hxx:335
void GetBottomLine_(const SwFrame &_rFrame)
Definition: frmtool.cxx:2579
void CalcLeftLine_()
Definition: frmtool.cxx:2399
SwPageFrame * InsertNewPage(SwPageDesc &rDesc, SwFrame *pUpper, bool isRightPage, bool bFirst, bool bInsertEmpty, bool bFootnote, SwFrame *pSibling, bool bVeryFirstPage=false)
Definition: frmtool.cxx:3070
bool JoinedWithNext(const SwFrame &_rFrame) const
Definition: frmtool.cxx:2550
bool mbInvalidatePrevPrtArea
Definition: frmtool.hxx:275
bool HasBeenDeleted() const
return true if mpFrame != 0 and mpFrame is not client of pRegIn false otherwise
Definition: frmtool.cxx:3956
void GetSpacingValuesOfFrame(const SwFrame &rFrame, SwTwips &onLowerSpacing, SwTwips &onLineSpacing, bool &obIsLineSpacingProportional, bool bIdenticalStyles)
method to determine the spacing values of a frame
Definition: frmtool.cxx:3882
const SwFrame * GetVirtualUpper(const SwFrame *pFrame, const Point &rPos)
Provides the Upper of an anchor in paragraph-bound objects.
Definition: frmtool.cxx:3516
bool m_bBottomLine
Definition: frmtool.hxx:312
static bool IsLocked()
Definition: frmtool.hxx:469
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:1177
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:1199
const Size & GetSize() const
Definition: frmtool.hxx:403
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:921
bool m_bIsLine
Definition: frmtool.hxx:320
Access class for the Cache.
Definition: swcache.hxx:195
A layout frame is a frame that contains other frames (m_pLower), e.g. SwPageFrame or SwTabFrame...
Definition: layfrm.hxx:35
void RegistFlys(SwPageFrame *, const SwLayoutFrame *)
Definition: frmtool.cxx:3175
bool m_bCachedGetTopLine
Definition: frmtool.hxx:323
#define GRFNUM_NO
Definition: frmtool.hxx:55
sal_uInt16 m_nGetBottomLine
Definition: frmtool.hxx:335
virtual ~SwBorderAttrs() override
Definition: frmtool.cxx:2224
sal_uInt16 m_nTop
Definition: frmtool.hxx:335
void AppendObjs(const SwFrameFormats *pTable, sal_uLong nIndex, SwFrame *pFrame, SwPageFrame *pPage, SwDoc *doc)
Definition: frmtool.cxx:1246
sal_uInt16 m_nGetTopLine
Definition: frmtool.hxx:335
const SdrObject * Bottom()
Definition: frmtool.cxx:2667
bool m_bCachedJoinedWithPrev
Definition: frmtool.hxx:328
const SvxULSpaceItem & GetULSpace() const
Definition: frmtool.hxx:387
static sal_uInt8 s_nCnt
Definition: frmtool.hxx:454
sal_uInt16 CalcRightLine() const
Definition: frmtool.hxx:519
void CalcBottom_()
Definition: frmtool.cxx:2252
SwTwips CalcRowRstHeight(SwLayoutFrame *pRow)
Definition: frmtool.cxx:3661