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