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 SwTextNode;
34 class SwTextAttrEnd;
35 class SwTextFormatter;
36 class SwTextFormatInfo;
37 class SwParaPortion;
38 class WidowsAndOrphans;
39 class SwTextFootnote;
40 class SwInterHyphInfo; // Hyphenate()
41 class SwCache;
42 class SwBorderAttrs;
43 class SwFrameFormat;
44 struct SwCursorMoveState;
45 struct SwFillData;
46 class SwPortionHandler;
47 class SwScriptInfo;
48 enum class ExpandMode;
49 class SwTextAttr;
50 class SwWrtShell;
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 // warning: Existing must be used only once; a second use would delete the frame created by the first one...
104 enum class FrameMode { New, Existing };
105 std::unique_ptr<sw::MergedPara> CheckParaRedlineMerge(SwTextFrame & rFrame, SwTextNode & rTextNode, FrameMode eMode);
107 
108 bool FrameContainsNode(SwContentFrame const& rFrame, SwNodeOffset nNodeIndex);
109 bool IsParaPropsNode(SwRootFrame const& rLayout, SwTextNode const& rNode);
110 SwTextNode * GetParaPropsNode(SwRootFrame const& rLayout, SwNodeIndex const& rNode);
111 SwPosition GetParaPropsPos(SwRootFrame const& rLayout, SwPosition const& rPos);
112 std::pair<SwTextNode *, SwTextNode *>
113 GetFirstAndLastNode(SwRootFrame const& rLayout, SwNodeIndex const& rPos);
114 
115 SwTextNode const& GetAttrMerged(SfxItemSet & rFormatSet,
116  SwTextNode const& rNode, SwRootFrame const* pLayout);
117 
118 void GotoPrevLayoutTextFrame(SwNodeIndex & rIndex, SwRootFrame const* pLayout);
119 void GotoNextLayoutTextFrame(SwNodeIndex & rIndex, SwRootFrame const* pLayout);
120 
121 TextFrameIndex UpdateMergedParaForDelete(MergedPara & rMerged,
122  bool isRealDelete,
123  SwTextNode const& rNode, sal_Int32 nIndex, sal_Int32 nLen);
124 
125 void MoveMergedFlysAndFootnotes(std::vector<SwTextFrame*> const& rFrames,
126  SwTextNode const& rFirstNode, SwTextNode & rSecondNode, bool);
127 
128 void MoveDeletedPrevFrames(const SwTextNode & rDeletedPrev, SwTextNode & rNode);
129 enum class Recreate { No, ThisNode, Predecessor };
130 void CheckResetRedlineMergeFlag(SwTextNode & rNode, Recreate eRecreateMerged);
131 
132 void UpdateFramesForAddDeleteRedline(SwDoc & rDoc, SwPaM const& rPam);
133 void UpdateFramesForRemoveDeleteRedline(SwDoc & rDoc, SwPaM const& rPam);
134 
136  SwTextFrame & rFrame, SwTextNode & rTextNode,
137  std::set<SwNodeOffset> *pSkipped);
138 
139 OUString GetExpandTextMerged(SwRootFrame const* pLayout,
140  SwTextNode const& rNode, bool bWithNumber,
141  bool bWithSpacesForLevel, ExpandMode i_mode);
142 
143 bool IsMarkHidden(SwRootFrame const& rLayout, ::sw::mark::IMark const& rMark);
144 bool IsMarkHintHidden(SwRootFrame const& rLayout,
145  SwTextNode const& rNode, SwTextAttrEnd const& rHint);
146 
147 void RecreateStartTextFrames(SwTextNode & rNode);
148 
153 bool HasNumberingWhichNeedsLayoutUpdate(const SwTextNode& rTextNode);
154 
155 } // namespace sw
156 
160 {
161  friend class SwTextIter;
162  friend class SwTestFormat;
163  friend class WidowsAndOrphans;
164  friend class TextFrameLockGuard; // May Lock()/Unlock()
165  friend bool sw_ChangeOffset(SwTextFrame* pFrame, TextFrameIndex nNew);
166 
173  static constexpr tools::Long nMinPrtLine = 0; // This Line must not be underrun when printing
174  // Hack for table cells stretching multiple pages
175 
176  sal_uInt32 mnAllLines :24; // Line count for the Paint (including nThisLines)
177  sal_uInt32 mnThisLines :8; // Count of Lines of the Frame
178 
179  // The x position for flys anchored at this paragraph.
180  // These values are calculated in SwTextFrame::CalcBaseOfstForFly()
182  // The x position for wrap-through flys anchored at this paragraph.
187  // OD 2004-03-17 #i11860# - re-factoring of #i11859#
188  // member for height of last line (value needed for proportional line spacing)
190  // member for the additional first line offset, which is caused by the list
191  // label alignment for list level position and space mode LABEL_ALIGNMENT.
192  // This additional first line offset is used for the text formatting.
193  // It is NOT used for the determination of printing area.
195 
197  std::unique_ptr<sw::MergedPara> m_pMergedPara;
198 
199  TextFrameIndex mnOffset; // Is the offset in the Content (character count)
200 
201  sal_uInt16 mnCacheIndex; // Index into the cache, USHRT_MAX if there's definitely no fitting object in the cache
202 
203  // Separates the Master and creates a Follow or adjusts the data in the Follow
204  void AdjustFollow_( SwTextFormatter &rLine, TextFrameIndex nOffset,
205  TextFrameIndex nStrEnd, const sal_uInt8 nMode );
206 
207  // Iterates all Lines and sets the line spacing using the attribute
208  void CalcLineSpace();
209 
210  // Only called in Format
211  void AdjustFrame( const SwTwips nChgHeight, bool bHasToFit = false );
212 
213  // Evaluates the Preps in Format()
214  bool CalcPreps();
215  void PrepWidows( const sal_uInt16 nNeed, bool bNotify );
216  void InvalidateRange_( const SwCharRange &, const tools::Long = 0);
217  inline void InvalidateRange( const SwCharRange &, const tools::Long = 0);
218 
219  // WidowsAndOrphans, AdjustFrame, AdjustFollow
220  void FormatAdjust( SwTextFormatter &rLine, WidowsAndOrphans &rFrameBreak,
221  TextFrameIndex nStrLen, const bool bDummy );
222  void ChangeOffset( SwTextFrame* pFrame, TextFrameIndex nNew );
223 
224  bool mbLocked : 1; // In the Format?
225  bool mbWidow : 1; // Is our follow a Widow?
226  bool mbJustWidow : 1; // Did we just request Widow flag on master?
227  bool mbEmpty : 1; // Are we an empty paragraph?
228  bool mbInFootnoteConnect : 1; // Is in Connect at the moment
229  bool mbFootnote : 1; // Has at least one footnote
230  bool mbRepaint : 1; // TextFrame: Repaint is ready to be fetched
232  bool mbHasRotatedPortions : 1;
233  bool mbFieldFollow : 1; // Start with Field rest of the Master
234  bool mbHasAnimation : 1; // Contains animated SwGrfNumPortion
235  bool mbIsSwapped : 1; // during text formatting we swap the
236  // width and height for vertical formatting
237  // OD 14.03.2003 #i11760# - flag to control, if follow is formatted in
238  // method <CalcFollow(..)>.
239  // E.g., avoid formatting of follow, if method <SwLayoutFrame::FormatWidthCols(..)>
240  // is running.
241  bool mbFollowFormatAllowed : 1;
242 
243  void ResetPreps();
244  void Lock() { mbLocked = true; }
245  void Unlock() { mbLocked = false; }
246  void SetWidow( const bool bNew ) { mbWidow = bNew; }
247  void SetJustWidow( const bool bNew ) { mbJustWidow = bNew; }
248  void SetEmpty( const bool bNew ) { mbEmpty = bNew; }
249  void SetFieldFollow( const bool bNew ) { mbFieldFollow = bNew; }
250 
251  bool IsIdxInside(TextFrameIndex nPos, TextFrameIndex nLen) const;
252 
253  // Changes the Frame or not (cf. FlyCnt)
254  bool GetModelPositionForViewPoint_(SwPosition *pPos, const Point &rPoint,
255  const bool bChgFrame, SwCursorMoveState* = nullptr ) const;
256  void FillCursorPos( SwFillData &rFill ) const;
257 
258  // Format exactly one Line
259  bool FormatLine( SwTextFormatter &rLine, const bool bPrev );
260 
261  // In order to safe stack space, we split this method:
262  // Format_ calls Format_ with parameters
263  void Format_( vcl::RenderContext* pRenderContext, SwParaPortion *pPara );
264  void Format_( SwTextFormatter &rLine, SwTextFormatInfo &rInf,
265  const bool bAdjust = false );
266  void FormatOnceMore( SwTextFormatter &rLine, SwTextFormatInfo &rInf );
267 
268  // Formats the Follow and ensures disposing on orphans
269  bool CalcFollow(TextFrameIndex nTextOfst);
270 
271  virtual void MakePos() override;
272 
273  // Corrects the position from which we need to format
274  static TextFrameIndex FindBrk(const OUString &rText, TextFrameIndex nStart,
275  TextFrameIndex nEnd);
276 
277  // inline branch
278  SwTwips GetFootnoteFrameHeight_() const;
279 
280  // Outsourced to CalcPreps
281  bool CalcPrepFootnoteAdjust();
282 
283  // For Footnote and WidOrp: Forced validation
284  void ValidateFrame();
285  void ValidateBodyFrame();
286 
287  bool GetDropRect_( SwRect &rRect ) const;
288 
289  void SetPara( SwParaPortion *pNew, bool bDelete = true );
290 
291  bool IsFootnoteNumFrame_() const;
292 
293  // Refresh formatting information
294  bool FormatQuick( bool bForceQuickFormat );
295 
296  // Opt: Format empty paragraphs
297  bool FormatEmpty();
298  SwTwips EmptyHeight() const;
299 
300  // Opt: Paint empty paragraphs
301  bool PaintEmpty( const SwRect &, bool bCheck ) const;
302 
303  void ChgThisLines(); // Must always be called if the Line count could have changed
304 
305  // required for 'new' relative anchor position
306  void CalcBaseOfstForFly();
307 
319  void CalcHeightOfLastLine( const bool _bUseFont = false );
320 
321  virtual void DestroyImpl() override;
322  virtual ~SwTextFrame() override;
323 
324  void UpdateOutlineContentVisibilityButton(SwWrtShell* pWrtSh) const;
325  void PaintOutlineContentVisibilityButton() const;
326 
327  virtual void SwClientNotify(SwModify const& rModify, SfxHint const& rHint) override;
328 
329 public:
330 
331  virtual const SvxFormatBreakItem& GetBreakItem() const override;
332  virtual const SwFormatPageDesc& GetPageDescItem() const override;
333 
334  css::uno::Sequence< css::style::TabStop > GetTabStopInfo( SwTwips CurrentPos ) override;
335 
340  void Init();
341 
343  SwRect AutoSpell_(SwTextNode &, sal_Int32);
344 
346  SwRect SmartTagScan(SwTextNode &);
347 
349  void CollectAutoCmplWrds(SwTextNode &, sal_Int32);
350 
357  virtual bool GetCharRect( SwRect& rRect, const SwPosition& rPos,
358  SwCursorMoveState* pCMS = nullptr, bool bAllowFarAway = true ) const override;
359 
361  bool GetAutoPos( SwRect &, const SwPosition& ) const;
362 
383  bool GetTopOfLine( SwTwips& _onTopOfLine,
384  const SwPosition& _rPos ) const;
385 
386  virtual bool FillSelection( SwSelectionList& rList, const SwRect& rRect ) const override;
387 
396  virtual bool GetModelPositionForViewPoint( SwPosition *, Point&,
397  SwCursorMoveState* = nullptr, bool bTestBackground = false ) const override;
398 
403  bool GetKeyCursorOfst(SwPosition *pPos, const Point &rPoint ) const
404  { return GetModelPositionForViewPoint_( pPos, rPoint, false ); }
405 
406  void PaintExtraData( const SwRect & rRect ) const;
407  SwRect GetPaintSwRect();
408  virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&,
409  SwPrintData const*const pPrintData = nullptr ) const override;
410  virtual bool GetInfo( SfxPoolItem & ) const override;
411 
417  virtual bool LeftMargin(SwPaM *) const override;
418  virtual bool RightMargin(SwPaM *, bool bAPI = false) const override;
419 
420  virtual bool UnitUp(SwPaM *, const SwTwips nOffset,
421  bool bSetInReadOnly ) const override;
422  virtual bool UnitDown(SwPaM *, const SwTwips nOffset,
423  bool bSetInReadOnly ) const override;
424  bool UnitUp_(SwPaM *, const SwTwips nOffset,
425  bool bSetInReadOnly ) const;
426  bool UnitDown_(SwPaM *, const SwTwips nOffset,
427  bool bSetInReadOnly ) const;
428 
433  void PrepareVisualMove( TextFrameIndex& nPos, sal_uInt8& nCursorLevel,
434  bool& bRight, bool bInsertCursor );
435 
437  void SplitFrame(TextFrameIndex nTextPos);
438  SwContentFrame *JoinFrame();
439  TextFrameIndex GetOffset() const { return mnOffset; }
440  void SetOffset_(TextFrameIndex nNewOfst);
441  inline void SetOffset (TextFrameIndex nNewOfst);
442  void ManipOfst(TextFrameIndex const nNewOfst) { mnOffset = nNewOfst; }
443  SwTextFrame *GetFrameAtPos ( const SwPosition &rPos);
444  inline const SwTextFrame *GetFrameAtPos ( const SwPosition &rPos) const;
445  SwTextFrame& GetFrameAtOfst(TextFrameIndex nOfst);
447  bool IsEmptyMaster() const
448  { return GetFollow() && !GetFollow()->GetOffset(); }
449 
450  void SetMergedPara(std::unique_ptr<sw::MergedPara> p);
451  sw::MergedPara * GetMergedPara() { return m_pMergedPara.get(); }
452  sw::MergedPara const* GetMergedPara() const { return m_pMergedPara.get(); }
453 
455  const OUString& GetText() const;
456  SwTextNode const* GetTextNodeForParaProps() const;
457  SwTextNode const* GetTextNodeForFirstText() const;
459  { return const_cast<SwTextNode*>(const_cast<SwTextFrame const*>(this)->GetTextNodeFirst()); };
460  SwTextNode const* GetTextNodeFirst() const;
462  { return const_cast<SwDoc &>(const_cast<SwTextFrame const*>(this)->GetDoc()); }
463  SwDoc const& GetDoc() const;
464 
465  SwTextFrame(SwTextNode * const, SwFrame*, sw::FrameMode eMode);
466 
475  virtual bool Prepare( const PrepareHint ePrep = PrepareHint::Clear,
476  const void *pVoid = nullptr, bool bNotify = true ) override;
477 
483  virtual bool WouldFit( SwTwips &nMaxHeight, bool &bSplit, bool bTst ) override;
484 
491  bool TestFormat( const SwFrame* pPrv, SwTwips &nMaxHeight, bool &bSplit );
492 
497  bool Hyphenate(SwInterHyphInfoTextFrame & rInf);
498 
500  inline SwTwips GrowTst( const SwTwips nGrow );
501 
502  SwParaPortion *GetPara();
503  inline const SwParaPortion *GetPara() const;
504  inline bool HasPara() const;
505  bool HasPara_() const;
506 
508  std::pair<SwTextNode*, sal_Int32> MapViewToModel(TextFrameIndex nIndex) const;
509  SwPosition MapViewToModelPos(TextFrameIndex nIndex) const;
510  TextFrameIndex MapModelToView(SwTextNode const* pNode, sal_Int32 nIndex) const;
511  TextFrameIndex MapModelToViewPos(SwPosition const& rPos) const;
512 
513  // If there are any hanging punctuation portions in the margin
514  // the offset will be returned.
515  SwTwips HangingMargin() const;
516 
517  // Locking
518  bool IsLocked() const { return mbLocked; }
519 
520  bool IsWidow() const { return mbWidow; }
521  bool IsJustWidow() const { return mbJustWidow; }
522  bool IsEmpty() const { return mbEmpty; }
523  bool HasFootnote() const { return mbFootnote; }
524  bool IsInFootnoteConnect()const { return mbInFootnoteConnect;}
525  bool IsFieldFollow() const { return mbFieldFollow;}
526 
527  inline void SetRepaint() const;
528  inline void ResetRepaint() const;
529  bool HasRepaint() const { return mbRepaint; }
530  void SetHasRotatedPortions(bool bHasRotatedPortions);
531  bool GetHasRotatedPortions() const { return mbHasRotatedPortions; }
532  void SetAnimation() const
533  { const_cast<SwTextFrame*>(this)->mbHasAnimation = true; }
534  bool HasAnimation() const { return mbHasAnimation; }
535 
536  bool IsSwapped() const { return mbIsSwapped; }
537 
539 #ifdef DBG_UTIL
540  void CalcFootnoteFlag(TextFrameIndex nStop = TextFrameIndex(COMPLETE_STRING)); //For testing SplitFrame
541 #else
542  void CalcFootnoteFlag();
543 #endif
544 
546  bool IsHiddenNow() const; // bHidden && pOut == pPrt
547  void HideHidden(); // Remove appendage if Hidden
548  void HideFootnotes(TextFrameIndex nStart, TextFrameIndex nEnd);
549 
555  void HideAndShowObjects();
556 
558  void RemoveFootnote(TextFrameIndex nStart,
560  inline SwTwips GetFootnoteFrameHeight() const;
561  SwTextFrame *FindFootnoteRef( const SwTextFootnote *pFootnote );
562  const SwTextFrame *FindFootnoteRef( const SwTextFootnote *pFootnote ) const
563  { return const_cast<SwTextFrame *>(this)->FindFootnoteRef( pFootnote ); }
564  void ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadLine );
565 
570  SwTwips GetFootnoteLine( const SwTextFootnote *pFootnote ) const;
571 
572  TextFrameIndex GetDropLen(TextFrameIndex nWishLen) const;
573 
574  LanguageType GetLangOfChar(TextFrameIndex nIndex, sal_uInt16 nScript,
575  bool bNoChar = false) const;
576 
577  virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override;
578  virtual void CheckDirection( bool bVert ) override;
579 
581  SwTwips GetParHeight() const;
582 
583  inline SwTextFrame *GetFollow();
584  inline const SwTextFrame *GetFollow() const;
585 
587  SwTextFrame *FindQuoVadisFrame();
588 
597  SwTextFrame* GetFormatted( bool bForceQuickFormat = false );
598 
600  void SetFootnote( const bool bNew ) { mbFootnote = bNew; }
601 
603  inline bool IsInside(TextFrameIndex nPos) const;
604 
606  bool GetDropRect( SwRect &rRect ) const
607  { return HasPara() && GetDropRect_( rRect ); }
608 
609  static SwCache *GetTextCache() { return s_pTextCache; }
610  static void SetTextCache( SwCache *pNew ) { s_pTextCache = pNew; }
611 
612  static tools::Long GetMinPrtLine() { return nMinPrtLine; }
613 
614  sal_uInt16 GetCacheIdx() const { return mnCacheIndex; }
615  void SetCacheIdx( const sal_uInt16 nNew ) { mnCacheIndex = nNew; }
616 
618  void ClearPara();
620  void RemoveFromCache();
621 
623  bool IsFootnoteNumFrame() const
624  { return IsInFootnote() && !GetIndPrev() && IsFootnoteNumFrame_(); }
625 
630  SwTwips CalcFitToContent();
631 
638  void CalcAdditionalFirstLineOffset();
639 
641  {
642  return mnAdditionalFirstLineOffset;
643  }
644 
650  tools::Long GetLineSpace( const bool _bNoPropLineSpacing = false ) const;
651 
653  sal_uInt16 FirstLineHeight() const;
654 
656  void MoveFlyInCnt(SwTextFrame *pNew, TextFrameIndex nStart, TextFrameIndex nEnd);
657 
659  TextFrameIndex CalcFlyPos( SwFrameFormat const * pSearch );
660 
662  bool FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff );
663 
665  sal_uInt16 GetLineCount(TextFrameIndex nPos);
666 
668  sal_uLong GetAllLines() const { return mnAllLines; }
669  sal_uLong GetThisLines() const { return mnThisLines;}
670  void RecalcAllLines();
671 
673  void StopAnimation( const OutputDevice *pOut );
674 
676  void VisitPortions( SwPortionHandler& rPH ) const;
677 
679  const SwScriptInfo* GetScriptInfo() const;
680 
682  void SwapWidthAndHeight();
683 
688  void SwitchHorizontalToVertical( SwRect& rRect ) const;
689 
694  void SwitchHorizontalToVertical( Point& rPoint ) const;
695 
700  tools::Long SwitchHorizontalToVertical( tools::Long nLimit ) const;
701 
706  void SwitchVerticalToHorizontal( SwRect& rRect ) const;
707 
712  void SwitchVerticalToHorizontal( Point& rPoint ) const;
713 
718  tools::Long SwitchVerticalToHorizontal( tools::Long nLimit ) const;
719 
724  void SwitchLTRtoRTL( SwRect& rRect ) const;
725 
730  void SwitchLTRtoRTL( Point& rPoint ) const;
731 
736  void SwitchRTLtoLTR( SwRect& rRect ) const { SwitchLTRtoRTL( rRect ); }
737 
742  void SwitchRTLtoLTR( Point& rPoint ) const { SwitchLTRtoRTL( rPoint ); };
743 
744  bool FollowFormatAllowed() const
745  {
746  return mbFollowFormatAllowed;
747  }
748 
750  {
751  mbFollowFormatAllowed = true;
752  }
753 
755  {
756  mbFollowFormatAllowed = false;
757  }
758 
759  SwTwips GetBaseOffsetForFly( bool bIgnoreFlysAnchoredAtThisFrame ) const
760  {
761  return ( bIgnoreFlysAnchoredAtThisFrame ?
762  mnFlyAnchorOfst :
763  mnFlyAnchorOfstNoWrap );
764  }
765 
766  SwTwips GetBaseVertOffsetForFly(bool bIgnoreFlysAnchoredAtThisFrame) const;
767 
769  {
770  return mnHeightOfLastLine;
771  }
772 
773  static void repaintTextFrames( const SwTextNode& rNode );
774 
775  void RegisterToNode(SwTextNode &, bool isForceNodeAsFirst = false);
776 
777  bool IsSymbolAt(TextFrameIndex) const;
778  OUString GetCurWord(SwPosition const&) const;
779  sal_uInt16 GetScalingOfSelectedText(TextFrameIndex nStt, TextFrameIndex nEnd);
780 
781  virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const override;
782 };
783 
784 //use this to protect a SwTextFrame for a given scope from getting merged with
785 //its neighbour and thus deleted
787 {
788 private:
791 public:
792  //Lock pFrame for the lifetime of the Cut/Paste call, etc. to avoid
793  //SwTextFrame::AdjustFollow_ removing the pFrame we're trying to Make
795  {
796  m_pTextFrame = pFrame->IsTextFrame() ? static_cast<SwTextFrame*>(pFrame) : nullptr;
797  if (m_pTextFrame)
798  {
799  m_bOldLocked = m_pTextFrame->IsLocked();
800  m_pTextFrame->Lock();
801  }
802  else
803  {
804  m_bOldLocked = false;
805  }
806  }
807 
809  {
810  if (m_pTextFrame && !m_bOldLocked)
811  m_pTextFrame->Unlock();
812  }
813 };
814 
815 inline const SwParaPortion *SwTextFrame::GetPara() const
816 {
817  return const_cast<SwTextFrame*>(this)->GetPara();
818 }
819 
820 inline bool SwTextFrame::HasPara() const
821 {
822  return mnCacheIndex!=USHRT_MAX && HasPara_();
823 }
824 
825 inline SwTwips SwTextFrame::GrowTst( const SwTwips nGrow )
826 {
827  return Grow( nGrow, true );
828 }
829 
830 inline bool SwTextFrame::IsInside(TextFrameIndex const nPos) const
831 {
832  bool bRet = true;
833  if( nPos < GetOffset() )
834  bRet = false;
835  else
836  {
837  const SwTextFrame *pFoll = GetFollow();
838  if( pFoll && nPos >= pFoll->GetOffset() )
839  bRet = false;
840  }
841  return bRet;
842 }
843 
845 {
846  if( !IsFollow() && IsInFootnote() && HasPara() )
847  return GetFootnoteFrameHeight_();
848  else
849  return 0;
850 }
851 
852 inline const SwTextFrame *SwTextFrame::GetFollow() const
853 {
854  return static_cast<const SwTextFrame*>(SwContentFrame::GetFollow());
855 }
857 {
858  return static_cast<SwTextFrame*>(SwContentFrame::GetFollow());
859 }
860 
861 inline const SwTextFrame *SwTextFrame::GetFrameAtPos( const SwPosition &rPos) const
862 {
863  return const_cast<SwTextFrame*>(this)->GetFrameAtPos( rPos );
864 }
865 
866 inline void SwTextFrame::SetOffset(TextFrameIndex const nNewOfst)
867 {
868  if ( mnOffset != nNewOfst )
869  SetOffset_( nNewOfst );
870 }
871 
872 inline void SwTextFrame::SetRepaint() const
873 {
874  const_cast<SwTextFrame*>(this)->mbRepaint = true;
875 }
876 inline void SwTextFrame::ResetRepaint() const
877 {
878  const_cast<SwTextFrame*>(this)->mbRepaint = false;
879 }
880 
882 protected:
883  explicit TemporarySwap(SwTextFrame * frame, bool swap):
884  m_frame(frame), m_undo(false)
885  {
886  if (m_frame->IsVertical() && swap) {
887  m_undo = true;
889  }
890  }
891 
893  if (m_undo) {
895  }
896  }
897 
898 private:
899  TemporarySwap(TemporarySwap const &) = delete;
900  void operator =(TemporarySwap const &) = delete;
901 
903  bool m_undo;
904 };
905 
907 public:
908  explicit SwSwapIfSwapped(SwTextFrame* frame):
909  TemporarySwap(frame, frame->IsSwapped()) {}
910 };
911 
913 public:
914  explicit SwSwapIfNotSwapped(SwTextFrame* frame):
915  TemporarySwap(frame, !frame->IsSwapped()) {}
916 };
917 
923 {
925  bool bUndo;
926 public:
927  SwFrameSwapper( const SwTextFrame* pFrame, bool bSwapIfNotSwapped );
928  ~SwFrameSwapper();
929 };
930 
932 {
935 public:
936  SwLayoutModeModifier( const OutputDevice& rOutp );
938  void Modify( bool bChgToRTL );
939  void SetAuto();
940 };
941 
943 {
946 public:
947  SwDigitModeModifier( const OutputDevice& rOutp, LanguageType eCurLang );
949 };
950 
951 namespace sw {
952 
958 {
960  std::vector<Extent> extents;
963  OUString mergedText;
970  MergedPara(SwTextFrame & rFrame, std::vector<Extent>&& rExtents,
971  OUString const& rText,
972  SwTextNode *const pProps, SwTextNode *const pFirst,
973  SwTextNode const*const pLast)
974  : listener(rFrame), extents(std::move(rExtents)), mergedText(rText)
975  , pParaPropsNode(pProps), pFirstNode(pFirst), pLastNode(pLast)
976  {
977  assert(pParaPropsNode);
978  assert(pFirstNode);
979  assert(pLastNode);
980  }
981 };
982 
985 {
986 protected:
988  SwTextNode const*const m_pNode;
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 
1024 
1025 } // namespace sw
1026 
1027 #endif
1028 
1029 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Recreate
Definition: txtfrm.hxx:129
void CheckResetRedlineMergeFlag(SwTextNode &rNode, Recreate eRecreateMerged)
if first node is First, its frames may need to be moved, never deleted.
Definition: ndtxt.cxx:838
Base class of the Writer layout elements.
Definition: frame.hxx:315
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:159
bool IsMarkHintHidden(SwRootFrame const &rLayout, SwTextNode const &rNode, SwTextAttrEnd const &rHint)
Definition: reffld.cxx:1142
LanguageType nOldLanguageType
Definition: txtfrm.hxx:945
void AllowFollowFormat()
Definition: txtfrm.hxx:749
SwTextNode const *const m_pNode
Definition: txtfrm.hxx:988
bool IsFollow() const
Definition: flowfrm.hxx:166
SwInterHyphInfoTextFrame(SwTextFrame const &rFrame, SwTextNode const &rNode, SwInterHyphInfo const &rHyphInfo)
Definition: txtedt.cxx:1602
MergedAttrIter(SwTextFrame const &rFrame)
Definition: txtfrm.hxx:998
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:798
SwTextNode const & GetAttrMerged(SfxItemSet &rFormatSet, SwTextNode const &rNode, SwRootFrame const *pLayout)
Definition: txtfrm.cxx:371
void Init()
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
Definition: fmtpdsc.hxx:35
bool FollowFormatAllowed() const
Definition: txtfrm.hxx:744
SwTwips Grow(SwTwips, bool bTst=false, bool bInfo=false)
Definition: wsfrm.cxx:1503
const SwTwips WIDOW_MAGIC
Definition: txtfrm.hxx:1023
SwDigitModeModifier(const OutputDevice &rOutp, LanguageType eCurLang)
Definition: txtfrm.cxx:725
const OutputDevice & rOut
Definition: txtfrm.hxx:944
bool IsSwapped() const
Definition: txtfrm.hxx:536
void SwitchRTLtoLTR(Point &rPoint) const
Calculates the coordinates of a point when switching from RTL to LTR layout.
Definition: txtfrm.hxx:742
MergedPara(SwTextFrame &rFrame, std::vector< Extent > &&rExtents, OUString const &rText, SwTextNode *const pProps, SwTextNode *const pFirst, SwTextNode const *const pLast)
Definition: txtfrm.hxx:970
bool GetHasRotatedPortions() const
Definition: txtfrm.hxx:531
static void SetTextCache(SwCache *pNew)
Definition: txtfrm.hxx:610
bool HasPara() const
Definition: txtfrm.hxx:820
bool IsInFootnote() const
Definition: frame.hxx:950
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:288
sal_uIntPtr sal_uLong
long Long
SwTwips mnFootnoteLine
Definition: txtfrm.hxx:186
void UpdateTextNodeHyphInfo(SwTextFrame const &rFrame, SwTextNode const &rNode, SwInterHyphInfo &o_rHyphInfo)
Definition: txtedt.cxx:1612
TextFrameIndex mnOffset
Definition: txtfrm.hxx:199
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:451
bool IsEmptyMaster() const
If there's a Follow and we don't contain text ourselves.
Definition: txtfrm.hxx:447
Definition: doc.hxx:188
SwParaPortion * GetPara()
Definition: txtcache.cxx:90
SwTextAttr const * PrevAttr(SwTextNode const **ppNode=nullptr)
Definition: txtfrm.cxx:226
SwSwapIfNotSwapped(SwTextFrame *frame)
Definition: txtfrm.hxx:914
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:532
Dialog to specify the properties of date form field.
TemporarySwap(SwTextFrame *frame, bool swap)
Definition: txtfrm.hxx:883
Of course Writer needs its own rectangles.
Definition: swrect.hxx:34
virtual const SvxFormatBreakItem & GetBreakItem() const
Definition: findfrm.cxx:685
virtual const SwFormatPageDesc & GetPageDescItem() const
Definition: findfrm.cxx:690
bool IsInside(TextFrameIndex nPos) const
Respect the Follows.
Definition: txtfrm.hxx:830
virtual bool LeftMargin(SwPaM *) const =0
The root element of a Writer document layout.
Definition: rootfrm.hxx:82
SwTextNode * pNode
Definition: txtfrm.hxx:87
Collection of SwLineLayout instances, represents the paragraph text in Writer layout.
Definition: porlay.hxx:251
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
Definition: wsfrm.cxx:2340
SwTextAttr const * NextAttr(SwTextNode const **ppNode=nullptr)
Definition: txtfrm.cxx:89
static SwCache * GetTextCache()
Definition: txtfrm.hxx:609
void SetJustWidow(const bool bNew)
Definition: txtfrm.hxx:247
SwTwips GetFootnoteFrameHeight() const
Definition: txtfrm.hxx:844
bool mbRepaint
Definition: txtfrm.hxx:230
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:93
TextFrameLockGuard(SwFrame *pFrame)
Definition: txtfrm.hxx:794
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:403
TextFrameIndex m_nWordStart
output: found word
Definition: txtfrm.hxx:65
vcl::text::ComplexTextLayoutFlags m_nOldLayoutMode
Definition: txtfrm.hxx:934
sw::WriterMultiListener listener
Definition: txtfrm.hxx:959
A wrapper around SfxPoolItem to store the start position of (usually) a text portion, with an optional end.
Definition: txatbase.hxx:41
sal_uLong GetThisLines() const
Definition: txtfrm.hxx:669
SwTwips GrowTst(const SwTwips nGrow)
Test grow.
Definition: txtfrm.hxx:825
std::unique_ptr< sw::MergedPara > CheckParaRedlineMerge(SwTextFrame &rFrame, SwTextNode &rTextNode, FrameMode eMode)
Definition: redlnitr.cxx:208
void Lock()
Definition: txtfrm.hxx:244
sal_Int32 nEnd
Definition: txtfrm.hxx:89
bool IsTextFrame() const
Definition: frame.hxx:1235
sal_uInt16 GetCacheIdx() const
Definition: txtfrm.hxx:614
sal_uInt16 mnCacheIndex
Definition: txtfrm.hxx:201
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:1033
const SwTextFrame * pFrame
Definition: txtfrm.hxx:924
const OutputDevice & m_rOut
Definition: txtfrm.hxx:933
Describes parts of multiple text nodes, which will form a text frame, even when redlines are hidden a...
Definition: txtfrm.hxx:957
virtual bool FillSelection(SwSelectionList &rList, const SwRect &rRect) const
Definition: unusedf.cxx:41
void GotoNextLayoutTextFrame(SwNodeIndex &rIndex, SwRootFrame const *const pLayout)
Definition: docnum.cxx:1471
virtual bool UnitDown(SwPaM *, const SwTwips nOffset, bool bSetInReadOnly) const
Definition: trvlfrm.cxx:971
void SetRepaint() const
Definition: txtfrm.hxx:872
TextFrameIndex m_nEnd
Definition: txtfrm.hxx:63
SwTextFrame * GetFollow()
Definition: txtfrm.hxx:856
TextFrameIndex GetOffset() const
Definition: txtfrm.hxx:439
virtual bool GetCharRect(SwRect &, const SwPosition &, SwCursorMoveState *=nullptr, bool bAllowFarAway=true) const
Definition: unusedf.cxx:72
FrameMode
Definition: txtfrm.hxx:104
std::vector< Extent > extents
Definition: txtfrm.hxx:960
bool IsEmpty() const
Definition: txtfrm.hxx:522
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:137
SwTextNode * GetTextNodeFirst()
Definition: txtfrm.hxx:458
SwTwips mnFlyAnchorOfst
Definition: txtfrm.hxx:181
Style of a layout element.
Definition: frmfmt.hxx:59
bool IsWidow() const
Definition: txtfrm.hxx:520
OUString GetExpandTextMerged(SwRootFrame const *const pLayout, SwTextNode const &rNode, bool const bWithNumber, bool const bWithSpacesForLevel, ExpandMode const i_mode)
PrepareHint
Definition: swtypes.hxx:194
#define SAL_MAX_INT32
virtual css::uno::Sequence< css::style::TabStop > GetTabStopInfo(SwTwips)
Definition: frame.hxx:514
SwFrame * GetIndPrev() const
Definition: frame.hxx:725
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:668
Helper class which can be used instead of the macros if a function has too many returns.
Definition: txtfrm.hxx:922
void Unlock()
Definition: txtfrm.hxx:245
bool IsInFootnoteConnect() const
Definition: txtfrm.hxx:524
TextFrameIndex MapModelToView(MergedPara const &, SwTextNode const *pNode, sal_Int32 nIndex)
Definition: txtfrm.cxx:1184
SwTextFrame * GetFrameAtPos(const SwPosition &rPos)
Definition: frmcrsr.cxx:151
void ManipOfst(TextFrameIndex const nNewOfst)
Definition: txtfrm.hxx:442
iterate SwTextAttr in potentially merged text frame
Definition: txtfrm.hxx:984
std::pair< SwTextNode *, sal_Int32 > MapViewToModel(MergedPara const &, TextFrameIndex nIndex)
Definition: txtfrm.cxx:1165
void SetOffset_(TextFrameIndex nNewOfst)
Definition: frmform.cxx:758
SwTextNode * pParaPropsNode
most paragraph properties are taken from the first non-empty node
Definition: txtfrm.hxx:965
css::uno::Reference< css::linguistic2::XHyphenatedWord > m_xHyphWord
output: hyphenated word
Definition: txtfrm.hxx:59
void Modify(bool bChgToRTL)
Definition: txtfrm.cxx:712
Marks a node in the document model.
Definition: ndindex.hxx:32
virtual void Format(vcl::RenderContext *pRenderContext, const SwBorderAttrs *pAttrs=nullptr)
Definition: unusedf.cxx:25
SwTwips GetFootnoteFrameHeight_() const
Calculates the maximum reachable height for the TextFrame in the Footnote Area.
Definition: txtftn.cxx:306
void MoveMergedFlysAndFootnotes(std::vector< SwTextFrame * > const &rFrames, SwTextNode const &rFirstNode, SwTextNode &rSecondNode, bool)
Definition: ndtxt.cxx:362
OUString mergedText
note: cannot be const currently to avoid UB because SwTextGuess::Guess const_casts it and modifies it...
Definition: txtfrm.hxx:963
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
virtual bool RightMargin(SwPaM *, bool bAPI=false) const =0
bool IsLocked() const
Definition: txtfrm.hxx:518
SwTextFrame * MakeTextFrame(SwTextNode &rNode, SwFrame *, sw::FrameMode eMode)
Definition: txtfrm.cxx:799
tools::Long SwTwips
Definition: swtypes.hxx:52
SwTextNode * GetParaPropsNode(SwRootFrame const &rLayout, SwNodeIndex const &rNode)
Definition: txtfrm.cxx:328
MergedAttrIterByEnd(SwTextFrame const &rFrame)
Definition: txtfrm.cxx:149
virtual void CheckDirection(bool bVert)
Definition: wsfrm.cxx:389
SwPosition GetParaPropsPos(SwRootFrame const &rLayout, SwPosition const &rPos)
Definition: txtfrm.cxx:342
SwTextFrame * m_pTextFrame
Definition: txtfrm.hxx:789
static tools::Long GetMinPrtLine()
Definition: txtfrm.hxx:612
bool IsFootnoteNumFrame() const
Am I a FootnoteFrame, with a number at the start of the paragraph?
Definition: txtfrm.hxx:623
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
bool GetDropRect(SwRect &rRect) const
DropCaps and selections.
Definition: txtfrm.hxx:606
ExpandMode
Some helpers for converting model strings to view strings.
SwSwapIfSwapped(SwTextFrame *frame)
Definition: txtfrm.hxx:908
sw::MergedPara const * GetMergedPara() const
Definition: txtfrm.hxx:452
void SwitchRTLtoLTR(SwRect &rRect) const
Calculates the coordinates of a rectangle when switching from RTL to LTR layout.
Definition: txtfrm.hxx:736
SwTwips mnAdditionalFirstLineOffset
Definition: txtfrm.hxx:194
void SetOffset(TextFrameIndex nNewOfst)
Definition: txtfrm.hxx:866
virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const
Definition: xmldump.cxx:520
void RecreateStartTextFrames(SwTextNode &rNode)
Definition: frmtool.cxx:1409
void UpdateFramesForRemoveDeleteRedline(SwDoc &rDoc, SwPaM const &rPam)
SwTextFrame * m_frame
Definition: txtfrm.hxx:902
unsigned char sal_uInt8
void operator=(TemporarySwap const &)=delete
void SetFootnote(const bool bNew)
Will be moved soon.
Definition: txtfrm.hxx:600
void ResetRepaint() const
Definition: txtfrm.hxx:876
SwTextNode const *const m_pNode
Definition: txtfrm.hxx:1006
MergedAttrIterBase(SwTextFrame const &rFrame)
Definition: txtfrm.cxx:81
void ForbidFollowFormat()
Definition: txtfrm.hxx:754
void SetFieldFollow(const bool bNew)
Definition: txtfrm.hxx:249
SwTwips GetHeightOfLastLine() const
Definition: txtfrm.hxx:768
void SwapWidthAndHeight()
Swaps width and height of the text frame.
Definition: txtfrm.cxx:421
SwTwips mnFlyAnchorOfstNoWrap
Definition: txtfrm.hxx:183
SwTwips GetAdditionalFirstLineOffset() const
Definition: txtfrm.hxx:640
std::unique_ptr< sw::MergedPara > m_pMergedPara
redline merge data
Definition: txtfrm.hxx:197
TextFrameIndex m_nStart
input: requested range to hyphenate
Definition: txtfrm.hxx:62
virtual bool WouldFit(SwTwips &nMaxHeight, bool &bSplit, bool bTst)
Definition: unusedf.cxx:35
sal_Int32 nStart
Definition: txtfrm.hxx:88
bool HasAnimation() const
Definition: txtfrm.hxx:534
MergedAttrIterReverse(SwTextFrame const &rFrame)
Definition: txtfrm.cxx:201
bool IsParaPropsNode(SwRootFrame const &rLayout, SwTextNode const &rNode)
Definition: txtfrm.cxx:311
void SetWidow(const bool bNew)
Definition: txtfrm.hxx:246
a clone of SwInterHyphInfo, but with TextFrameIndex instead of node index
Definition: txtfrm.hxx:55
virtual bool GetInfo(SfxPoolItem &) const
Definition: calbck.hxx:172
constexpr sal_Int32 COMPLETE_STRING
Definition: swtypes.hxx:58
void GotoPrevLayoutTextFrame(SwNodeIndex &rIndex, SwRootFrame const *const pLayout)
Definition: docnum.cxx:1443
SwTextNode const * pLastNode
mainly for sanity checks
Definition: txtfrm.hxx:969
bool IsVertical() const
Definition: frame.hxx:974
SwTextAttr const * NextAttr(SwTextNode const *&rpNode)
Definition: txtfrm.cxx:164
SwDoc & GetDoc()
Definition: txtfrm.hxx:461
SwTwips mnHeightOfLastLine
Definition: txtfrm.hxx:189
struct _xmlTextWriter * xmlTextWriterPtr
void SetCacheIdx(const sal_uInt16 nNew)
Definition: txtfrm.hxx:615
Small Helper class: Prepares a test format.
Definition: txtfrm.cxx:3116
SwTextNode *const pFirstNode
except break attributes, those are taken from the first node
Definition: txtfrm.hxx:967
SwTwips mnFlyAnchorVertOfstNoWrap
The y position for wrap-through flys anchored at this paragraph.
Definition: txtfrm.hxx:185
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:172
bool IsFieldFollow() const
Definition: txtfrm.hxx:525
bool sw_ChangeOffset(SwTextFrame *pFrame, TextFrameIndex nNew)
Definition: frmcrsr.cxx:108
void SetEmpty(const bool bNew)
Definition: txtfrm.hxx:248
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:66
bool HasNumberingWhichNeedsLayoutUpdate(const SwTextNode &rTextNode)
Decides if rTextNode has a numbering which has layout-level values (e.g.
Definition: ndtxt.cxx:910
sw::MergedPara const *const m_pMerged
Definition: txtfrm.hxx:987
bool IsJustWidow() const
Definition: txtfrm.hxx:521
const SwTextFrame * FindFootnoteRef(const SwTextFootnote *pFootnote) const
Definition: txtfrm.hxx:562
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:355
virtual void DestroyImpl() override
Definition: ssfrm.cxx:422
SwFrameSwapper(const SwTextFrame *pFrame, bool bSwapIfNotSwapped)
Definition: txtfrm.cxx:668
SwLayoutModeModifier(const OutputDevice &rOutp)
Definition: txtfrm.cxx:702
bool HasRepaint() const
Definition: txtfrm.hxx:529
bool HasFootnote() const
Definition: txtfrm.hxx:523
SwTwips GetBaseOffsetForFly(bool bIgnoreFlysAnchoredAtThisFrame) const
Definition: txtfrm.hxx:759
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:4270