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::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 // MM02 new VOC and primitive-based version
105  vcl::RenderContext & rOutputDevice,
107  const basegfx::B2DHomMatrix& rGraphicTransform,
108  const OUString& rName,
109  const OUString& rTitle,
110  const OUString& rDescription);
111 
112 // method to align rectangle.
113 // Created declaration here to avoid <extern> declarations
114 void SwAlignRect( SwRect &rRect, const SwViewShell *pSh, const vcl::RenderContext* pRenderContext );
115 
116 // method to align graphic rectangle
117 // Created declaration here to avoid <extern> declarations
118 void SwAlignGrfRect( SwRect *pGrfRect, const vcl::RenderContext &rOut );
119 
130 void PaintCharacterBorder(const SwFont& rFont, const SwRect& rPaintArea, const bool bVerticalLayout,
131  const bool bVerticalLayoutLRBT, const bool bJoinWithPrev,
132  const bool bJoinWithNext);
133 
134 // get Fly, if no List is given use the current shell
135 // Implementation in feshview.cxx
136 SwFlyFrame *GetFlyFromMarked( const SdrMarkList *pLst, SwViewShell *pSh );
137 
138 SwFrame *SaveContent( SwLayoutFrame *pLay, SwFrame *pStart = nullptr );
139 void RestoreContent( SwFrame *pSav, SwLayoutFrame *pParent, SwFrame *pSibling );
140 
141 // Get ContentNodes, create ContentFrames, and add them to LayFrame.
142 void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, sal_uLong nIndex,
143  bool bPages = false, sal_uLong nEndIndex = 0,
144  SwFrame *pPrv = nullptr, sw::FrameMode eMode = sw::FrameMode::New);
145 
146 // Creation of frames for a specific section (uses InsertCnt_)
147 void MakeFrames( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
148  const SwNodeIndex &rEndIdx );
149 
150 extern bool bObjsDirect;
151 
152 // prevent creation of Flys in InsertCnt_, e.g. for table headlines
153 extern bool bDontCreateObjects;
154 
155 // for FlyCnts, see SwFlyAtContentFrame::MakeAll()
157 
158 // for table settings via keyboard
160 long CalcHeightWithFlys( const SwFrame *pFrame );
161 
162 namespace sw {
163 
164 bool IsRightPageByNumber(SwRootFrame const& rLayout, sal_uInt16 nPageNum);
165 
166 } // namespace sw
167 
168 SwPageFrame *InsertNewPage( SwPageDesc &rDesc, SwFrame *pUpper,
169  bool isRightPage, bool bFirst, bool bInsertEmpty, bool bFootnote,
170  SwFrame *pSibling );
171 
172 // connect Flys with page
173 void RegistFlys( SwPageFrame*, const SwLayoutFrame* );
174 
175 // notification of Fly's background if needed
176 void Notify( SwFlyFrame *pFly, SwPageFrame *pOld, const SwRect &rOld,
177  const SwRect* pOldRect = nullptr );
178 
179 void Notify_Background( const SdrObject* pObj,
180  SwPageFrame* pPage,
181  const SwRect& rRect,
182  const PrepareHint eHint,
183  const bool bInva );
184 
185 const SwFrame* GetVirtualUpper( const SwFrame* pFrame, const Point& rPos );
186 
187 bool Is_Lower_Of( const SwFrame *pCurrFrame, const SdrObject* pObj );
188 
189 // FIXME: EasyHack (refactoring): rename method and parameter name in all files
190 const SwFrame *FindContext( const SwFrame *pFrame, SwFrameType nAdditionalContextTyp );
191 
192 bool IsFrameInSameContext( const SwFrame *pInnerFrame, const SwFrame *pFrame );
193 
194 const SwFrame * FindPage( const SwRect &rRect, const SwFrame *pPage );
195 
208 SwFrame* GetFrameOfModify( const SwRootFrame* pLayout,
209  SwModify const&,
210  SwFrameType const nFrameType,
211  const SwPosition *pPos = nullptr,
212  std::pair<Point, bool> const* pViewPosAndCalcFrame = nullptr);
213 
214 // Should extra data (redline stroke, line numbers) be painted?
215 bool IsExtraData( const SwDoc *pDoc );
216 
217 // #i11760# - method declaration <CalcContent(..)>
218 void CalcContent( SwLayoutFrame *pLay, bool bNoColl = false );
219 
220 // Notify classes memorize the current sizes in their constructor and do
221 // the necessary notifications in their destructor if needed
223 {
224 protected:
227  const SwRect maPrt;
233 
234 public:
235  SwFrameNotify( SwFrame *pFrame );
236  ~SwFrameNotify() COVERITY_NOEXCEPT_FALSE;
237 
238  const SwRect &getFrameArea() const { return maFrame; }
239  void SetInvaKeep() { mbInvaKeep = true; }
240 };
241 
243 {
245 
246 public:
247  SwLayNotify( SwLayoutFrame *pLayFrame );
248  ~SwLayNotify();
249 
250  void SetLowersComplete( bool b ) { m_bLowersComplete = b; }
251  bool IsLowersComplete() const { return m_bLowersComplete; }
252 };
253 
254 class SwFlyNotify : public SwLayNotify
255 {
258 
259 public:
260  SwFlyNotify( SwFlyFrame *pFlyFrame );
261  ~SwFlyNotify();
262 };
263 
265 {
266 private:
267  // #i11859#
270 
271  // #i25029#
274 
275 public:
276  SwContentNotify( SwContentFrame *pContentFrame );
278 
279  // #i25029#
281  {
282  mbInvalidatePrevPrtArea = true;
283  }
284 
286  {
287  mbBordersJoinedWithPrev = true;
288  }
289 };
290 
291 // SwBorderAttrs encapsulates the calculation for margin attributes including
292 // border. The whole class is cached.
293 
294 // WARNING! If more attributes should be cached also adjust the method
295 // Modify::Modify!
296 class SwBorderAttrs : public SwCacheObj
297 {
300  // #i96772#
301  std::shared_ptr<SvxLRSpaceItem> m_rLR;
305 
306  // the following bool values set the cached values to INVALID - until they
307  // are calculated for the first time
308  bool m_bTopLine : 1;
309  bool m_bBottomLine : 1;
310  bool m_bLeftLine : 1;
311  bool m_bRightLine : 1;
312  bool m_bTop : 1;
313  bool m_bBottom : 1;
314  bool m_bLine : 1;
315  bool m_bLineSpacing : 1;
316 
317  bool m_bIsLine : 1; // border on at least one side?
318 
319  bool m_bCacheGetLine : 1; // cache GetTopLine(), GetBottomLine()?
320  bool m_bCachedGetTopLine : 1; // is GetTopLine() cached?
321  bool m_bCachedGetBottomLine : 1; // is GetBottomLine() cached?
322  // Booleans indicate that <m_bJoinedWithPrev> and <m_bJoinedWithNext> are
323  // cached and valid.
324  // Caching depends on value of <m_bCacheGetLine>.
325  mutable bool m_bCachedJoinedWithPrev : 1;
326  mutable bool m_bCachedJoinedWithNext : 1;
327  // Booleans indicate that borders are joined with previous/next frame.
330 
331  // The cached values (un-defined until calculated for the first time)
332  sal_uInt16 m_nTopLine,
334  m_nLeftLine,
335  m_nRightLine,
336  m_nTop,
337  m_nBottom,
341 
342  // only calculate lines and shadow
343  void CalcTopLine_();
344  void CalcBottomLine_();
345  void CalcLeftLine_();
346  void CalcRightLine_();
347 
348  // lines + shadow + margin
349  void CalcTop_();
350  void CalcBottom_();
351 
352  void IsLine_();
353 
354  // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
355  // borders/shadow have to be joined with previous frame.
356  void GetTopLine_ ( const SwFrame& _rFrame,
357  const SwFrame* _pPrevFrame );
358  void GetBottomLine_( const SwFrame& _rFrame );
359 
360  // calculate cached values <m_bJoinedWithPrev> and <m_bJoinedWithNext>
361  // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
362  // borders/shadow have to be joined with previous frame.
363  void CalcJoinedWithPrev( const SwFrame& _rFrame,
364  const SwFrame* _pPrevFrame );
365  void CalcJoinedWithNext( const SwFrame& _rFrame );
366 
367  // internal helper method for CalcJoinedWithPrev and CalcJoinedWithNext
368  bool JoinWithCmp( const SwFrame& _rCallerFrame,
369  const SwFrame& _rCmpFrame ) const;
370 
371  // Are the left and right line and the LRSpace equal?
372  bool CmpLeftRight( const SwBorderAttrs &rCmpAttrs,
373  const SwFrame *pCaller,
374  const SwFrame *pCmp ) const;
375 
376  // tdf#125300 line spacing before cell border
377  void CalcLineSpacing_();
378 
379 public:
380  SwBorderAttrs( const SwModify *pOwner, const SwFrame *pConstructor );
381  virtual ~SwBorderAttrs() override;
382 
383  const SwAttrSet &GetAttrSet() const { return m_rAttrSet; }
384  const SvxULSpaceItem &GetULSpace() const { return m_rUL; }
385  const SvxBoxItem &GetBox() const { return m_rBox; }
386  const SvxShadowItem &GetShadow() const { return m_rShadow; }
387 
388  inline sal_uInt16 CalcTopLine() const;
389  inline sal_uInt16 CalcBottomLine() const;
390  inline sal_uInt16 CalcLeftLine() const;
391  inline sal_uInt16 CalcRightLine() const;
392  inline sal_uInt16 CalcTop() const;
393  inline sal_uInt16 CalcBottom() const;
394  inline sal_uInt16 CalcLineSpacing() const;
395  long CalcLeft( const SwFrame *pCaller ) const;
396  long CalcRight( const SwFrame *pCaller ) const;
397 
398  inline bool IsLine() const;
399 
400  const Size &GetSize() const { return m_aFrameSize; }
401 
402  // Should upper (or lower) border be evaluated for this frame?
403  // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
404  // borders/shadow have to be joined with previous frame.
405  inline sal_uInt16 GetTopLine ( const SwFrame& _rFrame,
406  const SwFrame* _pPrevFrame = nullptr ) const;
407  inline sal_uInt16 GetBottomLine( const SwFrame& _rFrame ) const;
408  inline void SetGetCacheLine( bool bNew ) const;
409 
410  // Accessors for cached values <m_bJoinedWithPrev> and <m_bJoinedWithNext>
411  // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
412  // borders/shadow have to be joined with previous frame.
413  bool JoinedWithPrev( const SwFrame& _rFrame,
414  const SwFrame* _pPrevFrame = nullptr ) const;
415  bool JoinedWithNext( const SwFrame& _rFrame ) const;
416 };
417 
419 {
420  const SwFrame *m_pConstructor; //opt: for passing on to SwBorderAttrs
421 
422 protected:
423  virtual SwCacheObj *NewObj() override;
424 
425 public:
426  SwBorderAttrAccess( SwCache &rCache, const SwFrame *pOwner );
427 
428  SwBorderAttrs *Get();
429 };
430 
431 // Iterator for draw objects of a page. The objects will be iterated sorted by
432 // their Z-order. Iterating is not cheap since for each operation the _whole_
433 // SortArray needs to be traversed.
435 {
438 
439 public:
440  SwOrderIter( const SwPageFrame *pPage );
441 
442  void Current( const SdrObject *pNew ) { m_pCurrent = pNew; }
443  const SdrObject *operator()() const { return m_pCurrent; }
444  void Top();
445  const SdrObject *Bottom();
446  const SdrObject *Next();
447  void Prev();
448 };
449 
451 {
452  static sal_uInt8 nCnt;
453  static bool bLocked;
454 
455 public:
457  {
458  if ( ++StackHack::nCnt > 50 )
459  StackHack::bLocked = true;
460  }
462  {
463  if ( --StackHack::nCnt < 5 )
464  StackHack::bLocked = false;
465  }
466 
467  static bool IsLocked() { return StackHack::bLocked; }
468  static sal_uInt8 Count() { return StackHack::nCnt; }
469 };
470 
471 // Should upper (or lower) border be evaluated for this frame?
472 // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
473 // borders/shadow have to be joined with previous frame.
474 inline sal_uInt16 SwBorderAttrs::GetTopLine ( const SwFrame& _rFrame,
475  const SwFrame* _pPrevFrame ) const
476 {
477  if ( !m_bCachedGetTopLine || _pPrevFrame )
478  {
479  const_cast<SwBorderAttrs*>(this)->GetTopLine_( _rFrame, _pPrevFrame );
480  }
481  return m_nGetTopLine;
482 }
483 inline sal_uInt16 SwBorderAttrs::GetBottomLine( const SwFrame& _rFrame ) const
484 {
485  if ( !m_bCachedGetBottomLine )
486  const_cast<SwBorderAttrs*>(this)->GetBottomLine_( _rFrame );
487  return m_nGetBottomLine;
488 }
489 inline void SwBorderAttrs::SetGetCacheLine( bool bNew ) const
490 {
491  const_cast<SwBorderAttrs*>(this)->m_bCacheGetLine = bNew;
492  const_cast<SwBorderAttrs*>(this)->m_bCachedGetBottomLine =
493  const_cast<SwBorderAttrs*>(this)->m_bCachedGetTopLine = false;
494  // invalidate cache for values <m_bJoinedWithPrev> and <m_bJoinedWithNext>
495  m_bCachedJoinedWithPrev = false;
496  m_bCachedJoinedWithNext = false;
497 }
498 
499 inline sal_uInt16 SwBorderAttrs::CalcTopLine() const
500 {
501  if ( m_bTopLine )
502  const_cast<SwBorderAttrs*>(this)->CalcTopLine_();
503  return m_nTopLine;
504 }
505 inline sal_uInt16 SwBorderAttrs::CalcBottomLine() const
506 {
507  if ( m_bBottomLine )
508  const_cast<SwBorderAttrs*>(this)->CalcBottomLine_();
509  return m_nBottomLine;
510 }
511 inline sal_uInt16 SwBorderAttrs::CalcLeftLine() const
512 {
513  if ( m_bLeftLine )
514  const_cast<SwBorderAttrs*>(this)->CalcLeftLine_();
515  return m_nLeftLine;
516 }
517 inline sal_uInt16 SwBorderAttrs::CalcRightLine() const
518 {
519  if ( m_bRightLine )
520  const_cast<SwBorderAttrs*>(this)->CalcRightLine_();
521  return m_nRightLine;
522 }
523 inline sal_uInt16 SwBorderAttrs::CalcTop() const
524 {
525  if ( m_bTop )
526  const_cast<SwBorderAttrs*>(this)->CalcTop_();
527  return m_nTop;
528 }
529 inline sal_uInt16 SwBorderAttrs::CalcBottom() const
530 {
531  if ( m_bBottom )
532  const_cast<SwBorderAttrs*>(this)->CalcBottom_();
533  return m_nBottom;
534 }
535 inline sal_uInt16 SwBorderAttrs::CalcLineSpacing() const
536 {
537  if ( m_bLineSpacing )
538  const_cast<SwBorderAttrs*>(this)->CalcLineSpacing_();
539  return m_nLineSpacing;
540 }
541 inline bool SwBorderAttrs::IsLine() const
542 {
543  if ( m_bLine )
544  const_cast<SwBorderAttrs*>(this)->IsLine_();
545  return m_bIsLine;
546 }
547 
569 void GetSpacingValuesOfFrame( const SwFrame& rFrame,
570  SwTwips& onLowerSpacing,
571  SwTwips& onLineSpacing,
572  bool& obIsLineSpacingProportional,
573  bool bIdenticalStyles );
574 
587 const SwContentFrame* GetCellContent( const SwLayoutFrame& rCell_ );
588 
595 {
596 private:
597  const SwFrame* mpFrame;
599 
600 public:
601  SwDeletionChecker(const SwFrame* pFrame);
602 
608  bool HasBeenDeleted() const;
609 };
610 
611 #endif
612 
613 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool m_bJoinedWithPrev
Definition: frmtool.hxx:328
SwTwips mnFlyAnchorOfstNoWrap
Definition: frmtool.hxx:229
void SetInvalidatePrevPrtArea()
Definition: frmtool.hxx:280
sal_uInt16 CalcBottomLine() const
Definition: frmtool.hxx:505
Base class of the Writer layout elements.
Definition: frame.hxx:297
sal_uInt16 m_nLineSpacing
Definition: frmtool.hxx:332
SwFlyNotify(SwFlyFrame *pFlyFrame)
Definition: frmtool.cxx:628
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:151
bool m_bBottom
Definition: frmtool.hxx:313
void RestoreContent(SwFrame *pSav, SwLayoutFrame *pParent, SwFrame *pSibling)
Definition: frmtool.cxx:2886
const SdrObject * Next()
Definition: frmtool.cxx:2607
const SvxBoxItem & m_rBox
Definition: frmtool.hxx:302
sal_uInt16 m_nLeftLine
Definition: frmtool.hxx:332
bool m_bTopLine
Definition: frmtool.hxx:308
void SetInvaKeep()
Definition: frmtool.hxx:239
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:1416
SwFrame * mpFrame
Definition: frmtool.hxx:225
const SwFrame * m_pConstructor
Definition: frmtool.hxx:420
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:3497
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:1810
const SwPageFrame * m_pPage
Definition: frmtool.hxx:436
bool m_bRightLine
Definition: frmtool.hxx:311
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:3107
const SwRect & getFrameArea() const
Definition: frmtool.hxx:238
~SwFrameNotify() COVERITY_NOEXCEPT_FALSE
Definition: frmtool.cxx:109
SwTwips mnHeightOfLastLine
Definition: frmtool.hxx:269
bool bDontCreateObjects
Definition: frmtool.cxx:82
void Current(const SdrObject *pNew)
Definition: frmtool.hxx:442
const SwFrame * FindPage(const SwRect &rRect, const SwFrame *pPage)
Definition: frmtool.cxx:3594
sal_uIntPtr sal_uLong
std::shared_ptr< SvxLRSpaceItem > m_rLR
Definition: frmtool.hxx:301
bool IsAnchoredObjShown(SwTextFrame const &rFrame, SwFormatAnchor const &rAnchor)
Definition: frmtool.cxx:1266
bool mbValidSize
Definition: frmtool.hxx:232
bool JoinedWithPrev(const SwFrame &_rFrame, const SwFrame *_pPrevFrame=nullptr) const
Definition: frmtool.cxx:2451
static sal_uInt8 nCnt
Definition: frmtool.hxx:452
Definition: doc.hxx:184
SwLayNotify(SwLayoutFrame *pLayFrame)
Definition: frmtool.cxx:416
bool m_bJoinedWithNext
Definition: frmtool.hxx:329
void Prev()
Definition: frmtool.cxx:2635
const SvxShadowItem & GetShadow() const
Definition: frmtool.hxx:386
SwFrameNotify(SwFrame *pFrame)
Definition: frmtool.cxx:88
bool JoinWithCmp(const SwFrame &_rCallerFrame, const SwFrame &_rCmpFrame) const
Definition: frmtool.cxx:2363
~StackHack()
Definition: frmtool.hxx:461
long CalcHeightWithFlys(const SwFrame *pFrame)
Definition: tabfrm.cxx:3869
long SwTwips
Definition: swtypes.hxx:49
sal_uInt16 CalcTopLine() const
Definition: frmtool.hxx:499
void SetBordersJoinedWithPrev()
Definition: frmtool.hxx:285
Dialog to specify the properties of date form field.
sal_uInt16 m_nRightLine
Definition: frmtool.hxx:332
void Top()
Definition: frmtool.cxx:2554
Of course Writer needs its own rectangles.
Definition: swrect.hxx:35
long CalcRight(const SwFrame *pCaller) const
Definition: frmtool.cxx:2199
void Notify_Background(const SdrObject *pObj, SwPageFrame *pPage, const SwRect &rRect, const PrepareHint eHint, const bool bInva)
Definition: frmtool.cxx:3255
The root element of a Writer document layout.
Definition: rootfrm.hxx:80
SwFlyFrame * GetFlyFromMarked(const SdrMarkList *pLst, SwViewShell *pSh)
Definition: feshview.cxx:138
static bool bFootnote
Definition: insfnote.cxx:33
bool bSetCompletePaintOnInvalidate
Definition: frmtool.cxx:83
virtual SwCacheObj * NewObj() override
Can be use in NewObj.
Definition: frmtool.cxx:2537
void CalcBottomLine_()
Definition: frmtool.cxx:2305
long CalcLeft(const SwFrame *pCaller) const
Definition: frmtool.cxx:2247
sal_uInt16 CalcLeftLine() const
Definition: frmtool.hxx:511
bool m_bLineSpacing
Definition: frmtool.hxx:315
void SwAlignRect(SwRect &rRect, const SwViewShell *pSh, const vcl::RenderContext *pRenderContext)
Function is also used outside this file.
Definition: paintfrm.cxx:1120
SwBorderAttrs(const SwModify *pOwner, const SwFrame *pConstructor)
Definition: frmtool.cxx:2123
bool IsLowersComplete() const
Definition: frmtool.hxx:251
bool m_bCachedGetBottomLine
Definition: frmtool.hxx:321
bool DrawFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr &rFillAttributes, const SwRect &rOriginalLayoutRect, const SwRegionRects &rPaintRegion, const basegfx::utils::B2DClipState &rClipState, vcl::RenderContext &rOut)
Definition: paintfrm.cxx:1713
const SvxShadowItem & m_rShadow
Definition: frmtool.hxx:303
bool IsFrameInSameContext(const SwFrame *pInnerFrame, const SwFrame *pFrame)
Definition: frmtool.cxx:3511
std::shared_ptr< SdrAllFillAttributesHelper > SdrAllFillAttributesHelperPtr
Definition: format.hxx:38
void CalcJoinedWithNext(const SwFrame &_rFrame)
Definition: frmtool.cxx:2420
void CalcTopLine_()
Definition: frmtool.cxx:2298
void CalcJoinedWithPrev(const SwFrame &_rFrame, const SwFrame *_pPrevFrame)
Definition: frmtool.cxx:2385
bool mbHadFollow
Definition: frmtool.hxx:230
SwPageFrame * InsertNewPage(SwPageDesc &rDesc, SwFrame *pUpper, bool isRightPage, bool bFirst, bool bInsertEmpty, bool bFootnote, SwFrame *pSibling)
Definition: frmtool.cxx:2987
void GetTopLine_(const SwFrame &_rFrame, const SwFrame *_pPrevFrame)
Definition: frmtool.cxx:2475
bool m_bLeftLine
Definition: frmtool.hxx:310
const SwAttrSet & m_rAttrSet
Definition: frmtool.hxx:298
bool mbInvaKeep
Definition: frmtool.hxx:231
const SwRect aFrameAndSpace
Definition: frmtool.hxx:257
const SwRect maPrt
Definition: frmtool.hxx:227
const SwRect maFrame
Definition: frmtool.hxx:226
SwFrame * SaveContent(SwLayoutFrame *pLay, SwFrame *pStart=nullptr)
Definition: frmtool.cxx:2723
helper class to check if a frame has been deleted during an operation WARNING! This should only be us...
Definition: frmtool.hxx:594
void MakeFrames(SwDoc *pDoc, const SwNodeIndex &rSttIdx, const SwNodeIndex &rEndIdx)
Definition: frmtool.cxx:1918
void CalcLineSpacing_()
Definition: frmtool.cxx:2507
Specific frame formats (frames, DrawObjects).
FrameMode
Definition: txtfrm.hxx:102
void CalcContent(SwLayoutFrame *pLay, bool bNoColl=false)
Definition: fly.cxx:1354
void SetGetCacheLine(bool bNew) const
Definition: frmtool.hxx:489
PrepareHint
Definition: swtypes.hxx:200
sal_uInt16 GetBottomLine(const SwFrame &_rFrame) const
Definition: frmtool.hxx:483
SwFrameType
Definition: frame.hxx:72
bool m_bLowersComplete
Definition: frmtool.hxx:244
sal_uInt16 m_nTopLine
Definition: frmtool.hxx:332
bool CmpLeftRight(const SwBorderAttrs &rCmpAttrs, const SwFrame *pCaller, const SwFrame *pCmp) const
Definition: frmtool.cxx:2352
SwOrderIter(const SwPageFrame *pPage)
Definition: frmtool.cxx:2548
FlyAnchors.
Definition: fmtanchr.hxx:34
const SvxBoxItem & GetBox() const
Definition: frmtool.hxx:385
const SwFrame * mpFrame
Definition: frmtool.hxx:597
SwBorderAttrAccess(SwCache &rCache, const SwFrame *pOwner)
Definition: frmtool.cxx:2529
static sal_uInt8 Count()
Definition: frmtool.hxx:468
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:4763
static bool bLocked
Definition: frmtool.hxx:453
const SwAttrSet & GetAttrSet() const
Definition: frmtool.hxx:383
sal_uInt16 m_nBottom
Definition: frmtool.hxx:332
sal_uInt16 GetTopLine(const SwFrame &_rFrame, const SwFrame *_pPrevFrame=nullptr) const
Definition: frmtool.hxx:474
const SdrObject * m_pCurrent
Definition: frmtool.hxx:437
Marks a node in the document model.
Definition: ndindex.hxx:31
bool IsExtraData(const SwDoc *pDoc)
Definition: frmtool.cxx:3752
bool m_bCachedJoinedWithNext
Definition: frmtool.hxx:326
bool IsLine() const
Definition: frmtool.hxx:541
bool bObjsDirect
Definition: frmtool.cxx:81
SwContentNotify(SwContentFrame *pContentFrame)
Definition: frmtool.cxx:733
bool mbBordersJoinedWithPrev
Definition: frmtool.hxx:273
A page of the document layout.
Definition: pagefrm.hxx:41
bool mbChkHeightOfLastLine
Definition: frmtool.hxx:268
SwDeletionChecker(const SwFrame *pFrame)
Definition: frmtool.cxx:3855
void CalcRightLine_()
Definition: frmtool.cxx:2319
sal_uInt16 CalcTop() const
Definition: frmtool.hxx:523
SwBorderAttrs * Get()
Definition: frmtool.cxx:2543
bool m_bCacheGetLine
Definition: frmtool.hxx:319
SwTwips mnFlyAnchorOfst
Definition: frmtool.hxx:228
void CalcTop_()
Definition: frmtool.cxx:2187
const SwContentFrame * GetCellContent(const SwLayoutFrame &rCell_)
method to get the content of the table cell
Definition: frmtool.cxx:3829
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:80
const SwModify * mpRegIn
Definition: frmtool.hxx:598
SwPageFrame * pOldPage
Definition: frmtool.hxx:256
bool Is_Lower_Of(const SwFrame *pCurrFrame, const SdrObject *pObj)
Definition: frmtool.cxx:3465
general base class for all free-flowing frames
Definition: flyfrm.hxx:60
void IsLine_()
Definition: frmtool.cxx:2326
bool IsRightPageByNumber(SwRootFrame const &rLayout, sal_uInt16 nPageNum)
Definition: frmtool.cxx:2976
sal_uInt16 CalcLineSpacing() const
Definition: frmtool.hxx:535
const Size m_aFrameSize
Definition: frmtool.hxx:304
void AppendAllObjs(const SwFrameFormats *pTable, const SwFrame *pSib)
Definition: frmtool.cxx:1307
const SvxULSpaceItem & m_rUL
Definition: frmtool.hxx:299
unsigned char sal_uInt8
const SdrObject * operator()() const
Definition: frmtool.hxx:443
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:250
void SwAlignGrfRect(SwRect *pGrfRect, const vcl::RenderContext &rOut)
Method to pixel-align rectangle for drawing graphic object.
Definition: paintfrm.cxx:1226
sal_uInt16 CalcBottom() const
Definition: frmtool.hxx:529
sal_uInt16 m_nBottomLine
Definition: frmtool.hxx:332
void GetBottomLine_(const SwFrame &_rFrame)
Definition: frmtool.cxx:2492
void CalcLeftLine_()
Definition: frmtool.cxx:2312
bool JoinedWithNext(const SwFrame &_rFrame) const
Definition: frmtool.cxx:2463
bool mbInvalidatePrevPrtArea
Definition: frmtool.hxx:272
bool HasBeenDeleted() const
return true if mpFrame != 0 and mpFrame is not client of pRegIn false otherwise
Definition: frmtool.cxx:3867
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:3793
const SwFrame * GetVirtualUpper(const SwFrame *pFrame, const Point &rPos)
Provides the Upper of an anchor in paragraph-bound objects.
Definition: frmtool.cxx:3433
bool m_bBottomLine
Definition: frmtool.hxx:309
static bool IsLocked()
Definition: frmtool.hxx:467
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:1142
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:1168
const Size & GetSize() const
Definition: frmtool.hxx:400
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:931
bool m_bIsLine
Definition: frmtool.hxx:317
Access class for the Cache.
Definition: swcache.hxx:194
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:3091
bool m_bCachedGetTopLine
Definition: frmtool.hxx:320
#define GRFNUM_NO
Definition: frmtool.hxx:54
sal_uInt16 m_nGetBottomLine
Definition: frmtool.hxx:332
virtual ~SwBorderAttrs() override
Definition: frmtool.cxx:2177
sal_uInt16 m_nTop
Definition: frmtool.hxx:332
void AppendObjs(const SwFrameFormats *pTable, sal_uLong nIndex, SwFrame *pFrame, SwPageFrame *pPage, SwDoc *doc)
Definition: frmtool.cxx:1215
sal_uInt16 m_nGetTopLine
Definition: frmtool.hxx:332
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:2580
bool m_bCachedJoinedWithPrev
Definition: frmtool.hxx:325
const SvxULSpaceItem & GetULSpace() const
Definition: frmtool.hxx:384
sal_uInt16 CalcRightLine() const
Definition: frmtool.hxx:517
void CalcBottom_()
Definition: frmtool.cxx:2193
SwTwips CalcRowRstHeight(SwLayoutFrame *pRow)
Definition: frmtool.cxx:3578