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 
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 void RecreateStartTextFrames(SwTextNode & rNode);
146 
151 bool HasNumberingWhichNeedsLayoutUpdate(const SwTextNode& rTextNode);
152 
153 } // namespace sw
154 
158 {
159  friend class SwTextIter;
160  friend class SwTestFormat;
161  friend class WidowsAndOrphans;
162  friend class TextFrameLockGuard; // May Lock()/Unlock()
163  friend bool sw_ChangeOffset(SwTextFrame* pFrame, TextFrameIndex nNew);
164 
171  static constexpr tools::Long nMinPrtLine = 0; // This Line must not be underrun when printing
172  // Hack for table cells stretching multiple pages
173 
174  sal_uLong mnAllLines :24; // Line count for the Paint (including nThisLines)
175  sal_uLong mnThisLines :8; // Count of Lines of the Frame
176 
177  // The x position for flys anchored at this paragraph.
178  // These values are calculated in SwTextFrame::CalcBaseOfstForFly()
180  // The x position for wrap-through flys anchored at this paragraph.
185  // OD 2004-03-17 #i11860# - re-factoring of #i11859#
186  // member for height of last line (value needed for proportional line spacing)
188  // member for the additional first line offset, which is caused by the list
189  // label alignment for list level position and space mode LABEL_ALIGNMENT.
190  // This additional first line offset is used for the text formatting.
191  // It is NOT used for the determination of printing area.
193 
195  std::unique_ptr<sw::MergedPara> m_pMergedPara;
196 
197  TextFrameIndex mnOffset; // Is the offset in the Content (character count)
198 
199  sal_uInt16 mnCacheIndex; // Index into the cache, USHRT_MAX if there's definitely no fitting object in the cache
200 
201  // Separates the Master and creates a Follow or adjusts the data in the Follow
202  void AdjustFollow_( SwTextFormatter &rLine, TextFrameIndex nOffset,
203  TextFrameIndex nStrEnd, const sal_uInt8 nMode );
204 
205  // Iterates all Lines and sets the line spacing using the attribute
206  void CalcLineSpace();
207 
208  // Only called in Format
209  void AdjustFrame( const SwTwips nChgHeight, bool bHasToFit = false );
210 
211  // Evaluates the Preps in Format()
212  bool CalcPreps();
213  void PrepWidows( const sal_uInt16 nNeed, bool bNotify );
214  void InvalidateRange_( const SwCharRange &, const tools::Long = 0);
215  inline void InvalidateRange( const SwCharRange &, const tools::Long = 0);
216 
217  // WidowsAndOrphans, AdjustFrame, AdjustFollow
218  void FormatAdjust( SwTextFormatter &rLine, WidowsAndOrphans &rFrameBreak,
219  TextFrameIndex nStrLen, const bool bDummy );
220  void ChangeOffset( SwTextFrame* pFrame, TextFrameIndex nNew );
221 
222  bool mbLocked : 1; // In the Format?
223  bool mbWidow : 1; // Is our follow a Widow?
224  bool mbJustWidow : 1; // Did we just request Widow flag on master?
225  bool mbEmpty : 1; // Are we an empty paragraph?
226  bool mbInFootnoteConnect : 1; // Is in Connect at the moment
227  bool mbFootnote : 1; // Has at least one footnote
228  bool mbRepaint : 1; // TextFrame: Repaint is ready to be fetched
230  bool mbHasRotatedPortions : 1;
231  bool mbFieldFollow : 1; // Start with Field rest of the Master
232  bool mbHasAnimation : 1; // Contains animated SwGrfNumPortion
233  bool mbIsSwapped : 1; // during text formatting we swap the
234  // width and height for vertical formatting
235  // OD 14.03.2003 #i11760# - flag to control, if follow is formatted in
236  // method <CalcFollow(..)>.
237  // E.g., avoid formatting of follow, if method <SwLayoutFrame::FormatWidthCols(..)>
238  // is running.
239  bool mbFollowFormatAllowed : 1;
240 
241  void ResetPreps();
242  void Lock() { mbLocked = true; }
243  void Unlock() { mbLocked = false; }
244  void SetWidow( const bool bNew ) { mbWidow = bNew; }
245  void SetJustWidow( const bool bNew ) { mbJustWidow = bNew; }
246  void SetEmpty( const bool bNew ) { mbEmpty = bNew; }
247  void SetFieldFollow( const bool bNew ) { mbFieldFollow = bNew; }
248 
249  bool IsIdxInside(TextFrameIndex nPos, TextFrameIndex nLen) const;
250 
251  // Changes the Frame or not (cf. FlyCnt)
252  bool GetModelPositionForViewPoint_(SwPosition *pPos, const Point &rPoint,
253  const bool bChgFrame, SwCursorMoveState* = nullptr ) const;
254  void FillCursorPos( SwFillData &rFill ) const;
255 
256  // Format exactly one Line
257  bool FormatLine( SwTextFormatter &rLine, const bool bPrev );
258 
259  // In order to safe stack space, we split this method:
260  // Format_ calls Format_ with parameters
261  void Format_( vcl::RenderContext* pRenderContext, SwParaPortion *pPara );
262  void Format_( SwTextFormatter &rLine, SwTextFormatInfo &rInf,
263  const bool bAdjust = false );
264  void FormatOnceMore( SwTextFormatter &rLine, SwTextFormatInfo &rInf );
265 
266  // Formats the Follow and ensures disposing on orphans
267  bool CalcFollow(TextFrameIndex nTextOfst);
268 
269  virtual void MakePos() override;
270 
271  // Corrects the position from which we need to format
272  static TextFrameIndex FindBrk(const OUString &rText, TextFrameIndex nStart,
273  TextFrameIndex nEnd);
274 
275  // inline branch
276  SwTwips GetFootnoteFrameHeight_() const;
277 
278  // Outsourced to CalcPreps
279  bool CalcPrepFootnoteAdjust();
280 
281  // For Footnote and WidOrp: Forced validation
282  void ValidateFrame();
283  void ValidateBodyFrame();
284 
285  bool GetDropRect_( SwRect &rRect ) const;
286 
287  void SetPara( SwParaPortion *pNew, bool bDelete = true );
288 
289  bool IsFootnoteNumFrame_() const;
290 
291  // Refresh formatting information
292  bool FormatQuick( bool bForceQuickFormat );
293 
294  // Opt: Format empty paragraphs
295  bool FormatEmpty();
296  SwTwips EmptyHeight() const;
297 
298  // Opt: Paint empty paragraphs
299  bool PaintEmpty( const SwRect &, bool bCheck ) const;
300 
301  void ChgThisLines(); // Must always be called if the Line count could have changed
302 
303  // required for 'new' relative anchor position
304  void CalcBaseOfstForFly();
305 
317  void CalcHeightOfLastLine( const bool _bUseFont = false );
318 
319  virtual void DestroyImpl() override;
320  virtual ~SwTextFrame() override;
321 
322 protected:
323  virtual void SwClientNotify(SwModify const& rModify, SfxHint const& rHint) override;
324 
325 public:
326 
327  virtual const SvxFormatBreakItem& GetBreakItem() const override;
328  virtual const SwFormatPageDesc& GetPageDescItem() const override;
329 
330  css::uno::Sequence< css::style::TabStop > GetTabStopInfo( SwTwips CurrentPos ) override;
331 
336  void Init();
337 
339  SwRect AutoSpell_(SwTextNode &, sal_Int32);
340 
342  SwRect SmartTagScan(SwTextNode &);
343 
345  void CollectAutoCmplWrds(SwTextNode &, sal_Int32);
346 
353  virtual bool GetCharRect( SwRect& rRect, const SwPosition& rPos,
354  SwCursorMoveState* pCMS = nullptr, bool bAllowFarAway = true ) const override;
355 
357  bool GetAutoPos( SwRect &, const SwPosition& ) const;
358 
379  bool GetTopOfLine( SwTwips& _onTopOfLine,
380  const SwPosition& _rPos ) const;
381 
382  virtual bool FillSelection( SwSelectionList& rList, const SwRect& rRect ) const override;
383 
392  virtual bool GetModelPositionForViewPoint( SwPosition *, Point&,
393  SwCursorMoveState* = nullptr, bool bTestBackground = false ) const override;
394 
399  bool GetKeyCursorOfst(SwPosition *pPos, const Point &rPoint ) const
400  { return GetModelPositionForViewPoint_( pPos, rPoint, false ); }
401 
402  void PaintExtraData( const SwRect & rRect ) const;
403  SwRect GetPaintSwRect();
404  virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&,
405  SwPrintData const*const pPrintData = nullptr ) const override;
406  virtual bool GetInfo( SfxPoolItem & ) const override;
407 
413  virtual bool LeftMargin(SwPaM *) const override;
414  virtual bool RightMargin(SwPaM *, bool bAPI = false) const override;
415 
416  virtual bool UnitUp(SwPaM *, const SwTwips nOffset,
417  bool bSetInReadOnly ) const override;
418  virtual bool UnitDown(SwPaM *, const SwTwips nOffset,
419  bool bSetInReadOnly ) const override;
420  bool UnitUp_(SwPaM *, const SwTwips nOffset,
421  bool bSetInReadOnly ) const;
422  bool UnitDown_(SwPaM *, const SwTwips nOffset,
423  bool bSetInReadOnly ) const;
424 
429  void PrepareVisualMove( TextFrameIndex& nPos, sal_uInt8& nCursorLevel,
430  bool& bRight, bool bInsertCursor );
431 
433  void SplitFrame(TextFrameIndex nTextPos);
434  SwContentFrame *JoinFrame();
435  TextFrameIndex GetOffset() const { return mnOffset; }
436  void SetOffset_(TextFrameIndex nNewOfst);
437  inline void SetOffset (TextFrameIndex nNewOfst);
438  void ManipOfst(TextFrameIndex const nNewOfst) { mnOffset = nNewOfst; }
439  SwTextFrame *GetFrameAtPos ( const SwPosition &rPos);
440  inline const SwTextFrame *GetFrameAtPos ( const SwPosition &rPos) const;
441  SwTextFrame& GetFrameAtOfst(TextFrameIndex nOfst);
443  bool IsEmptyMaster() const
444  { return GetFollow() && !GetFollow()->GetOffset(); }
445 
446  void SetMergedPara(std::unique_ptr<sw::MergedPara> p);
447  sw::MergedPara * GetMergedPara() { return m_pMergedPara.get(); }
448  sw::MergedPara const* GetMergedPara() const { return m_pMergedPara.get(); }
449 
451  const OUString& GetText() const;
452  SwTextNode const* GetTextNodeForParaProps() const;
453  SwTextNode const* GetTextNodeForFirstText() const;
455  { return const_cast<SwTextNode*>(const_cast<SwTextFrame const*>(this)->GetTextNodeFirst()); };
456  SwTextNode const* GetTextNodeFirst() const;
458  { return const_cast<SwDoc &>(const_cast<SwTextFrame const*>(this)->GetDoc()); }
459  SwDoc const& GetDoc() const;
460 
461  SwTextFrame(SwTextNode * const, SwFrame*, sw::FrameMode eMode);
462 
471  virtual bool Prepare( const PrepareHint ePrep = PrepareHint::Clear,
472  const void *pVoid = nullptr, bool bNotify = true ) override;
473 
479  virtual bool WouldFit( SwTwips &nMaxHeight, bool &bSplit, bool bTst ) override;
480 
487  bool TestFormat( const SwFrame* pPrv, SwTwips &nMaxHeight, bool &bSplit );
488 
493  bool Hyphenate(SwInterHyphInfoTextFrame & rInf);
494 
496  inline SwTwips GrowTst( const SwTwips nGrow );
497 
498  SwParaPortion *GetPara();
499  inline const SwParaPortion *GetPara() const;
500  inline bool HasPara() const;
501  bool HasPara_() const;
502 
504  std::pair<SwTextNode*, sal_Int32> MapViewToModel(TextFrameIndex nIndex) const;
505  SwPosition MapViewToModelPos(TextFrameIndex nIndex) const;
506  TextFrameIndex MapModelToView(SwTextNode const* pNode, sal_Int32 nIndex) const;
507  TextFrameIndex MapModelToViewPos(SwPosition const& rPos) const;
508 
509  // If there are any hanging punctuation portions in the margin
510  // the offset will be returned.
511  SwTwips HangingMargin() const;
512 
513  // Locking
514  bool IsLocked() const { return mbLocked; }
515 
516  bool IsWidow() const { return mbWidow; }
517  bool IsJustWidow() const { return mbJustWidow; }
518  bool IsEmpty() const { return mbEmpty; }
519  bool HasFootnote() const { return mbFootnote; }
520  bool IsInFootnoteConnect()const { return mbInFootnoteConnect;}
521  bool IsFieldFollow() const { return mbFieldFollow;}
522 
523  inline void SetRepaint() const;
524  inline void ResetRepaint() const;
525  bool HasRepaint() const { return mbRepaint; }
526  void SetHasRotatedPortions(bool bHasRotatedPortions);
527  bool GetHasRotatedPortions() const { return mbHasRotatedPortions; }
528  void SetAnimation() const
529  { const_cast<SwTextFrame*>(this)->mbHasAnimation = true; }
530  bool HasAnimation() const { return mbHasAnimation; }
531 
532  bool IsSwapped() const { return mbIsSwapped; }
533 
535 #ifdef DBG_UTIL
536  void CalcFootnoteFlag(TextFrameIndex nStop = TextFrameIndex(COMPLETE_STRING)); //For testing SplitFrame
537 #else
538  void CalcFootnoteFlag();
539 #endif
540 
542  bool IsHiddenNow() const; // bHidden && pOut == pPrt
543  void HideHidden(); // Remove appendage if Hidden
544  void HideFootnotes(TextFrameIndex nStart, TextFrameIndex nEnd);
545 
551  void HideAndShowObjects();
552 
554  void RemoveFootnote(TextFrameIndex nStart,
556  inline SwTwips GetFootnoteFrameHeight() const;
557  SwTextFrame *FindFootnoteRef( const SwTextFootnote *pFootnote );
558  const SwTextFrame *FindFootnoteRef( const SwTextFootnote *pFootnote ) const
559  { return const_cast<SwTextFrame *>(this)->FindFootnoteRef( pFootnote ); }
560  void ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadLine );
561 
566  SwTwips GetFootnoteLine( const SwTextFootnote *pFootnote ) const;
567 
568  TextFrameIndex GetDropLen(TextFrameIndex nWishLen) const;
569 
570  LanguageType GetLangOfChar(TextFrameIndex nIndex, sal_uInt16 nScript,
571  bool bNoChar = false) const;
572 
573  virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override;
574  virtual void CheckDirection( bool bVert ) override;
575 
577  sal_uInt16 GetParHeight() const;
578 
579  inline SwTextFrame *GetFollow();
580  inline const SwTextFrame *GetFollow() const;
581 
583  SwTextFrame *FindQuoVadisFrame();
584 
593  SwTextFrame* GetFormatted( bool bForceQuickFormat = false );
594 
596  void SetFootnote( const bool bNew ) { mbFootnote = bNew; }
597 
599  inline bool IsInside(TextFrameIndex nPos) const;
600 
602  bool GetDropRect( SwRect &rRect ) const
603  { return HasPara() && GetDropRect_( rRect ); }
604 
605  static SwCache *GetTextCache() { return s_pTextCache; }
606  static void SetTextCache( SwCache *pNew ) { s_pTextCache = pNew; }
607 
608  static tools::Long GetMinPrtLine() { return nMinPrtLine; }
609 
610  sal_uInt16 GetCacheIdx() const { return mnCacheIndex; }
611  void SetCacheIdx( const sal_uInt16 nNew ) { mnCacheIndex = nNew; }
612 
614  void ClearPara();
616  void RemoveFromCache();
617 
619  bool IsFootnoteNumFrame() const
620  { return IsInFootnote() && !GetIndPrev() && IsFootnoteNumFrame_(); }
621 
626  SwTwips CalcFitToContent();
627 
634  void CalcAdditionalFirstLineOffset();
635 
637  {
638  return mnAdditionalFirstLineOffset;
639  }
640 
646  tools::Long GetLineSpace( const bool _bNoPropLineSpacing = false ) const;
647 
649  sal_uInt16 FirstLineHeight() const;
650 
652  void MoveFlyInCnt(SwTextFrame *pNew, TextFrameIndex nStart, TextFrameIndex nEnd);
653 
655  TextFrameIndex CalcFlyPos( SwFrameFormat const * pSearch );
656 
658  bool FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff );
659 
661  sal_uInt16 GetLineCount(TextFrameIndex nPos);
662 
664  sal_uLong GetAllLines() const { return mnAllLines; }
665  sal_uLong GetThisLines() const { return mnThisLines;}
666  void RecalcAllLines();
667 
669  void StopAnimation( const OutputDevice *pOut );
670 
672  void VisitPortions( SwPortionHandler& rPH ) const;
673 
675  const SwScriptInfo* GetScriptInfo() const;
676 
678  void SwapWidthAndHeight();
679 
684  void SwitchHorizontalToVertical( SwRect& rRect ) const;
685 
690  void SwitchHorizontalToVertical( Point& rPoint ) const;
691 
696  tools::Long SwitchHorizontalToVertical( tools::Long nLimit ) const;
697 
702  void SwitchVerticalToHorizontal( SwRect& rRect ) const;
703 
708  void SwitchVerticalToHorizontal( Point& rPoint ) const;
709 
714  tools::Long SwitchVerticalToHorizontal( tools::Long nLimit ) const;
715 
720  void SwitchLTRtoRTL( SwRect& rRect ) const;
721 
726  void SwitchLTRtoRTL( Point& rPoint ) const;
727 
732  void SwitchRTLtoLTR( SwRect& rRect ) const { SwitchLTRtoRTL( rRect ); }
733 
738  void SwitchRTLtoLTR( Point& rPoint ) const { SwitchLTRtoRTL( rPoint ); };
739 
740  bool FollowFormatAllowed() const
741  {
742  return mbFollowFormatAllowed;
743  }
744 
746  {
747  mbFollowFormatAllowed = true;
748  }
749 
751  {
752  mbFollowFormatAllowed = false;
753  }
754 
755  SwTwips GetBaseOffsetForFly( bool bIgnoreFlysAnchoredAtThisFrame ) const
756  {
757  return ( bIgnoreFlysAnchoredAtThisFrame ?
758  mnFlyAnchorOfst :
759  mnFlyAnchorOfstNoWrap );
760  }
761 
762  SwTwips GetBaseVertOffsetForFly(bool bIgnoreFlysAnchoredAtThisFrame) const;
763 
765  {
766  return mnHeightOfLastLine;
767  }
768 
769  static void repaintTextFrames( const SwTextNode& rNode );
770 
771  void RegisterToNode(SwTextNode &, bool isForceNodeAsFirst = false);
772 
773  bool IsSymbolAt(TextFrameIndex) const;
774  OUString GetCurWord(SwPosition const&) const;
775  sal_uInt16 GetScalingOfSelectedText(TextFrameIndex nStt, TextFrameIndex nEnd);
776 
777  virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const override;
778 };
779 
780 //use this to protect a SwTextFrame for a given scope from getting merged with
781 //its neighbour and thus deleted
783 {
784 private:
787 public:
788  //Lock pFrame for the lifetime of the Cut/Paste call, etc. to avoid
789  //SwTextFrame::AdjustFollow_ removing the pFrame we're trying to Make
791  {
792  m_pTextFrame = pFrame->IsTextFrame() ? static_cast<SwTextFrame*>(pFrame) : nullptr;
793  if (m_pTextFrame)
794  {
795  m_bOldLocked = m_pTextFrame->IsLocked();
796  m_pTextFrame->Lock();
797  }
798  else
799  {
800  m_bOldLocked = false;
801  }
802  }
803 
805  {
806  if (m_pTextFrame && !m_bOldLocked)
807  m_pTextFrame->Unlock();
808  }
809 };
810 
811 inline const SwParaPortion *SwTextFrame::GetPara() const
812 {
813  return const_cast<SwTextFrame*>(this)->GetPara();
814 }
815 
816 inline bool SwTextFrame::HasPara() const
817 {
818  return mnCacheIndex!=USHRT_MAX && HasPara_();
819 }
820 
821 inline SwTwips SwTextFrame::GrowTst( const SwTwips nGrow )
822 {
823  return Grow( nGrow, true );
824 }
825 
826 inline bool SwTextFrame::IsInside(TextFrameIndex const nPos) const
827 {
828  bool bRet = true;
829  if( nPos < GetOffset() )
830  bRet = false;
831  else
832  {
833  const SwTextFrame *pFoll = GetFollow();
834  if( pFoll && nPos >= pFoll->GetOffset() )
835  bRet = false;
836  }
837  return bRet;
838 }
839 
841 {
842  if( !IsFollow() && IsInFootnote() && HasPara() )
843  return GetFootnoteFrameHeight_();
844  else
845  return 0;
846 }
847 
848 inline const SwTextFrame *SwTextFrame::GetFollow() const
849 {
850  return static_cast<const SwTextFrame*>(SwContentFrame::GetFollow());
851 }
853 {
854  return static_cast<SwTextFrame*>(SwContentFrame::GetFollow());
855 }
856 
857 inline const SwTextFrame *SwTextFrame::GetFrameAtPos( const SwPosition &rPos) const
858 {
859  return const_cast<SwTextFrame*>(this)->GetFrameAtPos( rPos );
860 }
861 
862 inline void SwTextFrame::SetOffset(TextFrameIndex const nNewOfst)
863 {
864  if ( mnOffset != nNewOfst )
865  SetOffset_( nNewOfst );
866 }
867 
868 inline void SwTextFrame::SetRepaint() const
869 {
870  const_cast<SwTextFrame*>(this)->mbRepaint = true;
871 }
872 inline void SwTextFrame::ResetRepaint() const
873 {
874  const_cast<SwTextFrame*>(this)->mbRepaint = false;
875 }
876 
878 protected:
879  explicit TemporarySwap(SwTextFrame * frame, bool swap):
880  m_frame(frame), m_undo(false)
881  {
882  if (m_frame->IsVertical() && swap) {
883  m_undo = true;
885  }
886  }
887 
889  if (m_undo) {
891  }
892  }
893 
894 private:
895  TemporarySwap(TemporarySwap const &) = delete;
896  void operator =(TemporarySwap const &) = delete;
897 
899  bool m_undo;
900 };
901 
903 public:
904  explicit SwSwapIfSwapped(SwTextFrame* frame):
905  TemporarySwap(frame, frame->IsSwapped()) {}
906 };
907 
909 public:
910  explicit SwSwapIfNotSwapped(SwTextFrame* frame):
911  TemporarySwap(frame, !frame->IsSwapped()) {}
912 };
913 
919 {
921  bool bUndo;
922 public:
923  SwFrameSwapper( const SwTextFrame* pFrame, bool bSwapIfNotSwapped );
924  ~SwFrameSwapper();
925 };
926 
928 {
931 public:
932  SwLayoutModeModifier( const OutputDevice& rOutp );
934  void Modify( bool bChgToRTL );
935  void SetAuto();
936 };
937 
939 {
942 public:
943  SwDigitModeModifier( const OutputDevice& rOutp, LanguageType eCurLang );
945 };
946 
947 namespace sw {
948 
954 {
956  std::vector<Extent> extents;
959  OUString mergedText;
966  MergedPara(SwTextFrame & rFrame, std::vector<Extent>&& rExtents,
967  OUString const& rText,
968  SwTextNode *const pProps, SwTextNode *const pFirst,
969  SwTextNode const*const pLast)
970  : listener(rFrame), extents(std::move(rExtents)), mergedText(rText)
971  , pParaPropsNode(pProps), pFirstNode(pFirst), pLastNode(pLast)
972  {
973  assert(pParaPropsNode);
974  assert(pFirstNode);
975  assert(pLastNode);
976  }
977 };
978 
981 {
982 protected:
983 #if BOOST_VERSION < 105600
986 #else
987  sw::MergedPara const*const m_pMerged;
988  SwTextNode const*const m_pNode;
989 #endif
992  MergedAttrIterBase(SwTextFrame const& rFrame);
993 };
994 
996  : public MergedAttrIterBase
997 {
998 public:
999  MergedAttrIter(SwTextFrame const& rFrame) : MergedAttrIterBase(rFrame) {}
1000  SwTextAttr const* NextAttr(SwTextNode const** ppNode = nullptr);
1001 };
1002 
1004 {
1005 private:
1006  std::vector<std::pair<SwTextNode const*, SwTextAttr const*>> m_Hints;
1007  SwTextNode const*const m_pNode;
1009 public:
1010  MergedAttrIterByEnd(SwTextFrame const& rFrame);
1011  SwTextAttr const* NextAttr(SwTextNode const*& rpNode);
1012  void PrevAttr();
1013 };
1014 
1016  : public MergedAttrIterBase
1017 {
1018 public:
1019  MergedAttrIterReverse(SwTextFrame const& rFrame);
1020  SwTextAttr const* PrevAttr(SwTextNode const** ppNode = nullptr);
1021 };
1022 
1023 
1025 
1026 } // namespace sw
1027 
1028 #endif
1029 
1030 /* 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:839
Base class of the Writer layout elements.
Definition: frame.hxx:298
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:157
bool IsMarkHintHidden(SwRootFrame const &rLayout, SwTextNode const &rNode, SwTextAttrEnd const &rHint)
Definition: reffld.cxx:1113
LanguageType nOldLanguageType
Definition: txtfrm.hxx:941
void AllowFollowFormat()
Definition: txtfrm.hxx:745
bool IsFollow() const
Definition: flowfrm.hxx:166
SwInterHyphInfoTextFrame(SwTextFrame const &rFrame, SwTextNode const &rNode, SwInterHyphInfo const &rHyphInfo)
Definition: txtedt.cxx:1592
MergedAttrIter(SwTextFrame const &rFrame)
Definition: txtfrm.hxx:999
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:799
SwTextNode const & GetAttrMerged(SfxItemSet &rFormatSet, SwTextNode const &rNode, SwRootFrame const *pLayout)
Definition: txtfrm.cxx:367
void Init()
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
Definition: fmtpdsc.hxx:35
bool FollowFormatAllowed() const
Definition: txtfrm.hxx:740
SwTwips Grow(SwTwips, bool bTst=false, bool bInfo=false)
Definition: wsfrm.cxx:1491
const SwTwips WIDOW_MAGIC
Definition: txtfrm.hxx:1024
SwDigitModeModifier(const OutputDevice &rOutp, LanguageType eCurLang)
Definition: txtfrm.cxx:722
const OutputDevice & rOut
Definition: txtfrm.hxx:940
bool IsSwapped() const
Definition: txtfrm.hxx:532
void SwitchRTLtoLTR(Point &rPoint) const
Calculates the coordinates of a point when switching from RTL to LTR layout.
Definition: txtfrm.hxx:738
MergedPara(SwTextFrame &rFrame, std::vector< Extent > &&rExtents, OUString const &rText, SwTextNode *const pProps, SwTextNode *const pFirst, SwTextNode const *const pLast)
Definition: txtfrm.hxx:966
bool GetHasRotatedPortions() const
Definition: txtfrm.hxx:527
static void SetTextCache(SwCache *pNew)
Definition: txtfrm.hxx:606
bool HasPara() const
Definition: txtfrm.hxx:816
bool IsInFootnote() const
Definition: frame.hxx:930
virtual bool Prepare(const PrepareHint ePrep=PrepareHint::Clear, const void *pVoid=nullptr, bool bNotify=true)
Definition: wsfrm.cxx:594
sal_uIntPtr sal_uLong
long Long
SwTwips mnFootnoteLine
Definition: txtfrm.hxx:184
void UpdateTextNodeHyphInfo(SwTextFrame const &rFrame, SwTextNode const &rNode, SwInterHyphInfo &o_rHyphInfo)
Definition: txtedt.cxx:1602
TextFrameIndex mnOffset
Definition: txtfrm.hxx:197
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:447
bool IsEmptyMaster() const
If there's a Follow and we don't contain text ourselves.
Definition: txtfrm.hxx:443
Definition: doc.hxx:187
SwParaPortion * GetPara()
Definition: txtcache.cxx:90
SwTextAttr const * PrevAttr(SwTextNode const **ppNode=nullptr)
Definition: txtfrm.cxx:222
SwSwapIfNotSwapped(SwTextFrame *frame)
Definition: txtfrm.hxx:910
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:528
Dialog to specify the properties of date form field.
TemporarySwap(SwTextFrame *frame, bool swap)
Definition: txtfrm.hxx:879
Of course Writer needs its own rectangles.
Definition: swrect.hxx:35
virtual const SvxFormatBreakItem & GetBreakItem() const
Definition: findfrm.cxx:655
virtual const SwFormatPageDesc & GetPageDescItem() const
Definition: findfrm.cxx:660
bool IsInside(TextFrameIndex nPos) const
Respect the Follows.
Definition: txtfrm.hxx:826
virtual bool LeftMargin(SwPaM *) const =0
The root element of a Writer document layout.
Definition: rootfrm.hxx:82
SwTextNode * pNode
Definition: txtfrm.hxx:85
Collection of SwLineLayout instances, represents the paragraph text in Writer layout.
Definition: porlay.hxx:247
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
Definition: wsfrm.cxx:2330
SwTextAttr const * NextAttr(SwTextNode const **ppNode=nullptr)
Definition: txtfrm.cxx:85
static SwCache * GetTextCache()
Definition: txtfrm.hxx:605
void SetJustWidow(const bool bNew)
Definition: txtfrm.hxx:245
SwTwips GetFootnoteFrameHeight() const
Definition: txtfrm.hxx:840
bool mbRepaint
Definition: txtfrm.hxx:228
virtual bool GetModelPositionForViewPoint(SwPosition *, Point &, SwCursorMoveState *=nullptr, bool bTestBackground=false) const
Definition: unusedf.cxx:47
TextFrameLockGuard(SwFrame *pFrame)
Definition: txtfrm.hxx:790
std::vector< std::pair< SwTextNode const *, SwTextAttr const * > > m_Hints
Definition: txtfrm.hxx:1006
bool GetKeyCursorOfst(SwPosition *pPos, const Point &rPoint) const
Makes sure that the Frame is not switched (e.g.
Definition: txtfrm.hxx:399
TextFrameIndex m_nWordStart
output: found word
Definition: txtfrm.hxx:63
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
sw::WriterMultiListener listener
Definition: txtfrm.hxx:955
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:665
SwTwips GrowTst(const SwTwips nGrow)
Test grow.
Definition: txtfrm.hxx:821
std::unique_ptr< sw::MergedPara > CheckParaRedlineMerge(SwTextFrame &rFrame, SwTextNode &rTextNode, FrameMode eMode)
Definition: redlnitr.cxx:205
void Lock()
Definition: txtfrm.hxx:242
sal_Int32 nEnd
Definition: txtfrm.hxx:87
bool IsTextFrame() const
Definition: frame.hxx:1215
sal_uInt16 GetCacheIdx() const
Definition: txtfrm.hxx:610
sal_uInt16 mnCacheIndex
Definition: txtfrm.hxx:199
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:1024
const SwTextFrame * pFrame
Definition: txtfrm.hxx:920
const OutputDevice & m_rOut
Definition: txtfrm.hxx:929
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:4250
Describes parts of multiple text nodes, which will form a text frame, even when redlines are hidden a...
Definition: txtfrm.hxx:953
virtual bool FillSelection(SwSelectionList &rList, const SwRect &rRect) const
Definition: unusedf.cxx:41
void GotoNextLayoutTextFrame(SwNodeIndex &rIndex, SwRootFrame const *const pLayout)
Definition: docnum.cxx:1474
virtual bool UnitDown(SwPaM *, const SwTwips nOffset, bool bSetInReadOnly) const
Definition: trvlfrm.cxx:971
void SetRepaint() const
Definition: txtfrm.hxx:868
TextFrameIndex m_nEnd
Definition: txtfrm.hxx:61
SwTextFrame * GetFollow()
Definition: txtfrm.hxx:852
TextFrameIndex GetOffset() const
Definition: txtfrm.hxx:435
virtual bool GetCharRect(SwRect &, const SwPosition &, SwCursorMoveState *=nullptr, bool bAllowFarAway=true) const
Definition: unusedf.cxx:72
FrameMode
Definition: txtfrm.hxx:102
std::vector< Extent > extents
Definition: txtfrm.hxx:956
bool IsEmpty() const
Definition: txtfrm.hxx:518
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:454
struct _xmlTextWriter * xmlTextWriterPtr
bool FrameContainsNode(SwContentFrame const &rFrame, sal_uLong nNodeIndex)
Definition: txtfrm.cxx:284
SwTwips mnFlyAnchorOfst
Definition: txtfrm.hxx:179
Style of a layout element.
Definition: frmfmt.hxx:58
bool IsWidow() const
Definition: txtfrm.hxx:516
OUString GetExpandTextMerged(SwRootFrame const *const pLayout, SwTextNode const &rNode, bool const bWithNumber, bool const bWithSpacesForLevel, ExpandMode const i_mode)
PrepareHint
Definition: swtypes.hxx:198
#define SAL_MAX_INT32
virtual css::uno::Sequence< css::style::TabStop > GetTabStopInfo(SwTwips)
Definition: frame.hxx:497
SwFrame * GetIndPrev() const
Definition: frame.hxx:707
const SwContentFrame * GetFollow() const
Definition: cntfrm.hxx:114
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:664
Helper class which can be used instead of the macros if a function has too many returns.
Definition: txtfrm.hxx:918
void Unlock()
Definition: txtfrm.hxx:243
bool IsInFootnoteConnect() const
Definition: txtfrm.hxx:520
TextFrameIndex MapModelToView(MergedPara const &, SwTextNode const *pNode, sal_Int32 nIndex)
Definition: txtfrm.cxx:1175
SwTextFrame * GetFrameAtPos(const SwPosition &rPos)
Definition: frmcrsr.cxx:151
void ManipOfst(TextFrameIndex const nNewOfst)
Definition: txtfrm.hxx:438
iterate SwTextAttr in potentially merged text frame
Definition: txtfrm.hxx:980
std::pair< SwTextNode *, sal_Int32 > MapViewToModel(MergedPara const &, TextFrameIndex nIndex)
Definition: txtfrm.cxx:1156
void SetOffset_(TextFrameIndex nNewOfst)
Definition: frmform.cxx:759
SwTextNode * pParaPropsNode
most paragraph properties are taken from the first non-empty node
Definition: txtfrm.hxx:961
css::uno::Reference< css::linguistic2::XHyphenatedWord > m_xHyphWord
output: hyphenated word
Definition: txtfrm.hxx:57
void Modify(bool bChgToRTL)
Definition: txtfrm.cxx:709
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:360
OUString mergedText
note: cannot be const currently to avoid UB because SwTextGuess::Guess const_casts it and modifies it...
Definition: txtfrm.hxx:959
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
virtual bool RightMargin(SwPaM *, bool bAPI=false) const =0
bool IsLocked() const
Definition: txtfrm.hxx:514
SwTextFrame * MakeTextFrame(SwTextNode &rNode, SwFrame *, sw::FrameMode eMode)
Definition: txtfrm.cxx:796
tools::Long SwTwips
Definition: swtypes.hxx:49
SwTextNode * GetParaPropsNode(SwRootFrame const &rLayout, SwNodeIndex const &rNode)
Definition: txtfrm.cxx:324
MergedAttrIterByEnd(SwTextFrame const &rFrame)
Definition: txtfrm.cxx:145
virtual void CheckDirection(bool bVert)
Definition: wsfrm.cxx:391
SwPosition GetParaPropsPos(SwRootFrame const &rLayout, SwPosition const &rPos)
Definition: txtfrm.cxx:338
SwTextFrame * m_pTextFrame
Definition: txtfrm.hxx:785
static tools::Long GetMinPrtLine()
Definition: txtfrm.hxx:608
bool IsFootnoteNumFrame() const
Am I a FootnoteFrame, with a number at the start of the paragraph?
Definition: txtfrm.hxx:619
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
bool GetDropRect(SwRect &rRect) const
DropCaps and selections.
Definition: txtfrm.hxx:602
ExpandMode
Some helpers for converting model strings to view strings.
SwSwapIfSwapped(SwTextFrame *frame)
Definition: txtfrm.hxx:904
sw::MergedPara const * GetMergedPara() const
Definition: txtfrm.hxx:448
void SwitchRTLtoLTR(SwRect &rRect) const
Calculates the coordinates of a rectangle when switching from RTL to LTR layout.
Definition: txtfrm.hxx:732
SwTwips mnAdditionalFirstLineOffset
Definition: txtfrm.hxx:192
void SetOffset(TextFrameIndex nNewOfst)
Definition: txtfrm.hxx:862
virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const
Definition: xmldump.cxx:497
void RecreateStartTextFrames(SwTextNode &rNode)
Definition: frmtool.cxx:1388
void UpdateFramesForRemoveDeleteRedline(SwDoc &rDoc, SwPaM const &rPam)
SwTextFrame * m_frame
Definition: txtfrm.hxx:898
unsigned char sal_uInt8
void operator=(TemporarySwap const &)=delete
void SetFootnote(const bool bNew)
Will be moved soon.
Definition: txtfrm.hxx:596
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
Definition: unosett.cxx:254
void ResetRepaint() const
Definition: txtfrm.hxx:872
SwTextNode const *const m_pNode
Definition: txtfrm.hxx:1007
MergedAttrIterBase(SwTextFrame const &rFrame)
Definition: txtfrm.cxx:77
void ForbidFollowFormat()
Definition: txtfrm.hxx:750
void SetFieldFollow(const bool bNew)
Definition: txtfrm.hxx:247
SwTwips GetHeightOfLastLine() const
Definition: txtfrm.hxx:764
void SwapWidthAndHeight()
Swaps width and height of the text frame.
Definition: txtfrm.cxx:418
sw::MergedPara const * m_pMerged
Definition: txtfrm.hxx:984
SwTwips mnFlyAnchorOfstNoWrap
Definition: txtfrm.hxx:181
SwTwips GetAdditionalFirstLineOffset() const
Definition: txtfrm.hxx:636
std::unique_ptr< sw::MergedPara > m_pMergedPara
redline merge data
Definition: txtfrm.hxx:195
TextFrameIndex m_nStart
input: requested range to hyphenate
Definition: txtfrm.hxx:60
virtual bool WouldFit(SwTwips &nMaxHeight, bool &bSplit, bool bTst)
Definition: unusedf.cxx:35
sal_Int32 nStart
Definition: txtfrm.hxx:86
bool HasAnimation() const
Definition: txtfrm.hxx:530
MergedAttrIterReverse(SwTextFrame const &rFrame)
Definition: txtfrm.cxx:197
bool IsParaPropsNode(SwRootFrame const &rLayout, SwTextNode const &rNode)
Definition: txtfrm.cxx:307
void SetWidow(const bool bNew)
Definition: txtfrm.hxx:244
a clone of SwInterHyphInfo, but with TextFrameIndex instead of node index
Definition: txtfrm.hxx:53
virtual bool GetInfo(SfxPoolItem &) const
Definition: calbck.hxx:166
void GotoPrevLayoutTextFrame(SwNodeIndex &rIndex, SwRootFrame const *const pLayout)
Definition: docnum.cxx:1446
SwTextNode const * pLastNode
mainly for sanity checks
Definition: txtfrm.hxx:965
bool IsVertical() const
Definition: frame.hxx:954
SwTextAttr const * NextAttr(SwTextNode const *&rpNode)
Definition: txtfrm.cxx:160
SwDoc & GetDoc()
Definition: txtfrm.hxx:457
SwTwips mnHeightOfLastLine
Definition: txtfrm.hxx:187
void SetCacheIdx(const sal_uInt16 nNew)
Definition: txtfrm.hxx:611
Small Helper class: Prepares a test format.
Definition: txtfrm.cxx:3106
SwTextNode *const pFirstNode
except break attributes, those are taken from the first node
Definition: txtfrm.hxx:963
SwTwips mnFlyAnchorVertOfstNoWrap
The y position for wrap-through flys anchored at this paragraph.
Definition: txtfrm.hxx:183
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:170
bool IsFieldFollow() const
Definition: txtfrm.hxx:521
bool sw_ChangeOffset(SwTextFrame *pFrame, TextFrameIndex nNew)
Definition: frmcrsr.cxx:108
void SetEmpty(const bool bNew)
Definition: txtfrm.hxx:246
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:930
TextFrameIndex m_nWordLen
Definition: txtfrm.hxx:64
bool HasNumberingWhichNeedsLayoutUpdate(const SwTextNode &rTextNode)
Decides if rTextNode has a numbering which has layout-level values (e.g.
Definition: ndtxt.cxx:911
bool IsJustWidow() const
Definition: txtfrm.hxx:517
const sal_Int32 COMPLETE_STRING
Definition: swtypes.hxx:61
const SwTextFrame * FindFootnoteRef(const SwTextFootnote *pFootnote) const
Definition: txtfrm.hxx:558
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:351
virtual void DestroyImpl() override
Definition: ssfrm.cxx:422
SwFrameSwapper(const SwTextFrame *pFrame, bool bSwapIfNotSwapped)
Definition: txtfrm.cxx:665
SwLayoutModeModifier(const OutputDevice &rOutp)
Definition: txtfrm.cxx:699
bool HasRepaint() const
Definition: txtfrm.hxx:525
SwTextNode const * m_pNode
Definition: txtfrm.hxx:985
bool HasFootnote() const
Definition: txtfrm.hxx:519
SwTwips GetBaseOffsetForFly(bool bIgnoreFlysAnchoredAtThisFrame) const
Definition: txtfrm.hxx:755