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 <boost/version.hpp>
27 
28 #include <set>
29 
30 namespace com { namespace sun { namespace star { namespace linguistic2 { class XHyphenatedWord; } } } }
31 
32 namespace sw { namespace mark { class IMark; } }
33 class SwCharRange;
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 
52 #define NON_PRINTING_CHARACTER_COLOR Color(0x26, 0x8b, 0xd2)
53 
56 {
57 private:
59  css::uno::Reference<css::linguistic2::XHyphenatedWord> m_xHyphWord;
60 public:
67 
69  SwTextNode const& rNode, SwInterHyphInfo const& rHyphInfo);
70  void UpdateTextNodeHyphInfo(SwTextFrame const& rFrame,
71  SwTextNode const& rNode, SwInterHyphInfo & o_rHyphInfo);
72 
73  void SetHyphWord(const css::uno::Reference<css::linguistic2::XHyphenatedWord> &xHW)
74  {
75  m_xHyphWord = xHW;
76  }
77 };
78 
79 namespace sw {
80 
85 struct Extent
86 {
87  SwTextNode * /*const logically, but need assignment for std::vector*/ pNode;
88  sal_Int32 nStart;
89  sal_Int32 nEnd;
90  Extent(SwTextNode *const p, sal_Int32 const s, sal_Int32 const e)
91  : pNode(p), nStart(s), nEnd(e)
92  {
93  assert(pNode);
94  assert(nStart != nEnd);
95  }
96 };
97 
98 struct MergedPara;
99 
100 std::pair<SwTextNode*, sal_Int32> MapViewToModel(MergedPara const&, TextFrameIndex nIndex);
101 TextFrameIndex MapModelToView(MergedPara const&, SwTextNode const* pNode, sal_Int32 nIndex);
102 
103 enum class FrameMode { New, Existing };
104 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* );
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();
607 
609  bool IsFootnoteNumFrame() const
610  { return IsInFootnote() && !GetIndPrev() && IsFootnoteNumFrame_(); }
611 
616  SwTwips CalcFitToContent();
617 
624  void CalcAdditionalFirstLineOffset();
625 
627  {
628  return mnAdditionalFirstLineOffset;
629  }
630 
636  long GetLineSpace( const bool _bNoPropLineSpacing = false ) const;
637 
639  sal_uInt16 FirstLineHeight() const;
640 
642  void MoveFlyInCnt(SwTextFrame *pNew, TextFrameIndex nStart, TextFrameIndex nEnd);
643 
645  TextFrameIndex CalcFlyPos( SwFrameFormat const * pSearch );
646 
648  bool FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff );
649 
651  sal_uInt16 GetLineCount(TextFrameIndex nPos);
652 
654  sal_uLong GetAllLines() const { return mnAllLines; }
655  sal_uLong GetThisLines() const { return mnThisLines;}
656  void RecalcAllLines();
657 
659  void StopAnimation( OutputDevice *pOut );
660 
662  void VisitPortions( SwPortionHandler& rPH ) const;
663 
665  const SwScriptInfo* GetScriptInfo() const;
666 
668  void SwapWidthAndHeight();
669 
674  void SwitchHorizontalToVertical( SwRect& rRect ) const;
675 
680  void SwitchHorizontalToVertical( Point& rPoint ) const;
681 
686  long SwitchHorizontalToVertical( long nLimit ) const;
687 
692  void SwitchVerticalToHorizontal( SwRect& rRect ) const;
693 
698  void SwitchVerticalToHorizontal( Point& rPoint ) const;
699 
704  long SwitchVerticalToHorizontal( long nLimit ) const;
705 
710  void SwitchLTRtoRTL( SwRect& rRect ) const;
711 
716  void SwitchLTRtoRTL( Point& rPoint ) const;
717 
722  void SwitchRTLtoLTR( SwRect& rRect ) const { SwitchLTRtoRTL( rRect ); }
723 
728  void SwitchRTLtoLTR( Point& rPoint ) const { SwitchLTRtoRTL( rPoint ); };
729 
730  bool FollowFormatAllowed() const
731  {
732  return mbFollowFormatAllowed;
733  }
734 
736  {
737  mbFollowFormatAllowed = true;
738  }
739 
741  {
742  mbFollowFormatAllowed = false;
743  }
744 
745  SwTwips GetBaseOfstForFly( bool bIgnoreFlysAnchoredAtThisFrame ) const
746  {
747  return ( bIgnoreFlysAnchoredAtThisFrame ?
748  mnFlyAnchorOfst :
749  mnFlyAnchorOfstNoWrap );
750  }
751 
752  SwTwips GetBaseVertOffsetForFly(bool bIgnoreFlysAnchoredAtThisFrame) const;
753 
755  {
756  return mnHeightOfLastLine;
757  }
758 
759  static void repaintTextFrames( const SwTextNode& rNode );
760 
761  void RegisterToNode(SwTextNode &, bool isForceNodeAsFirst = false);
762 
763  bool IsSymbolAt(TextFrameIndex) const;
764  OUString GetCurWord(SwPosition const&) const;
765  sal_uInt16 GetScalingOfSelectedText(TextFrameIndex nStt, TextFrameIndex nEnd);
766 
767  virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const override;
768 };
769 
770 //use this to protect a SwTextFrame for a given scope from getting merged with
771 //its neighbour and thus deleted
773 {
774 private:
777 public:
778  //Lock pFrame for the lifetime of the Cut/Paste call, etc. to avoid
779  //SwTextFrame::AdjustFollow_ removing the pFrame we're trying to Make
781  {
782  m_pTextFrame = pFrame->IsTextFrame() ? static_cast<SwTextFrame*>(pFrame) : nullptr;
783  if (m_pTextFrame)
784  {
785  m_bOldLocked = m_pTextFrame->IsLocked();
786  m_pTextFrame->Lock();
787  }
788  else
789  {
790  m_bOldLocked = false;
791  }
792  }
793 
795  {
796  if (m_pTextFrame && !m_bOldLocked)
797  m_pTextFrame->Unlock();
798  }
799 };
800 
801 inline const SwParaPortion *SwTextFrame::GetPara() const
802 {
803  return const_cast<SwTextFrame*>(this)->GetPara();
804 }
805 
806 inline bool SwTextFrame::HasPara() const
807 {
808  return mnCacheIndex!=USHRT_MAX && HasPara_();
809 }
810 
811 inline SwTwips SwTextFrame::GrowTst( const SwTwips nGrow )
812 {
813  return Grow( nGrow, true );
814 }
815 
816 inline bool SwTextFrame::IsInside(TextFrameIndex const nPos) const
817 {
818  bool bRet = true;
819  if( nPos < GetOfst() )
820  bRet = false;
821  else
822  {
823  const SwTextFrame *pFoll = GetFollow();
824  if( pFoll && nPos >= pFoll->GetOfst() )
825  bRet = false;
826  }
827  return bRet;
828 }
829 
831 {
832  if( !IsFollow() && IsInFootnote() && HasPara() )
833  return GetFootnoteFrameHeight_();
834  else
835  return 0;
836 }
837 
838 inline const SwTextFrame *SwTextFrame::GetFollow() const
839 {
840  return static_cast<const SwTextFrame*>(SwContentFrame::GetFollow());
841 }
843 {
844  return static_cast<SwTextFrame*>(SwContentFrame::GetFollow());
845 }
846 
847 inline const SwTextFrame *SwTextFrame::GetFrameAtPos( const SwPosition &rPos) const
848 {
849  return const_cast<SwTextFrame*>(this)->GetFrameAtPos( rPos );
850 }
851 
852 inline void SwTextFrame::SetOfst(TextFrameIndex const nNewOfst)
853 {
854  if ( mnOffset != nNewOfst )
855  SetOfst_( nNewOfst );
856 }
857 
858 inline void SwTextFrame::SetRepaint() const
859 {
860  const_cast<SwTextFrame*>(this)->mbRepaint = true;
861 }
862 inline void SwTextFrame::ResetRepaint() const
863 {
864  const_cast<SwTextFrame*>(this)->mbRepaint = false;
865 }
866 
867 inline void SwTextFrame::SetBlinkPor() const
868 {
869  const_cast<SwTextFrame*>(this)->mbHasBlinkPortions = true;
870 }
871 inline void SwTextFrame::ResetBlinkPor() const
872 {
873  const_cast<SwTextFrame*>(this)->mbHasBlinkPortions = false;
874 }
875 
877 protected:
878  explicit TemporarySwap(SwTextFrame * frame, bool swap):
879  m_frame(frame), m_undo(false)
880  {
881  if (m_frame->IsVertical() && swap) {
882  m_undo = true;
884  }
885  }
886 
888  if (m_undo) {
890  }
891  }
892 
893 private:
894  TemporarySwap(TemporarySwap const &) = delete;
895  void operator =(TemporarySwap const &) = delete;
896 
898  bool m_undo;
899 };
900 
902 public:
903  explicit SwSwapIfSwapped(SwTextFrame* frame):
904  TemporarySwap(frame, frame->IsSwapped()) {}
905 };
906 
908 public:
909  explicit SwSwapIfNotSwapped(SwTextFrame* frame):
910  TemporarySwap(frame, !frame->IsSwapped()) {}
911 };
912 
918 {
920  bool bUndo;
921 public:
922  SwFrameSwapper( const SwTextFrame* pFrame, bool bSwapIfNotSwapped );
923  ~SwFrameSwapper();
924 };
925 
927 {
930 public:
931  SwLayoutModeModifier( const OutputDevice& rOutp );
933  void Modify( bool bChgToRTL );
934  void SetAuto();
935 };
936 
938 {
941 public:
942  SwDigitModeModifier( const OutputDevice& rOutp, LanguageType eCurLang );
944 };
945 
946 namespace sw {
947 
953 {
955  std::vector<Extent> extents;
958  OUString mergedText;
965  MergedPara(SwTextFrame & rFrame, std::vector<Extent>&& rExtents,
966  OUString const& rText,
967  SwTextNode *const pProps, SwTextNode *const pFirst,
968  SwTextNode const*const pLast)
969  : listener(rFrame), extents(std::move(rExtents)), mergedText(rText)
970  , pParaPropsNode(pProps), pFirstNode(pFirst), pLastNode(pLast)
971  {
972  assert(pParaPropsNode);
973  assert(pFirstNode);
974  assert(pLastNode);
975  }
976 };
977 
980 {
981 protected:
982 #if BOOST_VERSION < 105600
985 #else
986  sw::MergedPara const*const m_pMerged;
987  SwTextNode const*const m_pNode;
988 #endif
991  MergedAttrIterBase(SwTextFrame const& rFrame);
992 };
993 
995  : public MergedAttrIterBase
996 {
997 public:
998  MergedAttrIter(SwTextFrame const& rFrame) : MergedAttrIterBase(rFrame) {}
999  SwTextAttr const* NextAttr(SwTextNode const** ppNode = nullptr);
1000 };
1001 
1003 {
1004 private:
1005  std::vector<std::pair<SwTextNode const*, SwTextAttr const*>> m_Hints;
1006  SwTextNode const*const m_pNode;
1008 public:
1009  MergedAttrIterByEnd(SwTextFrame const& rFrame);
1010  SwTextAttr const* NextAttr(SwTextNode const*& rpNode);
1011  void PrevAttr();
1012 };
1013 
1015  : public MergedAttrIterBase
1016 {
1017 public:
1018  MergedAttrIterReverse(SwTextFrame const& rFrame);
1019  SwTextAttr const* PrevAttr(SwTextNode const** ppNode = nullptr);
1020 };
1021 
1022 
1023 } // namespace sw
1024 
1025 #endif
1026 
1027 /* 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:1106
void AllowFollowFormat()
Definition: txtfrm.hxx:735
bool IsFollow() const
Definition: flowfrm.hxx:166
SwInterHyphInfoTextFrame(SwTextFrame const &rFrame, SwTextNode const &rNode, SwInterHyphInfo const &rHyphInfo)
Definition: txtedt.cxx:1593
MergedAttrIter(SwTextFrame const &rFrame)
Definition: txtfrm.hxx:998
LanguageType const nOldLanguageType
Definition: txtfrm.hxx:940
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:372
void Init()
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
Definition: fmtpdsc.hxx:35
bool FollowFormatAllowed() const
Definition: txtfrm.hxx:730
SwTwips Grow(SwTwips, bool bTst=false, bool bInfo=false)
Definition: wsfrm.cxx:1455
SwDigitModeModifier(const OutputDevice &rOutp, LanguageType eCurLang)
Definition: txtfrm.cxx:727
const OutputDevice & rOut
Definition: txtfrm.hxx:939
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:728
MergedPara(SwTextFrame &rFrame, std::vector< Extent > &&rExtents, OUString const &rText, SwTextNode *const pProps, SwTextNode *const pFirst, SwTextNode const *const pLast)
Definition: txtfrm.hxx:965
void SetBlinkPor() const
Definition: txtfrm.hxx:867
static void SetTextCache(SwCache *pNew)
Definition: txtfrm.hxx:598
bool HasPara() const
Definition: txtfrm.hxx:806
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:1603
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:90
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:82
SwTextAttr const * PrevAttr(SwTextNode const **ppNode=nullptr)
Definition: txtfrm.cxx:229
TextFrameIndex GetOfst() const
Definition: txtfrm.hxx:426
SwSwapIfNotSwapped(SwTextFrame *frame)
Definition: txtfrm.hxx:909
bool IsMarkHidden(SwRootFrame const &rLayout,::sw::mark::IMark const &rMark)
Definition: crbm.cxx:129
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 drop-down form field.
Definition: accframe.hxx:34
virtual void SwClientNotify(const SwModify &, const SfxHint &rHint) override
Definition: calbck.cxx:108
TemporarySwap(SwTextFrame *frame, bool swap)
Definition: txtfrm.hxx:878
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:816
virtual bool LeftMargin(SwPaM *) const =0
The root element of a Writer document layout.
Definition: rootfrm.hxx:79
SwTextNode * pNode
Definition: txtfrm.hxx:87
Collection of SwLineLayout instances, represents the paragraph text in Writer layout.
Definition: porlay.hxx:231
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:830
bool mbRepaint
Definition: txtfrm.hxx:220
TextFrameLockGuard(SwFrame *pFrame)
Definition: txtfrm.hxx:780
std::vector< std::pair< SwTextNode const *, SwTextAttr const * > > m_Hints
Definition: txtfrm.hxx:1005
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:65
sw::WriterMultiListener listener
Definition: txtfrm.hxx:954
static long GetMinPrtLine()
Definition: txtfrm.hxx:600
sal_uLong GetThisLines() const
Definition: txtfrm.hxx:655
SwTwips GrowTst(const SwTwips nGrow)
Test grow.
Definition: txtfrm.hxx:811
std::unique_ptr< sw::MergedPara > CheckParaRedlineMerge(SwTextFrame &rFrame, SwTextNode &rTextNode, FrameMode eMode)
Definition: redlnitr.cxx:53
void ResetBlinkPor() const
Definition: txtfrm.hxx:871
void Lock()
Definition: txtfrm.hxx:233
sal_Int32 nEnd
Definition: txtfrm.hxx:89
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:1019
const SwTextFrame * pFrame
Definition: txtfrm.hxx:919
const OutputDevice & m_rOut
Definition: txtfrm.hxx:928
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:4210
Describes parts of multiple text nodes, which will form a text frame, even when redlines are hidden a...
Definition: txtfrm.hxx:952
virtual bool FillSelection(SwSelectionList &rList, const SwRect &rRect) const
Definition: unusedf.cxx:40
void GotoNextLayoutTextFrame(SwNodeIndex &rIndex, SwRootFrame const *const pLayout)
Definition: docnum.cxx:1481
virtual bool UnitDown(SwPaM *, const SwTwips nOffset, bool bSetInReadOnly) const
Definition: trvlfrm.cxx:965
void SetRepaint() const
Definition: txtfrm.hxx:858
void SetOfst_(TextFrameIndex nNewOfst)
Definition: frmform.cxx:765
TextFrameIndex m_nEnd
Definition: txtfrm.hxx:63
SwTextFrame * GetFollow()
Definition: txtfrm.hxx:842
virtual bool GetCharRect(SwRect &, const SwPosition &, SwCursorMoveState *=nullptr, bool bAllowFarAway=true) const
Definition: unusedf.cxx:71
FrameMode
Definition: txtfrm.hxx:103
std::vector< Extent > extents
Definition: txtfrm.hxx:955
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:85
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:289
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:113
ComplexTextLayoutFlags const m_nOldLayoutMode
Definition: txtfrm.hxx:929
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:654
Helper class which can be used instead of the macros if a function has too many returns.
Definition: txtfrm.hxx:917
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:1170
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:979
std::pair< SwTextNode *, sal_Int32 > MapViewToModel(MergedPara const &, TextFrameIndex nIndex)
Definition: txtfrm.cxx:1151
SwTextNode * pParaPropsNode
most paragraph properties are taken from the first non-empty node
Definition: txtfrm.hxx:960
css::uno::Reference< css::linguistic2::XHyphenatedWord > m_xHyphWord
output: hyphenated word
Definition: txtfrm.hxx:59
void Modify(bool bChgToRTL)
Definition: txtfrm.cxx:714
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:295
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:958
#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
SwTextNode * GetParaPropsNode(SwRootFrame const &rLayout, SwNodeIndex const &rNode)
Definition: txtfrm.cxx:329
MergedAttrIterByEnd(SwTextFrame const &rFrame)
Definition: txtfrm.cxx:157
virtual void CheckDirection(bool bVert)
Definition: wsfrm.cxx:381
SwPosition GetParaPropsPos(SwRootFrame const &rLayout, SwPosition const &rPos)
Definition: txtfrm.cxx:343
SwTextFrame * m_pTextFrame
Definition: txtfrm.hxx:775
bool IsFootnoteNumFrame() const
Am I a FootnoteFrame, with a number at the start of the paragraph?
Definition: txtfrm.hxx:609
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
void SetOfst(TextFrameIndex nNewOfst)
Definition: txtfrm.hxx:852
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:903
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:722
SwTwips mnAdditionalFirstLineOffset
Definition: txtfrm.hxx:184
virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const
Definition: xmldump.cxx:444
void UpdateFramesForRemoveDeleteRedline(SwDoc &rDoc, SwPaM const &rPam)
SwTextFrame * m_frame
Definition: txtfrm.hxx:897
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:745
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
Definition: unosett.cxx:259
void ResetRepaint() const
Definition: txtfrm.hxx:862
SwTextNode const *const m_pNode
Definition: txtfrm.hxx:1006
bool mbHasBlinkPortions
Definition: txtfrm.hxx:221
MergedAttrIterBase(SwTextFrame const &rFrame)
Definition: txtfrm.cxx:89
void ForbidFollowFormat()
Definition: txtfrm.hxx:740
void SetFieldFollow(const bool bNew)
Definition: txtfrm.hxx:238
SwTwips GetHeightOfLastLine() const
Definition: txtfrm.hxx:754
void SwapWidthAndHeight()
Swaps width and height of the text frame.
Definition: txtfrm.cxx:423
sw::MergedPara const * m_pMerged
Definition: txtfrm.hxx:983
SwTwips mnFlyAnchorOfstNoWrap
Definition: txtfrm.hxx:173
SwTwips GetAdditionalFirstLineOffset() const
Definition: txtfrm.hxx:626
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:62
virtual bool WouldFit(SwTwips &nMaxHeight, bool &bSplit, bool bTst)
Definition: unusedf.cxx:34
sal_Int32 nStart
Definition: txtfrm.hxx:88
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:312
void SetWidow(const bool bNew)
Definition: txtfrm.hxx:235
a clone of SwInterHyphInfo, but with TextFrameIndex instead of node index
Definition: txtfrm.hxx:55
virtual bool GetInfo(SfxPoolItem &) const
Definition: calbck.hxx:164
void GotoPrevLayoutTextFrame(SwNodeIndex &rIndex, SwRootFrame const *const pLayout)
Definition: docnum.cxx:1453
SwTextNode const * pLastNode
mainly for sanity checks
Definition: txtfrm.hxx:964
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:3099
SwTextNode *const pFirstNode
except break attributes, those are taken from the first node
Definition: txtfrm.hxx:962
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:473
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:580
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:67
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:66
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:73
std::pair< SwTextNode *, SwTextNode * > GetFirstAndLastNode(SwRootFrame const &rLayout, SwNodeIndex const &rPos)
Definition: txtfrm.cxx:356
virtual void DestroyImpl() override
Definition: ssfrm.cxx:421
SwFrameSwapper(const SwTextFrame *pFrame, bool bSwapIfNotSwapped)
Definition: txtfrm.cxx:670
SwLayoutModeModifier(const OutputDevice &rOutp)
Definition: txtfrm.cxx:704
bool HasRepaint() const
Definition: txtfrm.hxx:516
SwTextNode const * m_pNode
Definition: txtfrm.hxx:984
bool HasFootnote() const
Definition: txtfrm.hxx:510