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
30class SwLayoutFrame;
31class SwFont;
32class SwTextFrame;
33class SwFormatAnchor;
34class SwViewShell;
35class SwPageFrame;
36class SwFlyFrame;
37class SwContentFrame;
38class SwRootFrame;
39class SwDoc;
40class SdrObject;
41class SvxBrushItem;
42class SdrMarkList;
43class SwNodeIndex;
44class GraphicObject;
45class GraphicAttr;
46class SwPageDesc;
47class SwFrameFormats;
48class SwRegionRects;
49class SwTextNode;
50namespace sw { struct Extent; }
51namespace basegfx::utils { class B2DClipState; }
52
53#define FAR_AWAY (SAL_MAX_INT32 - 20000) // initial position of a Fly
54constexpr tools::Long BROWSE_HEIGHT = 56700 * 10; // 10 Meters
55#define GRFNUM_NO 0
56#define GRFNUM_YES 1
57#define GRFNUM_REPLACE 2
58
59void AppendObjs( const SwFrameFormats *pTable, SwNodeOffset nIndex,
60 SwFrame *pFrame, SwPageFrame *pPage, SwDoc* doc );
61
62void AppendObjsOfNode(SwFrameFormats const* pTable, SwNodeOffset 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
68void 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
73bool IsAnchoredObjShown(SwTextFrame const& rFrame, SwFormatAnchor const& rAnchor);
74
75void 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.
80void 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
115void 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
119void SwAlignGrfRect( SwRect *pGrfRect, const vcl::RenderContext &rOut );
120
131void 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
138
139SwFrame *SaveContent( SwLayoutFrame *pLay, SwFrame *pStart = nullptr );
140void RestoreContent( SwFrame *pSav, SwLayoutFrame *pParent, SwFrame *pSibling );
141
142// Get ContentNodes, create ContentFrames, and add them to LayFrame.
143void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, SwNodeOffset nIndex,
144 bool bPages = false, SwNodeOffset nEndIndex = SwNodeOffset(0),
145 SwFrame *pPrv = nullptr, sw::FrameMode eMode = sw::FrameMode::New);
146
147// Creation of frames for a specific section (uses InsertCnt_)
148void MakeFrames( SwDoc *pDoc, SwNode &rSttIdx,
149 SwNode &rEndIdx );
150
151extern bool bObjsDirect;
152
153// for FlyCnts, see SwFlyAtContentFrame::MakeAll()
155
156// for table settings via keyboard
158tools::Long CalcHeightWithFlys( const SwFrame *pFrame );
159
160namespace sw {
161 bool IsRightPageByNumber(SwRootFrame const& rLayout, sal_uInt16 nPageNum);
163 {
165 public:
166 FlyCreationSuppressor(bool isAlreadySuppressedAllowed = true);
168 };
169} // namespace sw
170
172 bool isRightPage, bool bFirst, bool bInsertEmpty, bool bFootnote,
173 SwFrame *pSibling, bool bVeryFirstPage = false );
174
175// connect Flys with page
176void RegistFlys( SwPageFrame*, const SwLayoutFrame* );
177
178// notification of Fly's background if needed
179void Notify( SwFlyFrame *pFly, SwPageFrame *pOld, const SwRect &rOld,
180 const SwRect* pOldRect = nullptr );
181
182void Notify_Background( const SdrObject* pObj,
183 SwPageFrame* pPage,
184 const SwRect& rRect,
185 const PrepareHint eHint,
186 const bool bInva );
187
188const SwFrame* GetVirtualUpper( const SwFrame* pFrame, const Point& rPos );
189
190bool Is_Lower_Of( const SwFrame *pCurrFrame, const SdrObject* pObj );
191
192// FIXME: EasyHack (refactoring): rename method and parameter name in all files
193const SwFrame *FindContext( const SwFrame *pFrame, SwFrameType nAdditionalContextTyp );
194
195bool IsFrameInSameContext( const SwFrame *pInnerFrame, const SwFrame *pFrame );
196
197const SwFrame * FindPage( const SwRect &rRect, const SwFrame *pPage );
198
211SwFrame* 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?
218bool IsExtraData( const SwDoc *pDoc );
219
220// #i11760# - method declaration <CalcContent(..)>
221void 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{
227private:
228 void ImplDestroy();
229
230protected:
239
240public:
241 SwFrameNotify( SwFrame *pFrame );
243
244 const SwRect &getFrameArea() const { return maFrame; }
245 void SetInvaKeep() { mbInvaKeep = true; }
246};
247
249{
251
252 void ImplDestroy();
253
254public:
255 SwLayNotify( SwLayoutFrame *pLayFrame );
256 ~SwLayNotify();
257
258 void SetLowersComplete( bool b ) { m_bLowersComplete = b; }
259 bool IsLowersComplete() const { return m_bLowersComplete; }
260};
261
263{
266
267 void ImplDestroy();
268
269public:
270 SwFlyNotify( SwFlyFrame *pFlyFrame );
271 ~SwFlyNotify();
272};
273
275{
276private:
277 // #i11859#
280
281 // #i25029#
284
285 void ImplDestroy();
286
287public:
288 SwContentNotify( SwContentFrame *pContentFrame );
290
291 // #i25029#
293 {
295 }
296
298 {
300 }
301};
302
303// SwBorderAttrs encapsulates the calculation for margin attributes including
304// border. The whole class is cached.
305
306// WARNING! If more attributes should be cached also adjust the method
307// Modify::Modify!
308class SwBorderAttrs final : public SwCacheObj
309{
312 // #i96772#
313 std::shared_ptr<SvxLRSpaceItem> m_xLR;
317
318 // the following bool values set the cached values to INVALID - until they
319 // are calculated for the first time
320 bool m_bTopLine : 1;
322 bool m_bLeftLine : 1;
323 bool m_bRightLine : 1;
324 bool m_bTop : 1;
325 bool m_bBottom : 1;
326 bool m_bLine : 1;
328
329 bool m_bIsLine : 1; // border on at least one side?
330
331 bool m_bCacheGetLine : 1; // cache GetTopLine(), GetBottomLine()?
332 bool m_bCachedGetTopLine : 1; // is GetTopLine() cached?
333 bool m_bCachedGetBottomLine : 1; // is GetBottomLine() cached?
334 // Booleans indicate that <m_bJoinedWithPrev> and <m_bJoinedWithNext> are
335 // cached and valid.
336 // Caching depends on value of <m_bCacheGetLine>.
337 mutable bool m_bCachedJoinedWithPrev : 1;
338 mutable bool m_bCachedJoinedWithNext : 1;
339 // Booleans indicate that borders are joined with previous/next frame.
342
343 // The cached values (un-defined until calculated for the first time)
344 sal_uInt16 m_nTopLine,
353
354 // only calculate lines and shadow
355 void CalcTopLine_();
356 void CalcBottomLine_();
357 void CalcLeftLine_();
358 void CalcRightLine_();
359
360 // lines + shadow + margin
361 void CalcTop_();
362 void CalcBottom_();
363
364 void IsLine_();
365
366 // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
367 // borders/shadow have to be joined with previous frame.
368 void GetTopLine_ ( const SwFrame& _rFrame,
369 const SwFrame* _pPrevFrame );
370 void GetBottomLine_( const SwFrame& _rFrame );
371
372 // calculate cached values <m_bJoinedWithPrev> and <m_bJoinedWithNext>
373 // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
374 // borders/shadow have to be joined with previous frame.
375 void CalcJoinedWithPrev( const SwFrame& _rFrame,
376 const SwFrame* _pPrevFrame );
377 void CalcJoinedWithNext( const SwFrame& _rFrame );
378
379 // internal helper method for CalcJoinedWithPrev and CalcJoinedWithNext
380 bool JoinWithCmp( const SwFrame& _rCallerFrame,
381 const SwFrame& _rCmpFrame ) const;
382
383 // Are the left and right line and the LRSpace equal?
384 bool CmpLeftRight( const SwBorderAttrs &rCmpAttrs,
385 const SwFrame *pCaller,
386 const SwFrame *pCmp ) const;
387
388 // tdf#125300 line spacing before cell border
389 void CalcLineSpacing_();
390
391public:
392 SwBorderAttrs( const sw::BorderCacheOwner* pOwner, const SwFrame *pConstructor );
393 virtual ~SwBorderAttrs() override;
394
395 const SwAttrSet &GetAttrSet() const { return m_rAttrSet; }
396 const SvxULSpaceItem &GetULSpace() const { return m_rUL; }
397 const SvxBoxItem &GetBox() const { return m_rBox; }
398 const SvxShadowItem &GetShadow() const { return m_rShadow; }
399
400 inline sal_uInt16 CalcTopLine() const;
401 inline sal_uInt16 CalcBottomLine() const;
402 inline sal_uInt16 CalcLeftLine() const;
403 inline sal_uInt16 CalcRightLine() const;
404 inline sal_uInt16 CalcTop() const;
405 inline sal_uInt16 CalcBottom() const;
406 inline sal_uInt16 CalcLineSpacing() const;
407 tools::Long CalcLeft( const SwFrame *pCaller ) const;
408 tools::Long CalcRight( const SwFrame *pCaller ) const;
409
410 inline bool IsLine() const;
411
412 const Size &GetSize() const { return m_aFrameSize; }
413
414 // Should upper (or lower) border be evaluated for this frame?
415 // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
416 // borders/shadow have to be joined with previous frame.
417 inline sal_uInt16 GetTopLine ( const SwFrame& _rFrame,
418 const SwFrame* _pPrevFrame = nullptr ) const;
419 inline sal_uInt16 GetBottomLine( const SwFrame& _rFrame ) const;
420 inline void SetGetCacheLine( bool bNew ) const;
421
422 // Accessors for cached values <m_bJoinedWithPrev> and <m_bJoinedWithNext>
423 // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
424 // borders/shadow have to be joined with previous frame.
425 bool JoinedWithPrev( const SwFrame& _rFrame,
426 const SwFrame* _pPrevFrame = nullptr ) const;
427 bool JoinedWithNext( const SwFrame& _rFrame ) const;
428};
429
431{
432 const SwFrame *m_pConstructor; //opt: for passing on to SwBorderAttrs
433
434 virtual SwCacheObj *NewObj() override;
435
436public:
437 SwBorderAttrAccess( SwCache &rCache, const SwFrame *pOwner );
438
440};
441
442// Iterator for draw objects of a page. The objects will be iterated sorted by
443// their Z-order. Iterating is not cheap since for each operation the _whole_
444// SortArray needs to be traversed.
446{
449
450public:
451 SwOrderIter( const SwPageFrame *pPage );
452
453 void Current( const SdrObject *pNew ) { m_pCurrent = pNew; }
454 const SdrObject *operator()() const { return m_pCurrent; }
455 void Top();
456 const SdrObject *Bottom();
457 const SdrObject *Next();
458 void Prev();
459};
460
462{
464 static bool s_bLocked;
465
466public:
468 {
469 if ( ++StackHack::s_nCnt > 50 )
471 }
473 {
474 if ( --StackHack::s_nCnt < 5 )
475 StackHack::s_bLocked = false;
476 }
477
478 static bool IsLocked() { return StackHack::s_bLocked; }
479 static sal_uInt8 Count() { return StackHack::s_nCnt; }
480};
481
482// Should upper (or lower) border be evaluated for this frame?
483// #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
484// borders/shadow have to be joined with previous frame.
485inline sal_uInt16 SwBorderAttrs::GetTopLine ( const SwFrame& _rFrame,
486 const SwFrame* _pPrevFrame ) const
487{
488 if ( !m_bCachedGetTopLine || _pPrevFrame )
489 {
490 const_cast<SwBorderAttrs*>(this)->GetTopLine_( _rFrame, _pPrevFrame );
491 }
492 return m_nGetTopLine;
493}
494inline sal_uInt16 SwBorderAttrs::GetBottomLine( const SwFrame& _rFrame ) const
495{
497 const_cast<SwBorderAttrs*>(this)->GetBottomLine_( _rFrame );
498 return m_nGetBottomLine;
499}
500inline void SwBorderAttrs::SetGetCacheLine( bool bNew ) const
501{
502 const_cast<SwBorderAttrs*>(this)->m_bCacheGetLine = bNew;
503 const_cast<SwBorderAttrs*>(this)->m_bCachedGetBottomLine =
504 const_cast<SwBorderAttrs*>(this)->m_bCachedGetTopLine = false;
505 // invalidate cache for values <m_bJoinedWithPrev> and <m_bJoinedWithNext>
508}
509
510inline sal_uInt16 SwBorderAttrs::CalcTopLine() const
511{
512 if ( m_bTopLine )
513 const_cast<SwBorderAttrs*>(this)->CalcTopLine_();
514 return m_nTopLine;
515}
516inline sal_uInt16 SwBorderAttrs::CalcBottomLine() const
517{
518 if ( m_bBottomLine )
519 const_cast<SwBorderAttrs*>(this)->CalcBottomLine_();
520 return m_nBottomLine;
521}
522inline sal_uInt16 SwBorderAttrs::CalcLeftLine() const
523{
524 if ( m_bLeftLine )
525 const_cast<SwBorderAttrs*>(this)->CalcLeftLine_();
526 return m_nLeftLine;
527}
528inline sal_uInt16 SwBorderAttrs::CalcRightLine() const
529{
530 if ( m_bRightLine )
531 const_cast<SwBorderAttrs*>(this)->CalcRightLine_();
532 return m_nRightLine;
533}
534inline sal_uInt16 SwBorderAttrs::CalcTop() const
535{
536 if ( m_bTop )
537 const_cast<SwBorderAttrs*>(this)->CalcTop_();
538 return m_nTop;
539}
540inline sal_uInt16 SwBorderAttrs::CalcBottom() const
541{
542 if ( m_bBottom )
543 const_cast<SwBorderAttrs*>(this)->CalcBottom_();
544 return m_nBottom;
545}
546inline sal_uInt16 SwBorderAttrs::CalcLineSpacing() const
547{
548 if ( m_bLineSpacing )
549 const_cast<SwBorderAttrs*>(this)->CalcLineSpacing_();
550 return m_nLineSpacing;
551}
552inline bool SwBorderAttrs::IsLine() const
553{
554 if ( m_bLine )
555 const_cast<SwBorderAttrs*>(this)->IsLine_();
556 return m_bIsLine;
557}
558
580void GetSpacingValuesOfFrame( const SwFrame& rFrame,
581 SwTwips& onLowerSpacing,
582 SwTwips& onLineSpacing,
583 bool& obIsLineSpacingProportional,
584 bool bIdenticalStyles );
585
598const SwContentFrame* GetCellContent( const SwLayoutFrame& rCell_ );
599
606{
607private:
609 const sw::BroadcastingModify* mpRegIn;
610
611public:
612 SwDeletionChecker(const SwFrame* pFrame);
613
619 bool HasBeenDeleted() const;
620};
621
622#endif
623
624/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
~StackHack()
Definition: frmtool.hxx:472
static bool IsLocked()
Definition: frmtool.hxx:478
static sal_uInt8 s_nCnt
Definition: frmtool.hxx:463
static sal_uInt8 Count()
Definition: frmtool.hxx:479
static bool s_bLocked
Definition: frmtool.hxx:464
const SwFrame * m_pConstructor
Definition: frmtool.hxx:432
virtual SwCacheObj * NewObj() override
Can be use in NewObj.
Definition: frmtool.cxx:2676
SwBorderAttrAccess(SwCache &rCache, const SwFrame *pOwner)
Definition: frmtool.cxx:2668
SwBorderAttrs * Get()
Definition: frmtool.cxx:2682
bool m_bLineSpacing
Definition: frmtool.hxx:327
void CalcTopLine_()
Definition: frmtool.cxx:2437
void CalcBottomLine_()
Definition: frmtool.cxx:2444
const SvxShadowItem & m_rShadow
Definition: frmtool.hxx:315
void CalcRightLine_()
Definition: frmtool.cxx:2458
bool JoinedWithNext(const SwFrame &_rFrame) const
Definition: frmtool.cxx:2602
sal_uInt16 CalcRightLine() const
Definition: frmtool.hxx:528
sal_uInt16 m_nGetTopLine
Definition: frmtool.hxx:350
void CalcTop_()
Definition: frmtool.cxx:2289
void SetGetCacheLine(bool bNew) const
Definition: frmtool.hxx:500
sal_uInt16 m_nTop
Definition: frmtool.hxx:348
void CalcLineSpacing_()
Definition: frmtool.cxx:2646
sal_uInt16 m_nLeftLine
Definition: frmtool.hxx:346
bool JoinedWithPrev(const SwFrame &_rFrame, const SwFrame *_pPrevFrame=nullptr) const
Definition: frmtool.cxx:2590
SwBorderAttrs(const sw::BorderCacheOwner *pOwner, const SwFrame *pConstructor)
Definition: frmtool.cxx:2223
const SvxBoxItem & GetBox() const
Definition: frmtool.hxx:397
sal_uInt16 m_nGetBottomLine
Definition: frmtool.hxx:351
bool m_bLeftLine
Definition: frmtool.hxx:322
const SvxULSpaceItem & m_rUL
Definition: frmtool.hxx:311
const Size & GetSize() const
Definition: frmtool.hxx:412
tools::Long CalcLeft(const SwFrame *pCaller) const
Definition: frmtool.cxx:2372
bool m_bJoinedWithNext
Definition: frmtool.hxx:341
bool m_bBottomLine
Definition: frmtool.hxx:321
bool m_bTopLine
Definition: frmtool.hxx:320
bool CmpLeftRight(const SwBorderAttrs &rCmpAttrs, const SwFrame *pCaller, const SwFrame *pCmp) const
Definition: frmtool.cxx:2491
sal_uInt16 CalcTopLine() const
Definition: frmtool.hxx:510
const SvxULSpaceItem & GetULSpace() const
Definition: frmtool.hxx:396
sal_uInt16 m_nBottomLine
Definition: frmtool.hxx:345
bool m_bCachedGetTopLine
Definition: frmtool.hxx:332
sal_uInt16 CalcLeftLine() const
Definition: frmtool.hxx:522
void CalcLeftLine_()
Definition: frmtool.cxx:2451
void GetBottomLine_(const SwFrame &_rFrame)
Definition: frmtool.cxx:2631
sal_uInt16 CalcTop() const
Definition: frmtool.hxx:534
void GetTopLine_(const SwFrame &_rFrame, const SwFrame *_pPrevFrame)
Definition: frmtool.cxx:2614
bool m_bCachedJoinedWithNext
Definition: frmtool.hxx:338
void CalcJoinedWithNext(const SwFrame &_rFrame)
Definition: frmtool.cxx:2559
void CalcBottom_()
Definition: frmtool.cxx:2304
sal_uInt16 GetTopLine(const SwFrame &_rFrame, const SwFrame *_pPrevFrame=nullptr) const
Definition: frmtool.hxx:485
sal_uInt16 GetBottomLine(const SwFrame &_rFrame) const
Definition: frmtool.hxx:494
bool m_bCachedJoinedWithPrev
Definition: frmtool.hxx:337
sal_uInt16 m_nBottom
Definition: frmtool.hxx:349
const SwAttrSet & GetAttrSet() const
Definition: frmtool.hxx:395
const SvxShadowItem & GetShadow() const
Definition: frmtool.hxx:398
sal_uInt16 m_nLineSpacing
Definition: frmtool.hxx:352
bool m_bCacheGetLine
Definition: frmtool.hxx:331
bool IsLine() const
Definition: frmtool.hxx:552
bool m_bBottom
Definition: frmtool.hxx:325
sal_uInt16 CalcBottomLine() const
Definition: frmtool.hxx:516
bool m_bCachedGetBottomLine
Definition: frmtool.hxx:333
tools::Long CalcRight(const SwFrame *pCaller) const
Definition: frmtool.cxx:2310
sal_uInt16 CalcLineSpacing() const
Definition: frmtool.hxx:546
sal_uInt16 m_nTopLine
Definition: frmtool.hxx:344
void IsLine_()
Definition: frmtool.cxx:2465
sal_uInt16 m_nRightLine
Definition: frmtool.hxx:347
std::shared_ptr< SvxLRSpaceItem > m_xLR
Definition: frmtool.hxx:313
void CalcJoinedWithPrev(const SwFrame &_rFrame, const SwFrame *_pPrevFrame)
Definition: frmtool.cxx:2524
bool m_bRightLine
Definition: frmtool.hxx:323
bool m_bIsLine
Definition: frmtool.hxx:329
bool m_bJoinedWithPrev
Definition: frmtool.hxx:340
bool JoinWithCmp(const SwFrame &_rCallerFrame, const SwFrame &_rCmpFrame) const
Definition: frmtool.cxx:2502
const Size m_aFrameSize
Definition: frmtool.hxx:316
const SwAttrSet & m_rAttrSet
Definition: frmtool.hxx:310
const SvxBoxItem & m_rBox
Definition: frmtool.hxx:314
sal_uInt16 CalcBottom() const
Definition: frmtool.hxx:540
virtual ~SwBorderAttrs() override
Definition: frmtool.cxx:2279
Access class for the Cache.
Definition: swcache.hxx:198
The Cache object base class Users of the Cache must derive a class from the SwCacheObj and store thei...
Definition: swcache.hxx:137
SwContentFrame is the layout for content nodes: a common base class for text (paragraph) and non-text...
Definition: cntfrm.hxx:58
void ImplDestroy()
Definition: frmtool.cxx:808
bool mbChkHeightOfLastLine
Definition: frmtool.hxx:278
bool mbInvalidatePrevPrtArea
Definition: frmtool.hxx:282
SwTwips mnHeightOfLastLine
Definition: frmtool.hxx:279
SwContentNotify(SwContentFrame *pContentFrame)
Definition: frmtool.cxx:783
bool mbBordersJoinedWithPrev
Definition: frmtool.hxx:283
void SetInvalidatePrevPrtArea()
Definition: frmtool.hxx:292
void SetBordersJoinedWithPrev()
Definition: frmtool.hxx:297
helper class to check if a frame has been deleted during an operation WARNING! This should only be us...
Definition: frmtool.hxx:606
bool HasBeenDeleted() const
return true if mpFrame != 0 and mpFrame is not client of pRegIn false otherwise
Definition: frmtool.cxx:4008
const sw::BroadcastingModify * mpRegIn
Definition: frmtool.hxx:609
SwDeletionChecker(const SwFrame *pFrame)
Definition: frmtool.cxx:3996
const SwFrame * mpFrame
Definition: frmtool.hxx:608
Definition: doc.hxx:194
general base class for all free-flowing frames
Definition: flyfrm.hxx:79
SwFlyNotify(SwFlyFrame *pFlyFrame)
Definition: frmtool.cxx:663
const SwRect m_aFrameAndSpace
Definition: frmtool.hxx:265
void ImplDestroy()
Definition: frmtool.cxx:672
SwPageFrame * m_pOldPage
Definition: frmtool.hxx:264
FlyAnchors.
Definition: fmtanchr.hxx:37
Specific frame formats (frames, DrawObjects).
bool mbHadFollow
Definition: frmtool.hxx:236
bool mbValidSize
Definition: frmtool.hxx:238
const SwRect maPrt
Definition: frmtool.hxx:233
SwFrameNotify(SwFrame *pFrame)
Definition: frmtool.cxx:110
void ImplDestroy()
Definition: frmtool.cxx:136
const SwRect maFrame
Definition: frmtool.hxx:232
bool mbInvaKeep
Definition: frmtool.hxx:237
void SetInvaKeep()
Definition: frmtool.hxx:245
SwTwips mnFlyAnchorOfstNoWrap
Definition: frmtool.hxx:235
SwTwips mnFlyAnchorOfst
Definition: frmtool.hxx:234
const SwRect & getFrameArea() const
Definition: frmtool.hxx:244
SwFrame * mpFrame
Definition: frmtool.hxx:231
Base class of the Writer layout elements.
Definition: frame.hxx:315
SwLayNotify(SwLayoutFrame *pLayFrame)
Definition: frmtool.cxx:446
void SetLowersComplete(bool b)
Definition: frmtool.hxx:258
void ImplDestroy()
Definition: frmtool.cxx:481
bool IsLowersComplete() const
Definition: frmtool.hxx:259
bool m_bLowersComplete
Definition: frmtool.hxx:250
A layout frame is a frame that contains other frames (m_pLower), e.g. SwPageFrame or SwTabFrame.
Definition: layfrm.hxx:36
Marks a node in the document model.
Definition: ndindex.hxx:31
Base class of the Writer document model elements.
Definition: node.hxx:98
const SdrObject * m_pCurrent
Definition: frmtool.hxx:448
const SdrObject * Bottom()
Definition: frmtool.cxx:2719
const SdrObject * operator()() const
Definition: frmtool.hxx:454
const SdrObject * Next()
Definition: frmtool.cxx:2746
void Prev()
Definition: frmtool.cxx:2774
void Top()
Definition: frmtool.cxx:2693
void Current(const SdrObject *pNew)
Definition: frmtool.hxx:453
SwOrderIter(const SwPageFrame *pPage)
Definition: frmtool.cxx:2687
const SwPageFrame * m_pPage
Definition: frmtool.hxx:447
A page of the document layout.
Definition: pagefrm.hxx:58
Of course Writer needs its own rectangles.
Definition: swrect.hxx:35
The root element of a Writer document layout.
Definition: rootfrm.hxx:82
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:165
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:111
Bookkeeping helper for SwCache caching writer borders.
const bool m_wasAlreadySuppressed
Definition: frmtool.hxx:164
FlyCreationSuppressor(bool isAlreadySuppressedAllowed=true)
Definition: frmtool.cxx:91
SwFrameType
Definition: frame.hxx:75
#define GRFNUM_NO
Definition: frmtool.hxx:55
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:1204
void RestoreContent(SwFrame *pSav, SwLayoutFrame *pParent, SwFrame *pSibling)
Definition: frmtool.cxx:3021
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:911
tools::Long CalcHeightWithFlys(const SwFrame *pFrame)
Definition: tabfrm.cxx:4051
bool Is_Lower_Of(const SwFrame *pCurrFrame, const SdrObject *pObj)
Definition: frmtool.cxx:3600
const SwContentFrame * GetCellContent(const SwLayoutFrame &rCell_)
method to get the content of the table cell
Definition: frmtool.cxx:3970
void Notify_Background(const SdrObject *pObj, SwPageFrame *pPage, const SwRect &rRect, const PrepareHint eHint, const bool bInva)
Definition: frmtool.cxx:3390
SwFrame * SaveContent(SwLayoutFrame *pLay, SwFrame *pStart=nullptr)
Definition: frmtool.cxx:2859
SwTwips CalcRowRstHeight(SwLayoutFrame *pRow)
Definition: frmtool.cxx:3713
void MakeFrames(SwDoc *pDoc, SwNode &rSttIdx, SwNode &rEndIdx)
Definition: frmtool.cxx:2013
void RegistFlys(SwPageFrame *, const SwLayoutFrame *)
Definition: frmtool.cxx:3227
SwFrame * GetFrameOfModify(const SwRootFrame *pLayout, sw::BroadcastingModify const &, SwFrameType const nFrameType, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr)
Definition: frmtool.cxx:3791
const SwFrame * GetVirtualUpper(const SwFrame *pFrame, const Point &rPos)
Provides the Upper of an anchor in paragraph-bound objects.
Definition: frmtool.cxx:3568
void AppendObjsOfNode(SwFrameFormats const *pTable, SwNodeOffset 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:1225
bool bSetCompletePaintOnInvalidate
Definition: frmtool.cxx:105
void SwAlignGrfRect(SwRect *pGrfRect, const vcl::RenderContext &rOut)
Method to pixel-align rectangle for drawing graphic object.
Definition: paintfrm.cxx:1232
constexpr tools::Long BROWSE_HEIGHT
Definition: frmtool.hxx:54
bool IsAnchoredObjShown(SwTextFrame const &rFrame, SwFormatAnchor const &rAnchor)
Definition: frmtool.cxx:1323
SwPageFrame * InsertNewPage(SwPageDesc &rDesc, SwFrame *pUpper, bool isRightPage, bool bFirst, bool bInsertEmpty, bool bFootnote, SwFrame *pSibling, bool bVeryFirstPage=false)
Definition: frmtool.cxx:3122
void CalcContent(SwLayoutFrame *pLay, bool bNoColl=false)
Definition: fly.cxx:1423
SwFlyFrame * GetFlyFromMarked(const SdrMarkList *pLst, SwViewShell *pSh)
Definition: feshview.cxx:139
bool DrawFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr &rFillAttributes, const SwRect &rOriginalLayoutRect, const SwRegionRects &rPaintRegion, const basegfx::utils::B2DClipState &rClipState, vcl::RenderContext &rOut)
Definition: paintfrm.cxx:1725
void AppendObjs(const SwFrameFormats *pTable, SwNodeOffset nIndex, SwFrame *pFrame, SwPageFrame *pPage, SwDoc *doc)
Definition: frmtool.cxx:1272
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:3934
void SwAlignRect(SwRect &rRect, const SwViewShell *pSh, const vcl::RenderContext *pRenderContext)
Function <SwAlignRect(..)> is also used outside this file.
Definition: paintfrm.cxx:1126
bool IsExtraData(const SwDoc *pDoc)
Definition: frmtool.cxx:3891
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:3243
void InsertCnt_(SwLayoutFrame *pLay, SwDoc *pDoc, SwNodeOffset nIndex, bool bPages=false, SwNodeOffset nEndIndex=SwNodeOffset(0), SwFrame *pPrv=nullptr, sw::FrameMode eMode=sw::FrameMode::New)
Definition: frmtool.cxx:1484
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:4924
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:3632
const SwFrame * FindPage(const SwRect &rRect, const SwFrame *pPage)
Definition: frmtool.cxx:3729
bool bObjsDirect
Definition: frmtool.cxx:104
bool IsFrameInSameContext(const SwFrame *pInnerFrame, const SwFrame *pFrame)
Definition: frmtool.cxx:3646
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:1814
void AppendAllObjs(const SwFrameFormats *pTable, const SwFrame *pSib)
Definition: frmtool.cxx:1375
static bool bFootnote
Definition: insfnote.cxx:33
std::shared_ptr< SdrAllFillAttributesHelper > SdrAllFillAttributesHelperPtr
Definition: format.hxx:41
Dialog to specify the properties of date form field.
bool IsRightPageByNumber(SwRootFrame const &rLayout, sal_uInt16 nPageNum)
Definition: frmtool.cxx:3111
FrameMode
Definition: txtfrm.hxx:107
long Long
o3tl::strong_int< sal_Int32, struct Tag_SwNodeOffset > SwNodeOffset
Definition: nodeoffset.hxx:16
Marks a position in the document model.
Definition: pam.hxx:37
tools::Long SwTwips
Definition: swtypes.hxx:51
PrepareHint
Definition: swtypes.hxx:204
unsigned char sal_uInt8