LibreOffice Module sw (master) 1
ndtxt.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#pragma once
20
22#include <com/sun/star/text/XTextContent.hpp>
23
24#include "swdllapi.h"
26#include "SwNumberTreeTypes.hxx"
27#include "hintids.hxx"
28#include "list.hxx"
29#include "modeltoviewhelper.hxx"
30#include "ndhints.hxx"
31#include "node.hxx"
32#include "paratr.hxx"
33
34#include <sfx2/Metadatable.hxx>
35#include <unotools/weakref.hxx>
37#include <memory>
38#include <vector>
39#include <functional>
40
41class SfxHint;
42class SwNumRule;
43class SwNodeNum;
44class SvxLRSpaceItem;
45class SwXParagraph;
46
47namespace utl {
48 class TransliterationWrapper;
49}
50namespace vcl
51{
52class Font;
53}
54
55class SwContentFrame;
56class SwTextField;
58class SfxItemSet;
60struct SwSpellArgs;
61struct SwConversionArgs;
62class SwInterHyphInfo;
63class SwWrongList;
64class SwGrammarMarkUp;
65struct SwDocStat;
67enum class ExpandMode;
68enum class SwFieldIds : sal_uInt16;
69class SwField;
70
71namespace sw::mark { enum class RestoreMode; }
72
73namespace com::sun::star {
74 namespace uno {
75 template < class > class Sequence;
76 }
77}
78
80
83 : public SwContentNode
84 , public ::sfx2::Metadatable
86{
87 friend class SwContentNode;
89 friend class SwDoc;
90 friend class SwNodes;
91 friend class SwTextFrame;
92 friend class SwScriptInfo;
93
96 std::unique_ptr<SwpHints> m_pSwpHints;
97
98 mutable std::unique_ptr<SwNodeNum> mpNodeNum;
99 mutable std::unique_ptr<SwNodeNum> mpNodeNumRLHidden;
100 mutable std::unique_ptr<SwNodeNum> mpNodeNumOrig;
101
102 OUString m_Text;
103
105
108 mutable bool m_bContainsHiddenChars : 1;
110 mutable bool m_bHiddenCharsHidePara : 1;
112 mutable bool m_bRecalcHiddenCharFlags : 1;
113
114 mutable bool m_bLastOutlineState : 1;
116
118
123
126
127 std::optional< OUString > m_oNumStringCache;
128
130
131 // DrawingLayer FillAttributes in a preprocessed form for primitive usage
133
134 SAL_DLLPRIVATE SwTextNode( SwNode& rWhere, SwTextFormatColl *pTextColl,
135 const SfxItemSet* pAutoAttr = nullptr );
136 virtual void SwClientNotify( const SwModify&, const SfxHint& ) override;
138 SAL_DLLPRIVATE void CopyAttr( SwTextNode *pDest, const sal_Int32 nStart, const sal_Int32 nOldPos);
139
140 SAL_DLLPRIVATE SwTextNode* MakeNewTextNode( const SwNodeIndex&, bool bNext = true,
141 bool bChgFollow = true );
142
143 SAL_DLLPRIVATE void CutImpl(
144 SwTextNode * const pDest, const SwContentIndex & rDestStart,
145 const SwContentIndex & rStart, /*const*/ sal_Int32 nLen,
146 const bool bUpdate = true );
147
149 SAL_DLLPRIVATE void MoveTextAttr_To_AttrSet(); // Called by SplitNode.
150
152 SAL_DLLPRIVATE virtual void NewAttrSet( SwAttrPool& ) override;
153
157 { return m_bRecalcHiddenCharFlags; }
158 void SetHiddenCharAttribute( bool bNewHiddenCharsHidePara, bool bNewContainsHiddenChars ) const
159 {
160 m_bHiddenCharsHidePara = bNewHiddenCharsHidePara;
161 m_bContainsHiddenChars = bNewContainsHiddenChars;
162 m_bRecalcHiddenCharFlags = false;
163 }
164
165 SAL_DLLPRIVATE void CalcHiddenCharFlags() const;
166
167 SAL_DLLPRIVATE void SetLanguageAndFont( const SwPaM &rPaM,
168 LanguageType nLang, sal_uInt16 nLangWhichId,
169 const vcl::Font *pFont, sal_uInt16 nFontWhichId );
170
172
173 SAL_DLLPRIVATE void InitSwParaStatistics( bool bNew );
174
175 inline void TryDeleteSwpHints();
176
177 SAL_DLLPRIVATE void impl_FormatToTextAttr(const SfxItemSet& i_rAttrSet);
178
179 const SwTextInputField* GetOverlappingInputField( const SwTextAttr& rTextAttr ) const;
180
181 void DelFrames_TextNodePart();
182
183public:
184 enum class WrongState { TODO, PENDING, DONE };
185
186 bool IsWordCountDirty() const;
187 WrongState GetWrongDirty() const;
188 bool IsWrongDirty() const;
189 bool IsGrammarCheckDirty() const;
190 bool IsSmartTagDirty() const;
191 bool IsAutoCompleteWordDirty() const;
192 void SetWordCountDirty( bool bNew ) const;
193 void SetWrongDirty(WrongState eNew) const;
194 void SetGrammarCheckDirty( bool bNew ) const;
195 void SetSmartTagDirty( bool bNew ) const;
196 void SetAutoCompleteWordDirty( bool bNew ) const;
197 void SetWrong( std::unique_ptr<SwWrongList> pNew );
198 void ClearWrong();
199 std::unique_ptr<SwWrongList> ReleaseWrong();
200 SwWrongList* GetWrong();
201 const SwWrongList* GetWrong() const;
202 void SetGrammarCheck( std::unique_ptr<SwGrammarMarkUp> pNew );
203 void ClearGrammarCheck();
204 std::unique_ptr<SwGrammarMarkUp> ReleaseGrammarCheck();
205 SwGrammarMarkUp* GetGrammarCheck();
206 // return SwWrongList because *function pointer* return values aren't covariant
207 SwWrongList const* GetGrammarCheck() const;
208 void SetSmartTags( std::unique_ptr<SwWrongList> pNew );
209 void ClearSmartTags();
210 std::unique_ptr<SwWrongList> ReleaseSmartTags();
211 SwWrongList* GetSmartTags();
212 SwWrongList const* GetSmartTags() const;
213
215
216
217public:
220 void TriggerNodeUpdate(const sw::LegacyModifyHint&);
221
222 const OUString& GetText() const { return m_Text; }
223
224 // returns the maximum number of characters that can still be added to the node
225 inline sal_Int32 GetSpaceLeft() const;
226
228 inline SwpHints &GetSwpHints();
229 inline const SwpHints &GetSwpHints() const;
230 SwpHints *GetpSwpHints() { return m_pSwpHints.get(); }
231 const SwpHints *GetpSwpHints() const { return m_pSwpHints.get(); }
232 bool HasHints() const { return m_pSwpHints != nullptr; }
233 inline SwpHints &GetOrCreateSwpHints();
234
235 virtual ~SwTextNode() override;
236
237 virtual sal_Int32 Len() const override;
238
240 void GetMinMaxSize( SwNodeOffset nIndex, sal_uLong& rMin, sal_uLong &rMax, sal_uLong &rAbs ) const;
241
243 virtual bool SetAttr( const SfxPoolItem& ) override;
244 virtual bool SetAttr( const SfxItemSet& rSet ) override;
245 virtual bool ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 ) override;
246 virtual bool ResetAttr( const std::vector<sal_uInt16>& rWhichArr ) override;
247 virtual sal_uInt16 ResetAllAttr() override;
248
253 OUString InsertText( const OUString & rStr, const SwContentIndex & rIdx,
254 const SwInsertFlags nMode
256 OUString InsertText( const OUString & rStr, const SwPosition & rIdx,
257 const SwInsertFlags nMode
259
264 void EraseText ( const SwContentIndex &rIdx, const sal_Int32 nCount = SAL_MAX_INT32,
266 void EraseText ( const SwPosition& rIdx, const sal_Int32 nCount = SAL_MAX_INT32,
268
283 void RstTextAttr(
284 const SwContentIndex &rIdx,
285 const sal_Int32 nLen,
286 const sal_uInt16 nWhich = 0,
287 const SfxItemSet* pSet = nullptr,
288 const bool bInclRefToxMark = false,
289 const bool bExactRange = false );
290 void GCAttr();
291
292 // Delete text attribute (needs to be deregistered at Pool!)
293 void DestroyAttr( SwTextAttr* pAttr );
294
295 // delete all attributes from SwpHintsArray.
296 void ClearSwpHintsArr( bool bDelFields );
297
299 void FileLoadedInitHints();
300
302 bool InsertHint( SwTextAttr * const pAttr,
303 const SetAttrMode nMode = SetAttrMode::DEFAULT );
306 SwTextAttr* InsertItem( SfxPoolItem& rAttr,
307 const sal_Int32 nStart, const sal_Int32 nEnd,
308 const SetAttrMode nMode = SetAttrMode::DEFAULT );
309
312 bool SetAttr( const SfxItemSet& rSet,
313 sal_Int32 nStt, sal_Int32 nEnd,
314 const SetAttrMode nMode = SetAttrMode::DEFAULT,
315 SwTextAttr **ppNewTextAttr = nullptr);
323 bool GetParaAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd,
324 const bool bOnlyTextAttr = false,
325 const bool bGetFromChrFormat = true,
326 const bool bMergeIndentValuesOfNumRule = false,
327 SwRootFrame const* pLayout = nullptr) const;
328
330 void FormatToTextAttr( SwTextNode* pNd );
331
333 void DeleteAttributes( const sal_uInt16 nWhich,
334 const sal_Int32 nStart, const sal_Int32 nEnd = 0 );
336 void DeleteAttribute ( SwTextAttr * const pTextAttr );
337
340 void CopyText( SwTextNode * const pDest,
341 const SwContentIndex &rStart,
342 const sal_Int32 nLen,
343 const bool bForceCopyOfAllAttrs );
344 void CopyText( SwTextNode * const pDest,
345 const SwContentIndex &rDestStart,
346 const SwContentIndex &rStart,
347 sal_Int32 nLen,
348 const bool bForceCopyOfAllAttrs = false );
349
350 void CutText(SwTextNode * const pDest,
351 const SwContentIndex & rStart, const sal_Int32 nLen);
352 inline void CutText(SwTextNode * const pDest, const SwContentIndex &rDestStart,
353 const SwContentIndex & rStart, const sal_Int32 nLen);
354
358 void ReplaceText( const SwContentIndex& rStart, const sal_Int32 nDelLen,
359 const OUString & rText );
360 void ReplaceTextOnly( sal_Int32 nPos, sal_Int32 nLen,
361 const OUString& rText,
362 const css::uno::Sequence<sal_Int32>& rOffsets );
363
365 virtual SwContentFrame *MakeFrame( SwFrame* ) override;
366 SwTextNode * SplitContentNode(const SwPosition &,
367 std::function<void (SwTextNode *, sw::mark::RestoreMode, bool AtStart)> const* pContentIndexRestore);
368 virtual SwContentNode *JoinNext() override;
369 void JoinPrev();
370
371 SwContentNode *AppendNode( const SwPosition & );
372
374 bool DontExpandFormat( sal_Int32 nContentIdx, bool bFlag = true,
375 bool bFormatToTextAttributes = true );
376
381 };
382
391 SwTextAttr *GetTextAttrAt(
392 sal_Int32 const nIndex,
393 sal_uInt16 const nWhich,
394 enum GetTextAttrMode const eMode = DEFAULT ) const;
395
400 std::vector<SwTextAttr *> GetTextAttrsAt(
401 sal_Int32 const nIndex,
402 sal_uInt16 const nWhich ) const;
403
411 SwTextAttr *GetTextAttrForCharAt(
412 const sal_Int32 nIndex,
413 const sal_uInt16 nWhich = RES_TXTATR_END ) const;
414
421 SwTextAttr* GetTextAttrForEndCharAt(sal_Int32 nIndex, sal_uInt16 nWhich) const;
422
423 SwTextField* GetFieldTextAttrAt(
424 const sal_Int32 nIndex,
425 const bool bIncludeInputFieldAtStart = false ) const;
426
427 bool Spell(SwSpellArgs*);
428 bool Convert( SwConversionArgs & );
429
430 inline SwTextFormatColl *GetTextColl() const;
431 virtual SwFormatColl *ChgFormatColl( SwFormatColl* ) override;
432 void ChgTextCollUpdateNum( const SwTextFormatColl* pOld,
433 const SwTextFormatColl* pNew );
434
438 void CopyCollFormat(SwTextNode& rDestNd, bool bUndoForChgFormatColl = true);
439
440 // BEGIN OF BULLET/NUMBERING/OUTLINE STUFF:
441
449 SwNumRule *GetNumRule(bool bInParent = true) const;
450
451 const SwNodeNum* GetNum(SwRootFrame const* pLayout = nullptr,
453 void DoNum(std::function<void (SwNodeNum &)> const&);
454
455 SwNumberTree::tNumberVector GetNumberVector(SwRootFrame const* pLayout = nullptr,
457
464 bool IsOutline() const;
465
466 bool IsOutlineStateChanged() const;
467
468 void UpdateOutlineState();
469
473 void NumRuleChgd();
474
489 OUString GetNumString( const bool _bInclPrefixAndSuffixStrings = true,
490 const unsigned int _nRestrictToThisLevel = MAXLEVEL,
491 SwRootFrame const* pLayout = nullptr,
493
501 tools::Long GetLeftMarginWithNum( bool bTextLeft = false ) const;
502
513 bool GetFirstLineOfsWithNum( short& rFirstOffset ) const;
514
515 SwTwips GetAdditionalIndentForStartingNewList() const;
516
517 void ClearLRSpaceItemDueToListLevelIndents( std::shared_ptr<SvxLRSpaceItem>& o_rLRSpaceItem ) const;
518
524 tools::Long GetLeftMarginForTabCalculation() const;
525
535 bool HasNumber(SwRootFrame const* pLayout = nullptr) const;
536
546 bool HasBullet() const;
547
559 bool IsNumbered(SwRootFrame const* pLayout = nullptr) const;
560
566 bool HasMarkedLabel() const;
567
576 void SetAttrListLevel(int nLevel);
577
578 bool HasAttrListLevel() const;
579
580 int GetAttrListLevel() const;
581
587 int GetActualListLevel(SwListRedlineType eRedline = SwListRedlineType::SHOW) const;
588
609 int GetAttrOutlineLevel() const;
610
624 void SetAttrOutlineLevel(int nLevel);
625
631 void GetAttrOutlineContentVisible(bool& bOutlineContentVisibleAttr);
632 void SetAttrOutlineContentVisible(bool bVisible);
633
634 bool IsEmptyListStyleDueToSetOutlineLevelAttr() const { return mbEmptyListStyleSetDueToSetOutlineLevelAttr;}
635 void SetEmptyListStyleDueToSetOutlineLevelAttr();
636 void ResetEmptyListStyleDueToResetOutlineLevelAttr();
637
645 SwTwips GetWidthOfLeadingTabs() const;
646
655 bool HasVisibleNumberingOrBullet() const;
656
657 void SetListId(OUString const& rListId);
658 OUString GetListId() const;
659
674 bool AreListLevelIndentsApplicable() const;
675
684 bool GetListTabStopPosition( tools::Long& nListTabStopPosition ) const;
685
691 OUString GetLabelFollowedBy() const;
692
693 // END OF BULLET/NUMBERING/OUTLINE STUFF:
694
695 void fillSoftPageBreakList( SwSoftPageBreakList& rBreak ) const;
696
697 LanguageType GetLang( const sal_Int32 nBegin, const sal_Int32 nLen = 0,
698 sal_uInt16 nScript = 0 ) const;
699
701 bool IsSymbolAt(sal_Int32 nBegin) const; // In itratr.cxx.
702 virtual SwContentNode* MakeCopy(SwDoc&, SwNode& rWhere, bool bNewFrames) const override;
703
705 bool Hyphenate( SwInterHyphInfo &rHyphInf );
706 void DelSoftHyph( const sal_Int32 nStart, const sal_Int32 nEnd );
707
714 OUString GetExpandText( SwRootFrame const* pLayout,
715 const sal_Int32 nIdx = 0,
716 const sal_Int32 nLen = -1,
717 const bool bWithNum = false,
718 const bool bAddSpaceAfterListLabelStr = false,
719 const bool bWithSpacesForLevel = false,
721 bool CopyExpandText( SwTextNode& rDestNd, const SwContentIndex* pDestIdx,
722 sal_Int32 nIdx, sal_Int32 nLen,
723 SwRootFrame const* pLayout,
724 bool bWithNum = false, bool bWithFootnote = true,
725 bool bReplaceTabsWithSpaces = false ) const;
726
727 OUString GetRedlineText() const;
728
731 sal_Int32 GetDropLen(sal_Int32 nWishLen) const;
732
734 bool GetDropSize(int& rFontHeight, int& rDropHeight, int& rDropDescent) const;
735
738 { return m_pSwpHints && m_pSwpHints->CalcHiddenParaField(); }
741 { if (m_pSwpHints) m_pSwpHints->SetCalcHiddenParaField(); }
742
745 { return m_pSwpHints && m_pSwpHints->IsHiddenByParaField(); }
746
748
749 bool HasHiddenCharAttribute( bool bWholePara ) const
750 {
751 if ( m_bRecalcHiddenCharFlags )
752 CalcHiddenCharFlags();
753 return bWholePara ? m_bHiddenCharsHidePara : m_bContainsHiddenChars;
754 }
755
757 { m_bRecalcHiddenCharFlags = true; }
758
764 bool IsHidden() const;
765
766
768 virtual void Update(
769 SwContentIndex const & rPos,
770 const sal_Int32 nChangeLen,
771 UpdateMode eMode) override;
772
774 void TransliterateText( utl::TransliterationWrapper& rTrans,
775 sal_Int32 nStart, sal_Int32 nEnd,
776 SwUndoTransliterate* pUndo, bool bUseRedlining = false );
777
779 bool CountWords( SwDocStat& rStat, sal_Int32 nStart, sal_Int32 nEnd ) const;
780
783 bool IsNotificationEnabled() const;
784
786 bool IsNotifiable() const;
787
788 void SetListRestart( bool bRestart );
789 bool IsListRestart() const;
790
791 void SetAttrListRestartValue( SwNumberTree::tSwNumTreeNumber nNum );
792 bool HasAttrListRestartValue() const;
793 SwNumberTree::tSwNumTreeNumber GetAttrListRestartValue() const;
794 SwNumberTree::tSwNumTreeNumber GetActualListStartValue() const;
795
796 void SetCountedInList( bool bCounted );
797 bool IsCountedInList() const;
798
799 void AddToList();
800 void AddToListRLHidden();
801 void AddToListOrig();
802 void RemoveFromList();
803 void RemoveFromListRLHidden();
804 void RemoveFromListOrig();
805 bool IsInList() const;
806
807 bool IsFirstOfNumRule(SwRootFrame const& rLayout) const;
808
810 { return m_wXParagraph; }
811 SAL_DLLPRIVATE void SetXParagraph(rtl::Reference<SwXParagraph> const& xParagraph);
812
814 virtual ::sfx2::IXmlIdRegistry& GetRegistry() override;
815 virtual bool IsInClipboard() const override;
817 virtual bool IsInUndo() const override;
818 virtual bool IsInContent() const override;
819 virtual css::uno::Reference< css::rdf::XMetadatable > MakeUnoObject() override;
820
821 bool IsCollapse() const;
822
823 virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
824
825 sal_uInt32 GetRsid( sal_Int32 nStt, sal_Int32 nEnd ) const;
826 sal_uInt32 GetParRsid() const;
827
828 bool CompareRsid( const SwTextNode &rTextNode, sal_Int32 nStt1, sal_Int32 nStt2 ) const;
829 bool CompareParRsid( const SwTextNode &rTextNode ) const;
830
831 // Access to DrawingLayer FillAttributes in a preprocessed form for primitive usage
833
835 static bool IsIgnoredCharFormatForNumbering(const sal_uInt16 nWhich, bool bIsCharStyle = false);
836 void FormatDropNotify(const SwFormatDrop& rDrop) override
837 { TriggerNodeUpdate(sw::LegacyModifyHint(&rDrop, &rDrop)); };
838
839 void SetInSwUndo(bool bInUndo);
840};
841
843{
844 assert( m_pSwpHints );
845 return *m_pSwpHints;
846}
848{
849 assert( m_pSwpHints );
850 return *m_pSwpHints;
851}
852
854{
855 if ( !m_pSwpHints )
856 {
857 m_pSwpHints.reset(new SwpHints(*this));
858 }
859 return *m_pSwpHints;
860}
861
863{
864 if ( m_pSwpHints && m_pSwpHints->CanBeDeleted() )
865 {
866 m_pSwpHints.reset();
867 }
868}
869
871{
872 return const_cast<SwTextFormatColl*>(static_cast<const SwTextFormatColl*>(GetRegisteredIn()));
873}
874
877{
878 return SwNodeType::Text == m_nNodeType ? static_cast<SwTextNode*>(this) : nullptr;
879}
880
881inline const SwTextNode *SwNode::GetTextNode() const
882{
883 return SwNodeType::Text == m_nNodeType ? static_cast<const SwTextNode*>(this) : nullptr;
884}
885
886inline void
887SwTextNode::CutText(SwTextNode * const pDest, const SwContentIndex & rDestStart,
888 const SwContentIndex & rStart, const sal_Int32 nLen)
889{
890 CutImpl( pDest, rDestStart, rStart, nLen );
891}
892
893inline sal_Int32 SwTextNode::GetSpaceLeft() const
894{
895 // do not fill the String up to the max - need to be able to have a
896 // SwPosition "behind" the last character, i.e., at index TXTNODE_MAX + 1
897 const sal_Int32 TXTNODE_MAX = SAL_MAX_INT32 - 2;
898 return TXTNODE_MAX-m_Text.getLength();
899}
900
901/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OUString m_Text
struct _xmlTextWriter * xmlTextWriterPtr
const SwModify * GetRegisteredIn() const
Definition: calbck.hxx:164
SwContentFrame is the layout for content nodes: a common base class for text (paragraph) and non-text...
Definition: cntfrm.hxx:58
virtual void Update(SwContentIndex const &rPos, const sal_Int32 nChangeLen, UpdateMode eMode)
Definition: index.cxx:237
Marks a character position inside a document model content node (SwContentNode)
virtual void SwClientNotify(const SwModify &, const SfxHint &rHint) override
Definition: node.cxx:1119
virtual drawinglayer::attribute::SdrAllFillAttributesHelperPtr getSdrAllFillAttributesHelper() const
Definition: node.cxx:2130
virtual SwContentFrame * MakeFrame(SwFrame *pSib)=0
MakeFrame will be called for a certain layout pSib is another SwFrame of the same layout (e....
const SfxPoolItem & GetAttr(sal_uInt16 nWhich, bool bInParent=true) const
SS for PoolItems: hard attributation.
Definition: node.hxx:749
virtual SwContentNode * JoinNext()
Definition: node.cxx:1552
virtual bool SetAttr(const SfxPoolItem &)
made virtual
Definition: node.cxx:1586
virtual sal_Int32 Len() const
Definition: node.cxx:1257
virtual SwContentNode * MakeCopy(SwDoc &, SwNode &rWhere, bool bNewFrames) const =0
virtual SwFormatColl * ChgFormatColl(SwFormatColl *)
Definition: node.cxx:1259
virtual bool ResetAttr(sal_uInt16 nWhich1, sal_uInt16 nWhich2=0)
Definition: node.cxx:1679
virtual sal_uInt16 ResetAllAttr()
Definition: node.cxx:1749
virtual void NewAttrSet(SwAttrPool &)=0
Make respective nodes create the specific AttrSets.
Definition: doc.hxx:192
Base class of all fields.
Definition: fldbas.hxx:292
If SwFormatDrop is a Client, it is the CharFormat that describes the font for the DropCaps.
Definition: paratr.hxx:63
Base class of the Writer layout elements.
Definition: frame.hxx:315
Marks a node in the document model.
Definition: ndindex.hxx:31
Base class of the Writer document model elements.
Definition: node.hxx:84
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:876
SwNodeType m_nNodeType
Definition: node.hxx:87
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const
Dumps the node structure to the given destination (file nodes.xml in the current directory by default...
Definition: node.cxx:893
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:187
The root element of a Writer document layout.
Definition: rootfrm.hxx:82
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
Definition: txatbase.hxx:44
Represents the style of a paragraph.
Definition: fmtcol.hxx:59
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:165
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:86
OUString m_Text
Definition: ndtxt.hxx:102
SAL_DLLPRIVATE unotools::WeakReference< SwXParagraph > const & GetXParagraph() const
Definition: ndtxt.hxx:809
bool IsEmptyListStyleDueToSetOutlineLevelAttr() const
Definition: ndtxt.hxx:634
void SetHiddenCharAttribute(bool bNewHiddenCharsHidePara, bool bNewContainsHiddenChars) const
Definition: ndtxt.hxx:158
sal_Int32 GetSpaceLeft() const
Definition: ndtxt.hxx:893
bool IsCalcHiddenCharFlags() const
Optimization: Asking for information about hidden characters at SwScriptInfo updates these flags.
Definition: ndtxt.hxx:156
bool CalcHiddenParaField()
Hidden Paragraph Field:
Definition: ndtxt.hxx:737
bool m_bRecalcHiddenCharFlags
The last two flags have to be recalculated if this flag is set:
Definition: ndtxt.hxx:112
SwpHints & GetOrCreateSwpHints()
Definition: ndtxt.hxx:853
void CutText(SwTextNode *const pDest, const SwContentIndex &rStart, const sal_Int32 nLen)
Definition: ndtxt.cxx:2443
std::unique_ptr< SwNodeNum > mpNodeNum
Numbering for this paragraph.
Definition: ndtxt.hxx:98
bool IsHiddenByParaField() const
is the paragraph visible?
Definition: ndtxt.hxx:744
void TryDeleteSwpHints()
Definition: ndtxt.hxx:862
std::optional< OUString > m_oNumStringCache
Definition: ndtxt.hxx:127
std::unique_ptr< SwpHints > m_pSwpHints
May be 0.
Definition: ndtxt.hxx:96
void FormatDropNotify(const SwFormatDrop &rDrop) override
Definition: ndtxt.hxx:836
bool HasHints() const
Definition: ndtxt.hxx:232
bool m_bContainsHiddenChars
Some of the chars this para are hidden.
Definition: ndtxt.hxx:108
unotools::WeakReference< SwXParagraph > m_wXParagraph
Definition: ndtxt.hxx:129
void SetCalcHiddenCharFlags() const
Definition: ndtxt.hxx:756
SwpHints & GetSwpHints()
getters for SwpHints
Definition: ndtxt.hxx:842
bool m_bHiddenCharsHidePara
The whole paragraph is hidden because of the hidden text attribute.
Definition: ndtxt.hxx:110
bool m_bInUndo
Is an undo operation in progress?
Definition: ndtxt.hxx:125
bool m_bLastOutlineState
Definition: ndtxt.hxx:114
drawinglayer::attribute::SdrAllFillAttributesHelperPtr maFillAttributes
Definition: ndtxt.hxx:132
void SetCalcHiddenParaField()
set CalcVisible flags
Definition: ndtxt.hxx:740
bool mbEmptyListStyleSetDueToSetOutlineLevelAttr
Definition: ndtxt.hxx:117
const SwpHints * GetpSwpHints() const
Definition: ndtxt.hxx:231
SwParaIdleData_Impl * m_pParaIdleData_Impl
Definition: ndtxt.hxx:104
SAL_DLLPRIVATE void CutImpl(SwTextNode *const pDest, const SwContentIndex &rDestStart, const SwContentIndex &rStart, sal_Int32 nLen, const bool bUpdate=true)
Definition: ndtxt.cxx:2451
SwpHints * GetpSwpHints()
Definition: ndtxt.hxx:230
const OUString & GetText() const
Definition: ndtxt.hxx:222
bool mbInSetOrResetAttr
boolean, indicating that a <SetAttr(..)> or <ResetAttr(..)> or <ResetAllAttr(..)> method is running.
Definition: ndtxt.hxx:122
bool HasHiddenCharAttribute(bool bWholePara) const
Hidden Paragraph Field:
Definition: ndtxt.hxx:749
GetTextAttrMode
Definition: ndtxt.hxx:377
@ EXPAND
DEFAULT: (Start <= nIndex < End)
Definition: ndtxt.hxx:379
@ PARENT
EXPAND : (Start < nIndex <= End)
Definition: ndtxt.hxx:380
bool m_bNotifiable
Definition: ndtxt.hxx:115
std::unique_ptr< SwNodeNum > mpNodeNumOrig
Numbering for this paragraph (before changes)
Definition: ndtxt.hxx:100
SwTextFormatColl * GetTextColl() const
Definition: ndtxt.hxx:870
std::unique_ptr< SwNodeNum > mpNodeNumRLHidden
Numbering for this paragraph (hidden redlines)
Definition: ndtxt.hxx:99
An SwTextAttr container, stores all directly formatted text portions for a text node.
Definition: ndhints.hxx:68
virtual css::uno::Reference< css::rdf::XMetadatable > MakeUnoObject()=0
virtual bool IsInClipboard() const=0
virtual bool IsInUndo() const=0
virtual bool IsInContent() const=0
virtual ::sfx2::IXmlIdRegistry & GetRegistry()=0
constexpr OUStringLiteral IsHidden(u"IsHidden")
SwFieldIds
Definition: fldbas.hxx:45
constexpr sal_uInt16 RES_TXTATR_END(RES_TXTATR_NOEND_END)
SwListRedlineType
Definition: list.hxx:33
ExpandMode
Some helpers for converting model strings to view strings.
@ HideFieldmarkCommands
tools::Long tSwNumTreeNumber
std::vector< tSwNumTreeNumber > tNumberVector
SwNumRule * GetNumRule(SwTextFormatColl &rTextFormatColl)
determines the list style, which directly set at the given paragraph style
Definition: fmtcol.cxx:76
@ Sequence
std::shared_ptr< SdrAllFillAttributesHelper > SdrAllFillAttributesHelperPtr
Definition: format.hxx:41
RestoreMode
Definition: mvsave.hxx:73
long Long
o3tl::sorted_vector< sal_Int32 > SwSoftPageBreakList
Definition: ndtxt.hxx:79
sal_uIntPtr sal_uLong
static LanguageType nLang
Definition: srtdlg.cxx:51
Marks a position in the document model.
Definition: pam.hxx:37
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
SetAttrMode
Definition: swtypes.hxx:133
tools::Long SwTwips
Definition: swtypes.hxx:51
constexpr sal_uInt8 MAXLEVEL
Definition: swtypes.hxx:92
#define SAL_MAX_INT32