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