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;
46class SwXParagraph;
47
48namespace utl {
49 class TransliterationWrapper;
50}
51namespace vcl
52{
53class Font;
54}
55
56class SwContentFrame;
57class SwTextField;
59class SfxItemSet;
61struct SwSpellArgs;
62struct SwConversionArgs;
63class SwInterHyphInfo;
64class SwWrongList;
65class SwGrammarMarkUp;
66struct SwDocStat;
67enum class ExpandMode;
68enum class SwFieldIds : sal_uInt16;
69class SwField;
70
71namespace sw {
72 class TextNodeNotificationSuppressor;
73 namespace mark { enum class RestoreMode; }
74}
75
76namespace com::sun::star {
77 namespace uno {
78 template < class > class Sequence;
79 }
80}
81
83
84namespace sw
85{
86
87enum class WrongState { TODO, PENDING, DONE };
88
90{
91 std::unique_ptr<SwWrongList> pWrong; // for spell checking
92 std::unique_ptr<SwGrammarMarkUp> pGrammarCheck; // for grammar checking / proof reading
93 std::unique_ptr<SwWrongList> pSmartTags;
98 bool bWordCountDirty = true;
101 bool bSmartTagDirty = true;
102 bool bAutoComplDirty = true;
103};
104
105} // end namespace sw
106
109 : public SwContentNode
110 , public ::sfx2::Metadatable
111 , public sw::FormatDropDefiner
112{
113 friend class SwContentNode;
115 friend class SwDoc;
116 friend class SwNodes;
117 friend class SwTextFrame;
118 friend class SwScriptInfo;
120
123 std::unique_ptr<SwpHints> m_pSwpHints;
124
125 mutable std::unique_ptr<SwNodeNum> mpNodeNum;
126 mutable std::unique_ptr<SwNodeNum> mpNodeNumRLHidden;
127 mutable std::unique_ptr<SwNodeNum> mpNodeNumOrig;
128
129 OUString m_Text;
130
132
135 mutable bool m_bContainsHiddenChars : 1;
137 mutable bool m_bHiddenCharsHidePara : 1;
139 mutable bool m_bRecalcHiddenCharFlags : 1;
140
141 mutable bool m_bLastOutlineState : 1;
143
145
150
153
154 std::optional< OUString > m_oNumStringCache;
155
157
158 // DrawingLayer FillAttributes in a preprocessed form for primitive usage
160
161 SAL_DLLPRIVATE SwTextNode( SwNode& rWhere, SwTextFormatColl *pTextColl,
162 const SfxItemSet* pAutoAttr = nullptr );
163 virtual void SwClientNotify( const SwModify&, const SfxHint& ) override;
165 SAL_DLLPRIVATE void CopyAttr( SwTextNode *pDest, const sal_Int32 nStart, const sal_Int32 nOldPos);
166
167 SAL_DLLPRIVATE SwTextNode* MakeNewTextNode( SwNode&, bool bNext = true,
168 bool bChgFollow = true );
169
170 SAL_DLLPRIVATE void CutImpl(
171 SwTextNode * const pDest, const SwContentIndex & rDestStart,
172 const SwContentIndex & rStart, /*const*/ sal_Int32 nLen,
173 const bool bUpdate = true );
174
176 SAL_DLLPRIVATE void MoveTextAttr_To_AttrSet(); // Called by SplitNode.
177
179 SAL_DLLPRIVATE virtual void NewAttrSet( SwAttrPool& ) override;
180
184 { return m_bRecalcHiddenCharFlags; }
185 void SetHiddenCharAttribute( bool bNewHiddenCharsHidePara, bool bNewContainsHiddenChars ) const
186 {
187 m_bHiddenCharsHidePara = bNewHiddenCharsHidePara;
188 m_bContainsHiddenChars = bNewContainsHiddenChars;
189 m_bRecalcHiddenCharFlags = false;
190 }
191
192 SAL_DLLPRIVATE void CalcHiddenCharFlags() const;
193
194 SAL_DLLPRIVATE void SetLanguageAndFont( const SwPaM &rPaM,
195 LanguageType nLang, sal_uInt16 nLangWhichId,
196 const vcl::Font *pFont, sal_uInt16 nFontWhichId );
197
198 inline void TryDeleteSwpHints();
199
200 SAL_DLLPRIVATE void impl_FormatToTextAttr(const SfxItemSet& i_rAttrSet);
201
202 const SwTextInputField* GetOverlappingInputField( const SwTextAttr& rTextAttr ) const;
203
204 void DelFrames_TextNodePart();
205 void HandleNonLegacyHint(const SfxHint&);
206
207public:
208 bool IsWordCountDirty() const;
209 sw::WrongState GetWrongDirty() const;
210 bool IsWrongDirty() const;
211 bool IsGrammarCheckDirty() const;
212 bool IsSmartTagDirty() const;
213 bool IsAutoCompleteWordDirty() const;
214 void SetWordCountDirty( bool bNew ) const;
215 void SetWrongDirty(sw::WrongState eNew) const;
216 void SetGrammarCheckDirty( bool bNew ) const;
217 void SetSmartTagDirty( bool bNew ) const;
218 void SetAutoCompleteWordDirty( bool bNew ) const;
219 void SetWrong( std::unique_ptr<SwWrongList> pNew );
220 void ClearWrong();
221 std::unique_ptr<SwWrongList> ReleaseWrong();
222 SwWrongList* GetWrong();
223 const SwWrongList* GetWrong() const;
224 void SetGrammarCheck( std::unique_ptr<SwGrammarMarkUp> pNew );
225 void ClearGrammarCheck();
226 std::unique_ptr<SwGrammarMarkUp> ReleaseGrammarCheck();
227 SwGrammarMarkUp* GetGrammarCheck();
228 // return SwWrongList because *function pointer* return values aren't covariant
229 SwWrongList const* GetGrammarCheck() const;
230 void SetSmartTags( std::unique_ptr<SwWrongList> pNew );
231 void ClearSmartTags();
232 std::unique_ptr<SwWrongList> ReleaseSmartTags();
233 SwWrongList* GetSmartTags();
234 SwWrongList const* GetSmartTags() const;
235
237
238public:
240 void UpdateDocPos(const SwTwips nDocPos, const sal_uInt32 nIndex);
242 void TriggerNodeUpdate(const sw::LegacyModifyHint&);
243
244 const OUString& GetText() const { return m_Text; }
245
246 // returns the maximum number of characters that can still be added to the node
247 inline sal_Int32 GetSpaceLeft() const;
248
250 inline SwpHints &GetSwpHints();
251 inline const SwpHints &GetSwpHints() const;
252 SwpHints *GetpSwpHints() { return m_pSwpHints.get(); }
253 const SwpHints *GetpSwpHints() const { return m_pSwpHints.get(); }
254 bool HasHints() const { return m_pSwpHints != nullptr; }
255 inline SwpHints &GetOrCreateSwpHints();
256
257 virtual ~SwTextNode() override;
258
259 virtual sal_Int32 Len() const override;
260
262 void GetMinMaxSize( SwNodeOffset nIndex, sal_uLong& rMin, sal_uLong &rMax, sal_uLong &rAbs ) const;
263
265 virtual bool SetAttr( const SfxPoolItem& ) override;
266 virtual bool SetAttr( const SfxItemSet& rSet ) override;
267 virtual bool ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 ) override;
268 virtual bool ResetAttr( const std::vector<sal_uInt16>& rWhichArr ) override;
269 virtual sal_uInt16 ResetAllAttr() override;
270
275 OUString InsertText( const OUString & rStr, const SwContentIndex & rIdx,
276 const SwInsertFlags nMode
278 OUString InsertText( const OUString & rStr, const SwPosition & rIdx,
279 const SwInsertFlags nMode
282 void InsertDummy() { m_Text = OUStringChar(CH_TXT_TRACKED_DUMMY_CHAR); }
283
288 void EraseText ( const SwContentIndex &rIdx, const sal_Int32 nCount = SAL_MAX_INT32,
290 void EraseText ( const SwPosition& rIdx, const sal_Int32 nCount = SAL_MAX_INT32,
292
307 void RstTextAttr(
308 const sal_Int32 nContentStart,
309 const sal_Int32 nLen,
310 const sal_uInt16 nWhich = 0,
311 const SfxItemSet* pSet = nullptr,
312 const bool bInclRefToxMark = false,
313 const bool bExactRange = false );
314 void GCAttr();
315
316 // Delete text attribute (needs to be deregistered at Pool!)
317 void DestroyAttr( SwTextAttr* pAttr );
318
319 // delete all attributes from SwpHintsArray.
320 void ClearSwpHintsArr( bool bDelFields );
321
323 void FileLoadedInitHints();
324
326 bool InsertHint( SwTextAttr * const pAttr,
327 const SetAttrMode nMode = SetAttrMode::DEFAULT );
330 SwTextAttr* InsertItem( SfxPoolItem& rAttr,
331 const sal_Int32 nStart, const sal_Int32 nEnd,
332 const SetAttrMode nMode = SetAttrMode::DEFAULT );
333
336 bool SetAttr( const SfxItemSet& rSet,
337 sal_Int32 nStt, sal_Int32 nEnd,
338 const SetAttrMode nMode = SetAttrMode::DEFAULT,
339 SwTextAttr **ppNewTextAttr = nullptr);
347 bool GetParaAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd,
348 const bool bOnlyTextAttr = false,
349 const bool bGetFromChrFormat = true,
350 const bool bMergeIndentValuesOfNumRule = false,
351 SwRootFrame const* pLayout = nullptr) const;
352
354 void FormatToTextAttr( SwTextNode* pNd );
355
357 void DeleteAttributes( const sal_uInt16 nWhich,
358 const sal_Int32 nStart, const sal_Int32 nEnd = 0 );
360 void DeleteAttribute ( SwTextAttr * const pTextAttr );
361
364 void CopyText( SwTextNode * const pDest,
365 const SwContentIndex &rStart,
366 const sal_Int32 nLen,
367 const bool bForceCopyOfAllAttrs );
368 void CopyText( SwTextNode * const pDest,
369 const SwContentIndex &rDestStart,
370 const SwContentIndex &rStart,
371 sal_Int32 nLen,
372 const bool bForceCopyOfAllAttrs = false );
373 void CopyText( SwTextNode * const pDest,
374 const SwContentIndex &rDestStart,
375 const SwPosition &rStart,
376 sal_Int32 nLen,
377 const bool bForceCopyOfAllAttrs = false );
378
379 void CutText(SwTextNode * const pDest,
380 const SwContentIndex & rStart, const sal_Int32 nLen);
381 inline void CutText(SwTextNode * const pDest, const SwContentIndex &rDestStart,
382 const SwContentIndex & rStart, const sal_Int32 nLen);
383
387 void ReplaceText( const SwContentIndex& rStart, const sal_Int32 nDelLen,
388 const OUString & rText );
389 void ReplaceText( SwPosition& rStart, const sal_Int32 nDelLen,
390 const OUString & rText );
391 void ReplaceTextOnly( sal_Int32 nPos, sal_Int32 nLen,
392 std::u16string_view aText,
393 const css::uno::Sequence<sal_Int32>& rOffsets );
394
396 virtual SwContentFrame *MakeFrame( SwFrame* ) override;
397 SwTextNode * SplitContentNode(const SwPosition &,
398 std::function<void (SwTextNode *, sw::mark::RestoreMode, bool AtStart)> const* pContentIndexRestore);
399 virtual SwContentNode *JoinNext() override;
400 void JoinPrev();
401
402 SwContentNode *AppendNode( const SwPosition & );
403
405 bool DontExpandFormat( sal_Int32 nContentIdx, bool bFlag = true,
406 bool bFormatToTextAttributes = true );
407
416 SwTextAttr *GetTextAttrAt(
417 sal_Int32 const nIndex,
418 sal_uInt16 const nWhich,
420
425 std::vector<SwTextAttr *> GetTextAttrsAt(
426 sal_Int32 const nIndex,
427 sal_uInt16 const nWhich ) const;
428
436 SwTextAttr *GetTextAttrForCharAt(
437 const sal_Int32 nIndex,
438 const sal_uInt16 nWhich = RES_TXTATR_END ) const;
439
446 SwTextAttr* GetTextAttrForEndCharAt(sal_Int32 nIndex, sal_uInt16 nWhich) const;
447
448 SwTextField* GetFieldTextAttrAt(
449 const sal_Int32 nIndex,
451
452 bool Spell(SwSpellArgs*);
453 bool Convert( SwConversionArgs & );
454
455 inline SwTextFormatColl *GetTextColl() const;
456 virtual SwFormatColl *ChgFormatColl( SwFormatColl* ) override;
457 void ChgTextCollUpdateNum( const SwTextFormatColl* pOld,
458 const SwTextFormatColl* pNew );
459
463 void CopyCollFormat(SwTextNode& rDestNd, bool bUndoForChgFormatColl = true);
464
465 // BEGIN OF BULLET/NUMBERING/OUTLINE STUFF:
466
474 SwNumRule *GetNumRule(bool bInParent = true) const;
475
476 const SwNodeNum* GetNum(SwRootFrame const* pLayout = nullptr,
478 void DoNum(std::function<void (SwNodeNum &)> const&);
479
480 SwNumberTree::tNumberVector GetNumberVector(SwRootFrame const* pLayout = nullptr,
482
489 bool IsOutline() const;
490
491 bool IsOutlineStateChanged() const;
492
493 void UpdateOutlineState();
494
498 void NumRuleChgd();
499
514 OUString GetNumString( const bool _bInclPrefixAndSuffixStrings = true,
515 const unsigned int _nRestrictToThisLevel = MAXLEVEL,
516 SwRootFrame const* pLayout = nullptr,
518
527 tools::Long GetLeftMarginWithNum( bool bTextLeft = false ) const;
528
539 bool GetFirstLineOfsWithNum( short& rFirstOffset ) const;
540
541 SwTwips GetAdditionalIndentForStartingNewList() const;
542
548 tools::Long GetLeftMarginForTabCalculation() const;
549
559 bool HasNumber(SwRootFrame const* pLayout = nullptr) const;
560
570 bool HasBullet() const;
571
583 bool IsNumbered(SwRootFrame const* pLayout = nullptr) const;
584
590 bool HasMarkedLabel() const;
591
600 void SetAttrListLevel(int nLevel);
601
602 bool HasAttrListLevel() const;
603
604 int GetAttrListLevel() const;
605
611 int GetActualListLevel(SwListRedlineType eRedline = SwListRedlineType::SHOW) const;
612
633 int GetAttrOutlineLevel() const;
634
648 void SetAttrOutlineLevel(int nLevel);
649
655 void GetAttrOutlineContentVisible(bool& bOutlineContentVisibleAttr);
656 void SetAttrOutlineContentVisible(bool bVisible);
657
658 bool IsEmptyListStyleDueToSetOutlineLevelAttr() const { return mbEmptyListStyleSetDueToSetOutlineLevelAttr;}
659 void SetEmptyListStyleDueToSetOutlineLevelAttr();
660 void ResetEmptyListStyleDueToResetOutlineLevelAttr();
661
669 SwTwips GetWidthOfLeadingTabs() const;
670
679 bool HasVisibleNumberingOrBullet() const;
680
681 void SetListId(OUString const& rListId);
682 OUString GetListId() const;
683
698 ::sw::ListLevelIndents AreListLevelIndentsApplicable() const;
699 bool AreListLevelIndentsApplicableImpl(sal_uInt16 nWhich) const;
700
709 bool GetListTabStopPosition( tools::Long& nListTabStopPosition ) const;
710
716 OUString GetLabelFollowedBy() const;
717
718 // END OF BULLET/NUMBERING/OUTLINE STUFF:
719
720 void fillSoftPageBreakList( SwSoftPageBreakList& rBreak ) const;
721
722 LanguageType GetLang( const sal_Int32 nBegin, const sal_Int32 nLen = 0,
723 sal_uInt16 nScript = 0 ) const;
724
726 bool IsSymbolAt(sal_Int32 nBegin) const; // In itratr.cxx.
727 virtual SwContentNode* MakeCopy(SwDoc&, SwNode& rWhere, bool bNewFrames) const override;
728
730 bool Hyphenate( SwInterHyphInfo &rHyphInf );
731 void DelSoftHyph( const sal_Int32 nStart, const sal_Int32 nEnd );
732
739 OUString GetExpandText( SwRootFrame const* pLayout,
740 const sal_Int32 nIdx = 0,
741 const sal_Int32 nLen = -1,
742 const bool bWithNum = false,
743 const bool bAddSpaceAfterListLabelStr = false,
744 const bool bWithSpacesForLevel = false,
746 bool CopyExpandText( SwTextNode& rDestNd, const SwContentIndex* pDestIdx,
747 sal_Int32 nIdx, sal_Int32 nLen,
748 SwRootFrame const* pLayout,
749 bool bWithNum = false, bool bWithFootnote = true,
750 bool bReplaceTabsWithSpaces = false ) const;
751
752 OUString GetRedlineText() const;
753
756 sal_Int32 GetDropLen(sal_Int32 nWishLen) const;
757
759 bool GetDropSize(int& rFontHeight, int& rDropHeight, int& rDropDescent) const;
760
763 { return m_pSwpHints && m_pSwpHints->CalcHiddenParaField(); }
766 { if (m_pSwpHints) m_pSwpHints->SetCalcHiddenParaField(); }
767
770 { return m_pSwpHints && m_pSwpHints->IsHiddenByParaField(); }
771
773
774 bool HasHiddenCharAttribute( bool bWholePara ) const
775 {
776 if ( m_bRecalcHiddenCharFlags )
777 CalcHiddenCharFlags();
778 return bWholePara ? m_bHiddenCharsHidePara : m_bContainsHiddenChars;
779 }
780
782 { m_bRecalcHiddenCharFlags = true; }
783
789 bool IsHidden() const;
790
791
793 virtual void Update(
794 SwContentIndex const & rPos,
795 const sal_Int32 nChangeLen,
796 UpdateMode eMode) override;
797
799 void TransliterateText( utl::TransliterationWrapper& rTrans,
800 sal_Int32 nStart, sal_Int32 nEnd,
801 SwUndoTransliterate* pUndo, bool bUseRedlining = false );
802
804 bool CountWords( SwDocStat& rStat, sal_Int32 nStart, sal_Int32 nEnd ) const;
805
808 bool IsNotificationEnabled() const;
809
811 bool IsNotifiable() const;
812
813 void SetListRestart( bool bRestart );
814 bool IsListRestart() const;
815
816 void SetAttrListRestartValue( SwNumberTree::tSwNumTreeNumber nNum );
817 bool HasAttrListRestartValue() const;
818 SwNumberTree::tSwNumTreeNumber GetAttrListRestartValue() const;
819 SwNumberTree::tSwNumTreeNumber GetActualListStartValue() const;
820
821 void SetCountedInList( bool bCounted );
822 bool IsCountedInList() const;
823
824 void AddToList();
825 void AddToListRLHidden();
826 void AddToListOrig();
827 void RemoveFromList();
828 void RemoveFromListRLHidden();
829 void RemoveFromListOrig();
830 bool IsInList() const;
831
832 bool IsFirstOfNumRule(SwRootFrame const& rLayout) const;
833
835 { return m_wXParagraph; }
836 SAL_DLLPRIVATE void SetXParagraph(rtl::Reference<SwXParagraph> const& xParagraph);
837
839 virtual ::sfx2::IXmlIdRegistry& GetRegistry() override;
840 virtual bool IsInClipboard() const override;
842 virtual bool IsInUndo() const override;
843 virtual bool IsInContent() const override;
844 virtual css::uno::Reference< css::rdf::XMetadatable > MakeUnoObject() override;
845
846 bool IsCollapse() const;
847
848 virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
849
850 sal_uInt32 GetRsid( sal_Int32 nStt, sal_Int32 nEnd ) const;
851 sal_uInt32 GetParRsid() const;
852
853 bool CompareRsid( const SwTextNode &rTextNode, sal_Int32 nStt1, sal_Int32 nStt2 ) const;
854 bool CompareParRsid( const SwTextNode &rTextNode ) const;
855
856 // Access to DrawingLayer FillAttributes in a preprocessed form for primitive usage
858
860 static bool IsIgnoredCharFormatForNumbering(const sal_uInt16 nWhich, bool bIsCharStyle = false);
861 void FormatDropNotify(const SwFormatDrop& rDrop) override
862 { TriggerNodeUpdate(sw::LegacyModifyHint(&rDrop, &rDrop)); };
863
864 void SetInSwUndo(bool bInUndo);
865};
866
868{
869 assert( m_pSwpHints );
870 return *m_pSwpHints;
871}
873{
874 assert( m_pSwpHints );
875 return *m_pSwpHints;
876}
877
879{
880 if ( !m_pSwpHints )
881 {
882 m_pSwpHints.reset(new SwpHints(*this));
883 }
884 return *m_pSwpHints;
885}
886
888{
889 if ( m_pSwpHints && m_pSwpHints->CanBeDeleted() )
890 {
891 m_pSwpHints.reset();
892 }
893}
894
896{
897 return const_cast<SwTextFormatColl*>(static_cast<const SwTextFormatColl*>(GetRegisteredIn()));
898}
899
902{
903 return SwNodeType::Text == m_nNodeType ? static_cast<SwTextNode*>(this) : nullptr;
904}
905
906inline const SwTextNode *SwNode::GetTextNode() const
907{
908 return SwNodeType::Text == m_nNodeType ? static_cast<const SwTextNode*>(this) : nullptr;
909}
910
911inline void
912SwTextNode::CutText(SwTextNode * const pDest, const SwContentIndex & rDestStart,
913 const SwContentIndex & rStart, const sal_Int32 nLen)
914{
915 CutImpl( pDest, rDestStart, rStart, nLen );
916}
917
918inline sal_Int32 SwTextNode::GetSpaceLeft() const
919{
920 // do not fill the String up to the max - need to be able to have a
921 // SwPosition "behind" the last character, i.e., at index TXTNODE_MAX + 1
922 const sal_Int32 TXTNODE_MAX = SAL_MAX_INT32 - 2;
923 return TXTNODE_MAX-m_Text.getLength();
924}
925
926/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SwContentFrame is the layout for content nodes: a common base class for text (paragraph) and non-text...
Definition: cntfrm.hxx:59
Marks a character position inside a document model content node (SwContentNode)
virtual void SwClientNotify(const SwModify &, const SfxHint &rHint) override
Definition: node.cxx:1123
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:732
virtual SwContentNode * JoinNext()
Definition: node.cxx:1560
virtual bool SetAttr(const SfxPoolItem &)
made virtual
Definition: node.cxx:1586
virtual sal_Int32 Len() const
Definition: node.cxx:1256
virtual SwContentNode * MakeCopy(SwDoc &, SwNode &rWhere, bool bNewFrames) const =0
virtual SwFormatColl * ChgFormatColl(SwFormatColl *)
Definition: node.cxx:1258
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:197
Base class of all fields.
Definition: fldbas.hxx:296
SwFormatColl is just an SwFormat subclass that defaults to m_bAutoFormat=false, expressing that this ...
Definition: fmtcol.hxx:38
If SwFormatDrop is a Client, it is the CharFormat that describes the font for the DropCaps.
Definition: paratr.hxx:72
Base class of the Writer layout elements.
Definition: frame.hxx:315
Base class of the Writer document model elements.
Definition: node.hxx:98
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:901
SwNodeType m_nNodeType
Definition: node.hxx:101
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:899
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:188
The root element of a Writer document layout.
Definition: rootfrm.hxx:85
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:61
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:168
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:112
OUString m_Text
Definition: ndtxt.hxx:129
SAL_DLLPRIVATE unotools::WeakReference< SwXParagraph > const & GetXParagraph() const
Definition: ndtxt.hxx:834
bool IsEmptyListStyleDueToSetOutlineLevelAttr() const
Definition: ndtxt.hxx:658
void SetHiddenCharAttribute(bool bNewHiddenCharsHidePara, bool bNewContainsHiddenChars) const
Definition: ndtxt.hxx:185
sw::ParagraphIdleData m_aParagraphIdleData
Definition: ndtxt.hxx:131
sal_Int32 GetSpaceLeft() const
Definition: ndtxt.hxx:918
bool IsCalcHiddenCharFlags() const
Optimization: Asking for information about hidden characters at SwScriptInfo updates these flags.
Definition: ndtxt.hxx:183
bool CalcHiddenParaField()
Hidden Paragraph Field:
Definition: ndtxt.hxx:762
bool m_bRecalcHiddenCharFlags
The last two flags have to be recalculated if this flag is set:
Definition: ndtxt.hxx:139
SwpHints & GetOrCreateSwpHints()
Definition: ndtxt.hxx:878
void CutText(SwTextNode *const pDest, const SwContentIndex &rStart, const sal_Int32 nLen)
Definition: ndtxt.cxx:2496
std::unique_ptr< SwNodeNum > mpNodeNum
Numbering for this paragraph.
Definition: ndtxt.hxx:125
bool IsHiddenByParaField() const
is the paragraph visible?
Definition: ndtxt.hxx:769
void TryDeleteSwpHints()
Definition: ndtxt.hxx:887
std::optional< OUString > m_oNumStringCache
Definition: ndtxt.hxx:154
std::unique_ptr< SwpHints > m_pSwpHints
May be 0.
Definition: ndtxt.hxx:123
void FormatDropNotify(const SwFormatDrop &rDrop) override
Definition: ndtxt.hxx:861
bool HasHints() const
Definition: ndtxt.hxx:254
bool m_bContainsHiddenChars
Some of the chars this para are hidden.
Definition: ndtxt.hxx:135
unotools::WeakReference< SwXParagraph > m_wXParagraph
Definition: ndtxt.hxx:156
void SetCalcHiddenCharFlags() const
Definition: ndtxt.hxx:781
SwpHints & GetSwpHints()
getters for SwpHints
Definition: ndtxt.hxx:867
bool m_bHiddenCharsHidePara
The whole paragraph is hidden because of the hidden text attribute.
Definition: ndtxt.hxx:137
bool m_bInUndo
Is an undo operation in progress?
Definition: ndtxt.hxx:152
bool m_bLastOutlineState
Definition: ndtxt.hxx:141
drawinglayer::attribute::SdrAllFillAttributesHelperPtr maFillAttributes
Definition: ndtxt.hxx:159
void SetCalcHiddenParaField()
set CalcVisible flags
Definition: ndtxt.hxx:765
bool mbEmptyListStyleSetDueToSetOutlineLevelAttr
Definition: ndtxt.hxx:144
const SwpHints * GetpSwpHints() const
Definition: ndtxt.hxx:253
SAL_DLLPRIVATE void CutImpl(SwTextNode *const pDest, const SwContentIndex &rDestStart, const SwContentIndex &rStart, sal_Int32 nLen, const bool bUpdate=true)
Definition: ndtxt.cxx:2504
SwpHints * GetpSwpHints()
Definition: ndtxt.hxx:252
void InsertDummy()
Add a dummy character to the redline of the table changes.
Definition: ndtxt.hxx:282
const OUString & GetText() const
Definition: ndtxt.hxx:244
bool mbInSetOrResetAttr
boolean, indicating that a <SetAttr(..)> or <ResetAttr(..)> or <ResetAllAttr(..)> method is running.
Definition: ndtxt.hxx:149
bool HasHiddenCharAttribute(bool bWholePara) const
Hidden Paragraph Field:
Definition: ndtxt.hxx:774
bool m_bNotifiable
Definition: ndtxt.hxx:142
std::unique_ptr< SwNodeNum > mpNodeNumOrig
Numbering for this paragraph (before changes)
Definition: ndtxt.hxx:127
SwTextFormatColl * GetTextColl() const
Definition: ndtxt.hxx:895
std::unique_ptr< SwNodeNum > mpNodeNumRLHidden
Numbering for this paragraph (hidden redlines)
Definition: ndtxt.hxx:126
An SwTextAttr container, stores all directly formatted text portions for a text node.
Definition: ndhints.hxx:68
struct _xmlTextWriter * xmlTextWriterPtr
constexpr OUStringLiteral IsHidden(u"IsHidden")
SwFieldIds
Definition: fldbas.hxx:49
constexpr sal_uInt16 RES_TXTATR_END(RES_TXTATR_NOEND_END)
#define CH_TXT_TRACKED_DUMMY_CHAR
Definition: hintids.hxx:191
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:74
@ Sequence
std::shared_ptr< SdrAllFillAttributesHelper > SdrAllFillAttributesHelperPtr
Definition: format.hxx:41
RestoreMode
Definition: mvsave.hxx:73
Dialog to specify the properties of date form field.
WrongState
Definition: ndtxt.hxx:87
ListLevelIndents
Definition: paratr.hxx:52
GetTextAttrMode
Definition: swtypes.hxx:163
@ Expand
DEFAULT: (Start <= nIndex < End)
long Long
o3tl::sorted_vector< sal_Int32 > SwSoftPageBreakList
Definition: ndtxt.hxx:82
sal_uIntPtr sal_uLong
static LanguageType nLang
Definition: srtdlg.cxx:51
Marks a position in the document model.
Definition: pam.hxx:38
sal_uLong nNumberOfAsianWords
Definition: ndtxt.hxx:95
WrongState eWrongDirty
online spell checking needed/done?
Definition: ndtxt.hxx:99
sal_uLong nNumberOfCharsExcludingSpaces
Definition: ndtxt.hxx:97
std::unique_ptr< SwWrongList > pWrong
Definition: ndtxt.hxx:91
std::unique_ptr< SwWrongList > pSmartTags
Definition: ndtxt.hxx:93
sal_uLong nNumberOfWords
Definition: ndtxt.hxx:94
std::unique_ptr< SwGrammarMarkUp > pGrammarCheck
Definition: ndtxt.hxx:92
bool bAutoComplDirty
auto complete list dirty
Definition: ndtxt.hxx:102
sal_uLong nNumberOfChars
Definition: ndtxt.hxx:96
#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