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 <frameformats.hxx>
25#include <BorderCacheOwner.hxx>
26#include "frame.hxx"
27#include "txtfrm.hxx"
28#include "swcache.hxx"
29#include <swatrset.hxx>
30
31class SwLayoutFrame;
32class SwFont;
33class SwTextFrame;
34class SwFormatAnchor;
35class SwViewShell;
36class SwPageFrame;
37class SwFlyFrame;
38class SwContentFrame;
39class SwRootFrame;
40class SwDoc;
41class SdrObject;
42class SvxBrushItem;
43class SdrMarkList;
44class SwNodeIndex;
45class GraphicObject;
46class GraphicAttr;
47class SwPageDesc;
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 sw::FrameFormats<sw::SpzFrameFormat*>* pSpz, SwNodeOffset nIndex, SwFrame* pFrame, SwPageFrame* pPage, SwDoc* doc);
60
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
67void 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
72bool IsAnchoredObjShown(SwTextFrame const& rFrame, SwFormatAnchor const& rAnchor);
73
74void AppendAllObjs(const sw::FrameFormats<sw::SpzFrameFormat*>* pSpzs, 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.
79void 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
114void 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
118void SwAlignGrfRect( SwRect *pGrfRect, const vcl::RenderContext &rOut );
119
130void 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
137
138SwFrame *SaveContent( SwLayoutFrame *pLay, SwFrame *pStart = nullptr );
139void RestoreContent( SwFrame *pSav, SwLayoutFrame *pParent, SwFrame *pSibling );
140
141// Get ContentNodes, create ContentFrames, and add them to LayFrame.
142void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, SwNodeOffset nIndex,
143 bool bPages = false, SwNodeOffset nEndIndex = SwNodeOffset(0),
144 SwFrame *pPrv = nullptr, sw::FrameMode eMode = sw::FrameMode::New);
145
146// Creation of frames for a specific section (uses InsertCnt_)
147void MakeFrames( SwDoc *pDoc, SwNode &rSttIdx,
148 SwNode &rEndIdx );
149
150extern bool bObjsDirect;
151
152// for FlyCnts, see SwFlyAtContentFrame::MakeAll()
154
155// for table settings via keyboard
157tools::Long CalcHeightWithFlys( const SwFrame *pFrame );
158
159namespace sw {
160 bool HasPageBreakBefore(SwPageFrame const& rPage);
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 std::unique_ptr<SvxFirstLineIndentItem> m_pFirstLineIndent;
313 std::unique_ptr<SvxTextLeftMarginItem> m_pTextLeftMargin;
314 std::unique_ptr<SvxRightMarginItem> m_pRightMargin;
315 std::shared_ptr<SvxLRSpaceItem> m_xLR;
319
320 // the following bool values set the cached values to INVALID - until they
321 // are calculated for the first time
322 bool m_bTopLine : 1;
324 bool m_bLeftLine : 1;
325 bool m_bRightLine : 1;
326 bool m_bTop : 1;
327 bool m_bBottom : 1;
328 bool m_bLine : 1;
330
331 bool m_bIsLine : 1; // border on at least one side?
332
333 bool m_bCacheGetLine : 1; // cache GetTopLine(), GetBottomLine()?
334 bool m_bCachedGetTopLine : 1; // is GetTopLine() cached?
335 bool m_bCachedGetBottomLine : 1; // is GetBottomLine() cached?
336 // Booleans indicate that <m_bJoinedWithPrev> and <m_bJoinedWithNext> are
337 // cached and valid.
338 // Caching depends on value of <m_bCacheGetLine>.
339 mutable bool m_bCachedJoinedWithPrev : 1;
340 mutable bool m_bCachedJoinedWithNext : 1;
341 // Booleans indicate that borders are joined with previous/next frame.
344
345 // The cached values (un-defined until calculated for the first time)
346 sal_uInt16 m_nTopLine,
355
356 // only calculate lines and shadow
357 void CalcTopLine_();
358 void CalcBottomLine_();
359 void CalcLeftLine_();
360 void CalcRightLine_();
361
362 // lines + shadow + margin
363 void CalcTop_();
364 void CalcBottom_();
365
366 void IsLine_();
367
368 // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
369 // borders/shadow have to be joined with previous frame.
370 void GetTopLine_ ( const SwFrame& _rFrame,
371 const SwFrame* _pPrevFrame );
372 void GetBottomLine_( const SwFrame& _rFrame );
373
374 // calculate cached values <m_bJoinedWithPrev> and <m_bJoinedWithNext>
375 // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
376 // borders/shadow have to be joined with previous frame.
377 void CalcJoinedWithPrev( const SwFrame& _rFrame,
378 const SwFrame* _pPrevFrame );
379 void CalcJoinedWithNext( const SwFrame& _rFrame );
380
381 // internal helper method for CalcJoinedWithPrev and CalcJoinedWithNext
382 bool JoinWithCmp( const SwFrame& _rCallerFrame,
383 const SwFrame& _rCmpFrame ) const;
384
385 // Are the left and right line and the LRSpace equal?
386 bool CmpLeftRight( const SwBorderAttrs &rCmpAttrs,
387 const SwFrame *pCaller,
388 const SwFrame *pCmp ) const;
389
390 // tdf#125300 line spacing before cell border
391 void CalcLineSpacing_();
392
393public:
394 SwBorderAttrs( const sw::BorderCacheOwner* pOwner, const SwFrame *pConstructor );
395 virtual ~SwBorderAttrs() override;
396
397 const SwAttrSet &GetAttrSet() const { return m_rAttrSet; }
398 const SvxULSpaceItem &GetULSpace() const { return m_rUL; }
399 const SvxBoxItem &GetBox() const { return m_rBox; }
400 const SvxShadowItem &GetShadow() const { return m_rShadow; }
401
402 inline sal_uInt16 CalcTopLine() const;
403 inline sal_uInt16 CalcBottomLine() const;
404 inline sal_uInt16 CalcLeftLine() const;
405 inline sal_uInt16 CalcRightLine() const;
406 inline sal_uInt16 CalcTop() const;
407 inline sal_uInt16 CalcBottom() const;
408 inline sal_uInt16 CalcLineSpacing() const;
409 tools::Long CalcLeft( const SwFrame *pCaller ) const;
410 tools::Long CalcRight( const SwFrame *pCaller ) const;
411
412 inline bool IsLine() const;
413
414 const Size &GetSize() const { return m_aFrameSize; }
415
416 // Should upper (or lower) border be evaluated for this frame?
417 // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
418 // borders/shadow have to be joined with previous frame.
419 inline sal_uInt16 GetTopLine ( const SwFrame& _rFrame,
420 const SwFrame* _pPrevFrame = nullptr ) const;
421 inline sal_uInt16 GetBottomLine( const SwFrame& _rFrame ) const;
422 inline void SetGetCacheLine( bool bNew ) const;
423
424 // Accessors for cached values <m_bJoinedWithPrev> and <m_bJoinedWithNext>
425 // #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
426 // borders/shadow have to be joined with previous frame.
427 bool JoinedWithPrev( const SwFrame& _rFrame,
428 const SwFrame* _pPrevFrame = nullptr ) const;
429 bool JoinedWithNext( const SwFrame& _rFrame ) const;
430};
431
433{
434 const SwFrame *m_pConstructor; //opt: for passing on to SwBorderAttrs
435
436 virtual SwCacheObj *NewObj() override;
437
438public:
439 SwBorderAttrAccess( SwCache &rCache, const SwFrame *pOwner );
440
442};
443
444// Iterator for draw objects of a page. The objects will be iterated sorted by
445// their Z-order. Iterating is not cheap since for each operation the _whole_
446// SortArray needs to be traversed.
448{
451
452public:
453 SwOrderIter( const SwPageFrame *pPage );
454
455 void Current( const SdrObject *pNew ) { m_pCurrent = pNew; }
456 const SdrObject *operator()() const { return m_pCurrent; }
457 void Top();
458 const SdrObject *Bottom();
459 const SdrObject *Next();
460 void Prev();
461};
462
464{
466 static bool s_bLocked;
467
468public:
470 {
471 if ( ++StackHack::s_nCnt > 50 )
473 }
475 {
476 if ( --StackHack::s_nCnt < 5 )
477 StackHack::s_bLocked = false;
478 }
479
480 static bool IsLocked() { return StackHack::s_bLocked; }
481 static sal_uInt8 Count() { return StackHack::s_nCnt; }
482};
483
484// Should upper (or lower) border be evaluated for this frame?
485// #i25029# - If <_pPrevFrame> is set, its value is taken for testing, if
486// borders/shadow have to be joined with previous frame.
487inline sal_uInt16 SwBorderAttrs::GetTopLine ( const SwFrame& _rFrame,
488 const SwFrame* _pPrevFrame ) const
489{
490 if ( !m_bCachedGetTopLine || _pPrevFrame )
491 {
492 const_cast<SwBorderAttrs*>(this)->GetTopLine_( _rFrame, _pPrevFrame );
493 }
494 return m_nGetTopLine;
495}
496inline sal_uInt16 SwBorderAttrs::GetBottomLine( const SwFrame& _rFrame ) const
497{
499 const_cast<SwBorderAttrs*>(this)->GetBottomLine_( _rFrame );
500 return m_nGetBottomLine;
501}
502inline void SwBorderAttrs::SetGetCacheLine( bool bNew ) const
503{
504 const_cast<SwBorderAttrs*>(this)->m_bCacheGetLine = bNew;
505 const_cast<SwBorderAttrs*>(this)->m_bCachedGetBottomLine =
506 const_cast<SwBorderAttrs*>(this)->m_bCachedGetTopLine = false;
507 // invalidate cache for values <m_bJoinedWithPrev> and <m_bJoinedWithNext>
510}
511
512inline sal_uInt16 SwBorderAttrs::CalcTopLine() const
513{
514 if ( m_bTopLine )
515 const_cast<SwBorderAttrs*>(this)->CalcTopLine_();
516 return m_nTopLine;
517}
518inline sal_uInt16 SwBorderAttrs::CalcBottomLine() const
519{
520 if ( m_bBottomLine )
521 const_cast<SwBorderAttrs*>(this)->CalcBottomLine_();
522 return m_nBottomLine;
523}
524inline sal_uInt16 SwBorderAttrs::CalcLeftLine() const
525{
526 if ( m_bLeftLine )
527 const_cast<SwBorderAttrs*>(this)->CalcLeftLine_();
528 return m_nLeftLine;
529}
530inline sal_uInt16 SwBorderAttrs::CalcRightLine() const
531{
532 if ( m_bRightLine )
533 const_cast<SwBorderAttrs*>(this)->CalcRightLine_();
534 return m_nRightLine;
535}
536inline sal_uInt16 SwBorderAttrs::CalcTop() const
537{
538 if ( m_bTop )
539 const_cast<SwBorderAttrs*>(this)->CalcTop_();
540 return m_nTop;
541}
542inline sal_uInt16 SwBorderAttrs::CalcBottom() const
543{
544 if ( m_bBottom )
545 const_cast<SwBorderAttrs*>(this)->CalcBottom_();
546 return m_nBottom;
547}
548inline sal_uInt16 SwBorderAttrs::CalcLineSpacing() const
549{
550 if ( m_bLineSpacing )
551 const_cast<SwBorderAttrs*>(this)->CalcLineSpacing_();
552 return m_nLineSpacing;
553}
554inline bool SwBorderAttrs::IsLine() const
555{
556 if ( m_bLine )
557 const_cast<SwBorderAttrs*>(this)->IsLine_();
558 return m_bIsLine;
559}
560
582void GetSpacingValuesOfFrame( const SwFrame& rFrame,
583 SwTwips& onLowerSpacing,
584 SwTwips& onLineSpacing,
585 bool& obIsLineSpacingProportional,
586 bool bIdenticalStyles );
587
600const SwContentFrame* GetCellContent( const SwLayoutFrame& rCell_ );
601
608{
609private:
611 const sw::BroadcastingModify* mpRegIn;
612
613public:
614 SwDeletionChecker(const SwFrame* pFrame);
615
621 bool HasBeenDeleted() const;
622};
623
624#endif
625
626/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
~StackHack()
Definition: frmtool.hxx:474
static bool IsLocked()
Definition: frmtool.hxx:480
static sal_uInt8 s_nCnt
Definition: frmtool.hxx:465
static sal_uInt8 Count()
Definition: frmtool.hxx:481
static bool s_bLocked
Definition: frmtool.hxx:466
const SwFrame * m_pConstructor
Definition: frmtool.hxx:434
virtual SwCacheObj * NewObj() override
Can be use in NewObj.
Definition: frmtool.cxx:2690
SwBorderAttrAccess(SwCache &rCache, const SwFrame *pOwner)
Definition: frmtool.cxx:2682
SwBorderAttrs * Get()
Definition: frmtool.cxx:2696
bool m_bLineSpacing
Definition: frmtool.hxx:329
void CalcTopLine_()
Definition: frmtool.cxx:2451
void CalcBottomLine_()
Definition: frmtool.cxx:2458
const SvxShadowItem & m_rShadow
Definition: frmtool.hxx:317
void CalcRightLine_()
Definition: frmtool.cxx:2472
bool JoinedWithNext(const SwFrame &_rFrame) const
Definition: frmtool.cxx:2616
sal_uInt16 CalcRightLine() const
Definition: frmtool.hxx:530
sal_uInt16 m_nGetTopLine
Definition: frmtool.hxx:352
void CalcTop_()
Definition: frmtool.cxx:2290
void SetGetCacheLine(bool bNew) const
Definition: frmtool.hxx:502
sal_uInt16 m_nTop
Definition: frmtool.hxx:350
void CalcLineSpacing_()
Definition: frmtool.cxx:2660
sal_uInt16 m_nLeftLine
Definition: frmtool.hxx:348
bool JoinedWithPrev(const SwFrame &_rFrame, const SwFrame *_pPrevFrame=nullptr) const
Definition: frmtool.cxx:2604
SwBorderAttrs(const sw::BorderCacheOwner *pOwner, const SwFrame *pConstructor)
Definition: frmtool.cxx:2219
const SvxBoxItem & GetBox() const
Definition: frmtool.hxx:399
sal_uInt16 m_nGetBottomLine
Definition: frmtool.hxx:353
bool m_bLeftLine
Definition: frmtool.hxx:324
const SvxULSpaceItem & m_rUL
Definition: frmtool.hxx:311
std::unique_ptr< SvxRightMarginItem > m_pRightMargin
Definition: frmtool.hxx:314
const Size & GetSize() const
Definition: frmtool.hxx:414
tools::Long CalcLeft(const SwFrame *pCaller) const
Definition: frmtool.cxx:2382
bool m_bJoinedWithNext
Definition: frmtool.hxx:343
bool m_bBottomLine
Definition: frmtool.hxx:323
bool m_bTopLine
Definition: frmtool.hxx:322
bool CmpLeftRight(const SwBorderAttrs &rCmpAttrs, const SwFrame *pCaller, const SwFrame *pCmp) const
Definition: frmtool.cxx:2505
sal_uInt16 CalcTopLine() const
Definition: frmtool.hxx:512
const SvxULSpaceItem & GetULSpace() const
Definition: frmtool.hxx:398
sal_uInt16 m_nBottomLine
Definition: frmtool.hxx:347
bool m_bCachedGetTopLine
Definition: frmtool.hxx:334
sal_uInt16 CalcLeftLine() const
Definition: frmtool.hxx:524
void CalcLeftLine_()
Definition: frmtool.cxx:2465
void GetBottomLine_(const SwFrame &_rFrame)
Definition: frmtool.cxx:2645
sal_uInt16 CalcTop() const
Definition: frmtool.hxx:536
void GetTopLine_(const SwFrame &_rFrame, const SwFrame *_pPrevFrame)
Definition: frmtool.cxx:2628
bool m_bCachedJoinedWithNext
Definition: frmtool.hxx:340
void CalcJoinedWithNext(const SwFrame &_rFrame)
Definition: frmtool.cxx:2573
void CalcBottom_()
Definition: frmtool.cxx:2305
sal_uInt16 GetTopLine(const SwFrame &_rFrame, const SwFrame *_pPrevFrame=nullptr) const
Definition: frmtool.hxx:487
sal_uInt16 GetBottomLine(const SwFrame &_rFrame) const
Definition: frmtool.hxx:496
bool m_bCachedJoinedWithPrev
Definition: frmtool.hxx:339
sal_uInt16 m_nBottom
Definition: frmtool.hxx:351
const SwAttrSet & GetAttrSet() const
Definition: frmtool.hxx:397
const SvxShadowItem & GetShadow() const
Definition: frmtool.hxx:400
std::unique_ptr< SvxFirstLineIndentItem > m_pFirstLineIndent
Definition: frmtool.hxx:312
sal_uInt16 m_nLineSpacing
Definition: frmtool.hxx:354
bool m_bCacheGetLine
Definition: frmtool.hxx:333
bool IsLine() const
Definition: frmtool.hxx:554
bool m_bBottom
Definition: frmtool.hxx:327
sal_uInt16 CalcBottomLine() const
Definition: frmtool.hxx:518
bool m_bCachedGetBottomLine
Definition: frmtool.hxx:335
tools::Long CalcRight(const SwFrame *pCaller) const
Definition: frmtool.cxx:2311
sal_uInt16 CalcLineSpacing() const
Definition: frmtool.hxx:548
sal_uInt16 m_nTopLine
Definition: frmtool.hxx:346
void IsLine_()
Definition: frmtool.cxx:2479
sal_uInt16 m_nRightLine
Definition: frmtool.hxx:349
std::shared_ptr< SvxLRSpaceItem > m_xLR
Definition: frmtool.hxx:315
void CalcJoinedWithPrev(const SwFrame &_rFrame, const SwFrame *_pPrevFrame)
Definition: frmtool.cxx:2538
bool m_bRightLine
Definition: frmtool.hxx:325
bool m_bIsLine
Definition: frmtool.hxx:331
std::unique_ptr< SvxTextLeftMarginItem > m_pTextLeftMargin
Definition: frmtool.hxx:313
bool m_bJoinedWithPrev
Definition: frmtool.hxx:342
bool JoinWithCmp(const SwFrame &_rCallerFrame, const SwFrame &_rCmpFrame) const
Definition: frmtool.cxx:2516
const Size m_aFrameSize
Definition: frmtool.hxx:318
const SwAttrSet & m_rAttrSet
Definition: frmtool.hxx:310
const SvxBoxItem & m_rBox
Definition: frmtool.hxx:316
sal_uInt16 CalcBottom() const
Definition: frmtool.hxx:542
virtual ~SwBorderAttrs() override
Definition: frmtool.cxx:2280
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:59
void ImplDestroy()
Definition: frmtool.cxx:813
bool mbChkHeightOfLastLine
Definition: frmtool.hxx:278
bool mbInvalidatePrevPrtArea
Definition: frmtool.hxx:282
SwTwips mnHeightOfLastLine
Definition: frmtool.hxx:279
SwContentNotify(SwContentFrame *pContentFrame)
Definition: frmtool.cxx:788
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:608
bool HasBeenDeleted() const
return true if mpFrame != 0 and mpFrame is not client of pRegIn false otherwise
Definition: frmtool.cxx:4035
const sw::BroadcastingModify * mpRegIn
Definition: frmtool.hxx:611
SwDeletionChecker(const SwFrame *pFrame)
Definition: frmtool.cxx:4023
const SwFrame * mpFrame
Definition: frmtool.hxx:610
Definition: doc.hxx:197
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
To take Asian or other languages into consideration, an SwFont object consists of 3 SwSubFonts (Latin...
Definition: swfont.hxx:135
FlyAnchors.
Definition: fmtanchr.hxx:37
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:450
const SdrObject * Bottom()
Definition: frmtool.cxx:2733
const SdrObject * operator()() const
Definition: frmtool.hxx:456
const SdrObject * Next()
Definition: frmtool.cxx:2760
void Prev()
Definition: frmtool.cxx:2788
void Top()
Definition: frmtool.cxx:2707
void Current(const SdrObject *pNew)
Definition: frmtool.hxx:455
SwOrderIter(const SwPageFrame *pPage)
Definition: frmtool.cxx:2701
const SwPageFrame * m_pPage
Definition: frmtool.hxx:449
A page of the document layout.
Definition: pagefrm.hxx:60
Of course Writer needs its own rectangles.
Definition: swrect.hxx:35
The root element of a Writer document layout.
Definition: rootfrm.hxx:85
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:168
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:112
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:1212
void RestoreContent(SwFrame *pSav, SwLayoutFrame *pParent, SwFrame *pSibling)
Definition: frmtool.cxx:3035
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:915
tools::Long CalcHeightWithFlys(const SwFrame *pFrame)
Definition: tabfrm.cxx:4208
bool Is_Lower_Of(const SwFrame *pCurrFrame, const SdrObject *pObj)
Definition: frmtool.cxx:3622
const SwContentFrame * GetCellContent(const SwLayoutFrame &rCell_)
method to get the content of the table cell
Definition: frmtool.cxx:3997
void Notify_Background(const SdrObject *pObj, SwPageFrame *pPage, const SwRect &rRect, const PrepareHint eHint, const bool bInva)
Definition: frmtool.cxx:3412
SwFrame * SaveContent(SwLayoutFrame *pLay, SwFrame *pStart=nullptr)
Definition: frmtool.cxx:2873
SwTwips CalcRowRstHeight(SwLayoutFrame *pRow)
Definition: frmtool.cxx:3735
void MakeFrames(SwDoc *pDoc, SwNode &rSttIdx, SwNode &rEndIdx)
Definition: frmtool.cxx:2026
void RegistFlys(SwPageFrame *, const SwLayoutFrame *)
Definition: frmtool.cxx:3238
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:3813
const SwFrame * GetVirtualUpper(const SwFrame *pFrame, const Point &rPos)
Provides the Upper of an anchor in paragraph-bound objects.
Definition: frmtool.cxx:3590
void AppendObjs(const sw::FrameFormats< sw::SpzFrameFormat * > *pSpz, SwNodeOffset nIndex, SwFrame *pFrame, SwPageFrame *pPage, SwDoc *doc)
Definition: frmtool.cxx:1279
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:1241
constexpr tools::Long BROWSE_HEIGHT
Definition: frmtool.hxx:54
bool IsAnchoredObjShown(SwTextFrame const &rFrame, SwFormatAnchor const &rAnchor)
Definition: frmtool.cxx:1330
SwPageFrame * InsertNewPage(SwPageDesc &rDesc, SwFrame *pUpper, bool isRightPage, bool bFirst, bool bInsertEmpty, bool bFootnote, SwFrame *pSibling, bool bVeryFirstPage=false)
Definition: frmtool.cxx:3136
void CalcContent(SwLayoutFrame *pLay, bool bNoColl=false)
Definition: fly.cxx:1550
SwFlyFrame * GetFlyFromMarked(const SdrMarkList *pLst, SwViewShell *pSh)
Definition: feshview.cxx:109
bool DrawFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr &rFillAttributes, const SwRect &rOriginalLayoutRect, const SwRegionRects &rPaintRegion, const basegfx::utils::B2DClipState &rClipState, vcl::RenderContext &rOut)
Definition: paintfrm.cxx:1734
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:3961
void AppendObjsOfNode(sw::FrameFormats< sw::SpzFrameFormat * > 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:1233
void SwAlignRect(SwRect &rRect, const SwViewShell *pSh, const vcl::RenderContext *pRenderContext)
Function <SwAlignRect(..)> is also used outside this file.
Definition: paintfrm.cxx:1135
bool IsExtraData(const SwDoc *pDoc)
Definition: frmtool.cxx:3913
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:3254
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:1491
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:5040
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:3654
const SwFrame * FindPage(const SwRect &rRect, const SwFrame *pPage)
Definition: frmtool.cxx:3751
bool bObjsDirect
Definition: frmtool.cxx:104
bool IsFrameInSameContext(const SwFrame *pInnerFrame, const SwFrame *pFrame)
Definition: frmtool.cxx:3668
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:1823
void AppendAllObjs(const sw::FrameFormats< sw::SpzFrameFormat * > *pSpzs, const SwFrame *pSib)
Definition: frmtool.cxx:1382
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:3125
bool HasPageBreakBefore(SwPageFrame const &rPage)
Definition: flowfrm.cxx:922
FrameMode
Definition: txtfrm.hxx:110
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:38
tools::Long SwTwips
Definition: swtypes.hxx:51
PrepareHint
Definition: swtypes.hxx:206
unsigned char sal_uInt8