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 { namespace sun { namespace star { namespace linguistic2 { class XHyphenatedWord; } } } }
29 
30 namespace sw { namespace 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 
50 #define NON_PRINTING_CHARACTER_COLOR Color(0x26, 0x8b, 0xd2)
51 
54 {
55 private:
57  css::uno::Reference<css::linguistic2::XHyphenatedWord> m_xHyphWord;
58 public:
65 
67  SwTextNode const& rNode, SwInterHyphInfo const& rHyphInfo);
68  void UpdateTextNodeHyphInfo(SwTextFrame const& rFrame,
69  SwTextNode const& rNode, SwInterHyphInfo & o_rHyphInfo);
70 
71  void SetHyphWord(const css::uno::Reference<css::linguistic2::XHyphenatedWord> &xHW)
72  {
73  m_xHyphWord = xHW;
74  }
75 };
76 
77 namespace sw {
78 
83 struct Extent
84 {
85  SwTextNode * /*const logically, but need assignment for std::vector*/ pNode;
86  sal_Int32 nStart;
87  sal_Int32 nEnd;
88  Extent(SwTextNode *const p, sal_Int32 const s, sal_Int32 const e)
89  : pNode(p), nStart(s), nEnd(e)
90  {
91  assert(pNode);
92  assert(nStart != nEnd);
93  }
94 };
95 
96 struct MergedPara;
97 
98 std::pair<SwTextNode*, sal_Int32> MapViewToModel(MergedPara const&, TextFrameIndex nIndex);
99 TextFrameIndex MapModelToView(MergedPara const&, SwTextNode const* pNode, sal_Int32 nIndex);
100 
101 // warning: Existing must be used only once; a second use would delete the frame created by the first one...
102 enum class FrameMode { New, Existing };
103 std::unique_ptr<sw::MergedPara> CheckParaRedlineMerge(SwTextFrame & rFrame, SwTextNode & rTextNode, FrameMode eMode);
105 
106 bool FrameContainsNode(SwContentFrame const& rFrame, sal_uLong nNodeIndex);
107 bool IsParaPropsNode(SwRootFrame const& rLayout, SwTextNode const& rNode);
108 SwTextNode * GetParaPropsNode(SwRootFrame const& rLayout, SwNodeIndex const& rNode);
109 SwPosition GetParaPropsPos(SwRootFrame const& rLayout, SwPosition const& rPos);
110 std::pair<SwTextNode *, SwTextNode *>
111 GetFirstAndLastNode(SwRootFrame const& rLayout, SwNodeIndex const& rPos);
112 
113 SwTextNode const& GetAttrMerged(SfxItemSet & rFormatSet,
114  SwTextNode const& rNode, SwRootFrame const* pLayout);
115 
116 void GotoPrevLayoutTextFrame(SwNodeIndex & rIndex, SwRootFrame const* pLayout);
117 void GotoNextLayoutTextFrame(SwNodeIndex & rIndex, SwRootFrame const* pLayout);
118 
119 TextFrameIndex UpdateMergedParaForDelete(MergedPara & rMerged,
120  bool isRealDelete,
121  SwTextNode const& rNode, sal_Int32 nIndex, sal_Int32 nLen);
122 
123 void MoveMergedFlysAndFootnotes(std::vector<SwTextFrame*> const& rFrames,
124  SwTextNode const& rFirstNode, SwTextNode & rSecondNode, bool);
125 
126 void MoveDeletedPrevFrames(const SwTextNode & rDeletedPrev, SwTextNode & rNode);
127 enum class Recreate { No, ThisNode, Predecessor };
128 void CheckResetRedlineMergeFlag(SwTextNode & rNode, Recreate eRecreateMerged);
129 
130 void UpdateFramesForAddDeleteRedline(SwDoc & rDoc, SwPaM const& rPam);
131 void UpdateFramesForRemoveDeleteRedline(SwDoc & rDoc, SwPaM const& rPam);
132 
134  SwTextFrame & rFrame, SwTextNode & rTextNode,
135  std::set<sal_uLong> *pSkipped);
136 
137 OUString GetExpandTextMerged(SwRootFrame const* pLayout,
138  SwTextNode const& rNode, bool bWithNumber,
139  bool bWithSpacesForLevel, ExpandMode i_mode);
140 
141 bool IsMarkHidden(SwRootFrame const& rLayout, ::sw::mark::IMark const& rMark);
142 bool IsMarkHintHidden(SwRootFrame const& rLayout,
143  SwTextNode const& rNode, SwTextAttrEnd const& rHint);
144 
145 } // namespace sw
146 
150 {
151  friend class SwTextIter;
152  friend class SwTestFormat;
153  friend class WidowsAndOrphans;
154  friend class TextFrameLockGuard; // May Lock()/Unlock()
155  friend bool sw_ChangeOffset(SwTextFrame* pFrame, TextFrameIndex nNew);
156 
163  static constexpr long nMinPrtLine = 0; // This Line must not be underrun when printing
164  // Hack for table cells stretching multiple pages
165 
166  sal_uLong mnAllLines :24; // Line count for the Paint (including nThisLines)
167  sal_uLong mnThisLines :8; // Count of Lines of the Frame
168 
169  // The x position for flys anchored at this paragraph.
170  // These values are calculated in SwTextFrame::CalcBaseOfstForFly()
172  // The x position for wrap-through flys anchored at this paragraph.
177  // OD 2004-03-17 #i11860# - re-factoring of #i11859#
178  // member for height of last line (value needed for proportional line spacing)
180  // member for the additional first line offset, which is caused by the list
181  // label alignment for list level position and space mode LABEL_ALIGNMENT.
182  // This additional first line offset is used for the text formatting.
183  // It is NOT used for the determination of printing area.
185 
187  std::unique_ptr<sw::MergedPara> m_pMergedPara;
188 
189  TextFrameIndex mnOffset; // Is the offset in the Content (character count)
190 
191  sal_uInt16 mnCacheIndex; // Index into the cache, USHRT_MAX if there's definitely no fitting object in the cache
192 
193  // Separates the Master and creates a Follow or adjusts the data in the Follow
194  void AdjustFollow_( SwTextFormatter &rLine, TextFrameIndex nOffset,
195  TextFrameIndex nStrEnd, const sal_uInt8 nMode );
196 
197  // Iterates all Lines and sets the line spacing using the attribute
198  void CalcLineSpace();
199 
200  // Only called in Format
201  void AdjustFrame( const SwTwips nChgHeight, bool bHasToFit = false );
202 
203  // Evaluates the Preps in Format()
204  bool CalcPreps();
205  void PrepWidows( const sal_uInt16 nNeed, bool bNotify );
206  void InvalidateRange_( const SwCharRange &, const long = 0);
207  inline void InvalidateRange( const SwCharRange &, const long = 0);
208 
209  // WidowsAndOrphans, AdjustFrame, AdjustFollow
210  void FormatAdjust( SwTextFormatter &rLine, WidowsAndOrphans &rFrameBreak,
211  TextFrameIndex nStrLen, const bool bDummy );
212  void ChangeOffset( SwTextFrame* pFrame, TextFrameIndex nNew );
213 
214  bool mbLocked : 1; // In the Format?
215  bool mbWidow : 1; // Is our follow a Widow?
216  bool mbJustWidow : 1; // Did we just request Widow flag on master?
217  bool mbEmpty : 1; // Are we an empty paragraph?
218  bool mbInFootnoteConnect : 1; // Is in Connect at the moment
219  bool mbFootnote : 1; // Has at least one footnote
220  bool mbRepaint : 1; // TextFrame: Repaint is ready to be fetched
221  bool mbHasBlinkPortions : 1; // Contains Blink Portions
222  bool mbFieldFollow : 1; // Start with Field rest of the Master
223  bool mbHasAnimation : 1; // Contains animated SwGrfNumPortion
224  bool mbIsSwapped : 1; // during text formatting we swap the
225  // width and height for vertical formatting
226  // OD 14.03.2003 #i11760# - flag to control, if follow is formatted in
227  // method <CalcFollow(..)>.
228  // E.g., avoid formatting of follow, if method <SwLayoutFrame::FormatWidthCols(..)>
229  // is running.
230  bool mbFollowFormatAllowed : 1;
231 
232  void ResetPreps();
233  void Lock() { mbLocked = true; }
234  void Unlock() { mbLocked = false; }
235  void SetWidow( const bool bNew ) { mbWidow = bNew; }
236  void SetJustWidow( const bool bNew ) { mbJustWidow = bNew; }
237  void SetEmpty( const bool bNew ) { mbEmpty = bNew; }
238  void SetFieldFollow( const bool bNew ) { mbFieldFollow = bNew; }
239 
240  bool IsIdxInside(TextFrameIndex nPos, TextFrameIndex nLen) const;
241 
242  // Changes the Frame or not (cf. FlyCnt)
243  bool GetCursorOfst_(SwPosition *pPos, const Point &rPoint,
244  const bool bChgFrame, SwCursorMoveState* = nullptr ) const;
245  void FillCursorPos( SwFillData &rFill ) const;
246 
247  // Format exactly one Line
248  bool FormatLine( SwTextFormatter &rLine, const bool bPrev );
249 
250  // In order to safe stack space, we split this method:
251  // Format_ calls Format_ with parameters
252  void Format_( vcl::RenderContext* pRenderContext, SwParaPortion *pPara );
253  void Format_( SwTextFormatter &rLine, SwTextFormatInfo &rInf,
254  const bool bAdjust = false );
255  void FormatOnceMore( SwTextFormatter &rLine, SwTextFormatInfo &rInf );
256 
257  // Formats the Follow and ensures disposing on orphans
258  bool CalcFollow(TextFrameIndex nTextOfst);
259 
260  virtual void MakePos() override;
261 
262  // Corrects the position from which we need to format
263  static TextFrameIndex FindBrk(const OUString &rText, TextFrameIndex nStart,
264  TextFrameIndex nEnd);
265 
266  // inline branch
267  SwTwips GetFootnoteFrameHeight_() const;
268 
269  // Outsourced to CalcPreps
270  bool CalcPrepFootnoteAdjust();
271 
272  // For Footnote and WidOrp: Forced validation
273  void ValidateFrame();
274  void ValidateBodyFrame();
275 
276  bool GetDropRect_( SwRect &rRect ) const;
277 
278  void SetPara( SwParaPortion *pNew, bool bDelete = true );
279 
280  bool IsFootnoteNumFrame_() const;
281 
282  // Refresh formatting information
283  bool FormatQuick( bool bForceQuickFormat );
284 
285  // Opt: Format empty paragraphs
286  bool FormatEmpty();
287  SwTwips EmptyHeight() const;
288 
289  // Opt: Paint empty paragraphs
290  bool PaintEmpty( const SwRect &, bool bCheck ) const;
291 
292  void ChgThisLines(); // Must always be called if the Line count could have changed
293 
294  // required for 'new' relative anchor position
295  void CalcBaseOfstForFly();
296 
308  void CalcHeightOfLastLine( const bool _bUseFont = false );
309 
310  virtual void DestroyImpl() override;
311  virtual ~SwTextFrame() override;
312 
313 protected:
314  virtual void SwClientNotify(SwModify const& rModify, SfxHint const& rHint) override;
315 
316 public:
317 
318  virtual const SvxFormatBreakItem& GetBreakItem() const override;
319  virtual const SwFormatPageDesc& GetPageDescItem() const override;
320 
321  css::uno::Sequence< css::style::TabStop > GetTabStopInfo( SwTwips CurrentPos ) override;
322 
327  void Init();
328 
330  SwRect AutoSpell_(SwTextNode &, sal_Int32);
331 
333  SwRect SmartTagScan(SwTextNode &);
334 
336  void CollectAutoCmplWrds(SwTextNode &, sal_Int32);
337 
344  virtual bool GetCharRect( SwRect& rRect, const SwPosition& rPos,
345  SwCursorMoveState* pCMS = nullptr, bool bAllowFarAway = true ) const override;
346 
348  bool GetAutoPos( SwRect &, const SwPosition& ) const;
349 
370  bool GetTopOfLine( SwTwips& _onTopOfLine,
371  const SwPosition& _rPos ) const;
372 
373  virtual bool FillSelection( SwSelectionList& rList, const SwRect& rRect ) const override;
374 
383  virtual bool GetCursorOfst( SwPosition *, Point&,
384  SwCursorMoveState* = nullptr, bool bTestBackground = false ) const override;
385 
390  bool GetKeyCursorOfst(SwPosition *pPos, const Point &rPoint ) const
391  { return GetCursorOfst_( pPos, rPoint, false ); }
392 
393  void PaintExtraData( const SwRect & rRect ) const;
394  SwRect GetPaintSwRect();
395  virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&,
396  SwPrintData const*const pPrintData = nullptr ) const override;
397  virtual bool GetInfo( SfxPoolItem & ) const override;
398 
404  virtual bool LeftMargin(SwPaM *) const override;
405  virtual bool RightMargin(SwPaM *, bool bAPI = false) const override;
406 
407  virtual bool UnitUp(SwPaM *, const SwTwips nOffset,
408  bool bSetInReadOnly ) const override;
409  virtual bool UnitDown(SwPaM *, const SwTwips nOffset,
410  bool bSetInReadOnly ) const override;
411  bool UnitUp_(SwPaM *, const SwTwips nOffset,
412  bool bSetInReadOnly ) const;
413  bool UnitDown_(SwPaM *, const SwTwips nOffset,
414  bool bSetInReadOnly ) const;
415 
420  void PrepareVisualMove( TextFrameIndex& nPos, sal_uInt8& nCursorLevel,
421  bool& bRight, bool bInsertCursor );
422 
424  void SplitFrame(TextFrameIndex nTextPos);
425  SwContentFrame *JoinFrame();
426  TextFrameIndex GetOfst() const { return mnOffset; }
427  void SetOfst_(TextFrameIndex nNewOfst);
428  inline void SetOfst (TextFrameIndex nNewOfst);
429  void ManipOfst(TextFrameIndex const nNewOfst) { mnOffset = nNewOfst; }
430  SwTextFrame *GetFrameAtPos ( const SwPosition &rPos);
431  inline const SwTextFrame *GetFrameAtPos ( const SwPosition &rPos) const;
432  SwTextFrame& GetFrameAtOfst(TextFrameIndex nOfst);
434  bool IsEmptyMaster() const
435  { return GetFollow() && !GetFollow()->GetOfst(); }
436 
437  void SetMergedPara(std::unique_ptr<sw::MergedPara> p);
438  sw::MergedPara * GetMergedPara() { return m_pMergedPara.get(); }
439  sw::MergedPara const* GetMergedPara() const { return m_pMergedPara.get(); }
440 
442  const OUString& GetText() const;
443  SwTextNode const* GetTextNodeForParaProps() const;
444  SwTextNode const* GetTextNodeForFirstText() const;
446  { return const_cast<SwTextNode*>(const_cast<SwTextFrame const*>(this)->GetTextNodeFirst()); };
447  SwTextNode const* GetTextNodeFirst() const;
449  { return const_cast<SwDoc &>(const_cast<SwTextFrame const*>(this)->GetDoc()); }
450  SwDoc const& GetDoc() const;
451 
452  SwTextFrame(SwTextNode * const, SwFrame*, sw::FrameMode eMode);
453 
462  virtual bool Prepare( const PrepareHint ePrep = PREP_CLEAR,
463  const void *pVoid = nullptr, bool bNotify = true ) override;
464 
470  virtual bool WouldFit( SwTwips &nMaxHeight, bool &bSplit, bool bTst ) override;
471 
478  bool TestFormat( const SwFrame* pPrv, SwTwips &nMaxHeight, bool &bSplit );
479 
484  bool Hyphenate(SwInterHyphInfoTextFrame & rInf);
485 
487  inline SwTwips GrowTst( const SwTwips nGrow );
488 
489  SwParaPortion *GetPara();
490  inline const SwParaPortion *GetPara() const;
491  inline bool HasPara() const;
492  bool HasPara_() const;
493 
495  std::pair<SwTextNode*, sal_Int32> MapViewToModel(TextFrameIndex nIndex) const;
496  SwPosition MapViewToModelPos(TextFrameIndex nIndex) const;
497  TextFrameIndex MapModelToView(SwTextNode const* pNode, sal_Int32 nIndex) const;
498  TextFrameIndex MapModelToViewPos(SwPosition const& rPos) const;
499 
500  // If there are any hanging punctuation portions in the margin
501  // the offset will be returned.
502  SwTwips HangingMargin() const;
503 
504  // Locking
505  bool IsLocked() const { return mbLocked; }
506 
507  bool IsWidow() const { return mbWidow; }
508  bool IsJustWidow() const { return mbJustWidow; }
509  bool IsEmpty() const { return mbEmpty; }
510  bool HasFootnote() const { return mbFootnote; }
511  bool IsInFootnoteConnect()const { return mbInFootnoteConnect;}
512  bool IsFieldFollow() const { return mbFieldFollow;}
513 
514  inline void SetRepaint() const;
515  inline void ResetRepaint() const;
516  bool HasRepaint() const { return mbRepaint; }
517  inline void SetBlinkPor() const;
518  inline void ResetBlinkPor() const;
519  bool HasBlinkPor() const { return mbHasBlinkPortions; }
520  void SetAnimation() const
521  { const_cast<SwTextFrame*>(this)->mbHasAnimation = true; }
522  bool HasAnimation() const { return mbHasAnimation; }
523 
524  bool IsSwapped() const { return mbIsSwapped; }
525 
527 #ifdef DBG_UTIL
528  void CalcFootnoteFlag(TextFrameIndex nStop = TextFrameIndex(COMPLETE_STRING)); //For testing SplitFrame
529 #else
530  void CalcFootnoteFlag();
531 #endif
532 
534  bool IsHiddenNow() const; // bHidden && pOut == pPrt
535  void HideHidden(); // Remove appendage if Hidden
536  void HideFootnotes(TextFrameIndex nStart, TextFrameIndex nEnd);
537 
543  void HideAndShowObjects();
544 
546  void RemoveFootnote(TextFrameIndex nStart,
548  inline SwTwips GetFootnoteFrameHeight() const;
549  SwTextFrame *FindFootnoteRef( const SwTextFootnote *pFootnote );
550  const SwTextFrame *FindFootnoteRef( const SwTextFootnote *pFootnote ) const
551  { return const_cast<SwTextFrame *>(this)->FindFootnoteRef( pFootnote ); }
552  void ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadLine );
553 
558  SwTwips GetFootnoteLine( const SwTextFootnote *pFootnote ) const;
559 
560  TextFrameIndex GetDropLen(TextFrameIndex nWishLen) const;
561 
562  LanguageType GetLangOfChar(TextFrameIndex nIndex, sal_uInt16 nScript,
563  bool bNoChar = false) const;
564 
565  virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override;
566  virtual void CheckDirection( bool bVert ) override;
567 
569  sal_uInt16 GetParHeight() const;
570 
571  inline SwTextFrame *GetFollow();
572  inline const SwTextFrame *GetFollow() const;
573 
575  SwTextFrame *FindQuoVadisFrame();
576 
585  SwTextFrame* GetFormatted( bool bForceQuickFormat = false );
586 
588  void SetFootnote( const bool bNew ) { mbFootnote = bNew; }
589 
591  inline bool IsInside(TextFrameIndex nPos) const;
592 
594  bool GetDropRect( SwRect &rRect ) const
595  { return HasPara() && GetDropRect_( rRect ); }
596 
597  static SwCache *GetTextCache() { return s_pTextCache; }
598  static void SetTextCache( SwCache *pNew ) { s_pTextCache = pNew; }
599 
600  static long GetMinPrtLine() { return nMinPrtLine; }
601 
602  sal_uInt16 GetCacheIdx() const { return mnCacheIndex; }
603  void SetCacheIdx( const sal_uInt16 nNew ) { mnCacheIndex = nNew; }
604 
606  void ClearPara();
608  void RemoveFromCache();
609 
611  bool IsFootnoteNumFrame() const
612  { return IsInFootnote() && !GetIndPrev() && IsFootnoteNumFrame_(); }
613 
618  SwTwips CalcFitToContent();
619 
626  void CalcAdditionalFirstLineOffset();
627 
629  {
630  return mnAdditionalFirstLineOffset;
631  }
632 
638  long GetLineSpace( const bool _bNoPropLineSpacing = false ) const;
639 
641  sal_uInt16 FirstLineHeight() const;
642 
644  void MoveFlyInCnt(SwTextFrame *pNew, TextFrameIndex nStart, TextFrameIndex nEnd);
645 
647  TextFrameIndex CalcFlyPos( SwFrameFormat const * pSearch );
648 
650  bool FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff );
651 
653  sal_uInt16 GetLineCount(TextFrameIndex nPos);
654 
656  sal_uLong GetAllLines() const { return mnAllLines; }
657  sal_uLong GetThisLines() const { return mnThisLines;}
658  void RecalcAllLines();
659 
661  void StopAnimation( OutputDevice *pOut );
662 
664  void VisitPortions( SwPortionHandler& rPH ) const;
665 
667  const SwScriptInfo* GetScriptInfo() const;
668 
670  void SwapWidthAndHeight();
671 
676  void SwitchHorizontalToVertical( SwRect& rRect ) const;
677 
682  void SwitchHorizontalToVertical( Point& rPoint ) const;
683 
688  long SwitchHorizontalToVertical( long nLimit ) const;
689 
694  void SwitchVerticalToHorizontal( SwRect& rRect ) const;
695 
700  void SwitchVerticalToHorizontal( Point& rPoint ) const;
701 
706  long SwitchVerticalToHorizontal( long nLimit ) const;
707 
712  void SwitchLTRtoRTL( SwRect& rRect ) const;
713 
718  void SwitchLTRtoRTL( Point& rPoint ) const;
719 
724  void SwitchRTLtoLTR( SwRect& rRect ) const { SwitchLTRtoRTL( rRect ); }
725 
730  void SwitchRTLtoLTR( Point& rPoint ) const { SwitchLTRtoRTL( rPoint ); };
731 
732  bool FollowFormatAllowed() const
733  {
734  return mbFollowFormatAllowed;
735  }
736 
738  {
739  mbFollowFormatAllowed = true;
740  }
741 
743  {
744  mbFollowFormatAllowed = false;
745  }
746 
747  SwTwips GetBaseOfstForFly( bool bIgnoreFlysAnchoredAtThisFrame ) const
748  {
749  return ( bIgnoreFlysAnchoredAtThisFrame ?
750  mnFlyAnchorOfst :
751  mnFlyAnchorOfstNoWrap );
752  }
753 
754  SwTwips GetBaseVertOffsetForFly(bool bIgnoreFlysAnchoredAtThisFrame) const;
755 
757  {
758  return mnHeightOfLastLine;
759  }
760 
761  static void repaintTextFrames( const SwTextNode& rNode );
762 
763  void RegisterToNode(SwTextNode &, bool isForceNodeAsFirst = false);
764 
765  bool IsSymbolAt(TextFrameIndex) const;
766  OUString GetCurWord(SwPosition const&) const;
767  sal_uInt16 GetScalingOfSelectedText(TextFrameIndex nStt, TextFrameIndex nEnd);
768 
769  virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const override;
770 };
771 
772 //use this to protect a SwTextFrame for a given scope from getting merged with
773 //its neighbour and thus deleted
775 {
776 private:
779 public:
780  //Lock pFrame for the lifetime of the Cut/Paste call, etc. to avoid
781  //SwTextFrame::AdjustFollow_ removing the pFrame we're trying to Make
783  {
784  m_pTextFrame = pFrame->IsTextFrame() ? static_cast<SwTextFrame*>(pFrame) : nullptr;
785  if (m_pTextFrame)
786  {
787  m_bOldLocked = m_pTextFrame->IsLocked();
788  m_pTextFrame->Lock();
789  }
790  else
791  {
792  m_bOldLocked = false;
793  }
794  }
795 
797  {
798  if (m_pTextFrame && !m_bOldLocked)
799  m_pTextFrame->Unlock();
800  }
801 };
802 
803 inline const SwParaPortion *SwTextFrame::GetPara() const
804 {
805  return const_cast<SwTextFrame*>(this)->GetPara();
806 }
807 
808 inline bool SwTextFrame::HasPara() const
809 {
810  return mnCacheIndex!=USHRT_MAX && HasPara_();
811 }
812 
813 inline SwTwips SwTextFrame::GrowTst( const SwTwips nGrow )
814 {
815  return Grow( nGrow, true );
816 }
817 
818 inline bool SwTextFrame::IsInside(TextFrameIndex const nPos) const
819 {
820  bool bRet = true;
821  if( nPos < GetOfst() )
822  bRet = false;
823  else
824  {
825  const SwTextFrame *pFoll = GetFollow();
826  if( pFoll && nPos >= pFoll->GetOfst() )
827  bRet = false;
828  }
829  return bRet;
830 }
831 
833 {
834  if( !IsFollow() && IsInFootnote() && HasPara() )
835  return GetFootnoteFrameHeight_();
836  else
837  return 0;
838 }
839 
840 inline const SwTextFrame *SwTextFrame::GetFollow() const
841 {
842  return static_cast<const SwTextFrame*>(SwContentFrame::GetFollow());
843 }
845 {
846  return static_cast<SwTextFrame*>(SwContentFrame::GetFollow());
847 }
848 
849 inline const SwTextFrame *SwTextFrame::GetFrameAtPos( const SwPosition &rPos) const
850 {
851  return const_cast<SwTextFrame*>(this)->GetFrameAtPos( rPos );
852 }
853 
854 inline void SwTextFrame::SetOfst(TextFrameIndex const nNewOfst)
855 {
856  if ( mnOffset != nNewOfst )
857  SetOfst_( nNewOfst );
858 }
859 
860 inline void SwTextFrame::SetRepaint() const
861 {
862  const_cast<SwTextFrame*>(this)->mbRepaint = true;
863 }
864 inline void SwTextFrame::ResetRepaint() const
865 {
866  const_cast<SwTextFrame*>(this)->mbRepaint = false;
867 }
868 
869 inline void SwTextFrame::SetBlinkPor() const
870 {
871  const_cast<SwTextFrame*>(this)->mbHasBlinkPortions = true;
872 }
873 inline void SwTextFrame::ResetBlinkPor() const
874 {
875  const_cast<SwTextFrame*>(this)->mbHasBlinkPortions = false;
876 }
877 
879 protected:
880  explicit TemporarySwap(SwTextFrame * frame, bool swap):
881  m_frame(frame), m_undo(false)
882  {
883  if (m_frame->IsVertical() && swap) {
884  m_undo = true;
886  }
887  }
888 
890  if (m_undo) {
892  }
893  }
894 
895 private:
896  TemporarySwap(TemporarySwap const &) = delete;
897  void operator =(TemporarySwap const &) = delete;
898 
900  bool m_undo;
901 };
902 
904 public:
905  explicit SwSwapIfSwapped(SwTextFrame* frame):
906  TemporarySwap(frame, frame->IsSwapped()) {}
907 };
908 
910 public:
911  explicit SwSwapIfNotSwapped(SwTextFrame* frame):
912  TemporarySwap(frame, !frame->IsSwapped()) {}
913 };
914 
920 {
922  bool bUndo;
923 public:
924  SwFrameSwapper( const SwTextFrame* pFrame, bool bSwapIfNotSwapped );
925  ~SwFrameSwapper();
926 };
927 
929 {
932 public:
933  SwLayoutModeModifier( const OutputDevice& rOutp );
935  void Modify( bool bChgToRTL );
936  void SetAuto();
937 };
938 
940 {
943 public:
944  SwDigitModeModifier( const OutputDevice& rOutp, LanguageType eCurLang );
946 };
947 
948 namespace sw {
949 
955 {
957  std::vector<Extent> extents;
960  OUString mergedText;
967  MergedPara(SwTextFrame & rFrame, std::vector<Extent>&& rExtents,
968  OUString const& rText,
969  SwTextNode *const pProps, SwTextNode *const pFirst,
970  SwTextNode const*const pLast)
971  : listener(rFrame), extents(std::move(rExtents)), mergedText(rText)
972  , pParaPropsNode(pProps), pFirstNode(pFirst), pLastNode(pLast)
973  {
974  assert(pParaPropsNode);
975  assert(pFirstNode);
976  assert(pLastNode);
977  }
978 };
979 
982 {
983 protected:
984 #if BOOST_VERSION < 105600
987 #else
988  sw::MergedPara const*const m_pMerged;
989  SwTextNode const*const m_pNode;
990 #endif
993  MergedAttrIterBase(SwTextFrame const& rFrame);
994 };
995 
997  : public MergedAttrIterBase
998 {
999 public:
1000  MergedAttrIter(SwTextFrame const& rFrame) : MergedAttrIterBase(rFrame) {}
1001  SwTextAttr const* NextAttr(SwTextNode const** ppNode = nullptr);
1002 };
1003 
1005 {
1006 private:
1007  std::vector<std::pair<SwTextNode const*, SwTextAttr const*>> m_Hints;
1008  SwTextNode const*const m_pNode;
1010 public:
1011  MergedAttrIterByEnd(SwTextFrame const& rFrame);
1012  SwTextAttr const* NextAttr(SwTextNode const*& rpNode);
1013  void PrevAttr();
1014 };
1015 
1017  : public MergedAttrIterBase
1018 {
1019 public:
1020  MergedAttrIterReverse(SwTextFrame const& rFrame);
1021  SwTextAttr const* PrevAttr(SwTextNode const** ppNode = nullptr);
1022 };
1023 
1024 
1025 } // namespace sw
1026 
1027 #endif
1028 
1029 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Recreate
Definition: txtfrm.hxx:127
void CheckResetRedlineMergeFlag(SwTextNode &rNode, Recreate eRecreateMerged)
if first node is First, its frames may need to be moved, never deleted.
Definition: ndtxt.cxx:878
Base class of the Writer layout elements.
Definition: frame.hxx:295
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:149
bool IsMarkHintHidden(SwRootFrame const &rLayout, SwTextNode const &rNode, SwTextAttrEnd const &rHint)
Definition: reffld.cxx:1102
void AllowFollowFormat()
Definition: txtfrm.hxx:737
bool IsFollow() const
Definition: flowfrm.hxx:166
SwInterHyphInfoTextFrame(SwTextFrame const &rFrame, SwTextNode const &rNode, SwInterHyphInfo const &rHyphInfo)
Definition: txtedt.cxx:1591
MergedAttrIter(SwTextFrame const &rFrame)
Definition: txtfrm.hxx:1000
LanguageType const nOldLanguageType
Definition: txtfrm.hxx:942
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:838
SwTextNode const & GetAttrMerged(SfxItemSet &rFormatSet, SwTextNode const &rNode, SwRootFrame const *pLayout)
Definition: txtfrm.cxx:379
void Init()
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
Definition: fmtpdsc.hxx:35
bool FollowFormatAllowed() const
Definition: txtfrm.hxx:732
SwTwips Grow(SwTwips, bool bTst=false, bool bInfo=false)
Definition: wsfrm.cxx:1462
SwDigitModeModifier(const OutputDevice &rOutp, LanguageType eCurLang)
Definition: txtfrm.cxx:734
const OutputDevice & rOut
Definition: txtfrm.hxx:941
bool IsSwapped() const
Definition: txtfrm.hxx:524
void SwitchRTLtoLTR(Point &rPoint) const
Calculates the coordinates of a point when switching from RTL to LTR layout.
Definition: txtfrm.hxx:730
MergedPara(SwTextFrame &rFrame, std::vector< Extent > &&rExtents, OUString const &rText, SwTextNode *const pProps, SwTextNode *const pFirst, SwTextNode const *const pLast)
Definition: txtfrm.hxx:967
void SetBlinkPor() const
Definition: txtfrm.hxx:869
static void SetTextCache(SwCache *pNew)
Definition: txtfrm.hxx:598
bool HasPara() const
Definition: txtfrm.hxx:808
bool IsInFootnote() const
Definition: frame.hxx:925
sal_uIntPtr sal_uLong
SwTwips mnFootnoteLine
Definition: txtfrm.hxx:176
void UpdateTextNodeHyphInfo(SwTextFrame const &rFrame, SwTextNode const &rNode, SwInterHyphInfo &o_rHyphInfo)
Definition: txtedt.cxx:1601
TextFrameIndex mnOffset
Definition: txtfrm.hxx:189
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:88
sw::MergedPara * GetMergedPara()
Definition: txtfrm.hxx:438
bool IsEmptyMaster() const
If there's a Follow and we don't contain text ourselves.
Definition: txtfrm.hxx:434
Definition: doc.hxx:185
SwParaPortion * GetPara()
Definition: txtcache.cxx:89
SwTextAttr const * PrevAttr(SwTextNode const **ppNode=nullptr)
Definition: txtfrm.cxx:234
TextFrameIndex GetOfst() const
Definition: txtfrm.hxx:426
SwSwapIfNotSwapped(SwTextFrame *frame)
Definition: txtfrm.hxx:911
bool IsMarkHidden(SwRootFrame const &rLayout,::sw::mark::IMark const &rMark)
Definition: crbm.cxx:127
long SwTwips
Definition: swtypes.hxx:49
This class is used as parameter for creation of a block cursor selection.
void SetAnimation() const
Definition: txtfrm.hxx:520
Dialog to specify the properties of date form field.
virtual void SwClientNotify(const SwModify &, const SfxHint &rHint) override
Definition: calbck.cxx:108
TemporarySwap(SwTextFrame *frame, bool swap)
Definition: txtfrm.hxx:880
Of course Writer needs its own rectangles.
Definition: swrect.hxx:34
virtual const SvxFormatBreakItem & GetBreakItem() const
Definition: findfrm.cxx:654
virtual const SwFormatPageDesc & GetPageDescItem() const
Definition: findfrm.cxx:659
bool IsInside(TextFrameIndex nPos) const
Respect the Follows.
Definition: txtfrm.hxx:818
virtual bool LeftMargin(SwPaM *) const =0
The root element of a Writer document layout.
Definition: rootfrm.hxx:79
SwTextNode * pNode
Definition: txtfrm.hxx:85
Collection of SwLineLayout instances, represents the paragraph text in Writer layout.
Definition: porlay.hxx:229
SwTextAttr const * NextAttr(SwTextNode const **ppNode=nullptr)
Definition: txtfrm.cxx:97
static SwCache * GetTextCache()
Definition: txtfrm.hxx:597
void SetJustWidow(const bool bNew)
Definition: txtfrm.hxx:236
SwTwips GetFootnoteFrameHeight() const
Definition: txtfrm.hxx:832
bool mbRepaint
Definition: txtfrm.hxx:220
TextFrameLockGuard(SwFrame *pFrame)
Definition: txtfrm.hxx:782
std::vector< std::pair< SwTextNode const *, SwTextAttr const * > > m_Hints
Definition: txtfrm.hxx:1007
bool GetKeyCursorOfst(SwPosition *pPos, const Point &rPoint) const
Makes sure that the Frame is not switched (e.g.
Definition: txtfrm.hxx:390
TextFrameIndex m_nWordStart
output: found word
Definition: txtfrm.hxx:63
sw::WriterMultiListener listener
Definition: txtfrm.hxx:956
static long GetMinPrtLine()
Definition: txtfrm.hxx:600
sal_uLong GetThisLines() const
Definition: txtfrm.hxx:657
SwTwips GrowTst(const SwTwips nGrow)
Test grow.
Definition: txtfrm.hxx:813
std::unique_ptr< sw::MergedPara > CheckParaRedlineMerge(SwTextFrame &rFrame, SwTextNode &rTextNode, FrameMode eMode)
Definition: redlnitr.cxx:54
void ResetBlinkPor() const
Definition: txtfrm.hxx:873
void Lock()
Definition: txtfrm.hxx:233
sal_Int32 nEnd
Definition: txtfrm.hxx:87
bool IsTextFrame() const
Definition: frame.hxx:1210
sal_uInt16 GetCacheIdx() const
Definition: txtfrm.hxx:602
sal_uInt16 mnCacheIndex
Definition: txtfrm.hxx:191
virtual bool UnitUp(SwPaM *, const SwTwips nOffset, bool bSetInReadOnly) const
Definition: trvlfrm.cxx:960
TextFrameIndex UpdateMergedParaForDelete(MergedPara &rMerged, bool isRealDelete, SwTextNode const &rNode, sal_Int32 nIndex, sal_Int32 nLen)
Definition: txtfrm.cxx:1031
const SwTextFrame * pFrame
Definition: txtfrm.hxx:921
const OutputDevice & m_rOut
Definition: txtfrm.hxx:930
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:4216
Describes parts of multiple text nodes, which will form a text frame, even when redlines are hidden a...
Definition: txtfrm.hxx:954
virtual bool FillSelection(SwSelectionList &rList, const SwRect &rRect) const
Definition: unusedf.cxx:40
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:965
void SetRepaint() const
Definition: txtfrm.hxx:860
void SetOfst_(TextFrameIndex nNewOfst)
Definition: frmform.cxx:763
TextFrameIndex m_nEnd
Definition: txtfrm.hxx:61
SwTextFrame * GetFollow()
Definition: txtfrm.hxx:844
virtual bool GetCharRect(SwRect &, const SwPosition &, SwCursorMoveState *=nullptr, bool bAllowFarAway=true) const
Definition: unusedf.cxx:71
FrameMode
Definition: txtfrm.hxx:102
std::vector< Extent > extents
Definition: txtfrm.hxx:957
bool IsEmpty() const
Definition: txtfrm.hxx:509
Describes a part of a single text node, which will be part of a text frame, even when redlines are hi...
Definition: txtfrm.hxx:83
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:136
SwTextNode * GetTextNodeFirst()
Definition: txtfrm.hxx:445
struct _xmlTextWriter * xmlTextWriterPtr
bool FrameContainsNode(SwContentFrame const &rFrame, sal_uLong nNodeIndex)
Definition: txtfrm.cxx:296
SwTwips mnFlyAnchorOfst
Definition: txtfrm.hxx:171
Style of a layout element.
Definition: frmfmt.hxx:57
bool IsWidow() const
Definition: txtfrm.hxx:507
OUString GetExpandTextMerged(SwRootFrame const *const pLayout, SwTextNode const &rNode, bool const bWithNumber, bool const bWithSpacesForLevel, ExpandMode const i_mode)
PrepareHint
Definition: swtypes.hxx:204
virtual css::uno::Sequence< css::style::TabStop > GetTabStopInfo(SwTwips)
Definition: frame.hxx:492
SwFrame * GetIndPrev() const
Definition: frame.hxx:702
const SwContentFrame * GetFollow() const
Definition: cntfrm.hxx:114
ComplexTextLayoutFlags const m_nOldLayoutMode
Definition: txtfrm.hxx:931
virtual void PaintSwFrame(vcl::RenderContext &rRenderContext, SwRect const &, SwPrintData const *const pPrintData=nullptr) const
Definition: unusedf.cxx:29
ComplexTextLayoutFlags
sal_uLong GetAllLines() const
For displaying the line numbers.
Definition: txtfrm.hxx:656
Helper class which can be used instead of the macros if a function has too many returns.
Definition: txtfrm.hxx:919
void Unlock()
Definition: txtfrm.hxx:234
bool IsInFootnoteConnect() const
Definition: txtfrm.hxx:511
TextFrameIndex MapModelToView(MergedPara const &, SwTextNode const *pNode, sal_Int32 nIndex)
Definition: txtfrm.cxx:1182
SwTextFrame * GetFrameAtPos(const SwPosition &rPos)
Definition: frmcrsr.cxx:152
void ManipOfst(TextFrameIndex const nNewOfst)
Definition: txtfrm.hxx:429
iterate SwTextAttr in potentially merged text frame
Definition: txtfrm.hxx:981
std::pair< SwTextNode *, sal_Int32 > MapViewToModel(MergedPara const &, TextFrameIndex nIndex)
Definition: txtfrm.cxx:1163
SwTextNode * pParaPropsNode
most paragraph properties are taken from the first non-empty node
Definition: txtfrm.hxx:962
css::uno::Reference< css::linguistic2::XHyphenatedWord > m_xHyphWord
output: hyphenated word
Definition: txtfrm.hxx:57
void Modify(bool bChgToRTL)
Definition: txtfrm.cxx:721
Marks a node in the document model.
Definition: ndindex.hxx:31
virtual void Format(vcl::RenderContext *pRenderContext, const SwBorderAttrs *pAttrs=nullptr)
Definition: unusedf.cxx:24
SwTwips GetFootnoteFrameHeight_() const
Calculates the maximum reachable height for the TextFrame in the Footnote Area.
Definition: txtftn.cxx:299
void MoveMergedFlysAndFootnotes(std::vector< SwTextFrame * > const &rFrames, SwTextNode const &rFirstNode, SwTextNode &rSecondNode, bool)
Definition: ndtxt.cxx:368
OUString mergedText
note: cannot be const currently to avoid UB because SwTextGuess::Guess const_casts it and modifies it...
Definition: txtfrm.hxx:960
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
virtual bool RightMargin(SwPaM *, bool bAPI=false) const =0
bool IsLocked() const
Definition: txtfrm.hxx:505
virtual bool GetCursorOfst(SwPosition *, Point &, SwCursorMoveState *=nullptr, bool bTestBackground=false) const
Definition: unusedf.cxx:46
SwTextFrame * MakeTextFrame(SwTextNode &rNode, SwFrame *, sw::FrameMode eMode)
Definition: txtfrm.cxx:808
SwTextNode * GetParaPropsNode(SwRootFrame const &rLayout, SwNodeIndex const &rNode)
Definition: txtfrm.cxx:336
MergedAttrIterByEnd(SwTextFrame const &rFrame)
Definition: txtfrm.cxx:157
virtual void CheckDirection(bool bVert)
Definition: wsfrm.cxx:389
SwPosition GetParaPropsPos(SwRootFrame const &rLayout, SwPosition const &rPos)
Definition: txtfrm.cxx:350
SwTextFrame * m_pTextFrame
Definition: txtfrm.hxx:777
bool IsFootnoteNumFrame() const
Am I a FootnoteFrame, with a number at the start of the paragraph?
Definition: txtfrm.hxx:611
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
void SetOfst(TextFrameIndex nNewOfst)
Definition: txtfrm.hxx:854
bool GetDropRect(SwRect &rRect) const
DropCaps and selections.
Definition: txtfrm.hxx:594
ExpandMode
Some helpers for converting model strings to view strings.
SwSwapIfSwapped(SwTextFrame *frame)
Definition: txtfrm.hxx:905
sw::MergedPara const * GetMergedPara() const
Definition: txtfrm.hxx:439
void SwitchRTLtoLTR(SwRect &rRect) const
Calculates the coordinates of a rectangle when switching from RTL to LTR layout.
Definition: txtfrm.hxx:724
SwTwips mnAdditionalFirstLineOffset
Definition: txtfrm.hxx:184
virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const
Definition: xmldump.cxx:447
void UpdateFramesForRemoveDeleteRedline(SwDoc &rDoc, SwPaM const &rPam)
SwTextFrame * m_frame
Definition: txtfrm.hxx:899
unsigned char sal_uInt8
void operator=(TemporarySwap const &)=delete
void SetFootnote(const bool bNew)
Will be moved soon.
Definition: txtfrm.hxx:588
SwTwips GetBaseOfstForFly(bool bIgnoreFlysAnchoredAtThisFrame) const
Definition: txtfrm.hxx:747
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
Definition: unosett.cxx:261
void ResetRepaint() const
Definition: txtfrm.hxx:864
SwTextNode const *const m_pNode
Definition: txtfrm.hxx:1008
bool mbHasBlinkPortions
Definition: txtfrm.hxx:221
MergedAttrIterBase(SwTextFrame const &rFrame)
Definition: txtfrm.cxx:89
void ForbidFollowFormat()
Definition: txtfrm.hxx:742
void SetFieldFollow(const bool bNew)
Definition: txtfrm.hxx:238
SwTwips GetHeightOfLastLine() const
Definition: txtfrm.hxx:756
void SwapWidthAndHeight()
Swaps width and height of the text frame.
Definition: txtfrm.cxx:430
sw::MergedPara const * m_pMerged
Definition: txtfrm.hxx:985
SwTwips mnFlyAnchorOfstNoWrap
Definition: txtfrm.hxx:173
SwTwips GetAdditionalFirstLineOffset() const
Definition: txtfrm.hxx:628
std::unique_ptr< sw::MergedPara > m_pMergedPara
redline merge data
Definition: txtfrm.hxx:187
TextFrameIndex m_nStart
input: requested range to hyphenate
Definition: txtfrm.hxx:60
virtual bool WouldFit(SwTwips &nMaxHeight, bool &bSplit, bool bTst)
Definition: unusedf.cxx:34
sal_Int32 nStart
Definition: txtfrm.hxx:86
bool HasAnimation() const
Definition: txtfrm.hxx:522
MergedAttrIterReverse(SwTextFrame const &rFrame)
Definition: txtfrm.cxx:209
bool IsParaPropsNode(SwRootFrame const &rLayout, SwTextNode const &rNode)
Definition: txtfrm.cxx:319
void SetWidow(const bool bNew)
Definition: txtfrm.hxx:235
a clone of SwInterHyphInfo, but with TextFrameIndex instead of node index
Definition: txtfrm.hxx:53
virtual bool GetInfo(SfxPoolItem &) const
Definition: calbck.hxx:164
void GotoPrevLayoutTextFrame(SwNodeIndex &rIndex, SwRootFrame const *const pLayout)
Definition: docnum.cxx:1444
SwTextNode const * pLastNode
mainly for sanity checks
Definition: txtfrm.hxx:966
bool IsVertical() const
Definition: frame.hxx:949
SwTextAttr const * NextAttr(SwTextNode const *&rpNode)
Definition: txtfrm.cxx:172
SwDoc & GetDoc()
Definition: txtfrm.hxx:448
SwTwips mnHeightOfLastLine
Definition: txtfrm.hxx:179
void SetCacheIdx(const sal_uInt16 nNew)
Definition: txtfrm.hxx:603
Small Helper class: Prepares a test format.
Definition: txtfrm.cxx:3112
SwTextNode *const pFirstNode
except break attributes, those are taken from the first node
Definition: txtfrm.hxx:964
SwTwips mnFlyAnchorVertOfstNoWrap
The y position for wrap-through flys anchored at this paragraph.
Definition: txtfrm.hxx:175
bool HasBlinkPor() const
Definition: txtfrm.hxx:519
virtual void MakePos()
Definition: calcmove.cxx:534
static SwCache * s_pTextCache
SwLineLayout cache: the lines are not actually owned by the SwTextFrame but by this SwCache...
Definition: txtfrm.hxx:162
virtual bool Prepare(const PrepareHint ePrep=PREP_CLEAR, const void *pVoid=nullptr, bool bNotify=true)
Definition: wsfrm.cxx:587
bool IsFieldFollow() const
Definition: txtfrm.hxx:512
bool sw_ChangeOffset(SwTextFrame *pFrame, TextFrameIndex nNew)
Definition: frmcrsr.cxx:109
void SetEmpty(const bool bNew)
Definition: txtfrm.hxx:237
bool HasPara_() const
Definition: txtcache.cxx:74
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...
TextFrameIndex m_nWordLen
Definition: txtfrm.hxx:64
bool IsJustWidow() const
Definition: txtfrm.hxx:508
const sal_Int32 COMPLETE_STRING
Definition: swtypes.hxx:61
const SwTextFrame * FindFootnoteRef(const SwTextFootnote *pFootnote) const
Definition: txtfrm.hxx:550
void SetHyphWord(const css::uno::Reference< css::linguistic2::XHyphenatedWord > &xHW)
Definition: txtfrm.hxx:71
std::pair< SwTextNode *, SwTextNode * > GetFirstAndLastNode(SwRootFrame const &rLayout, SwNodeIndex const &rPos)
Definition: txtfrm.cxx:363
virtual void DestroyImpl() override
Definition: ssfrm.cxx:421
SwFrameSwapper(const SwTextFrame *pFrame, bool bSwapIfNotSwapped)
Definition: txtfrm.cxx:677
SwLayoutModeModifier(const OutputDevice &rOutp)
Definition: txtfrm.cxx:711
bool HasRepaint() const
Definition: txtfrm.hxx:516
SwTextNode const * m_pNode
Definition: txtfrm.hxx:986
bool HasFootnote() const
Definition: txtfrm.hxx:510