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; }
236  bool IsLowersComplete() const { return m_bLowersComplete; }
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  bool m_bLineSpacing : 1;
301 
302  bool m_bIsLine : 1; // border on at least one side?
303 
304  bool m_bCacheGetLine : 1; // cache GetTopLine(), GetBottomLine()?
305  bool m_bCachedGetTopLine : 1; // is GetTopLine() cached?
306  bool m_bCachedGetBottomLine : 1; // is GetBottomLine() cached?
307  // Booleans indicate that <m_bJoinedWithPrev> and <m_bJoinedWithNext> are
308  // cached and valid.
309  // Caching depends on value of <m_bCacheGetLine>.
310  mutable bool m_bCachedJoinedWithPrev : 1;
311  mutable bool m_bCachedJoinedWithNext : 1;
312  // Booleans indicate that borders are joined with previous/next frame.
315 
316  // The cached values (un-defined until calculated for the first time)
317  sal_uInt16 m_nTopLine,
319  m_nLeftLine,
320  m_nRightLine,
321  m_nTop,
322  m_nBottom,
326 
327  // only calculate lines and shadow
328  void CalcTopLine_();
329  void CalcBottomLine_();
330  void CalcLeftLine_();
331  void CalcRightLine_();
332 
333  // lines + shadow + margin
334  void CalcTop_();
335  void CalcBottom_();
336 
337  void IsLine_();
338 
339  // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
340  // borders/shadow have to be joined with previous frame.
341  void GetTopLine_ ( const SwFrame& _rFrame,
342  const SwFrame* _pPrevFrame );
343  void GetBottomLine_( const SwFrame& _rFrame );
344 
345  // calculate cached values <m_bJoinedWithPrev> and <m_bJoinedWithNext>
346  // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
347  // borders/shadow have to be joined with previous frame.
348  void CalcJoinedWithPrev( const SwFrame& _rFrame,
349  const SwFrame* _pPrevFrame );
350  void CalcJoinedWithNext( const SwFrame& _rFrame );
351 
352  // internal helper method for CalcJoinedWithPrev and CalcJoinedWithNext
353  bool JoinWithCmp( const SwFrame& _rCallerFrame,
354  const SwFrame& _rCmpFrame ) const;
355 
356  // Are the left and right line and the LRSpace equal?
357  bool CmpLeftRight( const SwBorderAttrs &rCmpAttrs,
358  const SwFrame *pCaller,
359  const SwFrame *pCmp ) const;
360 
361  // tdf#125300 line spacing before cell border
362  void CalcLineSpacing_();
363 
364 public:
365  SwBorderAttrs( const SwModify *pOwner, const SwFrame *pConstructor );
366  virtual ~SwBorderAttrs() override;
367 
368  const SwAttrSet &GetAttrSet() const { return m_rAttrSet; }
369  const SvxULSpaceItem &GetULSpace() const { return m_rUL; }
370  const SvxBoxItem &GetBox() const { return m_rBox; }
371  const SvxShadowItem &GetShadow() const { return m_rShadow; }
372 
373  inline sal_uInt16 CalcTopLine() const;
374  inline sal_uInt16 CalcBottomLine() const;
375  inline sal_uInt16 CalcLeftLine() const;
376  inline sal_uInt16 CalcRightLine() const;
377  inline sal_uInt16 CalcTop() const;
378  inline sal_uInt16 CalcBottom() const;
379  inline sal_uInt16 CalcLineSpacing() const;
380  long CalcLeft( const SwFrame *pCaller ) const;
381  long CalcRight( const SwFrame *pCaller ) const;
382 
383  inline bool IsLine() const;
384 
385  const Size &GetSize() const { return m_aFrameSize; }
386 
387  // Should upper (or lower) border be evaluated for this frame?
388  // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
389  // borders/shadow have to be joined with previous frame.
390  inline sal_uInt16 GetTopLine ( const SwFrame& _rFrame,
391  const SwFrame* _pPrevFrame = nullptr ) const;
392  inline sal_uInt16 GetBottomLine( const SwFrame& _rFrame ) const;
393  inline void SetGetCacheLine( bool bNew ) const;
394 
395  // Accessors for cached values <m_bJoinedWithPrev> and <m_bJoinedWithNext>
396  // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
397  // borders/shadow have to be joined with previous frame.
398  bool JoinedWithPrev( const SwFrame& _rFrame,
399  const SwFrame* _pPrevFrame = nullptr ) const;
400  bool JoinedWithNext( const SwFrame& _rFrame ) const;
401 };
402 
404 {
405  const SwFrame *m_pConstructor; //opt: for passing on to SwBorderAttrs
406 
407 protected:
408  virtual SwCacheObj *NewObj() override;
409 
410 public:
411  SwBorderAttrAccess( SwCache &rCache, const SwFrame *pOwner );
412 
413  SwBorderAttrs *Get();
414 };
415 
416 // Iterator for draw objects of a page. The objects will be iterated sorted by
417 // their Z-order. Iterating is not cheap since for each operation the _whole_
418 // SortArray needs to be traversed.
420 {
423 
424 public:
425  SwOrderIter( const SwPageFrame *pPage );
426 
427  void Current( const SdrObject *pNew ) { m_pCurrent = pNew; }
428  const SdrObject *operator()() const { return m_pCurrent; }
429  void Top();
430  const SdrObject *Bottom();
431  const SdrObject *Next();
432  void Prev();
433 };
434 
436 {
437  static sal_uInt8 nCnt;
438  static bool bLocked;
439 
440 public:
442  {
443  if ( ++StackHack::nCnt > 50 )
444  StackHack::bLocked = true;
445  }
447  {
448  if ( --StackHack::nCnt < 5 )
449  StackHack::bLocked = false;
450  }
451 
452  static bool IsLocked() { return StackHack::bLocked; }
453  static sal_uInt8 Count() { return StackHack::nCnt; }
454 };
455 
456 // Should upper (or lower) border be evaluated for this frame?
457 // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
458 // borders/shadow have to be joined with previous frame.
459 inline sal_uInt16 SwBorderAttrs::GetTopLine ( const SwFrame& _rFrame,
460  const SwFrame* _pPrevFrame ) const
461 {
462  if ( !m_bCachedGetTopLine || _pPrevFrame )
463  {
464  const_cast<SwBorderAttrs*>(this)->GetTopLine_( _rFrame, _pPrevFrame );
465  }
466  return m_nGetTopLine;
467 }
468 inline sal_uInt16 SwBorderAttrs::GetBottomLine( const SwFrame& _rFrame ) const
469 {
470  if ( !m_bCachedGetBottomLine )
471  const_cast<SwBorderAttrs*>(this)->GetBottomLine_( _rFrame );
472  return m_nGetBottomLine;
473 }
474 inline void SwBorderAttrs::SetGetCacheLine( bool bNew ) const
475 {
476  const_cast<SwBorderAttrs*>(this)->m_bCacheGetLine = bNew;
477  const_cast<SwBorderAttrs*>(this)->m_bCachedGetBottomLine =
478  const_cast<SwBorderAttrs*>(this)->m_bCachedGetTopLine = false;
479  // invalidate cache for values <m_bJoinedWithPrev> and <m_bJoinedWithNext>
480  m_bCachedJoinedWithPrev = false;
481  m_bCachedJoinedWithNext = false;
482 }
483 
484 inline sal_uInt16 SwBorderAttrs::CalcTopLine() const
485 {
486  if ( m_bTopLine )
487  const_cast<SwBorderAttrs*>(this)->CalcTopLine_();
488  return m_nTopLine;
489 }
490 inline sal_uInt16 SwBorderAttrs::CalcBottomLine() const
491 {
492  if ( m_bBottomLine )
493  const_cast<SwBorderAttrs*>(this)->CalcBottomLine_();
494  return m_nBottomLine;
495 }
496 inline sal_uInt16 SwBorderAttrs::CalcLeftLine() const
497 {
498  if ( m_bLeftLine )
499  const_cast<SwBorderAttrs*>(this)->CalcLeftLine_();
500  return m_nLeftLine;
501 }
502 inline sal_uInt16 SwBorderAttrs::CalcRightLine() const
503 {
504  if ( m_bRightLine )
505  const_cast<SwBorderAttrs*>(this)->CalcRightLine_();
506  return m_nRightLine;
507 }
508 inline sal_uInt16 SwBorderAttrs::CalcTop() const
509 {
510  if ( m_bTop )
511  const_cast<SwBorderAttrs*>(this)->CalcTop_();
512  return m_nTop;
513 }
514 inline sal_uInt16 SwBorderAttrs::CalcBottom() const
515 {
516  if ( m_bBottom )
517  const_cast<SwBorderAttrs*>(this)->CalcBottom_();
518  return m_nBottom;
519 }
520 inline sal_uInt16 SwBorderAttrs::CalcLineSpacing() const
521 {
522  if ( m_bLineSpacing )
523  const_cast<SwBorderAttrs*>(this)->CalcLineSpacing_();
524  return m_nLineSpacing;
525 }
526 inline bool SwBorderAttrs::IsLine() const
527 {
528  if ( m_bLine )
529  const_cast<SwBorderAttrs*>(this)->IsLine_();
530  return m_bIsLine;
531 }
532 
552 void GetSpacingValuesOfFrame( const SwFrame& rFrame,
553  SwTwips& onLowerSpacing,
554  SwTwips& onLineSpacing,
555  bool& obIsLineSpacingProportional );
556 
569 const SwContentFrame* GetCellContent( const SwLayoutFrame& rCell_ );
570 
577 {
578 private:
579  const SwFrame* mpFrame;
581 
582 public:
583  SwDeletionChecker(const SwFrame* pFrame);
584 
590  bool HasBeenDeleted() const;
591 };
592 
593 #endif
594 
595 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool m_bJoinedWithPrev
Definition: frmtool.hxx:313
SwTwips mnFlyAnchorOfstNoWrap
Definition: frmtool.hxx:214
void SetInvalidatePrevPrtArea()
Definition: frmtool.hxx:265
sal_uInt16 CalcBottomLine() const
Definition: frmtool.hxx:490
Base class of the Writer layout elements.
Definition: frame.hxx:295
sal_uInt16 m_nLineSpacing
Definition: frmtool.hxx:317
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:2798
const SdrObject * Next()
Definition: frmtool.cxx:2520
const SvxBoxItem & m_rBox
Definition: frmtool.hxx:287
sal_uInt16 m_nLeftLine
Definition: frmtool.hxx:317
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:405
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:3393
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:1813
const SwPageFrame * m_pPage
Definition: frmtool.hxx:421
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:3003
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:427
const SwFrame * FindPage(const SwRect &rRect, const SwFrame *pPage)
Definition: frmtool.cxx:3491
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:2364
static sal_uInt8 nCnt
Definition: frmtool.hxx:437
Definition: doc.hxx:185
SwLayNotify(SwLayoutFrame *pLayFrame)
Definition: frmtool.cxx:415
bool m_bJoinedWithNext
Definition: frmtool.hxx:314
void Prev()
Definition: frmtool.cxx:2548
const SvxShadowItem & GetShadow() const
Definition: frmtool.hxx:371
SwFrameNotify(SwFrame *pFrame)
Definition: frmtool.cxx:87
bool JoinWithCmp(const SwFrame &_rCallerFrame, const SwFrame &_rCmpFrame) const
Definition: frmtool.cxx:2276
~StackHack()
Definition: frmtool.hxx:446
long CalcHeightWithFlys(const SwFrame *pFrame)
Definition: tabfrm.cxx:3791
long SwTwips
Definition: swtypes.hxx:49
sal_uInt16 CalcTopLine() const
Definition: frmtool.hxx:484
void SetBordersJoinedWithPrev()
Definition: frmtool.hxx:270
Dialog to specify the properties of date form field.
sal_uInt16 m_nRightLine
Definition: frmtool.hxx:317
void Top()
Definition: frmtool.cxx:2467
Of course Writer needs its own rectangles.
Definition: swrect.hxx:34
long CalcRight(const SwFrame *pCaller) const
Definition: frmtool.cxx:2112
void Notify_Background(const SdrObject *pObj, SwPageFrame *pPage, const SwRect &rRect, const PrepareHint eHint, const bool bInva)
Definition: frmtool.cxx:3151
The root element of a Writer document layout.
Definition: rootfrm.hxx:79
SwFlyFrame * GetFlyFromMarked(const SdrMarkList *pLst, SwViewShell *pSh)
Definition: feshview.cxx:138
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:2450
void CalcBottomLine_()
Definition: frmtool.cxx:2218
long CalcLeft(const SwFrame *pCaller) const
Definition: frmtool.cxx:2160
sal_uInt16 CalcLeftLine() const
Definition: frmtool.hxx:496
bool m_bLineSpacing
Definition: frmtool.hxx:300
void SwAlignRect(SwRect &rRect, const SwViewShell *pSh, const vcl::RenderContext *pRenderContext)
Function is also used outside this file.
Definition: paintfrm.cxx:1123
SwBorderAttrs(const SwModify *pOwner, const SwFrame *pConstructor)
Definition: frmtool.cxx:2036
bool IsLowersComplete() const
Definition: frmtool.hxx:236
bool m_bCachedGetBottomLine
Definition: frmtool.hxx:306
bool DrawFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr &rFillAttributes, const SwRect &rOriginalLayoutRect, const SwRegionRects &rPaintRegion, const basegfx::utils::B2DClipState &rClipState, vcl::RenderContext &rOut)
Definition: paintfrm.cxx:1716
const SvxShadowItem & m_rShadow
Definition: frmtool.hxx:288
bool IsFrameInSameContext(const SwFrame *pInnerFrame, const SwFrame *pFrame)
Definition: frmtool.cxx:3407
std::shared_ptr< SdrAllFillAttributesHelper > SdrAllFillAttributesHelperPtr
Definition: format.hxx:38
void CalcJoinedWithNext(const SwFrame &_rFrame)
Definition: frmtool.cxx:2333
void CalcTopLine_()
Definition: frmtool.cxx:2211
void CalcJoinedWithPrev(const SwFrame &_rFrame, const SwFrame *_pPrevFrame)
Definition: frmtool.cxx:2298
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:3692
void GetTopLine_(const SwFrame &_rFrame, const SwFrame *_pPrevFrame)
Definition: frmtool.cxx:2388
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:2635
helper class to check if a frame has been deleted during an operation WARNING! This should only be us...
Definition: frmtool.hxx:576
void MakeFrames(SwDoc *pDoc, const SwNodeIndex &rSttIdx, const SwNodeIndex &rEndIdx)
Definition: frmtool.cxx:1831
SwPageFrame *const pOldPage
Definition: frmtool.hxx:241
void CalcLineSpacing_()
Definition: frmtool.cxx:2420
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:2886
FrameMode
Definition: txtfrm.hxx:102
void CalcContent(SwLayoutFrame *pLay, bool bNoColl=false)
Definition: fly.cxx:1362
void SetGetCacheLine(bool bNew) const
Definition: frmtool.hxx:474
PrepareHint
Definition: swtypes.hxx:204
sal_uInt16 GetBottomLine(const SwFrame &_rFrame) const
Definition: frmtool.hxx:468
SwFrameType
Definition: frame.hxx:72
bool m_bLowersComplete
Definition: frmtool.hxx:229
sal_uInt16 m_nTopLine
Definition: frmtool.hxx:317
bool CmpLeftRight(const SwBorderAttrs &rCmpAttrs, const SwFrame *pCaller, const SwFrame *pCmp) const
Definition: frmtool.cxx:2265
SwOrderIter(const SwPageFrame *pPage)
Definition: frmtool.cxx:2461
FlyAnchors.
Definition: fmtanchr.hxx:34
const SvxBoxItem & GetBox() const
Definition: frmtool.hxx:370
const SwFrame * mpFrame
Definition: frmtool.hxx:579
SwBorderAttrAccess(SwCache &rCache, const SwFrame *pOwner)
Definition: frmtool.cxx:2442
static sal_uInt8 Count()
Definition: frmtool.hxx:453
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:4775
static bool bLocked
Definition: frmtool.hxx:438
const SwAttrSet & GetAttrSet() const
Definition: frmtool.hxx:368
sal_uInt16 m_nBottom
Definition: frmtool.hxx:317
sal_uInt16 GetTopLine(const SwFrame &_rFrame, const SwFrame *_pPrevFrame=nullptr) const
Definition: frmtool.hxx:459
const SdrObject * m_pCurrent
Definition: frmtool.hxx:422
Marks a node in the document model.
Definition: ndindex.hxx:31
bool IsExtraData(const SwDoc *pDoc)
Definition: frmtool.cxx:3649
bool m_bCachedJoinedWithNext
Definition: frmtool.hxx:311
bool IsLine() const
Definition: frmtool.hxx:526
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:3749
void CalcRightLine_()
Definition: frmtool.cxx:2232
sal_uInt16 CalcTop() const
Definition: frmtool.hxx:508
SwBorderAttrs * Get()
Definition: frmtool.cxx:2456
bool m_bCacheGetLine
Definition: frmtool.hxx:304
SwTwips mnFlyAnchorOfst
Definition: frmtool.hxx:213
void CalcTop_()
Definition: frmtool.cxx:2100
const SwContentFrame * GetCellContent(const SwLayoutFrame &rCell_)
method to get the content of the table cell
Definition: frmtool.cxx:3723
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
const SwModify * mpRegIn
Definition: frmtool.hxx:580
bool Is_Lower_Of(const SwFrame *pCurrFrame, const SdrObject *pObj)
Definition: frmtool.cxx:3361
general base class for all free-flowing frames
Definition: flyfrm.hxx:60
void IsLine_()
Definition: frmtool.cxx:2239
sal_uInt16 CalcLineSpacing() const
Definition: frmtool.hxx:520
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:428
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:1229
sal_uInt16 CalcBottom() const
Definition: frmtool.hxx:514
sal_uInt16 m_nBottomLine
Definition: frmtool.hxx:317
void GetBottomLine_(const SwFrame &_rFrame)
Definition: frmtool.cxx:2405
void CalcLeftLine_()
Definition: frmtool.cxx:2225
bool JoinedWithNext(const SwFrame &_rFrame) const
Definition: frmtool.cxx:2376
bool mbInvalidatePrevPrtArea
Definition: frmtool.hxx:257
bool HasBeenDeleted() const
return true if mpFrame != 0 and mpFrame is not client of pRegIn false otherwise
Definition: frmtool.cxx:3761
const SwFrame * GetVirtualUpper(const SwFrame *pFrame, const Point &rPos)
Provides the Upper of an anchor in paragraph-bound objects.
Definition: frmtool.cxx:3329
bool m_bBottomLine
Definition: frmtool.hxx:294
static bool IsLocked()
Definition: frmtool.hxx:452
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:385
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:920
bool m_bIsLine
Definition: frmtool.hxx:302
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:2987
bool m_bCachedGetTopLine
Definition: frmtool.hxx:305
#define GRFNUM_NO
Definition: frmtool.hxx:54
sal_uInt16 m_nGetBottomLine
Definition: frmtool.hxx:317
virtual ~SwBorderAttrs() override
Definition: frmtool.cxx:2090
sal_uInt16 m_nTop
Definition: frmtool.hxx:317
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:317
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:2493
bool m_bCachedJoinedWithPrev
Definition: frmtool.hxx:310
const SvxULSpaceItem & GetULSpace() const
Definition: frmtool.hxx:369
sal_uInt16 CalcRightLine() const
Definition: frmtool.hxx:502
void CalcBottom_()
Definition: frmtool.cxx:2106
bool const mbValidSize
Definition: frmtool.hxx:217
SwTwips CalcRowRstHeight(SwLayoutFrame *pRow)
Definition: frmtool.cxx:3475