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_uInt32 mnAllLines :24; // Line count for the Paint (including nThisLines)
185 sal_uInt32 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
410 virtual bool GetModelPositionForViewPoint( SwPosition *, Point&,
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
531 // Locking
532 bool IsLocked() const { return mbLocked; }
533
534 bool IsWidow() const { return mbWidow; }
535 bool IsJustWidow() const { return mbJustWidow; }
536 bool IsEmpty() const { return mbEmpty; }
537 bool HasFootnote() const { return mbFootnote; }
538 bool IsInFootnoteConnect()const { return mbInFootnoteConnect;}
539 bool IsFieldFollow() const { return mbFieldFollow;}
540
541 inline void SetRepaint() const;
542 inline void ResetRepaint() const;
543 bool HasRepaint() const { return mbRepaint; }
544 void SetHasRotatedPortions(bool bHasRotatedPortions);
545 bool GetHasRotatedPortions() const { return mbHasRotatedPortions; }
546 void SetAnimation() const
547 { const_cast<SwTextFrame*>(this)->mbHasAnimation = true; }
548 bool HasAnimation() const { return mbHasAnimation; }
549
550 bool IsSwapped() const { return mbIsSwapped; }
551
553#ifdef DBG_UTIL
554 void CalcFootnoteFlag(TextFrameIndex nStop = TextFrameIndex(COMPLETE_STRING)); //For testing SplitFrame
555#else
556 void CalcFootnoteFlag();
557#endif
558
560 bool IsHiddenNow() const; // bHidden && pOut == pPrt
561 void HideHidden(); // Remove appendage if Hidden
562 void HideFootnotes(TextFrameIndex nStart, TextFrameIndex nEnd);
563
569 void HideAndShowObjects();
570
572 void RemoveFootnote(TextFrameIndex nStart,
574 inline SwTwips GetFootnoteFrameHeight() const;
575 SwTextFrame *FindFootnoteRef( const SwTextFootnote *pFootnote );
576 const SwTextFrame *FindFootnoteRef( const SwTextFootnote *pFootnote ) const
577 { return const_cast<SwTextFrame *>(this)->FindFootnoteRef( pFootnote ); }
578 void ConnectFootnote( SwTextFootnote *pFootnote, const SwTwips nDeadLine );
579
584 SwTwips GetFootnoteLine( const SwTextFootnote *pFootnote ) const;
585
586 TextFrameIndex GetDropLen(TextFrameIndex nWishLen) const;
587
588 LanguageType GetLangOfChar(TextFrameIndex nIndex, sal_uInt16 nScript,
589 bool bNoChar = false) const;
590
591 virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override;
592 virtual void CheckDirection( bool bVert ) override;
593
595 SwTwips GetParHeight() const;
596
597 inline SwTextFrame *GetFollow();
598 inline const SwTextFrame *GetFollow() const;
599
601 SwTextFrame *FindQuoVadisFrame();
602
611 SwTextFrame* GetFormatted( bool bForceQuickFormat = false );
612
614 void SetFootnote( const bool bNew ) { mbFootnote = bNew; }
615
617 inline bool IsInside(TextFrameIndex nPos) const;
618
620 bool GetDropRect( SwRect &rRect ) const
621 { return HasPara() && GetDropRect_( rRect ); }
622
623 static SwCache *GetTextCache() { return s_pTextCache; }
624 static void SetTextCache( SwCache *pNew ) { s_pTextCache = pNew; }
625
626 static tools::Long GetMinPrtLine() { return nMinPrtLine; }
627
628 sal_uInt16 GetCacheIdx() const { return mnCacheIndex; }
629 void SetCacheIdx( const sal_uInt16 nNew ) { mnCacheIndex = nNew; }
630
632 void ClearPara();
634 void RemoveFromCache();
635
638 { return IsInFootnote() && !GetIndPrev() && IsFootnoteNumFrame_(); }
639
644 SwTwips CalcFitToContent();
645
652 void CalcAdditionalFirstLineOffset();
653
655 {
656 return mnAdditionalFirstLineOffset;
657 }
658
664 tools::Long GetLineSpace( const bool _bNoPropLineSpacing = false ) const;
665
667 sal_uInt16 FirstLineHeight() const;
668
670 void MoveFlyInCnt(SwTextFrame *pNew, TextFrameIndex nStart, TextFrameIndex nEnd);
671
673 TextFrameIndex CalcFlyPos( SwFrameFormat const * pSearch );
674
676 bool FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff );
677
679 sal_uInt16 GetLineCount(TextFrameIndex nPos);
680
682 sal_uLong GetAllLines() const { return mnAllLines; }
683 sal_uLong GetThisLines() const { return mnThisLines;}
684 void RecalcAllLines();
685
687 void StopAnimation( const OutputDevice *pOut );
688
690 void VisitPortions( SwPortionHandler& rPH ) const;
691
693 const SwScriptInfo* GetScriptInfo() const;
694
696 void SwapWidthAndHeight();
697
702 void SwitchHorizontalToVertical( SwRect& rRect ) const;
703
708 void SwitchHorizontalToVertical( Point& rPoint ) const;
709
714 tools::Long SwitchHorizontalToVertical( tools::Long nLimit ) const;
715
720 void SwitchVerticalToHorizontal( SwRect& rRect ) const;
721
726 void SwitchVerticalToHorizontal( Point& rPoint ) const;
727
732 tools::Long SwitchVerticalToHorizontal( tools::Long nLimit ) const;
733
738 void SwitchLTRtoRTL( SwRect& rRect ) const;
739
744 void SwitchLTRtoRTL( Point& rPoint ) const;
745
750 void SwitchRTLtoLTR( SwRect& rRect ) const { SwitchLTRtoRTL( rRect ); }
751
756 void SwitchRTLtoLTR( Point& rPoint ) const { SwitchLTRtoRTL( rPoint ); };
757
759 {
760 return mbFollowFormatAllowed;
761 }
762
764 {
765 mbFollowFormatAllowed = true;
766 }
767
769 {
770 mbFollowFormatAllowed = false;
771 }
772
773 SwTwips GetBaseOffsetForFly( bool bIgnoreFlysAnchoredAtThisFrame ) const
774 {
775 return ( bIgnoreFlysAnchoredAtThisFrame ?
776 mnFlyAnchorOfst :
777 mnFlyAnchorOfstNoWrap );
778 }
779
780 SwTwips GetBaseVertOffsetForFly(bool bIgnoreFlysAnchoredAtThisFrame) const;
781
783 {
784 return mnHeightOfLastLine;
785 }
786
787 static void repaintTextFrames( const SwTextNode& rNode );
788
789 void RegisterToNode(SwTextNode &, bool isForceNodeAsFirst = false);
790
791 bool IsSymbolAt(TextFrameIndex) const;
792 OUString GetCurWord(SwPosition const&) const;
793 sal_uInt16 GetScalingOfSelectedText(TextFrameIndex nStt, TextFrameIndex nEnd);
794
797 bool HasNonLastSplitFlyDrawObj() const;
798
799 static SwView* GetView();
800
801 virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const override;
802};
803
804//use this to protect a SwTextFrame for a given scope from getting merged with
805//its neighbour and thus deleted
807{
808private:
811public:
812 //Lock pFrame for the lifetime of the Cut/Paste call, etc. to avoid
813 //SwTextFrame::AdjustFollow_ removing the pFrame we're trying to Make
815 {
816 m_pTextFrame = pFrame->IsTextFrame() ? static_cast<SwTextFrame*>(pFrame) : nullptr;
817 if (m_pTextFrame)
818 {
821 }
822 else
823 {
824 m_bOldLocked = false;
825 }
826 }
827
829 {
832 }
833};
834
836{
837 return const_cast<SwTextFrame*>(this)->GetPara();
838}
839
840inline bool SwTextFrame::HasPara() const
841{
842 return mnCacheIndex!=USHRT_MAX && HasPara_();
843}
844
846{
847 return Grow( nGrow, true );
848}
849
850inline bool SwTextFrame::IsInside(TextFrameIndex const nPos) const
851{
852 bool bRet = true;
853 if( nPos < GetOffset() )
854 bRet = false;
855 else
856 {
857 const SwTextFrame *pFoll = GetFollow();
858 if( pFoll && nPos >= pFoll->GetOffset() )
859 bRet = false;
860 }
861 return bRet;
862}
863
865{
866 if( !IsFollow() && IsInFootnote() && HasPara() )
868 else
869 return 0;
870}
871
873{
874 return static_cast<const SwTextFrame*>(SwContentFrame::GetFollow());
875}
877{
878 return static_cast<SwTextFrame*>(SwContentFrame::GetFollow());
879}
880
881inline const SwTextFrame *SwTextFrame::GetFrameAtPos( const SwPosition &rPos) const
882{
883 return const_cast<SwTextFrame*>(this)->GetFrameAtPos( rPos );
884}
885
886inline void SwTextFrame::SetOffset(TextFrameIndex const nNewOfst)
887{
888 if ( mnOffset != nNewOfst )
889 SetOffset_( nNewOfst );
890}
891
892inline void SwTextFrame::SetRepaint() const
893{
894 const_cast<SwTextFrame*>(this)->mbRepaint = true;
895}
896inline void SwTextFrame::ResetRepaint() const
897{
898 const_cast<SwTextFrame*>(this)->mbRepaint = false;
899}
900
902protected:
903 explicit TemporarySwap(SwTextFrame * frame, bool swap):
904 m_frame(frame), m_undo(false)
905 {
906 if (m_frame->IsVertical() && swap) {
907 m_undo = true;
909 }
910 }
911
913 if (m_undo) {
915 }
916 }
917
918private:
919 TemporarySwap(TemporarySwap const &) = delete;
920 void operator =(TemporarySwap const &) = delete;
921
923 bool m_undo;
924};
925
927public:
928 explicit SwSwapIfSwapped(SwTextFrame* frame):
929 TemporarySwap(frame, frame->IsSwapped()) {}
930};
931
933public:
935 TemporarySwap(frame, !frame->IsSwapped()) {}
936};
937
943{
945 bool bUndo;
946public:
947 SwFrameSwapper( const SwTextFrame* pFrame, bool bSwapIfNotSwapped );
949};
950
952{
955public:
956 SwLayoutModeModifier( const OutputDevice& rOutp );
958 void Modify( bool bChgToRTL );
959 void SetAuto();
960};
961
963{
966public:
967 SwDigitModeModifier( const OutputDevice& rOutp, LanguageType eCurLang );
969};
970
971namespace sw {
972
978{
980 std::vector<Extent> extents;
983 OUString mergedText;
990 MergedPara(SwTextFrame & rFrame, std::vector<Extent>&& rExtents,
991 OUString aText,
992 SwTextNode *const pProps, SwTextNode *const pFirst,
993 SwTextNode const*const pLast)
994 : listener(rFrame), extents(std::move(rExtents)), mergedText(std::move(aText))
995 , pParaPropsNode(pProps), pFirstNode(pFirst), pLastNode(pLast)
996 {
997 assert(pParaPropsNode);
998 assert(pFirstNode);
999 assert(pLastNode);
1000 }
1001};
1002
1005{
1006protected:
1008 SwTextNode const*const m_pNode;
1011 MergedAttrIterBase(SwTextFrame const& rFrame);
1012};
1013
1015 : public MergedAttrIterBase
1016{
1017public:
1019 SwTextAttr const* NextAttr(SwTextNode const** ppNode = nullptr);
1020};
1021
1023{
1024private:
1025 std::vector<std::pair<SwTextNode const*, SwTextAttr const*>> m_Hints;
1026 SwTextNode const*const m_pNode;
1028public:
1029 MergedAttrIterByEnd(SwTextFrame const& rFrame);
1030 SwTextAttr const* NextAttr(SwTextNode const*& rpNode);
1031 void PrevAttr();
1032};
1033
1035 : public MergedAttrIterBase
1036{
1037public:
1038 MergedAttrIterReverse(SwTextFrame const& rFrame);
1039 SwTextAttr const* PrevAttr(SwTextNode const** ppNode = nullptr);
1040};
1041
1042
1044
1045} // namespace sw
1046
1047#endif
1048
1049/* 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:965
SwDigitModeModifier(const OutputDevice &rOutp, LanguageType eCurLang)
Definition: txtfrm.cxx:724
const OutputDevice & rOut
Definition: txtfrm.hxx:964
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:943
SwFrameSwapper(const SwTextFrame *pFrame, bool bSwapIfNotSwapped)
Definition: txtfrm.cxx:667
const SwTextFrame * pFrame
Definition: txtfrm.hxx:944
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 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:302
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:953
SwLayoutModeModifier(const OutputDevice &rOutp)
Definition: txtfrm.cxx:701
void Modify(bool bChgToRTL)
Definition: txtfrm.cxx:711
vcl::text::ComplexTextLayoutFlags m_nOldLayoutMode
Definition: txtfrm.hxx:954
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:934
SwSwapIfSwapped(SwTextFrame *frame)
Definition: txtfrm.hxx:928
Small Helper class: Prepares a test format.
Definition: txtfrm.cxx:3173
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:637
SwTextFrame * GetFrameAtPos(const SwPosition &rPos)
Definition: frmcrsr.cxx:151
bool mbJustWidow
Definition: txtfrm.hxx:234
sal_uLong GetThisLines() const
Definition: txtfrm.hxx:683
SwDoc & GetDoc()
Definition: txtfrm.hxx:475
bool HasPara_() const
Definition: txtcache.cxx:75
bool GetDropRect(SwRect &rRect) const
DropCaps and selections.
Definition: txtfrm.hxx:620
bool FollowFormatAllowed() const
Definition: txtfrm.hxx:758
void SetOffset(TextFrameIndex nNewOfst)
Definition: txtfrm.hxx:886
SwTextFrame * GetFollow()
Definition: txtfrm.hxx:876
TextFrameIndex GetOffset() const
Definition: txtfrm.hxx:453
bool HasPara() const
Definition: txtfrm.hxx:840
bool IsWidow() const
Definition: txtfrm.hxx:534
bool IsSwapped() const
Definition: txtfrm.hxx:550
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:654
void ResetRepaint() const
Definition: txtfrm.hxx:896
bool mbHasRotatedPortions
Contains rotated portions.
Definition: txtfrm.hxx:240
SwTwips GetBaseOffsetForFly(bool bIgnoreFlysAnchoredAtThisFrame) const
Definition: txtfrm.hxx:773
void SwitchRTLtoLTR(SwRect &rRect) const
Calculates the coordinates of a rectangle when switching from RTL to LTR layout.
Definition: txtfrm.hxx:750
void SetFootnote(const bool bNew)
Will be moved soon.
Definition: txtfrm.hxx:614
sal_uLong GetAllLines() const
For displaying the line numbers.
Definition: txtfrm.hxx:682
void SwitchRTLtoLTR(Point &rPoint) const
Calculates the coordinates of a point when switching from RTL to LTR layout.
Definition: txtfrm.hxx:756
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:546
void Lock()
Definition: txtfrm.hxx:252
bool HasAnimation() const
Definition: txtfrm.hxx:548
bool mbRepaint
Definition: txtfrm.hxx:238
sw::MergedPara * GetMergedPara()
Definition: txtfrm.hxx:465
static void SetTextCache(SwCache *pNew)
Definition: txtfrm.hxx:624
const SwTextFrame * FindFootnoteRef(const SwTextFootnote *pFootnote) const
Definition: txtfrm.hxx:576
bool HasFootnote() const
Definition: txtfrm.hxx:537
void SetWidow(const bool bNew)
Definition: txtfrm.hxx:254
void SetCacheIdx(const sal_uInt16 nNew)
Definition: txtfrm.hxx:629
bool HasRepaint() const
Definition: txtfrm.hxx:543
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:539
void AllowFollowFormat()
Definition: txtfrm.hxx:763
sal_uInt32 mnAllLines
Definition: txtfrm.hxx:184
bool IsLocked() const
Definition: txtfrm.hxx:532
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:538
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:623
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:850
SwTwips GrowTst(const SwTwips nGrow)
Test grow.
Definition: txtfrm.hxx:845
SwTwips mnFootnoteLine
Definition: txtfrm.hxx:194
sal_uInt32 mnThisLines
Definition: txtfrm.hxx:185
sal_uInt16 mnCacheIndex
Definition: txtfrm.hxx:209
void ForbidFollowFormat()
Definition: txtfrm.hxx:768
bool mbEmpty
Definition: txtfrm.hxx:235
void Unlock()
Definition: txtfrm.hxx:253
sal_uInt16 GetCacheIdx() const
Definition: txtfrm.hxx:628
SwTextNode * GetTextNodeFirst()
Definition: txtfrm.hxx:472
void SetOffset_(TextFrameIndex nNewOfst)
Definition: frmform.cxx:810
SwTwips GetHeightOfLastLine() const
Definition: txtfrm.hxx:782
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:892
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:864
bool IsJustWidow() const
Definition: txtfrm.hxx:535
bool mbIsSwapped
Definition: txtfrm.hxx:243
static tools::Long GetMinPrtLine()
Definition: txtfrm.hxx:626
TextFrameIndex mnOffset
Definition: txtfrm.hxx:207
void SetEmpty(const bool bNew)
Definition: txtfrm.hxx:256
bool GetHasRotatedPortions() const
Definition: txtfrm.hxx:545
bool IsEmpty() const
Definition: txtfrm.hxx:536
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:903
TemporarySwap(TemporarySwap const &)=delete
void operator=(TemporarySwap const &)=delete
SwTextFrame * m_frame
Definition: txtfrm.hxx:922
SwTextFrame * m_pTextFrame
Definition: txtfrm.hxx:809
TextFrameLockGuard(SwFrame *pFrame)
Definition: txtfrm.hxx:814
iterate SwTextAttr in potentially merged text frame
Definition: txtfrm.hxx:1005
sw::MergedPara const *const m_pMerged
Definition: txtfrm.hxx:1007
MergedAttrIterBase(SwTextFrame const &rFrame)
Definition: txtfrm.cxx:83
SwTextNode const *const m_pNode
Definition: txtfrm.hxx:1008
SwTextAttr const * NextAttr(SwTextNode const *&rpNode)
Definition: txtfrm.cxx:166
SwTextNode const *const m_pNode
Definition: txtfrm.hxx:1026
MergedAttrIterByEnd(SwTextFrame const &rFrame)
Definition: txtfrm.cxx:151
std::vector< std::pair< SwTextNode const *, SwTextAttr const * > > m_Hints
Definition: txtfrm.hxx:1025
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:1018
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: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:1043
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:1164
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:4310
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
sal_uIntPtr sal_uLong
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:978
OUString mergedText
note: cannot be const currently to avoid UB because SwTextGuess::Guess const_casts it and modifies it...
Definition: txtfrm.hxx:983
sw::WriterMultiListener listener
Definition: txtfrm.hxx:979
SwTextNode *const pFirstNode
except break attributes, those are taken from the first node
Definition: txtfrm.hxx:987
MergedPara(SwTextFrame &rFrame, std::vector< Extent > &&rExtents, OUString aText, SwTextNode *const pProps, SwTextNode *const pFirst, SwTextNode const *const pLast)
Definition: txtfrm.hxx:990
SwTextNode * pParaPropsNode
most paragraph properties are taken from the first non-empty node
Definition: txtfrm.hxx:985
SwTextNode const * pLastNode
mainly for sanity checks
Definition: txtfrm.hxx:989
std::vector< Extent > extents
Definition: txtfrm.hxx:980
#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