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 { namespace sun { namespace star { namespace linguistic2 { class XHyphenatedWord; } } } }
29 
30 namespace sw { namespace 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 } // 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
223  bool mbHasRotatedPortions : 1;
224  bool mbFieldFollow : 1; // Start with Field rest of the Master
225  bool mbHasAnimation : 1; // Contains animated SwGrfNumPortion
226  bool mbIsSwapped : 1; // during text formatting we swap the
227  // width and height for vertical formatting
228  // OD 14.03.2003 #i11760# - flag to control, if follow is formatted in
229  // method <CalcFollow(..)>.
230  // E.g., avoid formatting of follow, if method <SwLayoutFrame::FormatWidthCols(..)>
231  // is running.
232  bool mbFollowFormatAllowed : 1;
233 
234  void ResetPreps();
235  void Lock() { mbLocked = true; }
236  void Unlock() { mbLocked = false; }
237  void SetWidow( const bool bNew ) { mbWidow = bNew; }
238  void SetJustWidow( const bool bNew ) { mbJustWidow = bNew; }
239  void SetEmpty( const bool bNew ) { mbEmpty = bNew; }
240  void SetFieldFollow( const bool bNew ) { mbFieldFollow = bNew; }
241 
242  bool IsIdxInside(TextFrameIndex nPos, TextFrameIndex nLen) const;
243 
244  // Changes the Frame or not (cf. FlyCnt)
245  bool GetModelPositionForViewPoint_(SwPosition *pPos, const Point &rPoint,
246  const bool bChgFrame, SwCursorMoveState* = nullptr ) const;
247  void FillCursorPos( SwFillData &rFill ) const;
248 
249  // Format exactly one Line
250  bool FormatLine( SwTextFormatter &rLine, const bool bPrev );
251 
252  // In order to safe stack space, we split this method:
253  // Format_ calls Format_ with parameters
254  void Format_( vcl::RenderContext* pRenderContext, SwParaPortion *pPara );
255  void Format_( SwTextFormatter &rLine, SwTextFormatInfo &rInf,
256  const bool bAdjust = false );
257  void FormatOnceMore( SwTextFormatter &rLine, SwTextFormatInfo &rInf );
258 
259  // Formats the Follow and ensures disposing on orphans
260  bool CalcFollow(TextFrameIndex nTextOfst);
261 
262  virtual void MakePos() override;
263 
264  // Corrects the position from which we need to format
265  static TextFrameIndex FindBrk(const OUString &rText, TextFrameIndex nStart,
266  TextFrameIndex nEnd);
267 
268  // inline branch
269  SwTwips GetFootnoteFrameHeight_() const;
270 
271  // Outsourced to CalcPreps
272  bool CalcPrepFootnoteAdjust();
273 
274  // For Footnote and WidOrp: Forced validation
275  void ValidateFrame();
276  void ValidateBodyFrame();
277 
278  bool GetDropRect_( SwRect &rRect ) const;
279 
280  void SetPara( SwParaPortion *pNew, bool bDelete = true );
281 
282  bool IsFootnoteNumFrame_() const;
283 
284  // Refresh formatting information
285  bool FormatQuick( bool bForceQuickFormat );
286 
287  // Opt: Format empty paragraphs
288  bool FormatEmpty();
289  SwTwips EmptyHeight() const;
290 
291  // Opt: Paint empty paragraphs
292  bool PaintEmpty( const SwRect &, bool bCheck ) const;
293 
294  void ChgThisLines(); // Must always be called if the Line count could have changed
295 
296  // required for 'new' relative anchor position
297  void CalcBaseOfstForFly();
298 
310  void CalcHeightOfLastLine( const bool _bUseFont = false );
311 
312  virtual void DestroyImpl() override;
313  virtual ~SwTextFrame() override;
314 
315 protected:
316  virtual void SwClientNotify(SwModify const& rModify, SfxHint const& rHint) override;
317 
318 public:
319 
320  virtual const SvxFormatBreakItem& GetBreakItem() const override;
321  virtual const SwFormatPageDesc& GetPageDescItem() const override;
322 
323  css::uno::Sequence< css::style::TabStop > GetTabStopInfo( SwTwips CurrentPos ) override;
324 
329  void Init();
330 
332  SwRect AutoSpell_(SwTextNode &, sal_Int32);
333 
335  SwRect SmartTagScan(SwTextNode &);
336 
338  void CollectAutoCmplWrds(SwTextNode &, sal_Int32);
339 
346  virtual bool GetCharRect( SwRect& rRect, const SwPosition& rPos,
347  SwCursorMoveState* pCMS = nullptr, bool bAllowFarAway = true ) const override;
348 
350  bool GetAutoPos( SwRect &, const SwPosition& ) const;
351 
372  bool GetTopOfLine( SwTwips& _onTopOfLine,
373  const SwPosition& _rPos ) const;
374 
375  virtual bool FillSelection( SwSelectionList& rList, const SwRect& rRect ) const override;
376 
385  virtual bool GetModelPositionForViewPoint( SwPosition *, Point&,
386  SwCursorMoveState* = nullptr, bool bTestBackground = false ) const override;
387 
392  bool GetKeyCursorOfst(SwPosition *pPos, const Point &rPoint ) const
393  { return GetModelPositionForViewPoint_( pPos, rPoint, false ); }
394 
395  void PaintExtraData( const SwRect & rRect ) const;
396  SwRect GetPaintSwRect();
397  virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&,
398  SwPrintData const*const pPrintData = nullptr ) const override;
399  virtual bool GetInfo( SfxPoolItem & ) const override;
400 
406  virtual bool LeftMargin(SwPaM *) const override;
407  virtual bool RightMargin(SwPaM *, bool bAPI = false) const override;
408 
409  virtual bool UnitUp(SwPaM *, const SwTwips nOffset,
410  bool bSetInReadOnly ) const override;
411  virtual bool UnitDown(SwPaM *, const SwTwips nOffset,
412  bool bSetInReadOnly ) const override;
413  bool UnitUp_(SwPaM *, const SwTwips nOffset,
414  bool bSetInReadOnly ) const;
415  bool UnitDown_(SwPaM *, const SwTwips nOffset,
416  bool bSetInReadOnly ) const;
417 
422  void PrepareVisualMove( TextFrameIndex& nPos, sal_uInt8& nCursorLevel,
423  bool& bRight, bool bInsertCursor );
424 
426  void SplitFrame(TextFrameIndex nTextPos);
427  SwContentFrame *JoinFrame();
428  TextFrameIndex GetOffset() const { return mnOffset; }
429  void SetOffset_(TextFrameIndex nNewOfst);
430  inline void SetOffset (TextFrameIndex nNewOfst);
431  void ManipOfst(TextFrameIndex const nNewOfst) { mnOffset = nNewOfst; }
432  SwTextFrame *GetFrameAtPos ( const SwPosition &rPos);
433  inline const SwTextFrame *GetFrameAtPos ( const SwPosition &rPos) const;
434  SwTextFrame& GetFrameAtOfst(TextFrameIndex nOfst);
436  bool IsEmptyMaster() const
437  { return GetFollow() && !GetFollow()->GetOffset(); }
438 
439  void SetMergedPara(std::unique_ptr<sw::MergedPara> p);
440  sw::MergedPara * GetMergedPara() { return m_pMergedPara.get(); }
441  sw::MergedPara const* GetMergedPara() const { return m_pMergedPara.get(); }
442 
444  const OUString& GetText() const;
445  SwTextNode const* GetTextNodeForParaProps() const;
446  SwTextNode const* GetTextNodeForFirstText() const;
448  { return const_cast<SwTextNode*>(const_cast<SwTextFrame const*>(this)->GetTextNodeFirst()); };
449  SwTextNode const* GetTextNodeFirst() const;
451  { return const_cast<SwDoc &>(const_cast<SwTextFrame const*>(this)->GetDoc()); }
452  SwDoc const& GetDoc() const;
453 
454  SwTextFrame(SwTextNode * const, SwFrame*, sw::FrameMode eMode);
455 
464  virtual bool Prepare( const PrepareHint ePrep = PrepareHint::Clear,
465  const void *pVoid = nullptr, bool bNotify = true ) override;
466 
472  virtual bool WouldFit( SwTwips &nMaxHeight, bool &bSplit, bool bTst ) override;
473 
480  bool TestFormat( const SwFrame* pPrv, SwTwips &nMaxHeight, bool &bSplit );
481 
486  bool Hyphenate(SwInterHyphInfoTextFrame & rInf);
487 
489  inline SwTwips GrowTst( const SwTwips nGrow );
490 
491  SwParaPortion *GetPara();
492  inline const SwParaPortion *GetPara() const;
493  inline bool HasPara() const;
494  bool HasPara_() const;
495 
497  std::pair<SwTextNode*, sal_Int32> MapViewToModel(TextFrameIndex nIndex) const;
498  SwPosition MapViewToModelPos(TextFrameIndex nIndex) const;
499  TextFrameIndex MapModelToView(SwTextNode const* pNode, sal_Int32 nIndex) const;
500  TextFrameIndex MapModelToViewPos(SwPosition const& rPos) const;
501 
502  // If there are any hanging punctuation portions in the margin
503  // the offset will be returned.
504  SwTwips HangingMargin() const;
505 
506  // Locking
507  bool IsLocked() const { return mbLocked; }
508 
509  bool IsWidow() const { return mbWidow; }
510  bool IsJustWidow() const { return mbJustWidow; }
511  bool IsEmpty() const { return mbEmpty; }
512  bool HasFootnote() const { return mbFootnote; }
513  bool IsInFootnoteConnect()const { return mbInFootnoteConnect;}
514  bool IsFieldFollow() const { return mbFieldFollow;}
515 
516  inline void SetRepaint() const;
517  inline void ResetRepaint() const;
518  bool HasRepaint() const { return mbRepaint; }
519  inline void SetBlinkPor() const;
520  inline void ResetBlinkPor() const;
521  bool HasBlinkPor() const { return mbHasBlinkPortions; }
522  void SetHasRotatedPortions(bool bHasRotatedPortions);
523  bool GetHasRotatedPortions() const { return mbHasRotatedPortions; }
524  void SetAnimation() const
525  { const_cast<SwTextFrame*>(this)->mbHasAnimation = true; }
526  bool HasAnimation() const { return mbHasAnimation; }
527 
528  bool IsSwapped() const { return mbIsSwapped; }
529 
531 #ifdef DBG_UTIL
532  void CalcFootnoteFlag(TextFrameIndex nStop = TextFrameIndex(COMPLETE_STRING)); //For testing SplitFrame
533 #else
534  void CalcFootnoteFlag();
535 #endif
536 
538  bool IsHiddenNow() const; // bHidden && pOut == pPrt
539  void HideHidden(); // Remove appendage if Hidden
540  void HideFootnotes(TextFrameIndex nStart, TextFrameIndex nEnd);
541 
547  void HideAndShowObjects();
548 
550  void RemoveFootnote(TextFrameIndex nStart,
552  inline SwTwips GetFootnoteFrameHeight() const;
553  SwTextFrame *FindFootnoteRef( const SwTextFootnote *pFootnote );
554  const SwTextFrame *FindFootnoteRef( const SwTextFootnote *pFootnote ) const
555  { return const_cast<SwTextFrame *>(this)->FindFootnoteRef( pFootnote ); }
556  void ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadLine );
557 
562  SwTwips GetFootnoteLine( const SwTextFootnote *pFootnote ) const;
563 
564  TextFrameIndex GetDropLen(TextFrameIndex nWishLen) const;
565 
566  LanguageType GetLangOfChar(TextFrameIndex nIndex, sal_uInt16 nScript,
567  bool bNoChar = false) const;
568 
569  virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override;
570  virtual void CheckDirection( bool bVert ) override;
571 
573  sal_uInt16 GetParHeight() const;
574 
575  inline SwTextFrame *GetFollow();
576  inline const SwTextFrame *GetFollow() const;
577 
579  SwTextFrame *FindQuoVadisFrame();
580 
589  SwTextFrame* GetFormatted( bool bForceQuickFormat = false );
590 
592  void SetFootnote( const bool bNew ) { mbFootnote = bNew; }
593 
595  inline bool IsInside(TextFrameIndex nPos) const;
596 
598  bool GetDropRect( SwRect &rRect ) const
599  { return HasPara() && GetDropRect_( rRect ); }
600 
601  static SwCache *GetTextCache() { return s_pTextCache; }
602  static void SetTextCache( SwCache *pNew ) { s_pTextCache = pNew; }
603 
604  static long GetMinPrtLine() { return nMinPrtLine; }
605 
606  sal_uInt16 GetCacheIdx() const { return mnCacheIndex; }
607  void SetCacheIdx( const sal_uInt16 nNew ) { mnCacheIndex = nNew; }
608 
610  void ClearPara();
612  void RemoveFromCache();
613 
615  bool IsFootnoteNumFrame() const
616  { return IsInFootnote() && !GetIndPrev() && IsFootnoteNumFrame_(); }
617 
622  SwTwips CalcFitToContent();
623 
630  void CalcAdditionalFirstLineOffset();
631 
633  {
634  return mnAdditionalFirstLineOffset;
635  }
636 
642  long GetLineSpace( const bool _bNoPropLineSpacing = false ) const;
643 
645  sal_uInt16 FirstLineHeight() const;
646 
648  void MoveFlyInCnt(SwTextFrame *pNew, TextFrameIndex nStart, TextFrameIndex nEnd);
649 
651  TextFrameIndex CalcFlyPos( SwFrameFormat const * pSearch );
652 
654  bool FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff );
655 
657  sal_uInt16 GetLineCount(TextFrameIndex nPos);
658 
660  sal_uLong GetAllLines() const { return mnAllLines; }
661  sal_uLong GetThisLines() const { return mnThisLines;}
662  void RecalcAllLines();
663 
665  void StopAnimation( OutputDevice *pOut );
666 
668  void VisitPortions( SwPortionHandler& rPH ) const;
669 
671  const SwScriptInfo* GetScriptInfo() const;
672 
674  void SwapWidthAndHeight();
675 
680  void SwitchHorizontalToVertical( SwRect& rRect ) const;
681 
686  void SwitchHorizontalToVertical( Point& rPoint ) const;
687 
692  long SwitchHorizontalToVertical( long nLimit ) const;
693 
698  void SwitchVerticalToHorizontal( SwRect& rRect ) const;
699 
704  void SwitchVerticalToHorizontal( Point& rPoint ) const;
705 
710  long SwitchVerticalToHorizontal( long nLimit ) const;
711 
716  void SwitchLTRtoRTL( SwRect& rRect ) const;
717 
722  void SwitchLTRtoRTL( Point& rPoint ) const;
723 
728  void SwitchRTLtoLTR( SwRect& rRect ) const { SwitchLTRtoRTL( rRect ); }
729 
734  void SwitchRTLtoLTR( Point& rPoint ) const { SwitchLTRtoRTL( rPoint ); };
735 
736  bool FollowFormatAllowed() const
737  {
738  return mbFollowFormatAllowed;
739  }
740 
742  {
743  mbFollowFormatAllowed = true;
744  }
745 
747  {
748  mbFollowFormatAllowed = false;
749  }
750 
751  SwTwips GetBaseOffsetForFly( bool bIgnoreFlysAnchoredAtThisFrame ) const
752  {
753  return ( bIgnoreFlysAnchoredAtThisFrame ?
754  mnFlyAnchorOfst :
755  mnFlyAnchorOfstNoWrap );
756  }
757 
758  SwTwips GetBaseVertOffsetForFly(bool bIgnoreFlysAnchoredAtThisFrame) const;
759 
761  {
762  return mnHeightOfLastLine;
763  }
764 
765  static void repaintTextFrames( const SwTextNode& rNode );
766 
767  void RegisterToNode(SwTextNode &, bool isForceNodeAsFirst = false);
768 
769  bool IsSymbolAt(TextFrameIndex) const;
770  OUString GetCurWord(SwPosition const&) const;
771  sal_uInt16 GetScalingOfSelectedText(TextFrameIndex nStt, TextFrameIndex nEnd);
772 
773  virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const override;
774 };
775 
776 //use this to protect a SwTextFrame for a given scope from getting merged with
777 //its neighbour and thus deleted
779 {
780 private:
783 public:
784  //Lock pFrame for the lifetime of the Cut/Paste call, etc. to avoid
785  //SwTextFrame::AdjustFollow_ removing the pFrame we're trying to Make
787  {
788  m_pTextFrame = pFrame->IsTextFrame() ? static_cast<SwTextFrame*>(pFrame) : nullptr;
789  if (m_pTextFrame)
790  {
791  m_bOldLocked = m_pTextFrame->IsLocked();
792  m_pTextFrame->Lock();
793  }
794  else
795  {
796  m_bOldLocked = false;
797  }
798  }
799 
801  {
802  if (m_pTextFrame && !m_bOldLocked)
803  m_pTextFrame->Unlock();
804  }
805 };
806 
807 inline const SwParaPortion *SwTextFrame::GetPara() const
808 {
809  return const_cast<SwTextFrame*>(this)->GetPara();
810 }
811 
812 inline bool SwTextFrame::HasPara() const
813 {
814  return mnCacheIndex!=USHRT_MAX && HasPara_();
815 }
816 
817 inline SwTwips SwTextFrame::GrowTst( const SwTwips nGrow )
818 {
819  return Grow( nGrow, true );
820 }
821 
822 inline bool SwTextFrame::IsInside(TextFrameIndex const nPos) const
823 {
824  bool bRet = true;
825  if( nPos < GetOffset() )
826  bRet = false;
827  else
828  {
829  const SwTextFrame *pFoll = GetFollow();
830  if( pFoll && nPos >= pFoll->GetOffset() )
831  bRet = false;
832  }
833  return bRet;
834 }
835 
837 {
838  if( !IsFollow() && IsInFootnote() && HasPara() )
839  return GetFootnoteFrameHeight_();
840  else
841  return 0;
842 }
843 
844 inline const SwTextFrame *SwTextFrame::GetFollow() const
845 {
846  return static_cast<const SwTextFrame*>(SwContentFrame::GetFollow());
847 }
849 {
850  return static_cast<SwTextFrame*>(SwContentFrame::GetFollow());
851 }
852 
853 inline const SwTextFrame *SwTextFrame::GetFrameAtPos( const SwPosition &rPos) const
854 {
855  return const_cast<SwTextFrame*>(this)->GetFrameAtPos( rPos );
856 }
857 
858 inline void SwTextFrame::SetOffset(TextFrameIndex const nNewOfst)
859 {
860  if ( mnOffset != nNewOfst )
861  SetOffset_( nNewOfst );
862 }
863 
864 inline void SwTextFrame::SetRepaint() const
865 {
866  const_cast<SwTextFrame*>(this)->mbRepaint = true;
867 }
868 inline void SwTextFrame::ResetRepaint() const
869 {
870  const_cast<SwTextFrame*>(this)->mbRepaint = false;
871 }
872 
873 inline void SwTextFrame::SetBlinkPor() const
874 {
875  const_cast<SwTextFrame*>(this)->mbHasBlinkPortions = true;
876 }
877 inline void SwTextFrame::ResetBlinkPor() const
878 {
879  const_cast<SwTextFrame*>(this)->mbHasBlinkPortions = false;
880 }
881 
883 protected:
884  explicit TemporarySwap(SwTextFrame * frame, bool swap):
885  m_frame(frame), m_undo(false)
886  {
887  if (m_frame->IsVertical() && swap) {
888  m_undo = true;
890  }
891  }
892 
894  if (m_undo) {
896  }
897  }
898 
899 private:
900  TemporarySwap(TemporarySwap const &) = delete;
901  void operator =(TemporarySwap const &) = delete;
902 
904  bool m_undo;
905 };
906 
908 public:
909  explicit SwSwapIfSwapped(SwTextFrame* frame):
910  TemporarySwap(frame, frame->IsSwapped()) {}
911 };
912 
914 public:
915  explicit SwSwapIfNotSwapped(SwTextFrame* frame):
916  TemporarySwap(frame, !frame->IsSwapped()) {}
917 };
918 
924 {
926  bool bUndo;
927 public:
928  SwFrameSwapper( const SwTextFrame* pFrame, bool bSwapIfNotSwapped );
929  ~SwFrameSwapper();
930 };
931 
933 {
936 public:
937  SwLayoutModeModifier( const OutputDevice& rOutp );
939  void Modify( bool bChgToRTL );
940  void SetAuto();
941 };
942 
944 {
947 public:
948  SwDigitModeModifier( const OutputDevice& rOutp, LanguageType eCurLang );
950 };
951 
952 namespace sw {
953 
959 {
961  std::vector<Extent> extents;
964  OUString mergedText;
971  MergedPara(SwTextFrame & rFrame, std::vector<Extent>&& rExtents,
972  OUString const& rText,
973  SwTextNode *const pProps, SwTextNode *const pFirst,
974  SwTextNode const*const pLast)
975  : listener(rFrame), extents(std::move(rExtents)), mergedText(rText)
976  , pParaPropsNode(pProps), pFirstNode(pFirst), pLastNode(pLast)
977  {
978  assert(pParaPropsNode);
979  assert(pFirstNode);
980  assert(pLastNode);
981  }
982 };
983 
986 {
987 protected:
988 #if BOOST_VERSION < 105600
991 #else
992  sw::MergedPara const*const m_pMerged;
993  SwTextNode const*const m_pNode;
994 #endif
997  MergedAttrIterBase(SwTextFrame const& rFrame);
998 };
999 
1001  : public MergedAttrIterBase
1002 {
1003 public:
1004  MergedAttrIter(SwTextFrame const& rFrame) : MergedAttrIterBase(rFrame) {}
1005  SwTextAttr const* NextAttr(SwTextNode const** ppNode = nullptr);
1006 };
1007 
1009 {
1010 private:
1011  std::vector<std::pair<SwTextNode const*, SwTextAttr const*>> m_Hints;
1012  SwTextNode const*const m_pNode;
1014 public:
1015  MergedAttrIterByEnd(SwTextFrame const& rFrame);
1016  SwTextAttr const* NextAttr(SwTextNode const*& rpNode);
1017  void PrevAttr();
1018 };
1019 
1021  : public MergedAttrIterBase
1022 {
1023 public:
1024  MergedAttrIterReverse(SwTextFrame const& rFrame);
1025  SwTextAttr const* PrevAttr(SwTextNode const** ppNode = nullptr);
1026 };
1027 
1028 
1030 
1031 } // namespace sw
1032 
1033 #endif
1034 
1035 /* 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:868
Base class of the Writer layout elements.
Definition: frame.hxx:297
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:149
bool IsMarkHintHidden(SwRootFrame const &rLayout, SwTextNode const &rNode, SwTextAttrEnd const &rHint)
Definition: reffld.cxx:1103
LanguageType nOldLanguageType
Definition: txtfrm.hxx:946
void AllowFollowFormat()
Definition: txtfrm.hxx:741
bool IsFollow() const
Definition: flowfrm.hxx:166
SwInterHyphInfoTextFrame(SwTextFrame const &rFrame, SwTextNode const &rNode, SwInterHyphInfo const &rHyphInfo)
Definition: txtedt.cxx:1585
MergedAttrIter(SwTextFrame const &rFrame)
Definition: txtfrm.hxx:1004
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:828
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:736
SwTwips Grow(SwTwips, bool bTst=false, bool bInfo=false)
Definition: wsfrm.cxx:1462
const SwTwips WIDOW_MAGIC
Definition: txtfrm.hxx:1029
SwDigitModeModifier(const OutputDevice &rOutp, LanguageType eCurLang)
Definition: txtfrm.cxx:722
const OutputDevice & rOut
Definition: txtfrm.hxx:945
bool IsSwapped() const
Definition: txtfrm.hxx:528
void SwitchRTLtoLTR(Point &rPoint) const
Calculates the coordinates of a point when switching from RTL to LTR layout.
Definition: txtfrm.hxx:734
MergedPara(SwTextFrame &rFrame, std::vector< Extent > &&rExtents, OUString const &rText, SwTextNode *const pProps, SwTextNode *const pFirst, SwTextNode const *const pLast)
Definition: txtfrm.hxx:971
bool GetHasRotatedPortions() const
Definition: txtfrm.hxx:523
void SetBlinkPor() const
Definition: txtfrm.hxx:873
static void SetTextCache(SwCache *pNew)
Definition: txtfrm.hxx:602
bool HasPara() const
Definition: txtfrm.hxx:812
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
SwTwips mnFootnoteLine
Definition: txtfrm.hxx:176
void UpdateTextNodeHyphInfo(SwTextFrame const &rFrame, SwTextNode const &rNode, SwInterHyphInfo &o_rHyphInfo)
Definition: txtedt.cxx:1595
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:88
sw::MergedPara * GetMergedPara()
Definition: txtfrm.hxx:440
bool IsEmptyMaster() const
If there's a Follow and we don't contain text ourselves.
Definition: txtfrm.hxx:436
Definition: doc.hxx:186
SwParaPortion * GetPara()
Definition: txtcache.cxx:89
SwTextAttr const * PrevAttr(SwTextNode const **ppNode=nullptr)
Definition: txtfrm.cxx:222
SwSwapIfNotSwapped(SwTextFrame *frame)
Definition: txtfrm.hxx:915
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:524
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:884
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:822
virtual bool LeftMargin(SwPaM *) const =0
The root element of a Writer document layout.
Definition: rootfrm.hxx:79
SwTextNode * pNode
Definition: txtfrm.hxx:85
Collection of SwLineLayout instances, represents the paragraph text in Writer layout.
Definition: porlay.hxx:229
SwTextAttr const * NextAttr(SwTextNode const **ppNode=nullptr)
Definition: txtfrm.cxx:85
static SwCache * GetTextCache()
Definition: txtfrm.hxx:601
void SetJustWidow(const bool bNew)
Definition: txtfrm.hxx:238
SwTwips GetFootnoteFrameHeight() const
Definition: txtfrm.hxx:836
bool mbRepaint
Definition: txtfrm.hxx:220
virtual bool GetModelPositionForViewPoint(SwPosition *, Point &, SwCursorMoveState *=nullptr, bool bTestBackground=false) const
Definition: unusedf.cxx:46
TextFrameLockGuard(SwFrame *pFrame)
Definition: txtfrm.hxx:786
std::vector< std::pair< SwTextNode const *, SwTextAttr const * > > m_Hints
Definition: txtfrm.hxx:1011
bool GetKeyCursorOfst(SwPosition *pPos, const Point &rPoint) const
Makes sure that the Frame is not switched (e.g.
Definition: txtfrm.hxx:392
TextFrameIndex m_nWordStart
output: found word
Definition: txtfrm.hxx:63
sw::WriterMultiListener listener
Definition: txtfrm.hxx:960
static long GetMinPrtLine()
Definition: txtfrm.hxx:604
sal_uLong GetThisLines() const
Definition: txtfrm.hxx:661
SwTwips GrowTst(const SwTwips nGrow)
Test grow.
Definition: txtfrm.hxx:817
std::unique_ptr< sw::MergedPara > CheckParaRedlineMerge(SwTextFrame &rFrame, SwTextNode &rTextNode, FrameMode eMode)
Definition: redlnitr.cxx:53
void ResetBlinkPor() const
Definition: txtfrm.hxx:877
void Lock()
Definition: txtfrm.hxx:235
sal_Int32 nEnd
Definition: txtfrm.hxx:87
bool IsTextFrame() const
Definition: frame.hxx:1212
sal_uInt16 GetCacheIdx() const
Definition: txtfrm.hxx:606
sal_uInt16 mnCacheIndex
Definition: txtfrm.hxx:191
virtual bool UnitUp(SwPaM *, const SwTwips nOffset, bool bSetInReadOnly) const
Definition: trvlfrm.cxx:964
TextFrameIndex UpdateMergedParaForDelete(MergedPara &rMerged, bool isRealDelete, SwTextNode const &rNode, sal_Int32 nIndex, sal_Int32 nLen)
Definition: txtfrm.cxx:1021
const SwTextFrame * pFrame
Definition: txtfrm.hxx:925
const OutputDevice & m_rOut
Definition: txtfrm.hxx:934
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:4216
Describes parts of multiple text nodes, which will form a text frame, even when redlines are hidden a...
Definition: txtfrm.hxx:958
virtual bool FillSelection(SwSelectionList &rList, const SwRect &rRect) const
Definition: unusedf.cxx:40
void GotoNextLayoutTextFrame(SwNodeIndex &rIndex, SwRootFrame const *const pLayout)
Definition: docnum.cxx:1473
virtual bool UnitDown(SwPaM *, const SwTwips nOffset, bool bSetInReadOnly) const
Definition: trvlfrm.cxx:969
void SetRepaint() const
Definition: txtfrm.hxx:864
TextFrameIndex m_nEnd
Definition: txtfrm.hxx:61
SwTextFrame * GetFollow()
Definition: txtfrm.hxx:848
TextFrameIndex GetOffset() const
Definition: txtfrm.hxx:428
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:961
bool IsEmpty() const
Definition: txtfrm.hxx:511
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:447
struct _xmlTextWriter * xmlTextWriterPtr
bool FrameContainsNode(SwContentFrame const &rFrame, sal_uLong nNodeIndex)
Definition: txtfrm.cxx:284
SwTwips mnFlyAnchorOfst
Definition: txtfrm.hxx:171
Style of a layout element.
Definition: frmfmt.hxx:57
bool IsWidow() const
Definition: txtfrm.hxx:509
OUString GetExpandTextMerged(SwRootFrame const *const pLayout, SwTextNode const &rNode, bool const bWithNumber, bool const bWithSpacesForLevel, ExpandMode const i_mode)
PrepareHint
Definition: swtypes.hxx:204
#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:660
Helper class which can be used instead of the macros if a function has too many returns.
Definition: txtfrm.hxx:923
void Unlock()
Definition: txtfrm.hxx:236
bool IsInFootnoteConnect() const
Definition: txtfrm.hxx:513
TextFrameIndex MapModelToView(MergedPara const &, SwTextNode const *pNode, sal_Int32 nIndex)
Definition: txtfrm.cxx:1172
SwTextFrame * GetFrameAtPos(const SwPosition &rPos)
Definition: frmcrsr.cxx:151
void ManipOfst(TextFrameIndex const nNewOfst)
Definition: txtfrm.hxx:431
iterate SwTextAttr in potentially merged text frame
Definition: txtfrm.hxx:985
std::pair< SwTextNode *, sal_Int32 > MapViewToModel(MergedPara const &, TextFrameIndex nIndex)
Definition: txtfrm.cxx:1153
void SetOffset_(TextFrameIndex nNewOfst)
Definition: frmform.cxx:759
SwTextNode * pParaPropsNode
most paragraph properties are taken from the first non-empty node
Definition: txtfrm.hxx:966
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:300
void MoveMergedFlysAndFootnotes(std::vector< SwTextFrame * > const &rFrames, SwTextNode const &rFirstNode, SwTextNode &rSecondNode, bool)
Definition: ndtxt.cxx:358
OUString mergedText
note: cannot be const currently to avoid UB because SwTextGuess::Guess const_casts it and modifies it...
Definition: txtfrm.hxx:964
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
virtual bool RightMargin(SwPaM *, bool bAPI=false) const =0
bool IsLocked() const
Definition: txtfrm.hxx:507
SwTextFrame * MakeTextFrame(SwTextNode &rNode, SwFrame *, sw::FrameMode eMode)
Definition: txtfrm.cxx:798
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:781
bool IsFootnoteNumFrame() const
Am I a FootnoteFrame, with a number at the start of the paragraph?
Definition: txtfrm.hxx:615
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:80
bool GetDropRect(SwRect &rRect) const
DropCaps and selections.
Definition: txtfrm.hxx:598
ExpandMode
Some helpers for converting model strings to view strings.
SwSwapIfSwapped(SwTextFrame *frame)
Definition: txtfrm.hxx:909
sw::MergedPara const * GetMergedPara() const
Definition: txtfrm.hxx:441
void SwitchRTLtoLTR(SwRect &rRect) const
Calculates the coordinates of a rectangle when switching from RTL to LTR layout.
Definition: txtfrm.hxx:728
SwTwips mnAdditionalFirstLineOffset
Definition: txtfrm.hxx:184
void SetOffset(TextFrameIndex nNewOfst)
Definition: txtfrm.hxx:858
virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const
Definition: xmldump.cxx:445
void UpdateFramesForRemoveDeleteRedline(SwDoc &rDoc, SwPaM const &rPam)
SwTextFrame * m_frame
Definition: txtfrm.hxx:903
unsigned char sal_uInt8
void operator=(TemporarySwap const &)=delete
void SetFootnote(const bool bNew)
Will be moved soon.
Definition: txtfrm.hxx:592
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
Definition: unosett.cxx:253
void ResetRepaint() const
Definition: txtfrm.hxx:868
SwTextNode const *const m_pNode
Definition: txtfrm.hxx:1012
bool mbHasBlinkPortions
Definition: txtfrm.hxx:221
MergedAttrIterBase(SwTextFrame const &rFrame)
Definition: txtfrm.cxx:77
void ForbidFollowFormat()
Definition: txtfrm.hxx:746
void SetFieldFollow(const bool bNew)
Definition: txtfrm.hxx:240
SwTwips GetHeightOfLastLine() const
Definition: txtfrm.hxx:760
void SwapWidthAndHeight()
Swaps width and height of the text frame.
Definition: txtfrm.cxx:418
sw::MergedPara const * m_pMerged
Definition: txtfrm.hxx:989
SwTwips mnFlyAnchorOfstNoWrap
Definition: txtfrm.hxx:173
SwTwips GetAdditionalFirstLineOffset() const
Definition: txtfrm.hxx:632
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: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:526
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:237
a clone of SwInterHyphInfo, but with TextFrameIndex instead of node index
Definition: txtfrm.hxx:53
virtual bool GetInfo(SfxPoolItem &) const
Definition: calbck.hxx:164
void GotoPrevLayoutTextFrame(SwNodeIndex &rIndex, SwRootFrame const *const pLayout)
Definition: docnum.cxx:1445
SwTextNode const * pLastNode
mainly for sanity checks
Definition: txtfrm.hxx:970
bool IsVertical() const
Definition: frame.hxx:951
SwTextAttr const * NextAttr(SwTextNode const *&rpNode)
Definition: txtfrm.cxx:160
SwDoc & GetDoc()
Definition: txtfrm.hxx:450
SwTwips mnHeightOfLastLine
Definition: txtfrm.hxx:179
void SetCacheIdx(const sal_uInt16 nNew)
Definition: txtfrm.hxx:607
Small Helper class: Prepares a test format.
Definition: txtfrm.cxx:3102
SwTextNode *const pFirstNode
except break attributes, those are taken from the first node
Definition: txtfrm.hxx:968
SwTwips mnFlyAnchorVertOfstNoWrap
The y position for wrap-through flys anchored at this paragraph.
Definition: txtfrm.hxx:175
bool HasBlinkPor() const
Definition: txtfrm.hxx:521
virtual void MakePos()
Definition: calcmove.cxx:534
static SwCache * s_pTextCache
SwLineLayout cache: the lines are not actually owned by the SwTextFrame but by this SwCache...
Definition: txtfrm.hxx:162
bool IsFieldFollow() const
Definition: txtfrm.hxx:514
bool sw_ChangeOffset(SwTextFrame *pFrame, TextFrameIndex nNew)
Definition: frmcrsr.cxx:108
void SetEmpty(const bool bNew)
Definition: txtfrm.hxx:239
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:935
TextFrameIndex m_nWordLen
Definition: txtfrm.hxx:64
bool IsJustWidow() const
Definition: txtfrm.hxx:510
const sal_Int32 COMPLETE_STRING
Definition: swtypes.hxx:61
const SwTextFrame * FindFootnoteRef(const SwTextFootnote *pFootnote) const
Definition: txtfrm.hxx:554
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:518
SwTextNode const * m_pNode
Definition: txtfrm.hxx:990
bool HasFootnote() const
Definition: txtfrm.hxx:512
SwTwips GetBaseOffsetForFly(bool bIgnoreFlysAnchoredAtThisFrame) const
Definition: txtfrm.hxx:751