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