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
30#include <view.hxx>
31
32namespace com::sun::star::linguistic2 { class XHyphenatedWord; }
33
34namespace sw::mark { class IMark; }
35class SwCharRange;
36class SwTextNode;
37class SwTextAttrEnd;
38class SwTextFormatter;
40class SwParaPortion;
42class SwTextFootnote;
43class SwInterHyphInfo; // Hyphenate()
44class SwCache;
45class SwBorderAttrs;
46class SwFrameFormat;
48struct SwFillData;
50class SwScriptInfo;
51enum class ExpandMode;
52class SwTextAttr;
53class SwWrtShell;
54class SwNode;
56
57#define NON_PRINTING_CHARACTER_COLOR Color(0x26, 0x8b, 0xd2)
58
61{
62private:
64 css::uno::Reference<css::linguistic2::XHyphenatedWord> m_xHyphWord;
65public:
72
74 SwTextNode const& rNode, SwInterHyphInfo const& rHyphInfo);
75 void UpdateTextNodeHyphInfo(SwTextFrame const& rFrame,
76 SwTextNode const& rNode, SwInterHyphInfo & o_rHyphInfo);
77
78 void SetHyphWord(const css::uno::Reference<css::linguistic2::XHyphenatedWord> &xHW)
79 {
80 m_xHyphWord = xHW;
81 }
82};
83
84namespace sw {
85
90struct Extent
91{
92 SwTextNode * /*const logically, but need assignment for std::vector*/ pNode;
93 sal_Int32 nStart;
94 sal_Int32 nEnd;
95 Extent(SwTextNode *const p, sal_Int32 const s, sal_Int32 const e)
96 : pNode(p), nStart(s), nEnd(e)
97 {
98 assert(pNode);
99 assert(nStart != nEnd);
100 }
101};
102
103struct MergedPara;
104class InsertText;
105
106std::pair<SwTextNode*, sal_Int32> MapViewToModel(MergedPara const&, TextFrameIndex nIndex);
107TextFrameIndex MapModelToView(MergedPara const&, SwTextNode const* pNode, sal_Int32 nIndex);
108
109// warning: Existing must be used only once; a second use would delete the frame created by the first one...
110enum class FrameMode { New, Existing };
111std::unique_ptr<sw::MergedPara> CheckParaRedlineMerge(SwTextFrame & rFrame, SwTextNode & rTextNode, FrameMode eMode);
113
114bool FrameContainsNode(SwContentFrame const& rFrame, SwNodeOffset nNodeIndex);
115bool IsParaPropsNode(SwRootFrame const& rLayout, SwTextNode const& rNode);
116SwTextNode * GetParaPropsNode(SwRootFrame const& rLayout, SwNode const& rNode);
117SwPosition GetParaPropsPos(SwRootFrame const& rLayout, SwPosition const& rPos);
118std::pair<SwTextNode *, SwTextNode *>
119GetFirstAndLastNode(SwRootFrame const& rLayout, SwNode const& rPos);
120
121SwTextNode const& GetAttrMerged(SfxItemSet & rFormatSet,
122 SwTextNode const& rNode, SwRootFrame const* pLayout);
123
124void GotoPrevLayoutTextFrame(SwNodeIndex & rIndex, SwRootFrame const* pLayout);
125void GotoNextLayoutTextFrame(SwNodeIndex & rIndex, SwRootFrame const* pLayout);
126
127TextFrameIndex UpdateMergedParaForDelete(MergedPara & rMerged,
128 bool isRealDelete,
129 SwTextNode const& rNode, sal_Int32 nIndex, sal_Int32 nLen);
130
131void MoveMergedFlysAndFootnotes(std::vector<SwTextFrame*> const& rFrames,
132 SwTextNode const& rFirstNode, SwTextNode & rSecondNode, bool);
133
134void MoveDeletedPrevFrames(const SwTextNode & rDeletedPrev, SwTextNode & rNode);
136void CheckResetRedlineMergeFlag(SwTextNode & rNode, Recreate eRecreateMerged);
137
138void UpdateFramesForAddDeleteRedline(SwDoc & rDoc, SwPaM const& rPam);
139void UpdateFramesForRemoveDeleteRedline(SwDoc & rDoc, SwPaM const& rPam);
140
142 SwTextFrame & rFrame, SwTextNode & rTextNode,
143 std::set<SwNodeOffset> *pSkipped);
144
145OUString GetExpandTextMerged(SwRootFrame const* pLayout,
146 SwTextNode const& rNode, bool bWithNumber,
147 bool bWithSpacesForLevel, ExpandMode i_mode);
148
149bool IsMarkHidden(SwRootFrame const& rLayout, ::sw::mark::IMark const& rMark);
150bool IsMarkHintHidden(SwRootFrame const& rLayout,
151 SwTextNode const& rNode, SwTextAttrEnd const& rHint);
152
154
155sw::InsertText MakeInsertText(SwTextNode& rNode, const sal_Int32 nPos, const sal_Int32 nLen);
156
162
163} // namespace sw
164
168{
169 friend class SwTextIter;
170 friend class SwTestFormat;
171 friend class WidowsAndOrphans;
172 friend class TextFrameLockGuard; // May Lock()/Unlock()
173 friend bool sw_ChangeOffset(SwTextFrame* pFrame, TextFrameIndex nNew);
174
181 static constexpr tools::Long nMinPrtLine = 0; // This Line must not be underrun when printing
182 // Hack for table cells stretching multiple pages
183
184 sal_Int32 mnAllLines :24; // Line count for the Paint (including nThisLines)
185 sal_Int32 mnThisLines :8; // Count of Lines of the Frame
186
187 // The x position for flys anchored at this paragraph.
188 // These values are calculated in SwTextFrame::CalcBaseOfstForFly()
190 // The x position for wrap-through flys anchored at this paragraph.
195 // OD 2004-03-17 #i11860# - re-factoring of #i11859#
196 // member for height of last line (value needed for proportional line spacing)
198 // member for the additional first line offset, which is caused by the list
199 // label alignment for list level position and space mode LABEL_ALIGNMENT.
200 // This additional first line offset is used for the text formatting.
201 // It is NOT used for the determination of printing area.
203
205 std::unique_ptr<sw::MergedPara> m_pMergedPara;
206
207 TextFrameIndex mnOffset; // Is the offset in the Content (character count)
208
209 sal_uInt16 mnCacheIndex; // Index into the cache, USHRT_MAX if there's definitely no fitting object in the cache
210
211 // Separates the Master and creates a Follow or adjusts the data in the Follow
212 void AdjustFollow_( SwTextFormatter &rLine, TextFrameIndex nOffset,
213 TextFrameIndex nStrEnd, const sal_uInt8 nMode );
214
215 // Iterates all Lines and sets the line spacing using the attribute
216 void CalcLineSpace();
217
218 // Only called in Format
219 void AdjustFrame( const SwTwips nChgHeight, bool bHasToFit = false );
220
221 // Evaluates the Preps in Format()
222 bool CalcPreps();
223 void PrepWidows( const sal_uInt16 nNeed, bool bNotify );
224 void InvalidateRange_( const SwCharRange &, const tools::Long = 0);
225 inline void InvalidateRange( const SwCharRange &, const tools::Long = 0);
226
227 // WidowsAndOrphans, AdjustFrame, AdjustFollow
228 void FormatAdjust( SwTextFormatter &rLine, WidowsAndOrphans &rFrameBreak,
229 TextFrameIndex nStrLen, const bool bDummy );
230 void ChangeOffset( SwTextFrame* pFrame, TextFrameIndex nNew );
231
232 bool mbLocked : 1; // In the Format?
233 bool mbWidow : 1; // Is our follow a Widow?
234 bool mbJustWidow : 1; // Did we just request Widow flag on master?
235 bool mbEmpty : 1; // Are we an empty paragraph?
236 bool mbInFootnoteConnect : 1; // Is in Connect at the moment
237 bool mbFootnote : 1; // Has at least one footnote
238 bool mbRepaint : 1; // TextFrame: Repaint is ready to be fetched
241 bool mbFieldFollow : 1; // Start with Field rest of the Master
242 bool mbHasAnimation : 1; // Contains animated SwGrfNumPortion
243 bool mbIsSwapped : 1; // during text formatting we swap the
244 // width and height for vertical formatting
245 // OD 14.03.2003 #i11760# - flag to control, if follow is formatted in
246 // method <CalcFollow(..)>.
247 // E.g., avoid formatting of follow, if method <SwLayoutFrame::FormatWidthCols(..)>
248 // is running.
250
251 void ResetPreps();
252 void Lock() { mbLocked = true; }
253 void Unlock() { mbLocked = false; }
254 void SetWidow( const bool bNew ) { mbWidow = bNew; }
255 void SetJustWidow( const bool bNew ) { mbJustWidow = bNew; }
256 void SetEmpty( const bool bNew ) { mbEmpty = bNew; }
257 void SetFieldFollow( const bool bNew ) { mbFieldFollow = bNew; }
258
259 bool IsIdxInside(TextFrameIndex nPos, TextFrameIndex nLen) const;
260
261 // Changes the Frame or not (cf. FlyCnt)
262 bool GetModelPositionForViewPoint_(SwPosition *pPos, const Point &rPoint,
263 const bool bChgFrame, SwCursorMoveState* = nullptr ) const;
264 void FillCursorPos( SwFillData &rFill ) const;
265
266 // Format exactly one Line
267 bool FormatLine( SwTextFormatter &rLine, const bool bPrev );
268
269 // In order to safe stack space, we split this method:
270 // Format_ calls Format_ with parameters
271 void FormatImpl( vcl::RenderContext* pRenderContext, SwParaPortion *pPara,
272 ::std::vector<SwAnchoredObject *> & rIntersectingObjs);
273 void Format_( SwTextFormatter &rLine, SwTextFormatInfo &rInf,
274 const bool bAdjust = false );
275 void FormatOnceMore( SwTextFormatter &rLine, SwTextFormatInfo &rInf );
276
277 // Formats the Follow and ensures disposing on orphans
278 bool CalcFollow(TextFrameIndex nTextOfst);
279
280 virtual void MakePos() override;
281
282 // Corrects the position from which we need to format
283 static TextFrameIndex FindBrk(std::u16string_view aText, TextFrameIndex nStart,
284 TextFrameIndex nEnd);
285
286 // inline branch
287 SwTwips GetFootnoteFrameHeight_() const;
288
289 // Outsourced to CalcPreps
290 bool CalcPrepFootnoteAdjust();
291
292 // For Footnote and WidOrp: Forced validation
293 void ValidateFrame();
294 void ValidateBodyFrame();
295
296 bool GetDropRect_( SwRect &rRect ) const;
297
298 void SetPara( SwParaPortion *pNew, bool bDelete = true );
299
300 bool IsFootnoteNumFrame_() const;
301
302 // Refresh formatting information
303 bool FormatQuick( bool bForceQuickFormat );
304
305 // Opt: Format empty paragraphs
306 bool FormatEmpty();
307 SwTwips EmptyHeight() const;
308
309 // Opt: Paint empty paragraphs
310 bool PaintEmpty( const SwRect &, bool bCheck ) const;
311
312 void ChgThisLines(); // Must always be called if the Line count could have changed
313
314 // required for 'new' relative anchor position
315 void CalcBaseOfstForFly();
316
328 void CalcHeightOfLastLine( const bool _bUseFont = false );
329
330 virtual void DestroyImpl() override;
331 virtual ~SwTextFrame() override;
332
333 void UpdateOutlineContentVisibilityButton(SwWrtShell* pWrtSh) const;
334 void PaintOutlineContentVisibilityButton() const;
335
336 void PaintParagraphStylesHighlighting() const;
337
338 virtual void SwClientNotify(SwModify const& rModify, SfxHint const& rHint) override;
339
341 std::vector<SwFlyAtContentFrame*> GetSplitFlyDrawObjs() const;
342
343public:
344
345 virtual const SvxFormatBreakItem& GetBreakItem() const override;
346 virtual const SwFormatPageDesc& GetPageDescItem() const override;
347
348 css::uno::Sequence< css::style::TabStop > GetTabStopInfo( SwTwips CurrentPos ) override;
349
354 void Init();
355
357 SwRect AutoSpell_(SwTextNode &, sal_Int32);
358
360 SwRect SmartTagScan(SwTextNode &);
361
363 void CollectAutoCmplWrds(SwTextNode &, sal_Int32);
364
371 virtual bool GetCharRect( SwRect& rRect, const SwPosition& rPos,
372 SwCursorMoveState* pCMS = nullptr, bool bAllowFarAway = true ) const override;
373
375 bool GetAutoPos( SwRect &, const SwPosition& ) const;
376
397 bool GetTopOfLine( SwTwips& _onTopOfLine,
398 const SwPosition& _rPos ) const;
399
400 virtual bool FillSelection( SwSelectionList& rList, const SwRect& rRect ) const override;
401
411 SwCursorMoveState* = nullptr, bool bTestBackground = false ) const override;
412
417 bool GetKeyCursorOfst(SwPosition *pPos, const Point &rPoint ) const
418 { return GetModelPositionForViewPoint_( pPos, rPoint, false ); }
419
420 void PaintExtraData( const SwRect & rRect ) const;
421 SwRect GetPaintSwRect();
422 virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&,
423 SwPrintData const*const pPrintData = nullptr ) const override;
424 virtual bool GetInfo( SfxPoolItem & ) const override;
425
431 virtual bool LeftMargin(SwPaM *) const override;
432 virtual bool RightMargin(SwPaM *, bool bAPI = false) const override;
433
434 virtual bool UnitUp(SwPaM *, const SwTwips nOffset,
435 bool bSetInReadOnly ) const override;
436 virtual bool UnitDown(SwPaM *, const SwTwips nOffset,
437 bool bSetInReadOnly ) const override;
438 bool UnitUp_(SwPaM *, const SwTwips nOffset,
439 bool bSetInReadOnly ) const;
440 bool UnitDown_(SwPaM *, const SwTwips nOffset,
441 bool bSetInReadOnly ) const;
442
447 void PrepareVisualMove( TextFrameIndex& nPos, sal_uInt8& nCursorLevel,
448 bool& bRight, bool bInsertCursor );
449
451 void SplitFrame(TextFrameIndex nTextPos);
452 SwContentFrame *JoinFrame();
453 TextFrameIndex GetOffset() const { return mnOffset; }
454 void SetOffset_(TextFrameIndex nNewOfst);
455 inline void SetOffset (TextFrameIndex nNewOfst);
456 void ManipOfst(TextFrameIndex const nNewOfst) { mnOffset = nNewOfst; }
457 SwTextFrame *GetFrameAtPos ( const SwPosition &rPos);
458 inline const SwTextFrame *GetFrameAtPos ( const SwPosition &rPos) const;
459 SwTextFrame& GetFrameAtOfst(TextFrameIndex nOfst);
461 bool IsEmptyMaster() const
462 { return GetFollow() && !GetFollow()->GetOffset(); }
463
464 void SetMergedPara(std::unique_ptr<sw::MergedPara> p);
465 sw::MergedPara * GetMergedPara() { return m_pMergedPara.get(); }
466 sw::MergedPara const* GetMergedPara() const { return m_pMergedPara.get(); }
467
469 const OUString& GetText() const;
470 SwTextNode const* GetTextNodeForParaProps() const;
471 SwTextNode const* GetTextNodeForFirstText() const;
473 { return const_cast<SwTextNode*>(const_cast<SwTextFrame const*>(this)->GetTextNodeFirst()); };
474 SwTextNode const* GetTextNodeFirst() const;
476 { return const_cast<SwDoc &>(const_cast<SwTextFrame const*>(this)->GetDoc()); }
477 SwDoc const& GetDoc() const;
478
480
489 virtual bool Prepare( const PrepareHint ePrep = PrepareHint::Clear,
490 const void *pVoid = nullptr, bool bNotify = true ) override;
491
497 virtual bool WouldFit(SwTwips &nMaxHeight, bool &bSplit, bool bTst, bool bMoveBwd) override;
498
505 bool TestFormat( const SwFrame* pPrv, SwTwips &nMaxHeight, bool &bSplit );
506
511 bool Hyphenate(SwInterHyphInfoTextFrame & rInf);
512
514 inline SwTwips GrowTst( const SwTwips nGrow );
515
516 SwParaPortion *GetPara();
517 inline const SwParaPortion *GetPara() const;
518 inline bool HasPara() const;
519 bool HasPara_() const;
520
522 std::pair<SwTextNode*, sal_Int32> MapViewToModel(TextFrameIndex nIndex) const;
523 SwPosition MapViewToModelPos(TextFrameIndex nIndex) const;
524 TextFrameIndex MapModelToView(SwTextNode const* pNode, sal_Int32 nIndex) const;
525 TextFrameIndex MapModelToViewPos(SwPosition const& rPos) const;
526
527 // If there are any hanging punctuation portions in the margin
528 // the offset will be returned.
529 SwTwips HangingMargin() const;
530
532 SwTwips GetLowerMarginForFlyIntersect() const;
533
534 // Locking
535 bool IsLocked() const { return mbLocked; }
536
537 bool IsWidow() const { return mbWidow; }
538 bool IsJustWidow() const { return mbJustWidow; }
539 bool IsEmpty() const { return mbEmpty; }
540 bool HasFootnote() const { return mbFootnote; }
541 bool IsInFootnoteConnect()const { return mbInFootnoteConnect;}
542 bool IsFieldFollow() const { return mbFieldFollow;}
543
544 inline void SetRepaint() const;
545 inline void ResetRepaint() const;
546 bool HasRepaint() const { return mbRepaint; }
547 void SetHasRotatedPortions(bool bHasRotatedPortions);
548 bool GetHasRotatedPortions() const { return mbHasRotatedPortions; }
549 void SetAnimation() const
550 { const_cast<SwTextFrame*>(this)->mbHasAnimation = true; }
551 bool HasAnimation() const { return mbHasAnimation; }
552
553 bool IsSwapped() const { return mbIsSwapped; }
554
556#ifdef DBG_UTIL
557 void CalcFootnoteFlag(TextFrameIndex nStop = TextFrameIndex(COMPLETE_STRING)); //For testing SplitFrame
558#else
559 void CalcFootnoteFlag();
560#endif
561
563 bool IsHiddenNow() const; // bHidden && pOut == pPrt
564 void HideHidden(); // Remove appendage if Hidden
565 void HideFootnotes(TextFrameIndex nStart, TextFrameIndex nEnd);
566
572 void HideAndShowObjects();
573
575 void RemoveFootnote(TextFrameIndex nStart,
577 inline SwTwips GetFootnoteFrameHeight() const;
578 SwTextFrame *FindFootnoteRef( const SwTextFootnote *pFootnote );
579 const SwTextFrame *FindFootnoteRef( const SwTextFootnote *pFootnote ) const
580 { return const_cast<SwTextFrame *>(this)->FindFootnoteRef( pFootnote ); }
581 void ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadLine );
582
587 SwTwips GetFootnoteLine( const SwTextFootnote *pFootnote ) const;
588
589 TextFrameIndex GetDropLen(TextFrameIndex nWishLen) const;
590
591 LanguageType GetLangOfChar(TextFrameIndex nIndex, sal_uInt16 nScript,
592 bool bNoChar = false) const;
593
594 virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override;
595 virtual void CheckDirection( bool bVert ) override;
596
598 SwTwips GetParHeight() const;
599
600 inline SwTextFrame *GetFollow();
601 inline const SwTextFrame *GetFollow() const;
602
604 SwTextFrame *FindQuoVadisFrame();
605
614 SwTextFrame* GetFormatted( bool bForceQuickFormat = false );
615
617 void SetFootnote( const bool bNew ) { mbFootnote = bNew; }
618
620 inline bool IsInside(TextFrameIndex nPos) const;
621
623 bool GetDropRect( SwRect &rRect ) const
624 { return HasPara() && GetDropRect_( rRect ); }
625
626 static SwCache *GetTextCache() { return s_pTextCache; }
627 static void SetTextCache( SwCache *pNew ) { s_pTextCache = pNew; }
628
629 static tools::Long GetMinPrtLine() { return nMinPrtLine; }
630
631 sal_uInt16 GetCacheIdx() const { return mnCacheIndex; }
632 void SetCacheIdx( const sal_uInt16 nNew ) { mnCacheIndex = nNew; }
633
635 void ClearPara();
637 void RemoveFromCache();
638
641 { return IsInFootnote() && !GetIndPrev() && IsFootnoteNumFrame_(); }
642
647 SwTwips CalcFitToContent();
648
655 void CalcAdditionalFirstLineOffset();
656
658 {
659 return mnAdditionalFirstLineOffset;
660 }
661
667 tools::Long GetLineSpace( const bool _bNoPropLineSpacing = false ) const;
668
670 sal_uInt16 FirstLineHeight() const;
671
673 void MoveFlyInCnt(SwTextFrame *pNew, TextFrameIndex nStart, TextFrameIndex nEnd);
674
676 TextFrameIndex CalcFlyPos( SwFrameFormat const * pSearch );
677
679 bool FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff );
680
682 sal_Int32 GetLineCount(TextFrameIndex nPos);
683
685 sal_Int32 GetAllLines() const { return mnAllLines; }
686 sal_Int32 GetThisLines() const { return mnThisLines;}
687 void RecalcAllLines();
688
690 void StopAnimation( const OutputDevice *pOut );
691
693 void VisitPortions( SwPortionHandler& rPH ) const;
694
696 const SwScriptInfo* GetScriptInfo() const;
697
699 void SwapWidthAndHeight();
700
705 void SwitchHorizontalToVertical( SwRect& rRect ) const;
706
711 void SwitchHorizontalToVertical( Point& rPoint ) const;
712
717 tools::Long SwitchHorizontalToVertical( tools::Long nLimit ) const;
718
723 void SwitchVerticalToHorizontal( SwRect& rRect ) const;
724
729 void SwitchVerticalToHorizontal( Point& rPoint ) const;
730
735 tools::Long SwitchVerticalToHorizontal( tools::Long nLimit ) const;
736
741 void SwitchLTRtoRTL( SwRect& rRect ) const;
742
747 void SwitchLTRtoRTL( Point& rPoint ) const;
748
753 void SwitchRTLtoLTR( SwRect& rRect ) const { SwitchLTRtoRTL( rRect ); }
754
759 void SwitchRTLtoLTR( Point& rPoint ) const { SwitchLTRtoRTL( rPoint ); };
760
762 {
763 return mbFollowFormatAllowed;
764 }
765
767 {
768 mbFollowFormatAllowed = true;
769 }
770
772 {
773 mbFollowFormatAllowed = false;
774 }
775
776 SwTwips GetBaseOffsetForFly( bool bIgnoreFlysAnchoredAtThisFrame ) const
777 {
778 return ( bIgnoreFlysAnchoredAtThisFrame ?
779 mnFlyAnchorOfst :
780 mnFlyAnchorOfstNoWrap );
781 }
782
783 SwTwips GetBaseVertOffsetForFly(bool bIgnoreFlysAnchoredAtThisFrame) const;
784
786 {
787 return mnHeightOfLastLine;
788 }
789
790 static void repaintTextFrames( const SwTextNode& rNode );
791
792 void RegisterToNode(SwTextNode &, bool isForceNodeAsFirst = false);
793
794 bool IsSymbolAt(TextFrameIndex) const;
795 OUString GetCurWord(SwPosition const&) const;
796 sal_uInt16 GetScalingOfSelectedText(TextFrameIndex nStt, TextFrameIndex nEnd);
797
800 bool HasNonLastSplitFlyDrawObj() const;
801
804 bool IsEmptyMasterWithSplitFly() const;
805
808 bool IsEmptyWithSplitFly() const;
809
810 static SwView* GetView();
811
812 virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const override;
813
814 void dumpAsXml(xmlTextWriterPtr writer = nullptr) const override;
815};
816
817//use this to protect a SwTextFrame for a given scope from getting merged with
818//its neighbour and thus deleted
820{
821private:
824public:
825 //Lock pFrame for the lifetime of the Cut/Paste call, etc. to avoid
826 //SwTextFrame::AdjustFollow_ removing the pFrame we're trying to Make
828 {
829 m_pTextFrame = pFrame->IsTextFrame() ? static_cast<SwTextFrame*>(pFrame) : nullptr;
830 if (m_pTextFrame)
831 {
834 }
835 else
836 {
837 m_bOldLocked = false;
838 }
839 }
840
842 {
845 }
846};
847
849{
850 return const_cast<SwTextFrame*>(this)->GetPara();
851}
852
853inline bool SwTextFrame::HasPara() const
854{
855 return mnCacheIndex!=USHRT_MAX && HasPara_();
856}
857
859{
860 return Grow( nGrow, true );
861}
862
863inline bool SwTextFrame::IsInside(TextFrameIndex const nPos) const
864{
865 bool bRet = true;
866 if( nPos < GetOffset() )
867 bRet = false;
868 else
869 {
870 const SwTextFrame *pFoll = GetFollow();
871 if( pFoll && nPos >= pFoll->GetOffset() )
872 bRet = false;
873 }
874 return bRet;
875}
876
878{
879 if( !IsFollow() && IsInFootnote() && HasPara() )
881 else
882 return 0;
883}
884
886{
887 return static_cast<const SwTextFrame*>(SwContentFrame::GetFollow());
888}
890{
891 return static_cast<SwTextFrame*>(SwContentFrame::GetFollow());
892}
893
894inline const SwTextFrame *SwTextFrame::GetFrameAtPos( const SwPosition &rPos) const
895{
896 return const_cast<SwTextFrame*>(this)->GetFrameAtPos( rPos );
897}
898
899inline void SwTextFrame::SetOffset(TextFrameIndex const nNewOfst)
900{
901 if ( mnOffset != nNewOfst )
902 SetOffset_( nNewOfst );
903}
904
905inline void SwTextFrame::SetRepaint() const
906{
907 const_cast<SwTextFrame*>(this)->mbRepaint = true;
908}
909inline void SwTextFrame::ResetRepaint() const
910{
911 const_cast<SwTextFrame*>(this)->mbRepaint = false;
912}
913
915protected:
916 explicit TemporarySwap(SwTextFrame * frame, bool swap):
917 m_frame(frame), m_undo(false)
918 {
919 if (m_frame->IsVertical() && swap) {
920 m_undo = true;
922 }
923 }
924
926 if (m_undo) {
928 }
929 }
930
931private:
932 TemporarySwap(TemporarySwap const &) = delete;
933 void operator =(TemporarySwap const &) = delete;
934
936 bool m_undo;
937};
938
940public:
941 explicit SwSwapIfSwapped(SwTextFrame* frame):
942 TemporarySwap(frame, frame->IsSwapped()) {}
943};
944
946public:
948 TemporarySwap(frame, !frame->IsSwapped()) {}
949};
950
956{
958 bool bUndo;
959public:
960 SwFrameSwapper( const SwTextFrame* pFrame, bool bSwapIfNotSwapped );
962};
963
965{
968public:
969 SwLayoutModeModifier( const OutputDevice& rOutp );
971 void Modify( bool bChgToRTL );
972 void SetAuto();
973};
974
976{
979public:
980 SwDigitModeModifier( const OutputDevice& rOutp, LanguageType eCurLang );
982};
983
984namespace sw {
985
991{
993 std::vector<Extent> extents;
996 OUString mergedText;
1003 MergedPara(SwTextFrame & rFrame, std::vector<Extent>&& rExtents,
1004 OUString aText,
1005 SwTextNode *const pProps, SwTextNode *const pFirst,
1006 SwTextNode const*const pLast)
1007 : listener(rFrame), extents(std::move(rExtents)), mergedText(std::move(aText))
1008 , pParaPropsNode(pProps), pFirstNode(pFirst), pLastNode(pLast)
1009 {
1010 assert(pParaPropsNode);
1011 assert(pFirstNode);
1012 assert(pLastNode);
1013 }
1014};
1015
1018{
1019protected:
1021 SwTextNode const*const m_pNode;
1024 MergedAttrIterBase(SwTextFrame const& rFrame);
1025};
1026
1028 : public MergedAttrIterBase
1029{
1030public:
1032 SwTextAttr const* NextAttr(SwTextNode const** ppNode = nullptr);
1033};
1034
1036{
1037private:
1038 std::vector<std::pair<SwTextNode const*, SwTextAttr const*>> m_Hints;
1039 SwTextNode const*const m_pNode;
1041public:
1042 MergedAttrIterByEnd(SwTextFrame const& rFrame);
1043 SwTextAttr const* NextAttr(SwTextNode const*& rpNode);
1044 void PrevAttr();
1045};
1046
1048 : public MergedAttrIterBase
1049{
1050public:
1051 MergedAttrIterReverse(SwTextFrame const& rFrame);
1052 SwTextAttr const* PrevAttr(SwTextNode const** ppNode = nullptr);
1053};
1054
1055
1057
1058} // namespace sw
1059
1060#endif
1061
1062/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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:173
SwContentFrame is the layout for content nodes: a common base class for text (paragraph) and non-text...
Definition: cntfrm.hxx:59
virtual bool UnitUp(SwPaM *, const SwTwips nOffset, bool bSetInReadOnly) const
Definition: trvlfrm.cxx:963
const SwContentFrame * GetFollow() const
Definition: cntfrm.hxx:136
virtual void DestroyImpl() override
Definition: ssfrm.cxx:428
virtual bool UnitDown(SwPaM *, const SwTwips nOffset, bool bSetInReadOnly) const
Definition: trvlfrm.cxx:968
virtual bool LeftMargin(SwPaM *) const =0
virtual bool RightMargin(SwPaM *, bool bAPI=false) const =0
virtual bool WouldFit(SwTwips &nMaxHeight, bool &bSplit, bool bTst, bool)
Definition: unusedf.cxx:35
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
Definition: wsfrm.cxx:2353
LanguageType nOldLanguageType
Definition: txtfrm.hxx:978
SwDigitModeModifier(const OutputDevice &rOutp, LanguageType eCurLang)
Definition: txtfrm.cxx:724
const OutputDevice & rOut
Definition: txtfrm.hxx:977
Definition: doc.hxx:197
Flys that are anchored to content (at-para, at-char) but not in content (as-char).
Definition: flyfrms.hxx:163
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
Definition: fmtpdsc.hxx:36
Style of a layout element.
Definition: frmfmt.hxx:72
Helper class which can be used instead of the macros if a function has too many returns.
Definition: txtfrm.hxx:956
SwFrameSwapper(const SwTextFrame *pFrame, bool bSwapIfNotSwapped)
Definition: txtfrm.cxx:667
const SwTextFrame * pFrame
Definition: txtfrm.hxx:957
Base class of the Writer layout elements.
Definition: frame.hxx:315
SwTwips Grow(SwTwips, bool bTst=false, bool bInfo=false)
Definition: wsfrm.cxx:1516
bool IsTextFrame() const
Definition: frame.hxx:1240
virtual bool Prepare(const PrepareHint ePrep=PrepareHint::Clear, const void *pVoid=nullptr, bool bNotify=true)
Definition: wsfrm.cxx:608
SwFrame * GetIndPrev() const
Definition: frame.hxx:730
bool IsInFootnote() const
Definition: frame.hxx:955
virtual void dumpAsXml(xmlTextWriterPtr writer=nullptr) const =0
virtual void MakePos()
Calculates the frame area position, in case it's invalid.
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)
Calculates the frame area size and the print area, in case they are invalid.
Definition: unusedf.cxx:25
virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const
Definition: xmldump.cxx:188
bool IsVertical() const
Definition: frame.hxx:979
virtual const SvxFormatBreakItem & GetBreakItem() const
Definition: findfrm.cxx:742
virtual css::uno::Sequence< css::style::TabStop > GetTabStopInfo(SwTwips)
Definition: frame.hxx:515
virtual void CheckDirection(bool bVert)
Definition: wsfrm.cxx:398
virtual const SwFormatPageDesc & GetPageDescItem() const
Definition: findfrm.cxx:747
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:61
void SetHyphWord(const css::uno::Reference< css::linguistic2::XHyphenatedWord > &xHW)
Definition: txtfrm.hxx:78
TextFrameIndex m_nWordLen
Definition: txtfrm.hxx:71
SwInterHyphInfoTextFrame(SwTextFrame const &rFrame, SwTextNode const &rNode, SwInterHyphInfo const &rHyphInfo)
Definition: txtedt.cxx:1673
TextFrameIndex m_nEnd
Definition: txtfrm.hxx:68
TextFrameIndex m_nStart
input: requested range to hyphenate
Definition: txtfrm.hxx:67
css::uno::Reference< css::linguistic2::XHyphenatedWord > m_xHyphWord
output: hyphenated word
Definition: txtfrm.hxx:64
void UpdateTextNodeHyphInfo(SwTextFrame const &rFrame, SwTextNode const &rNode, SwInterHyphInfo &o_rHyphInfo)
Definition: txtedt.cxx:1683
TextFrameIndex m_nWordStart
output: found word
Definition: txtfrm.hxx:70
const OutputDevice & m_rOut
Definition: txtfrm.hxx:966
SwLayoutModeModifier(const OutputDevice &rOutp)
Definition: txtfrm.cxx:701
void Modify(bool bChgToRTL)
Definition: txtfrm.cxx:711
vcl::text::ComplexTextLayoutFlags m_nOldLayoutMode
Definition: txtfrm.hxx:967
Marks a node in the document model.
Definition: ndindex.hxx:31
Base class of the Writer document model elements.
Definition: node.hxx:98
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:188
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:85
This class is used as parameter for creation of a block cursor selection.
SwSwapIfNotSwapped(SwTextFrame *frame)
Definition: txtfrm.hxx:947
SwSwapIfSwapped(SwTextFrame *frame)
Definition: txtfrm.hxx:941
Small Helper class: Prepares a test format.
Definition: txtfrm.cxx:3245
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
Definition: txatbase.hxx:44
SwTextAttr subclass for footnotes and endnotes.
Definition: txtftn.hxx:34
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:168
bool IsFootnoteNumFrame() const
Am I a FootnoteFrame, with a number at the start of the paragraph?
Definition: txtfrm.hxx:640
SwTextFrame * GetFrameAtPos(const SwPosition &rPos)
Definition: frmcrsr.cxx:151
bool mbJustWidow
Definition: txtfrm.hxx:234
SwDoc & GetDoc()
Definition: txtfrm.hxx:475
bool HasPara_() const
Definition: txtcache.cxx:75
bool GetDropRect(SwRect &rRect) const
DropCaps and selections.
Definition: txtfrm.hxx:623
bool FollowFormatAllowed() const
Definition: txtfrm.hxx:761
void SetOffset(TextFrameIndex nNewOfst)
Definition: txtfrm.hxx:899
SwTextFrame * GetFollow()
Definition: txtfrm.hxx:889
TextFrameIndex GetOffset() const
Definition: txtfrm.hxx:453
bool HasPara() const
Definition: txtfrm.hxx:853
bool IsWidow() const
Definition: txtfrm.hxx:537
bool IsSwapped() const
Definition: txtfrm.hxx:553
SwTwips mnFlyAnchorOfst
Definition: txtfrm.hxx:189
SwTwips mnHeightOfLastLine
Definition: txtfrm.hxx:197
bool mbWidow
Definition: txtfrm.hxx:233
bool mbLocked
Definition: txtfrm.hxx:232
sw::MergedPara const * GetMergedPara() const
Definition: txtfrm.hxx:466
SwTwips GetAdditionalFirstLineOffset() const
Definition: txtfrm.hxx:657
void ResetRepaint() const
Definition: txtfrm.hxx:909
bool mbHasRotatedPortions
Contains rotated portions.
Definition: txtfrm.hxx:240
SwTwips GetBaseOffsetForFly(bool bIgnoreFlysAnchoredAtThisFrame) const
Definition: txtfrm.hxx:776
void SwitchRTLtoLTR(SwRect &rRect) const
Calculates the coordinates of a rectangle when switching from RTL to LTR layout.
Definition: txtfrm.hxx:753
void SetFootnote(const bool bNew)
Will be moved soon.
Definition: txtfrm.hxx:617
sal_Int32 GetAllLines() const
For displaying the line numbers.
Definition: txtfrm.hxx:685
void SwitchRTLtoLTR(Point &rPoint) const
Calculates the coordinates of a point when switching from RTL to LTR layout.
Definition: txtfrm.hxx:759
bool IsEmptyMaster() const
If there's a Follow and we don't contain text ourselves.
Definition: txtfrm.hxx:461
void SetAnimation() const
Definition: txtfrm.hxx:549
void Lock()
Definition: txtfrm.hxx:252
bool HasAnimation() const
Definition: txtfrm.hxx:551
bool mbRepaint
Definition: txtfrm.hxx:238
sw::MergedPara * GetMergedPara()
Definition: txtfrm.hxx:465
static void SetTextCache(SwCache *pNew)
Definition: txtfrm.hxx:627
const SwTextFrame * FindFootnoteRef(const SwTextFootnote *pFootnote) const
Definition: txtfrm.hxx:579
bool HasFootnote() const
Definition: txtfrm.hxx:540
sal_Int32 mnAllLines
Definition: txtfrm.hxx:184
void SetWidow(const bool bNew)
Definition: txtfrm.hxx:254
void SetCacheIdx(const sal_uInt16 nNew)
Definition: txtfrm.hxx:632
sal_Int32 mnThisLines
Definition: txtfrm.hxx:185
bool HasRepaint() const
Definition: txtfrm.hxx:546
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:417
bool IsFieldFollow() const
Definition: txtfrm.hxx:542
void AllowFollowFormat()
Definition: txtfrm.hxx:766
bool IsLocked() const
Definition: txtfrm.hxx:535
SwTwips mnFlyAnchorOfstNoWrap
Definition: txtfrm.hxx:191
bool mbFollowFormatAllowed
Definition: txtfrm.hxx:249
bool mbHasAnimation
Definition: txtfrm.hxx:242
bool mbInFootnoteConnect
Definition: txtfrm.hxx:236
bool IsInFootnoteConnect() const
Definition: txtfrm.hxx:541
std::unique_ptr< sw::MergedPara > m_pMergedPara
redline merge data
Definition: txtfrm.hxx:205
bool mbFieldFollow
Definition: txtfrm.hxx:241
static SwCache * s_pTextCache
SwLineLayout cache: the lines are not actually owned by the SwTextFrame but by this SwCache,...
Definition: txtfrm.hxx:180
void SetFieldFollow(const bool bNew)
Definition: txtfrm.hxx:257
static SwCache * GetTextCache()
Definition: txtfrm.hxx:626
SwTwips mnFlyAnchorVertOfstNoWrap
The y position for wrap-through flys anchored at this paragraph.
Definition: txtfrm.hxx:193
void SetJustWidow(const bool bNew)
Definition: txtfrm.hxx:255
bool IsInside(TextFrameIndex nPos) const
Respect the Follows.
Definition: txtfrm.hxx:863
SwTwips GrowTst(const SwTwips nGrow)
Test grow.
Definition: txtfrm.hxx:858
SwTwips mnFootnoteLine
Definition: txtfrm.hxx:194
sal_uInt16 mnCacheIndex
Definition: txtfrm.hxx:209
void ForbidFollowFormat()
Definition: txtfrm.hxx:771
sal_Int32 GetThisLines() const
Definition: txtfrm.hxx:686
bool mbEmpty
Definition: txtfrm.hxx:235
void Unlock()
Definition: txtfrm.hxx:253
sal_uInt16 GetCacheIdx() const
Definition: txtfrm.hxx:631
SwTextNode * GetTextNodeFirst()
Definition: txtfrm.hxx:472
void SetOffset_(TextFrameIndex nNewOfst)
Definition: frmform.cxx:822
SwTwips GetHeightOfLastLine() const
Definition: txtfrm.hxx:785
void ManipOfst(TextFrameIndex const nNewOfst)
Definition: txtfrm.hxx:456
void SwapWidthAndHeight()
Swaps width and height of the text frame.
Definition: txtfrm.cxx:420
bool mbFootnote
Definition: txtfrm.hxx:237
void SetRepaint() const
Definition: txtfrm.hxx:905
SwTwips GetFootnoteFrameHeight_() const
Calculates the maximum reachable height for the TextFrame in the Footnote Area.
Definition: txtftn.cxx:314
SwTwips mnAdditionalFirstLineOffset
Definition: txtfrm.hxx:202
SwTwips GetFootnoteFrameHeight() const
Definition: txtfrm.hxx:877
bool IsJustWidow() const
Definition: txtfrm.hxx:538
bool mbIsSwapped
Definition: txtfrm.hxx:243
static tools::Long GetMinPrtLine()
Definition: txtfrm.hxx:629
TextFrameIndex mnOffset
Definition: txtfrm.hxx:207
void SetEmpty(const bool bNew)
Definition: txtfrm.hxx:256
bool GetHasRotatedPortions() const
Definition: txtfrm.hxx:548
bool IsEmpty() const
Definition: txtfrm.hxx:539
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:112
Definition: view.hxx:146
Used by the UI to modify the document model.
Definition: wrtsh.hxx:97
TemporarySwap(SwTextFrame *frame, bool swap)
Definition: txtfrm.hxx:916
TemporarySwap(TemporarySwap const &)=delete
void operator=(TemporarySwap const &)=delete
SwTextFrame * m_frame
Definition: txtfrm.hxx:935
SwTextFrame * m_pTextFrame
Definition: txtfrm.hxx:822
TextFrameLockGuard(SwFrame *pFrame)
Definition: txtfrm.hxx:827
iterate SwTextAttr in potentially merged text frame
Definition: txtfrm.hxx:1018
sw::MergedPara const *const m_pMerged
Definition: txtfrm.hxx:1020
MergedAttrIterBase(SwTextFrame const &rFrame)
Definition: txtfrm.cxx:83
SwTextNode const *const m_pNode
Definition: txtfrm.hxx:1021
SwTextAttr const * NextAttr(SwTextNode const *&rpNode)
Definition: txtfrm.cxx:166
SwTextNode const *const m_pNode
Definition: txtfrm.hxx:1039
MergedAttrIterByEnd(SwTextFrame const &rFrame)
Definition: txtfrm.cxx:151
std::vector< std::pair< SwTextNode const *, SwTextAttr const * > > m_Hints
Definition: txtfrm.hxx:1038
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:1031
void Init()
@ TestFormat
struct _xmlTextWriter * xmlTextWriterPtr
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:888
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:969
SwPosition GetParaPropsPos(SwRootFrame const &rLayout, SwPosition const &rPos)
Definition: txtfrm.cxx:344
void GotoNextLayoutTextFrame(SwNodeIndex &rIndex, SwRootFrame const *const pLayout)
Definition: docnum.cxx:1473
void GotoPrevLayoutTextFrame(SwNodeIndex &rIndex, SwRootFrame const *const pLayout)
Definition: docnum.cxx:1438
void MoveMergedFlysAndFootnotes(std::vector< SwTextFrame * > const &rFrames, SwTextNode const &rFirstNode, SwTextNode &rSecondNode, bool)
Definition: ndtxt.cxx:375
TextFrameIndex UpdateMergedParaForDelete(MergedPara &rMerged, bool isRealDelete, SwTextNode const &rNode, sal_Int32 nIndex, sal_Int32 nLen)
Definition: txtfrm.cxx:1119
bool FrameContainsNode(SwContentFrame const &rFrame, SwNodeOffset nNodeIndex)
Definition: txtfrm.cxx:290
SwTextFrame * MakeTextFrame(SwTextNode &rNode, SwFrame *, sw::FrameMode eMode)
Definition: txtfrm.cxx:885
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:1270
const SwTwips WIDOW_MAGIC
Definition: txtfrm.hxx:1056
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:1436
std::pair< SwTextNode *, sal_Int32 > MapViewToModel(MergedPara const &, TextFrameIndex nIndex)
Definition: txtfrm.cxx:1251
Recreate
Definition: txtfrm.hxx:135
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:1140
InsertText MakeInsertText(SwTextNode &rNode, const sal_Int32 nPos, const sal_Int32 nLen)
Definition: docbm.cxx:2094
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:4325
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:848
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:268
FrameMode
Definition: txtfrm.hxx:110
long Long
ComplexTextLayoutFlags
Marks a position in the document model.
Definition: pam.hxx:38
Describes a part of a single text node, which will be part of a text frame, even when redlines are hi...
Definition: txtfrm.hxx:91
Extent(SwTextNode *const p, sal_Int32 const s, sal_Int32 const e)
Definition: txtfrm.hxx:95
sal_Int32 nEnd
Definition: txtfrm.hxx:94
sal_Int32 nStart
Definition: txtfrm.hxx:93
SwTextNode * pNode
Definition: txtfrm.hxx:92
Describes parts of multiple text nodes, which will form a text frame, even when redlines are hidden a...
Definition: txtfrm.hxx:991
OUString mergedText
note: cannot be const currently to avoid UB because SwTextGuess::Guess const_casts it and modifies it...
Definition: txtfrm.hxx:996
sw::WriterMultiListener listener
Definition: txtfrm.hxx:992
SwTextNode *const pFirstNode
except break attributes, those are taken from the first node
Definition: txtfrm.hxx:1000
MergedPara(SwTextFrame &rFrame, std::vector< Extent > &&rExtents, OUString aText, SwTextNode *const pProps, SwTextNode *const pFirst, SwTextNode const *const pLast)
Definition: txtfrm.hxx:1003
SwTextNode * pParaPropsNode
most paragraph properties are taken from the first non-empty node
Definition: txtfrm.hxx:998
SwTextNode const * pLastNode
mainly for sanity checks
Definition: txtfrm.hxx:1002
std::vector< Extent > extents
Definition: txtfrm.hxx:993
#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:206
unsigned char sal_uInt8
#define SAL_MAX_INT32