LibreOffice Module sw (master)  1
txtfrm.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 #ifndef INCLUDED_SW_SOURCE_CORE_INC_TXTFRM_HXX
20 #define INCLUDED_SW_SOURCE_CORE_INC_TXTFRM_HXX
21 
22 #include <com/sun/star/uno/Sequence.hxx>
23 #include "cntfrm.hxx"
24 #include "TextFrameIndex.hxx"
25 
26 #include <set>
27 
28 namespace com::sun::star::linguistic2 { class XHyphenatedWord; }
29 
30 namespace sw::mark { class IMark; }
31 class SwCharRange;
32 class SwTextNode;
33 class SwTextAttrEnd;
34 class SwTextFormatter;
35 class SwTextFormatInfo;
36 class SwParaPortion;
37 class WidowsAndOrphans;
38 class SwTextFootnote;
39 class SwInterHyphInfo; // Hyphenate()
40 class SwCache;
41 class SwBorderAttrs;
42 class SwFrameFormat;
43 struct SwCursorMoveState;
44 struct SwFillData;
45 class SwPortionHandler;
46 class SwScriptInfo;
47 enum class ExpandMode;
48 class SwTextAttr;
49 class SwWrtShell;
50 
51 #define NON_PRINTING_CHARACTER_COLOR Color(0x26, 0x8b, 0xd2)
52 
55 {
56 private:
58  css::uno::Reference<css::linguistic2::XHyphenatedWord> m_xHyphWord;
59 public:
66 
68  SwTextNode const& rNode, SwInterHyphInfo const& rHyphInfo);
69  void UpdateTextNodeHyphInfo(SwTextFrame const& rFrame,
70  SwTextNode const& rNode, SwInterHyphInfo & o_rHyphInfo);
71 
72  void SetHyphWord(const css::uno::Reference<css::linguistic2::XHyphenatedWord> &xHW)
73  {
74  m_xHyphWord = xHW;
75  }
76 };
77 
78 namespace sw {
79 
84 struct Extent
85 {
86  SwTextNode * /*const logically, but need assignment for std::vector*/ pNode;
87  sal_Int32 nStart;
88  sal_Int32 nEnd;
89  Extent(SwTextNode *const p, sal_Int32 const s, sal_Int32 const e)
90  : pNode(p), nStart(s), nEnd(e)
91  {
92  assert(pNode);
93  assert(nStart != nEnd);
94  }
95 };
96 
97 struct MergedPara;
98 
99 std::pair<SwTextNode*, sal_Int32> MapViewToModel(MergedPara const&, TextFrameIndex nIndex);
100 TextFrameIndex MapModelToView(MergedPara const&, SwTextNode const* pNode, sal_Int32 nIndex);
101 
102 // warning: Existing must be used only once; a second use would delete the frame created by the first one...
103 enum class FrameMode { New, Existing };
104 std::unique_ptr<sw::MergedPara> CheckParaRedlineMerge(SwTextFrame & rFrame, SwTextNode & rTextNode, FrameMode eMode);
106 
107 bool FrameContainsNode(SwContentFrame const& rFrame, sal_uLong nNodeIndex);
108 bool IsParaPropsNode(SwRootFrame const& rLayout, SwTextNode const& rNode);
109 SwTextNode * GetParaPropsNode(SwRootFrame const& rLayout, SwNodeIndex const& rNode);
110 SwPosition GetParaPropsPos(SwRootFrame const& rLayout, SwPosition const& rPos);
111 std::pair<SwTextNode *, SwTextNode *>
112 GetFirstAndLastNode(SwRootFrame const& rLayout, SwNodeIndex const& rPos);
113 
114 SwTextNode const& GetAttrMerged(SfxItemSet & rFormatSet,
115  SwTextNode const& rNode, SwRootFrame const* pLayout);
116 
117 void GotoPrevLayoutTextFrame(SwNodeIndex & rIndex, SwRootFrame const* pLayout);
118 void GotoNextLayoutTextFrame(SwNodeIndex & rIndex, SwRootFrame const* pLayout);
119 
120 TextFrameIndex UpdateMergedParaForDelete(MergedPara & rMerged,
121  bool isRealDelete,
122  SwTextNode const& rNode, sal_Int32 nIndex, sal_Int32 nLen);
123 
124 void MoveMergedFlysAndFootnotes(std::vector<SwTextFrame*> const& rFrames,
125  SwTextNode const& rFirstNode, SwTextNode & rSecondNode, bool);
126 
127 void MoveDeletedPrevFrames(const SwTextNode & rDeletedPrev, SwTextNode & rNode);
128 enum class Recreate { No, ThisNode, Predecessor };
129 void CheckResetRedlineMergeFlag(SwTextNode & rNode, Recreate eRecreateMerged);
130 
131 void UpdateFramesForAddDeleteRedline(SwDoc & rDoc, SwPaM const& rPam);
132 void UpdateFramesForRemoveDeleteRedline(SwDoc & rDoc, SwPaM const& rPam);
133 
135  SwTextFrame & rFrame, SwTextNode & rTextNode,
136  std::set<sal_uLong> *pSkipped);
137 
138 OUString GetExpandTextMerged(SwRootFrame const* pLayout,
139  SwTextNode const& rNode, bool bWithNumber,
140  bool bWithSpacesForLevel, ExpandMode i_mode);
141 
142 bool IsMarkHidden(SwRootFrame const& rLayout, ::sw::mark::IMark const& rMark);
143 bool IsMarkHintHidden(SwRootFrame const& rLayout,
144  SwTextNode const& rNode, SwTextAttrEnd const& rHint);
145 
146 void RecreateStartTextFrames(SwTextNode & rNode);
147 
152 bool HasNumberingWhichNeedsLayoutUpdate(const SwTextNode& rTextNode);
153 
154 } // namespace sw
155 
159 {
160  friend class SwTextIter;
161  friend class SwTestFormat;
162  friend class WidowsAndOrphans;
163  friend class TextFrameLockGuard; // May Lock()/Unlock()
164  friend bool sw_ChangeOffset(SwTextFrame* pFrame, TextFrameIndex nNew);
165 
172  static constexpr tools::Long nMinPrtLine = 0; // This Line must not be underrun when printing
173  // Hack for table cells stretching multiple pages
174 
175  sal_uInt32 mnAllLines :24; // Line count for the Paint (including nThisLines)
176  sal_uInt32 mnThisLines :8; // Count of Lines of the Frame
177 
178  // The x position for flys anchored at this paragraph.
179  // These values are calculated in SwTextFrame::CalcBaseOfstForFly()
181  // The x position for wrap-through flys anchored at this paragraph.
186  // OD 2004-03-17 #i11860# - re-factoring of #i11859#
187  // member for height of last line (value needed for proportional line spacing)
189  // member for the additional first line offset, which is caused by the list
190  // label alignment for list level position and space mode LABEL_ALIGNMENT.
191  // This additional first line offset is used for the text formatting.
192  // It is NOT used for the determination of printing area.
194 
196  std::unique_ptr<sw::MergedPara> m_pMergedPara;
197 
198  TextFrameIndex mnOffset; // Is the offset in the Content (character count)
199 
200  sal_uInt16 mnCacheIndex; // Index into the cache, USHRT_MAX if there's definitely no fitting object in the cache
201 
202  // Separates the Master and creates a Follow or adjusts the data in the Follow
203  void AdjustFollow_( SwTextFormatter &rLine, TextFrameIndex nOffset,
204  TextFrameIndex nStrEnd, const sal_uInt8 nMode );
205 
206  // Iterates all Lines and sets the line spacing using the attribute
207  void CalcLineSpace();
208 
209  // Only called in Format
210  void AdjustFrame( const SwTwips nChgHeight, bool bHasToFit = false );
211 
212  // Evaluates the Preps in Format()
213  bool CalcPreps();
214  void PrepWidows( const sal_uInt16 nNeed, bool bNotify );
215  void InvalidateRange_( const SwCharRange &, const tools::Long = 0);
216  inline void InvalidateRange( const SwCharRange &, const tools::Long = 0);
217 
218  // WidowsAndOrphans, AdjustFrame, AdjustFollow
219  void FormatAdjust( SwTextFormatter &rLine, WidowsAndOrphans &rFrameBreak,
220  TextFrameIndex nStrLen, const bool bDummy );
221  void ChangeOffset( SwTextFrame* pFrame, TextFrameIndex nNew );
222 
223  bool mbLocked : 1; // In the Format?
224  bool mbWidow : 1; // Is our follow a Widow?
225  bool mbJustWidow : 1; // Did we just request Widow flag on master?
226  bool mbEmpty : 1; // Are we an empty paragraph?
227  bool mbInFootnoteConnect : 1; // Is in Connect at the moment
228  bool mbFootnote : 1; // Has at least one footnote
229  bool mbRepaint : 1; // TextFrame: Repaint is ready to be fetched
231  bool mbHasRotatedPortions : 1;
232  bool mbFieldFollow : 1; // Start with Field rest of the Master
233  bool mbHasAnimation : 1; // Contains animated SwGrfNumPortion
234  bool mbIsSwapped : 1; // during text formatting we swap the
235  // width and height for vertical formatting
236  // OD 14.03.2003 #i11760# - flag to control, if follow is formatted in
237  // method <CalcFollow(..)>.
238  // E.g., avoid formatting of follow, if method <SwLayoutFrame::FormatWidthCols(..)>
239  // is running.
240  bool mbFollowFormatAllowed : 1;
241 
242  void ResetPreps();
243  void Lock() { mbLocked = true; }
244  void Unlock() { mbLocked = false; }
245  void SetWidow( const bool bNew ) { mbWidow = bNew; }
246  void SetJustWidow( const bool bNew ) { mbJustWidow = bNew; }
247  void SetEmpty( const bool bNew ) { mbEmpty = bNew; }
248  void SetFieldFollow( const bool bNew ) { mbFieldFollow = bNew; }
249 
250  bool IsIdxInside(TextFrameIndex nPos, TextFrameIndex nLen) const;
251 
252  // Changes the Frame or not (cf. FlyCnt)
253  bool GetModelPositionForViewPoint_(SwPosition *pPos, const Point &rPoint,
254  const bool bChgFrame, SwCursorMoveState* = nullptr ) const;
255  void FillCursorPos( SwFillData &rFill ) const;
256 
257  // Format exactly one Line
258  bool FormatLine( SwTextFormatter &rLine, const bool bPrev );
259 
260  // In order to safe stack space, we split this method:
261  // Format_ calls Format_ with parameters
262  void Format_( vcl::RenderContext* pRenderContext, SwParaPortion *pPara );
263  void Format_( SwTextFormatter &rLine, SwTextFormatInfo &rInf,
264  const bool bAdjust = false );
265  void FormatOnceMore( SwTextFormatter &rLine, SwTextFormatInfo &rInf );
266 
267  // Formats the Follow and ensures disposing on orphans
268  bool CalcFollow(TextFrameIndex nTextOfst);
269 
270  virtual void MakePos() override;
271 
272  // Corrects the position from which we need to format
273  static TextFrameIndex FindBrk(const OUString &rText, TextFrameIndex nStart,
274  TextFrameIndex nEnd);
275 
276  // inline branch
277  SwTwips GetFootnoteFrameHeight_() const;
278 
279  // Outsourced to CalcPreps
280  bool CalcPrepFootnoteAdjust();
281 
282  // For Footnote and WidOrp: Forced validation
283  void ValidateFrame();
284  void ValidateBodyFrame();
285 
286  bool GetDropRect_( SwRect &rRect ) const;
287 
288  void SetPara( SwParaPortion *pNew, bool bDelete = true );
289 
290  bool IsFootnoteNumFrame_() const;
291 
292  // Refresh formatting information
293  bool FormatQuick( bool bForceQuickFormat );
294 
295  // Opt: Format empty paragraphs
296  bool FormatEmpty();
297  SwTwips EmptyHeight() const;
298 
299  // Opt: Paint empty paragraphs
300  bool PaintEmpty( const SwRect &, bool bCheck ) const;
301 
302  void ChgThisLines(); // Must always be called if the Line count could have changed
303 
304  // required for 'new' relative anchor position
305  void CalcBaseOfstForFly();
306 
318  void CalcHeightOfLastLine( const bool _bUseFont = false );
319 
320  virtual void DestroyImpl() override;
321  virtual ~SwTextFrame() override;
322 
323  void UpdateOutlineContentVisibilityButton(SwWrtShell* pWrtSh) const;
324  void PaintOutlineContentVisibilityButton() const;
325 
326  virtual void SwClientNotify(SwModify const& rModify, SfxHint const& rHint) override;
327 
328 public:
329 
330  virtual const SvxFormatBreakItem& GetBreakItem() const override;
331  virtual const SwFormatPageDesc& GetPageDescItem() const override;
332 
333  css::uno::Sequence< css::style::TabStop > GetTabStopInfo( SwTwips CurrentPos ) override;
334 
339  void Init();
340 
342  SwRect AutoSpell_(SwTextNode &, sal_Int32);
343 
345  SwRect SmartTagScan(SwTextNode &);
346 
348  void CollectAutoCmplWrds(SwTextNode &, sal_Int32);
349 
356  virtual bool GetCharRect( SwRect& rRect, const SwPosition& rPos,
357  SwCursorMoveState* pCMS = nullptr, bool bAllowFarAway = true ) const override;
358 
360  bool GetAutoPos( SwRect &, const SwPosition& ) const;
361 
382  bool GetTopOfLine( SwTwips& _onTopOfLine,
383  const SwPosition& _rPos ) const;
384 
385  virtual bool FillSelection( SwSelectionList& rList, const SwRect& rRect ) const override;
386 
395  virtual bool GetModelPositionForViewPoint( SwPosition *, Point&,
396  SwCursorMoveState* = nullptr, bool bTestBackground = false ) const override;
397 
402  bool GetKeyCursorOfst(SwPosition *pPos, const Point &rPoint ) const
403  { return GetModelPositionForViewPoint_( pPos, rPoint, false ); }
404 
405  void PaintExtraData( const SwRect & rRect ) const;
406  SwRect GetPaintSwRect();
407  virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&,
408  SwPrintData const*const pPrintData = nullptr ) const override;
409  virtual bool GetInfo( SfxPoolItem & ) const override;
410 
416  virtual bool LeftMargin(SwPaM *) const override;
417  virtual bool RightMargin(SwPaM *, bool bAPI = false) const override;
418 
419  virtual bool UnitUp(SwPaM *, const SwTwips nOffset,
420  bool bSetInReadOnly ) const override;
421  virtual bool UnitDown(SwPaM *, const SwTwips nOffset,
422  bool bSetInReadOnly ) const override;
423  bool UnitUp_(SwPaM *, const SwTwips nOffset,
424  bool bSetInReadOnly ) const;
425  bool UnitDown_(SwPaM *, const SwTwips nOffset,
426  bool bSetInReadOnly ) const;
427 
432  void PrepareVisualMove( TextFrameIndex& nPos, sal_uInt8& nCursorLevel,
433  bool& bRight, bool bInsertCursor );
434 
436  void SplitFrame(TextFrameIndex nTextPos);
437  SwContentFrame *JoinFrame();
438  TextFrameIndex GetOffset() const { return mnOffset; }
439  void SetOffset_(TextFrameIndex nNewOfst);
440  inline void SetOffset (TextFrameIndex nNewOfst);
441  void ManipOfst(TextFrameIndex const nNewOfst) { mnOffset = nNewOfst; }
442  SwTextFrame *GetFrameAtPos ( const SwPosition &rPos);
443  inline const SwTextFrame *GetFrameAtPos ( const SwPosition &rPos) const;
444  SwTextFrame& GetFrameAtOfst(TextFrameIndex nOfst);
446  bool IsEmptyMaster() const
447  { return GetFollow() && !GetFollow()->GetOffset(); }
448 
449  void SetMergedPara(std::unique_ptr<sw::MergedPara> p);
450  sw::MergedPara * GetMergedPara() { return m_pMergedPara.get(); }
451  sw::MergedPara const* GetMergedPara() const { return m_pMergedPara.get(); }
452 
454  const OUString& GetText() const;
455  SwTextNode const* GetTextNodeForParaProps() const;
456  SwTextNode const* GetTextNodeForFirstText() const;
458  { return const_cast<SwTextNode*>(const_cast<SwTextFrame const*>(this)->GetTextNodeFirst()); };
459  SwTextNode const* GetTextNodeFirst() const;
461  { return const_cast<SwDoc &>(const_cast<SwTextFrame const*>(this)->GetDoc()); }
462  SwDoc const& GetDoc() const;
463 
464  SwTextFrame(SwTextNode * const, SwFrame*, sw::FrameMode eMode);
465 
474  virtual bool Prepare( const PrepareHint ePrep = PrepareHint::Clear,
475  const void *pVoid = nullptr, bool bNotify = true ) override;
476 
482  virtual bool WouldFit( SwTwips &nMaxHeight, bool &bSplit, bool bTst ) override;
483 
490  bool TestFormat( const SwFrame* pPrv, SwTwips &nMaxHeight, bool &bSplit );
491 
496  bool Hyphenate(SwInterHyphInfoTextFrame & rInf);
497 
499  inline SwTwips GrowTst( const SwTwips nGrow );
500 
501  SwParaPortion *GetPara();
502  inline const SwParaPortion *GetPara() const;
503  inline bool HasPara() const;
504  bool HasPara_() const;
505 
507  std::pair<SwTextNode*, sal_Int32> MapViewToModel(TextFrameIndex nIndex) const;
508  SwPosition MapViewToModelPos(TextFrameIndex nIndex) const;
509  TextFrameIndex MapModelToView(SwTextNode const* pNode, sal_Int32 nIndex) const;
510  TextFrameIndex MapModelToViewPos(SwPosition const& rPos) const;
511 
512  // If there are any hanging punctuation portions in the margin
513  // the offset will be returned.
514  SwTwips HangingMargin() const;
515 
516  // Locking
517  bool IsLocked() const { return mbLocked; }
518 
519  bool IsWidow() const { return mbWidow; }
520  bool IsJustWidow() const { return mbJustWidow; }
521  bool IsEmpty() const { return mbEmpty; }
522  bool HasFootnote() const { return mbFootnote; }
523  bool IsInFootnoteConnect()const { return mbInFootnoteConnect;}
524  bool IsFieldFollow() const { return mbFieldFollow;}
525 
526  inline void SetRepaint() const;
527  inline void ResetRepaint() const;
528  bool HasRepaint() const { return mbRepaint; }
529  void SetHasRotatedPortions(bool bHasRotatedPortions);
530  bool GetHasRotatedPortions() const { return mbHasRotatedPortions; }
531  void SetAnimation() const
532  { const_cast<SwTextFrame*>(this)->mbHasAnimation = true; }
533  bool HasAnimation() const { return mbHasAnimation; }
534 
535  bool IsSwapped() const { return mbIsSwapped; }
536 
538 #ifdef DBG_UTIL
539  void CalcFootnoteFlag(TextFrameIndex nStop = TextFrameIndex(COMPLETE_STRING)); //For testing SplitFrame
540 #else
541  void CalcFootnoteFlag();
542 #endif
543 
545  bool IsHiddenNow() const; // bHidden && pOut == pPrt
546  void HideHidden(); // Remove appendage if Hidden
547  void HideFootnotes(TextFrameIndex nStart, TextFrameIndex nEnd);
548 
554  void HideAndShowObjects();
555 
557  void RemoveFootnote(TextFrameIndex nStart,
559  inline SwTwips GetFootnoteFrameHeight() const;
560  SwTextFrame *FindFootnoteRef( const SwTextFootnote *pFootnote );
561  const SwTextFrame *FindFootnoteRef( const SwTextFootnote *pFootnote ) const
562  { return const_cast<SwTextFrame *>(this)->FindFootnoteRef( pFootnote ); }
563  void ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadLine );
564 
569  SwTwips GetFootnoteLine( const SwTextFootnote *pFootnote ) const;
570 
571  TextFrameIndex GetDropLen(TextFrameIndex nWishLen) const;
572 
573  LanguageType GetLangOfChar(TextFrameIndex nIndex, sal_uInt16 nScript,
574  bool bNoChar = false) const;
575 
576  virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override;
577  virtual void CheckDirection( bool bVert ) override;
578 
580  sal_uInt32 GetParHeight() const;
581 
582  inline SwTextFrame *GetFollow();
583  inline const SwTextFrame *GetFollow() const;
584 
586  SwTextFrame *FindQuoVadisFrame();
587 
596  SwTextFrame* GetFormatted( bool bForceQuickFormat = false );
597 
599  void SetFootnote( const bool bNew ) { mbFootnote = bNew; }
600 
602  inline bool IsInside(TextFrameIndex nPos) const;
603 
605  bool GetDropRect( SwRect &rRect ) const
606  { return HasPara() && GetDropRect_( rRect ); }
607 
608  static SwCache *GetTextCache() { return s_pTextCache; }
609  static void SetTextCache( SwCache *pNew ) { s_pTextCache = pNew; }
610 
611  static tools::Long GetMinPrtLine() { return nMinPrtLine; }
612 
613  sal_uInt16 GetCacheIdx() const { return mnCacheIndex; }
614  void SetCacheIdx( const sal_uInt16 nNew ) { mnCacheIndex = nNew; }
615 
617  void ClearPara();
619  void RemoveFromCache();
620 
622  bool IsFootnoteNumFrame() const
623  { return IsInFootnote() && !GetIndPrev() && IsFootnoteNumFrame_(); }
624 
629  SwTwips CalcFitToContent();
630 
637  void CalcAdditionalFirstLineOffset();
638 
640  {
641  return mnAdditionalFirstLineOffset;
642  }
643 
649  tools::Long GetLineSpace( const bool _bNoPropLineSpacing = false ) const;
650 
652  sal_uInt16 FirstLineHeight() const;
653 
655  void MoveFlyInCnt(SwTextFrame *pNew, TextFrameIndex nStart, TextFrameIndex nEnd);
656 
658  TextFrameIndex CalcFlyPos( SwFrameFormat const * pSearch );
659 
661  bool FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff );
662 
664  sal_uInt16 GetLineCount(TextFrameIndex nPos);
665 
667  sal_uLong GetAllLines() const { return mnAllLines; }
668  sal_uLong GetThisLines() const { return mnThisLines;}
669  void RecalcAllLines();
670 
672  void StopAnimation( const OutputDevice *pOut );
673 
675  void VisitPortions( SwPortionHandler& rPH ) const;
676 
678  const SwScriptInfo* GetScriptInfo() const;
679 
681  void SwapWidthAndHeight();
682 
687  void SwitchHorizontalToVertical( SwRect& rRect ) const;
688 
693  void SwitchHorizontalToVertical( Point& rPoint ) const;
694 
699  tools::Long SwitchHorizontalToVertical( tools::Long nLimit ) const;
700 
705  void SwitchVerticalToHorizontal( SwRect& rRect ) const;
706 
711  void SwitchVerticalToHorizontal( Point& rPoint ) const;
712 
717  tools::Long SwitchVerticalToHorizontal( tools::Long nLimit ) const;
718 
723  void SwitchLTRtoRTL( SwRect& rRect ) const;
724 
729  void SwitchLTRtoRTL( Point& rPoint ) const;
730 
735  void SwitchRTLtoLTR( SwRect& rRect ) const { SwitchLTRtoRTL( rRect ); }
736 
741  void SwitchRTLtoLTR( Point& rPoint ) const { SwitchLTRtoRTL( rPoint ); };
742 
743  bool FollowFormatAllowed() const
744  {
745  return mbFollowFormatAllowed;
746  }
747 
749  {
750  mbFollowFormatAllowed = true;
751  }
752 
754  {
755  mbFollowFormatAllowed = false;
756  }
757 
758  SwTwips GetBaseOffsetForFly( bool bIgnoreFlysAnchoredAtThisFrame ) const
759  {
760  return ( bIgnoreFlysAnchoredAtThisFrame ?
761  mnFlyAnchorOfst :
762  mnFlyAnchorOfstNoWrap );
763  }
764 
765  SwTwips GetBaseVertOffsetForFly(bool bIgnoreFlysAnchoredAtThisFrame) const;
766 
768  {
769  return mnHeightOfLastLine;
770  }
771 
772  static void repaintTextFrames( const SwTextNode& rNode );
773 
774  void RegisterToNode(SwTextNode &, bool isForceNodeAsFirst = false);
775 
776  bool IsSymbolAt(TextFrameIndex) const;
777  OUString GetCurWord(SwPosition const&) const;
778  sal_uInt16 GetScalingOfSelectedText(TextFrameIndex nStt, TextFrameIndex nEnd);
779 
780  virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const override;
781 };
782 
783 //use this to protect a SwTextFrame for a given scope from getting merged with
784 //its neighbour and thus deleted
786 {
787 private:
790 public:
791  //Lock pFrame for the lifetime of the Cut/Paste call, etc. to avoid
792  //SwTextFrame::AdjustFollow_ removing the pFrame we're trying to Make
794  {
795  m_pTextFrame = pFrame->IsTextFrame() ? static_cast<SwTextFrame*>(pFrame) : nullptr;
796  if (m_pTextFrame)
797  {
798  m_bOldLocked = m_pTextFrame->IsLocked();
799  m_pTextFrame->Lock();
800  }
801  else
802  {
803  m_bOldLocked = false;
804  }
805  }
806 
808  {
809  if (m_pTextFrame && !m_bOldLocked)
810  m_pTextFrame->Unlock();
811  }
812 };
813 
814 inline const SwParaPortion *SwTextFrame::GetPara() const
815 {
816  return const_cast<SwTextFrame*>(this)->GetPara();
817 }
818 
819 inline bool SwTextFrame::HasPara() const
820 {
821  return mnCacheIndex!=USHRT_MAX && HasPara_();
822 }
823 
824 inline SwTwips SwTextFrame::GrowTst( const SwTwips nGrow )
825 {
826  return Grow( nGrow, true );
827 }
828 
829 inline bool SwTextFrame::IsInside(TextFrameIndex const nPos) const
830 {
831  bool bRet = true;
832  if( nPos < GetOffset() )
833  bRet = false;
834  else
835  {
836  const SwTextFrame *pFoll = GetFollow();
837  if( pFoll && nPos >= pFoll->GetOffset() )
838  bRet = false;
839  }
840  return bRet;
841 }
842 
844 {
845  if( !IsFollow() && IsInFootnote() && HasPara() )
846  return GetFootnoteFrameHeight_();
847  else
848  return 0;
849 }
850 
851 inline const SwTextFrame *SwTextFrame::GetFollow() const
852 {
853  return static_cast<const SwTextFrame*>(SwContentFrame::GetFollow());
854 }
856 {
857  return static_cast<SwTextFrame*>(SwContentFrame::GetFollow());
858 }
859 
860 inline const SwTextFrame *SwTextFrame::GetFrameAtPos( const SwPosition &rPos) const
861 {
862  return const_cast<SwTextFrame*>(this)->GetFrameAtPos( rPos );
863 }
864 
865 inline void SwTextFrame::SetOffset(TextFrameIndex const nNewOfst)
866 {
867  if ( mnOffset != nNewOfst )
868  SetOffset_( nNewOfst );
869 }
870 
871 inline void SwTextFrame::SetRepaint() const
872 {
873  const_cast<SwTextFrame*>(this)->mbRepaint = true;
874 }
875 inline void SwTextFrame::ResetRepaint() const
876 {
877  const_cast<SwTextFrame*>(this)->mbRepaint = false;
878 }
879 
881 protected:
882  explicit TemporarySwap(SwTextFrame * frame, bool swap):
883  m_frame(frame), m_undo(false)
884  {
885  if (m_frame->IsVertical() && swap) {
886  m_undo = true;
888  }
889  }
890 
892  if (m_undo) {
894  }
895  }
896 
897 private:
898  TemporarySwap(TemporarySwap const &) = delete;
899  void operator =(TemporarySwap const &) = delete;
900 
902  bool m_undo;
903 };
904 
906 public:
907  explicit SwSwapIfSwapped(SwTextFrame* frame):
908  TemporarySwap(frame, frame->IsSwapped()) {}
909 };
910 
912 public:
913  explicit SwSwapIfNotSwapped(SwTextFrame* frame):
914  TemporarySwap(frame, !frame->IsSwapped()) {}
915 };
916 
922 {
924  bool bUndo;
925 public:
926  SwFrameSwapper( const SwTextFrame* pFrame, bool bSwapIfNotSwapped );
927  ~SwFrameSwapper();
928 };
929 
931 {
934 public:
935  SwLayoutModeModifier( const OutputDevice& rOutp );
937  void Modify( bool bChgToRTL );
938  void SetAuto();
939 };
940 
942 {
945 public:
946  SwDigitModeModifier( const OutputDevice& rOutp, LanguageType eCurLang );
948 };
949 
950 namespace sw {
951 
957 {
959  std::vector<Extent> extents;
962  OUString mergedText;
969  MergedPara(SwTextFrame & rFrame, std::vector<Extent>&& rExtents,
970  OUString const& rText,
971  SwTextNode *const pProps, SwTextNode *const pFirst,
972  SwTextNode const*const pLast)
973  : listener(rFrame), extents(std::move(rExtents)), mergedText(rText)
974  , pParaPropsNode(pProps), pFirstNode(pFirst), pLastNode(pLast)
975  {
976  assert(pParaPropsNode);
977  assert(pFirstNode);
978  assert(pLastNode);
979  }
980 };
981 
984 {
985 protected:
986 #if BOOST_VERSION < 105600
989 #else
990  sw::MergedPara const*const m_pMerged;
991  SwTextNode const*const m_pNode;
992 #endif
995  MergedAttrIterBase(SwTextFrame const& rFrame);
996 };
997 
999  : public MergedAttrIterBase
1000 {
1001 public:
1002  MergedAttrIter(SwTextFrame const& rFrame) : MergedAttrIterBase(rFrame) {}
1003  SwTextAttr const* NextAttr(SwTextNode const** ppNode = nullptr);
1004 };
1005 
1007 {
1008 private:
1009  std::vector<std::pair<SwTextNode const*, SwTextAttr const*>> m_Hints;
1010  SwTextNode const*const m_pNode;
1012 public:
1013  MergedAttrIterByEnd(SwTextFrame const& rFrame);
1014  SwTextAttr const* NextAttr(SwTextNode const*& rpNode);
1015  void PrevAttr();
1016 };
1017 
1019  : public MergedAttrIterBase
1020 {
1021 public:
1022  MergedAttrIterReverse(SwTextFrame const& rFrame);
1023  SwTextAttr const* PrevAttr(SwTextNode const** ppNode = nullptr);
1024 };
1025 
1026 
1028 
1029 } // namespace sw
1030 
1031 #endif
1032 
1033 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Recreate
Definition: txtfrm.hxx:128
void CheckResetRedlineMergeFlag(SwTextNode &rNode, Recreate eRecreateMerged)
if first node is First, its frames may need to be moved, never deleted.
Definition: ndtxt.cxx:837
Base class of the Writer layout elements.
Definition: frame.hxx:315
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:158
bool IsMarkHintHidden(SwRootFrame const &rLayout, SwTextNode const &rNode, SwTextAttrEnd const &rHint)
Definition: reffld.cxx:1113
LanguageType nOldLanguageType
Definition: txtfrm.hxx:944
void AllowFollowFormat()
Definition: txtfrm.hxx:748
bool IsFollow() const
Definition: flowfrm.hxx:166
SwInterHyphInfoTextFrame(SwTextFrame const &rFrame, SwTextNode const &rNode, SwInterHyphInfo const &rHyphInfo)
Definition: txtedt.cxx:1603
MergedAttrIter(SwTextFrame const &rFrame)
Definition: txtfrm.hxx:1002
Marks a position in the document model.
Definition: pam.hxx:35
void UpdateFramesForAddDeleteRedline(SwDoc &rDoc, SwPaM const &rPam)
void MoveDeletedPrevFrames(const SwTextNode &rDeletedPrev, SwTextNode &rNode)
if first node is deleted & second survives, then the first node's frame will be deleted too; prevent this...
Definition: ndtxt.cxx:797
SwTextNode const & GetAttrMerged(SfxItemSet &rFormatSet, SwTextNode const &rNode, SwRootFrame const *pLayout)
Definition: txtfrm.cxx:371
void Init()
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
Definition: fmtpdsc.hxx:35
bool FollowFormatAllowed() const
Definition: txtfrm.hxx:743
SwTwips Grow(SwTwips, bool bTst=false, bool bInfo=false)
Definition: wsfrm.cxx:1502
const SwTwips WIDOW_MAGIC
Definition: txtfrm.hxx:1027
SwDigitModeModifier(const OutputDevice &rOutp, LanguageType eCurLang)
Definition: txtfrm.cxx:726
const OutputDevice & rOut
Definition: txtfrm.hxx:943
bool IsSwapped() const
Definition: txtfrm.hxx:535
void SwitchRTLtoLTR(Point &rPoint) const
Calculates the coordinates of a point when switching from RTL to LTR layout.
Definition: txtfrm.hxx:741
MergedPara(SwTextFrame &rFrame, std::vector< Extent > &&rExtents, OUString const &rText, SwTextNode *const pProps, SwTextNode *const pFirst, SwTextNode const *const pLast)
Definition: txtfrm.hxx:969
bool GetHasRotatedPortions() const
Definition: txtfrm.hxx:530
static void SetTextCache(SwCache *pNew)
Definition: txtfrm.hxx:609
bool HasPara() const
Definition: txtfrm.hxx:819
bool IsInFootnote() const
Definition: frame.hxx:950
virtual bool Prepare(const PrepareHint ePrep=PrepareHint::Clear, const void *pVoid=nullptr, bool bNotify=true)
Definition: wsfrm.cxx:596
sal_uIntPtr sal_uLong
long Long
SwTwips mnFootnoteLine
Definition: txtfrm.hxx:185
void UpdateTextNodeHyphInfo(SwTextFrame const &rFrame, SwTextNode const &rNode, SwInterHyphInfo &o_rHyphInfo)
Definition: txtedt.cxx:1613
TextFrameIndex mnOffset
Definition: txtfrm.hxx:198
The SwPortionHandler interface implements a visitor for the layout engine's text portions.
Extent(SwTextNode *const p, sal_Int32 const s, sal_Int32 const e)
Definition: txtfrm.hxx:89
sw::MergedPara * GetMergedPara()
Definition: txtfrm.hxx:450
bool IsEmptyMaster() const
If there's a Follow and we don't contain text ourselves.
Definition: txtfrm.hxx:446
Definition: doc.hxx:188
SwParaPortion * GetPara()
Definition: txtcache.cxx:90
SwTextAttr const * PrevAttr(SwTextNode const **ppNode=nullptr)
Definition: txtfrm.cxx:226
SwSwapIfNotSwapped(SwTextFrame *frame)
Definition: txtfrm.hxx:913
bool IsMarkHidden(SwRootFrame const &rLayout,::sw::mark::IMark const &rMark)
Definition: crbm.cxx:127
This class is used as parameter for creation of a block cursor selection.
void SetAnimation() const
Definition: txtfrm.hxx:531
Dialog to specify the properties of date form field.
TemporarySwap(SwTextFrame *frame, bool swap)
Definition: txtfrm.hxx:882
Of course Writer needs its own rectangles.
Definition: swrect.hxx:34
virtual const SvxFormatBreakItem & GetBreakItem() const
Definition: findfrm.cxx:657
virtual const SwFormatPageDesc & GetPageDescItem() const
Definition: findfrm.cxx:662
bool IsInside(TextFrameIndex nPos) const
Respect the Follows.
Definition: txtfrm.hxx:829
virtual bool LeftMargin(SwPaM *) const =0
The root element of a Writer document layout.
Definition: rootfrm.hxx:82
SwTextNode * pNode
Definition: txtfrm.hxx:86
Collection of SwLineLayout instances, represents the paragraph text in Writer layout.
Definition: porlay.hxx:249
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
Definition: wsfrm.cxx:2339
SwTextAttr const * NextAttr(SwTextNode const **ppNode=nullptr)
Definition: txtfrm.cxx:89
static SwCache * GetTextCache()
Definition: txtfrm.hxx:608
void SetJustWidow(const bool bNew)
Definition: txtfrm.hxx:246
SwTwips GetFootnoteFrameHeight() const
Definition: txtfrm.hxx:843
bool mbRepaint
Definition: txtfrm.hxx:229
virtual bool GetModelPositionForViewPoint(SwPosition *, Point &, SwCursorMoveState *=nullptr, bool bTestBackground=false) const
Definition: unusedf.cxx:47
Used by the UI to modify the document model.
Definition: wrtsh.hxx:93
TextFrameLockGuard(SwFrame *pFrame)
Definition: txtfrm.hxx:793
std::vector< std::pair< SwTextNode const *, SwTextAttr const * > > m_Hints
Definition: txtfrm.hxx:1009
bool GetKeyCursorOfst(SwPosition *pPos, const Point &rPoint) const
Makes sure that the Frame is not switched (e.g.
Definition: txtfrm.hxx:402
TextFrameIndex m_nWordStart
output: found word
Definition: txtfrm.hxx:64
sw::WriterMultiListener listener
Definition: txtfrm.hxx:958
A wrapper around SfxPoolItem to store the start position of (usually) a text portion, with an optional end.
Definition: txatbase.hxx:41
sal_uLong GetThisLines() const
Definition: txtfrm.hxx:668
SwTwips GrowTst(const SwTwips nGrow)
Test grow.
Definition: txtfrm.hxx:824
std::unique_ptr< sw::MergedPara > CheckParaRedlineMerge(SwTextFrame &rFrame, SwTextNode &rTextNode, FrameMode eMode)
Definition: redlnitr.cxx:205
void Lock()
Definition: txtfrm.hxx:243
sal_Int32 nEnd
Definition: txtfrm.hxx:88
bool IsTextFrame() const
Definition: frame.hxx:1235
sal_uInt16 GetCacheIdx() const
Definition: txtfrm.hxx:613
sal_uInt16 mnCacheIndex
Definition: txtfrm.hxx:200
virtual bool UnitUp(SwPaM *, const SwTwips nOffset, bool bSetInReadOnly) const
Definition: trvlfrm.cxx:966
TextFrameIndex UpdateMergedParaForDelete(MergedPara &rMerged, bool isRealDelete, SwTextNode const &rNode, sal_Int32 nIndex, sal_Int32 nLen)
Definition: txtfrm.cxx:1034
const SwTextFrame * pFrame
Definition: txtfrm.hxx:923
const OutputDevice & m_rOut
Definition: txtfrm.hxx:932
void AddRemoveFlysAnchoredToFrameStartingAtNode(SwTextFrame &rFrame, SwTextNode &rTextNode, std::set< sal_uLong > *pSkipped)
rTextNode is the first one of the "new" merge - if rTextNode isn't the same as MergedPara::pFirstNode...
Definition: wsfrm.cxx:4268
Describes parts of multiple text nodes, which will form a text frame, even when redlines are hidden a...
Definition: txtfrm.hxx:956
virtual bool FillSelection(SwSelectionList &rList, const SwRect &rRect) const
Definition: unusedf.cxx:41
void GotoNextLayoutTextFrame(SwNodeIndex &rIndex, SwRootFrame const *const pLayout)
Definition: docnum.cxx:1472
virtual bool UnitDown(SwPaM *, const SwTwips nOffset, bool bSetInReadOnly) const
Definition: trvlfrm.cxx:971
void SetRepaint() const
Definition: txtfrm.hxx:871
TextFrameIndex m_nEnd
Definition: txtfrm.hxx:62
SwTextFrame * GetFollow()
Definition: txtfrm.hxx:855
TextFrameIndex GetOffset() const
Definition: txtfrm.hxx:438
virtual bool GetCharRect(SwRect &, const SwPosition &, SwCursorMoveState *=nullptr, bool bAllowFarAway=true) const
Definition: unusedf.cxx:72
FrameMode
Definition: txtfrm.hxx:103
std::vector< Extent > extents
Definition: txtfrm.hxx:959
bool IsEmpty() const
Definition: txtfrm.hxx:521
Describes a part of a single text node, which will be part of a text frame, even when redlines are hi...
Definition: txtfrm.hxx:84
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:136
SwTextNode * GetTextNodeFirst()
Definition: txtfrm.hxx:457
struct _xmlTextWriter * xmlTextWriterPtr
bool FrameContainsNode(SwContentFrame const &rFrame, sal_uLong nNodeIndex)
Definition: txtfrm.cxx:288
SwTwips mnFlyAnchorOfst
Definition: txtfrm.hxx:180
Style of a layout element.
Definition: frmfmt.hxx:59
bool IsWidow() const
Definition: txtfrm.hxx:519
OUString GetExpandTextMerged(SwRootFrame const *const pLayout, SwTextNode const &rNode, bool const bWithNumber, bool const bWithSpacesForLevel, ExpandMode const i_mode)
PrepareHint
Definition: swtypes.hxx:194
#define SAL_MAX_INT32
virtual css::uno::Sequence< css::style::TabStop > GetTabStopInfo(SwTwips)
Definition: frame.hxx:514
SwFrame * GetIndPrev() const
Definition: frame.hxx:725
const SwContentFrame * GetFollow() const
Definition: cntfrm.hxx:131
virtual void PaintSwFrame(vcl::RenderContext &rRenderContext, SwRect const &, SwPrintData const *const pPrintData=nullptr) const
Definition: unusedf.cxx:30
ComplexTextLayoutFlags
sal_uLong GetAllLines() const
For displaying the line numbers.
Definition: txtfrm.hxx:667
Helper class which can be used instead of the macros if a function has too many returns.
Definition: txtfrm.hxx:921
void Unlock()
Definition: txtfrm.hxx:244
bool IsInFootnoteConnect() const
Definition: txtfrm.hxx:523
TextFrameIndex MapModelToView(MergedPara const &, SwTextNode const *pNode, sal_Int32 nIndex)
Definition: txtfrm.cxx:1185
SwTextFrame * GetFrameAtPos(const SwPosition &rPos)
Definition: frmcrsr.cxx:151
void ManipOfst(TextFrameIndex const nNewOfst)
Definition: txtfrm.hxx:441
iterate SwTextAttr in potentially merged text frame
Definition: txtfrm.hxx:983
std::pair< SwTextNode *, sal_Int32 > MapViewToModel(MergedPara const &, TextFrameIndex nIndex)
Definition: txtfrm.cxx:1166
void SetOffset_(TextFrameIndex nNewOfst)
Definition: frmform.cxx:758
SwTextNode * pParaPropsNode
most paragraph properties are taken from the first non-empty node
Definition: txtfrm.hxx:964
css::uno::Reference< css::linguistic2::XHyphenatedWord > m_xHyphWord
output: hyphenated word
Definition: txtfrm.hxx:58
void Modify(bool bChgToRTL)
Definition: txtfrm.cxx:713
Marks a node in the document model.
Definition: ndindex.hxx:31
virtual void Format(vcl::RenderContext *pRenderContext, const SwBorderAttrs *pAttrs=nullptr)
Definition: unusedf.cxx:25
SwTwips GetFootnoteFrameHeight_() const
Calculates the maximum reachable height for the TextFrame in the Footnote Area.
Definition: txtftn.cxx:306
void MoveMergedFlysAndFootnotes(std::vector< SwTextFrame * > const &rFrames, SwTextNode const &rFirstNode, SwTextNode &rSecondNode, bool)
Definition: ndtxt.cxx:361
OUString mergedText
note: cannot be const currently to avoid UB because SwTextGuess::Guess const_casts it and modifies it...
Definition: txtfrm.hxx:962
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
virtual bool RightMargin(SwPaM *, bool bAPI=false) const =0
bool IsLocked() const
Definition: txtfrm.hxx:517
SwTextFrame * MakeTextFrame(SwTextNode &rNode, SwFrame *, sw::FrameMode eMode)
Definition: txtfrm.cxx:800
tools::Long SwTwips
Definition: swtypes.hxx:52
SwTextNode * GetParaPropsNode(SwRootFrame const &rLayout, SwNodeIndex const &rNode)
Definition: txtfrm.cxx:328
MergedAttrIterByEnd(SwTextFrame const &rFrame)
Definition: txtfrm.cxx:149
virtual void CheckDirection(bool bVert)
Definition: wsfrm.cxx:388
SwPosition GetParaPropsPos(SwRootFrame const &rLayout, SwPosition const &rPos)
Definition: txtfrm.cxx:342
SwTextFrame * m_pTextFrame
Definition: txtfrm.hxx:788
static tools::Long GetMinPrtLine()
Definition: txtfrm.hxx:611
bool IsFootnoteNumFrame() const
Am I a FootnoteFrame, with a number at the start of the paragraph?
Definition: txtfrm.hxx:622
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
bool GetDropRect(SwRect &rRect) const
DropCaps and selections.
Definition: txtfrm.hxx:605
ExpandMode
Some helpers for converting model strings to view strings.
SwSwapIfSwapped(SwTextFrame *frame)
Definition: txtfrm.hxx:907
sw::MergedPara const * GetMergedPara() const
Definition: txtfrm.hxx:451
void SwitchRTLtoLTR(SwRect &rRect) const
Calculates the coordinates of a rectangle when switching from RTL to LTR layout.
Definition: txtfrm.hxx:735
SwTwips mnAdditionalFirstLineOffset
Definition: txtfrm.hxx:193
void SetOffset(TextFrameIndex nNewOfst)
Definition: txtfrm.hxx:865
virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const
Definition: xmldump.cxx:524
void RecreateStartTextFrames(SwTextNode &rNode)
Definition: frmtool.cxx:1403
void UpdateFramesForRemoveDeleteRedline(SwDoc &rDoc, SwPaM const &rPam)
SwTextFrame * m_frame
Definition: txtfrm.hxx:901
unsigned char sal_uInt8
void operator=(TemporarySwap const &)=delete
void SetFootnote(const bool bNew)
Will be moved soon.
Definition: txtfrm.hxx:599
void ResetRepaint() const
Definition: txtfrm.hxx:875
SwTextNode const *const m_pNode
Definition: txtfrm.hxx:1010
MergedAttrIterBase(SwTextFrame const &rFrame)
Definition: txtfrm.cxx:81
void ForbidFollowFormat()
Definition: txtfrm.hxx:753
void SetFieldFollow(const bool bNew)
Definition: txtfrm.hxx:248
SwTwips GetHeightOfLastLine() const
Definition: txtfrm.hxx:767
void SwapWidthAndHeight()
Swaps width and height of the text frame.
Definition: txtfrm.cxx:422
sw::MergedPara const * m_pMerged
Definition: txtfrm.hxx:987
SwTwips mnFlyAnchorOfstNoWrap
Definition: txtfrm.hxx:182
SwTwips GetAdditionalFirstLineOffset() const
Definition: txtfrm.hxx:639
std::unique_ptr< sw::MergedPara > m_pMergedPara
redline merge data
Definition: txtfrm.hxx:196
TextFrameIndex m_nStart
input: requested range to hyphenate
Definition: txtfrm.hxx:61
virtual bool WouldFit(SwTwips &nMaxHeight, bool &bSplit, bool bTst)
Definition: unusedf.cxx:35
sal_Int32 nStart
Definition: txtfrm.hxx:87
bool HasAnimation() const
Definition: txtfrm.hxx:533
MergedAttrIterReverse(SwTextFrame const &rFrame)
Definition: txtfrm.cxx:201
bool IsParaPropsNode(SwRootFrame const &rLayout, SwTextNode const &rNode)
Definition: txtfrm.cxx:311
void SetWidow(const bool bNew)
Definition: txtfrm.hxx:245
a clone of SwInterHyphInfo, but with TextFrameIndex instead of node index
Definition: txtfrm.hxx:54
virtual bool GetInfo(SfxPoolItem &) const
Definition: calbck.hxx:172
constexpr sal_Int32 COMPLETE_STRING
Definition: swtypes.hxx:58
void GotoPrevLayoutTextFrame(SwNodeIndex &rIndex, SwRootFrame const *const pLayout)
Definition: docnum.cxx:1444
SwTextNode const * pLastNode
mainly for sanity checks
Definition: txtfrm.hxx:968
bool IsVertical() const
Definition: frame.hxx:974
SwTextAttr const * NextAttr(SwTextNode const *&rpNode)
Definition: txtfrm.cxx:164
SwDoc & GetDoc()
Definition: txtfrm.hxx:460
SwTwips mnHeightOfLastLine
Definition: txtfrm.hxx:188
void SetCacheIdx(const sal_uInt16 nNew)
Definition: txtfrm.hxx:614
Small Helper class: Prepares a test format.
Definition: txtfrm.cxx:3117
SwTextNode *const pFirstNode
except break attributes, those are taken from the first node
Definition: txtfrm.hxx:966
SwTwips mnFlyAnchorVertOfstNoWrap
The y position for wrap-through flys anchored at this paragraph.
Definition: txtfrm.hxx:184
virtual void MakePos()
Definition: calcmove.cxx:539
static SwCache * s_pTextCache
SwLineLayout cache: the lines are not actually owned by the SwTextFrame but by this SwCache...
Definition: txtfrm.hxx:171
bool IsFieldFollow() const
Definition: txtfrm.hxx:524
bool sw_ChangeOffset(SwTextFrame *pFrame, TextFrameIndex nNew)
Definition: frmcrsr.cxx:108
void SetEmpty(const bool bNew)
Definition: txtfrm.hxx:247
bool HasPara_() const
Definition: txtcache.cxx:75
o3tl::strong_int< sal_Int32, struct Tag_TextFrameIndex > TextFrameIndex
Denotes a character index in a text frame at a layout level, after extent mapping from a text node at...
ComplexTextLayoutFlags m_nOldLayoutMode
Definition: txtfrm.hxx:933
TextFrameIndex m_nWordLen
Definition: txtfrm.hxx:65
bool HasNumberingWhichNeedsLayoutUpdate(const SwTextNode &rTextNode)
Decides if rTextNode has a numbering which has layout-level values (e.g.
Definition: ndtxt.cxx:909
bool IsJustWidow() const
Definition: txtfrm.hxx:520
const SwTextFrame * FindFootnoteRef(const SwTextFootnote *pFootnote) const
Definition: txtfrm.hxx:561
void SetHyphWord(const css::uno::Reference< css::linguistic2::XHyphenatedWord > &xHW)
Definition: txtfrm.hxx:72
std::pair< SwTextNode *, SwTextNode * > GetFirstAndLastNode(SwRootFrame const &rLayout, SwNodeIndex const &rPos)
Definition: txtfrm.cxx:355
virtual void DestroyImpl() override
Definition: ssfrm.cxx:422
SwFrameSwapper(const SwTextFrame *pFrame, bool bSwapIfNotSwapped)
Definition: txtfrm.cxx:669
SwLayoutModeModifier(const OutputDevice &rOutp)
Definition: txtfrm.cxx:703
bool HasRepaint() const
Definition: txtfrm.hxx:528
SwTextNode const * m_pNode
Definition: txtfrm.hxx:988
bool HasFootnote() const
Definition: txtfrm.hxx:522
SwTwips GetBaseOffsetForFly(bool bIgnoreFlysAnchoredAtThisFrame) const
Definition: txtfrm.hxx:758