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;
66enum class ExpandMode;
67enum class SwFieldIds : sal_uInt16;
68class SwField;
69
70namespace sw {
71 class TextNodeNotificationSuppressor;
72 namespace mark { enum class RestoreMode; }
73}
74
75namespace com::sun::star {
76 namespace uno {
77 template < class > class Sequence;
78 }
79}
80
82
83namespace sw
84{
85
86enum class WrongState { TODO, PENDING, DONE };
87
89{
90 std::unique_ptr<SwWrongList> pWrong; // for spell checking
91 std::unique_ptr<SwGrammarMarkUp> pGrammarCheck; // for grammar checking / proof reading
92 std::unique_ptr<SwWrongList> pSmartTags;
97 bool bWordCountDirty = true;
99 bool bGrammarCheckDirty = true;
100 bool bSmartTagDirty = true;
101 bool bAutoComplDirty = true;
102};
103
104} // end namespace sw
105
108 : public SwContentNode
109 , public ::sfx2::Metadatable
110 , public sw::FormatDropDefiner
111{
112 friend class SwContentNode;
114 friend class SwDoc;
115 friend class SwNodes;
116 friend class SwTextFrame;
117 friend class SwScriptInfo;
119
122 std::unique_ptr<SwpHints> m_pSwpHints;
123
124 mutable std::unique_ptr<SwNodeNum> mpNodeNum;
125 mutable std::unique_ptr<SwNodeNum> mpNodeNumRLHidden;
126 mutable std::unique_ptr<SwNodeNum> mpNodeNumOrig;
127
128 OUString m_Text;
129
131
134 mutable bool m_bContainsHiddenChars : 1;
136 mutable bool m_bHiddenCharsHidePara : 1;
138 mutable bool m_bRecalcHiddenCharFlags : 1;
139
140 mutable bool m_bLastOutlineState : 1;
142
144
149
152
153 std::optional< OUString > m_oNumStringCache;
154
156
157 // DrawingLayer FillAttributes in a preprocessed form for primitive usage
159
160 SAL_DLLPRIVATE SwTextNode( SwNode& rWhere, SwTextFormatColl *pTextColl,
161 const SfxItemSet* pAutoAttr = nullptr );
162 virtual void SwClientNotify( const SwModify&, const SfxHint& ) override;
164 SAL_DLLPRIVATE void CopyAttr( SwTextNode *pDest, const sal_Int32 nStart, const sal_Int32 nOldPos);
165
166 SAL_DLLPRIVATE SwTextNode* MakeNewTextNode( SwNode&, bool bNext = true,
167 bool bChgFollow = true );
168
169 SAL_DLLPRIVATE void CutImpl(
170 SwTextNode * const pDest, const SwContentIndex & rDestStart,
171 const SwContentIndex & rStart, /*const*/ sal_Int32 nLen,
172 const bool bUpdate = true );
173
175 SAL_DLLPRIVATE void MoveTextAttr_To_AttrSet(); // Called by SplitNode.
176
178 SAL_DLLPRIVATE virtual void NewAttrSet( SwAttrPool& ) override;
179
183 { return m_bRecalcHiddenCharFlags; }
184 void SetHiddenCharAttribute( bool bNewHiddenCharsHidePara, bool bNewContainsHiddenChars ) const
185 {
186 m_bHiddenCharsHidePara = bNewHiddenCharsHidePara;
187 m_bContainsHiddenChars = bNewContainsHiddenChars;
188 m_bRecalcHiddenCharFlags = false;
189 }
190
191 SAL_DLLPRIVATE void CalcHiddenCharFlags() const;
192
193 SAL_DLLPRIVATE void SetLanguageAndFont( const SwPaM &rPaM,
194 LanguageType nLang, sal_uInt16 nLangWhichId,
195 const vcl::Font *pFont, sal_uInt16 nFontWhichId );
196
197 inline void TryDeleteSwpHints();
198
199 SAL_DLLPRIVATE void impl_FormatToTextAttr(const SfxItemSet& i_rAttrSet);
200
201 const SwTextInputField* GetOverlappingInputField( const SwTextAttr& rTextAttr ) const;
202
203 void DelFrames_TextNodePart();
204 void HandleNonLegacyHint(const SfxHint&);
205
206public:
207 bool IsWordCountDirty() const;
208 sw::WrongState GetWrongDirty() const;
209 bool IsWrongDirty() const;
210 bool IsGrammarCheckDirty() const;
211 bool IsSmartTagDirty() const;
212 bool IsAutoCompleteWordDirty() const;
213 void SetWordCountDirty( bool bNew ) const;
214 void SetWrongDirty(sw::WrongState eNew) const;
215 void SetGrammarCheckDirty( bool bNew ) const;
216 void SetSmartTagDirty( bool bNew ) const;
217 void SetAutoCompleteWordDirty( bool bNew ) const;
218 void SetWrong( std::unique_ptr<SwWrongList> pNew );
219 void ClearWrong();
220 std::unique_ptr<SwWrongList> ReleaseWrong();
221 SwWrongList* GetWrong();
222 const SwWrongList* GetWrong() const;
223 void SetGrammarCheck( std::unique_ptr<SwGrammarMarkUp> pNew );
224 void ClearGrammarCheck();
225 std::unique_ptr<SwGrammarMarkUp> ReleaseGrammarCheck();
226 SwGrammarMarkUp* GetGrammarCheck();
227 // return SwWrongList because *function pointer* return values aren't covariant
228 SwWrongList const* GetGrammarCheck() const;
229 void SetSmartTags( std::unique_ptr<SwWrongList> pNew );
230 void ClearSmartTags();
231 std::unique_ptr<SwWrongList> ReleaseSmartTags();
232 SwWrongList* GetSmartTags();
233 SwWrongList const* GetSmartTags() const;
234
236
237public:
240 void TriggerNodeUpdate(const sw::LegacyModifyHint&);
241
242 const OUString& GetText() const { return m_Text; }
243
244 // returns the maximum number of characters that can still be added to the node
245 inline sal_Int32 GetSpaceLeft() const;
246
248 inline SwpHints &GetSwpHints();
249 inline const SwpHints &GetSwpHints() const;
250 SwpHints *GetpSwpHints() { return m_pSwpHints.get(); }
251 const SwpHints *GetpSwpHints() const { return m_pSwpHints.get(); }
252 bool HasHints() const { return m_pSwpHints != nullptr; }
253 inline SwpHints &GetOrCreateSwpHints();
254
255 virtual ~SwTextNode() override;
256
257 virtual sal_Int32 Len() const override;
258
260 void GetMinMaxSize( SwNodeOffset nIndex, sal_uLong& rMin, sal_uLong &rMax, sal_uLong &rAbs ) const;
261
263 virtual bool SetAttr( const SfxPoolItem& ) override;
264 virtual bool SetAttr( const SfxItemSet& rSet ) override;
265 virtual bool ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 ) override;
266 virtual bool ResetAttr( const std::vector<sal_uInt16>& rWhichArr ) override;
267 virtual sal_uInt16 ResetAllAttr() override;
268
273 OUString InsertText( const OUString & rStr, const SwContentIndex & rIdx,
274 const SwInsertFlags nMode
276 OUString InsertText( const OUString & rStr, const SwPosition & rIdx,
277 const SwInsertFlags nMode
279
284 void EraseText ( const SwContentIndex &rIdx, const sal_Int32 nCount = SAL_MAX_INT32,
286 void EraseText ( const SwPosition& rIdx, const sal_Int32 nCount = SAL_MAX_INT32,
288
303 void RstTextAttr(
304 const sal_Int32 nContentStart,
305 const sal_Int32 nLen,
306 const sal_uInt16 nWhich = 0,
307 const SfxItemSet* pSet = nullptr,
308 const bool bInclRefToxMark = false,
309 const bool bExactRange = false );
310 void GCAttr();
311
312 // Delete text attribute (needs to be deregistered at Pool!)
313 void DestroyAttr( SwTextAttr* pAttr );
314
315 // delete all attributes from SwpHintsArray.
316 void ClearSwpHintsArr( bool bDelFields );
317
319 void FileLoadedInitHints();
320
322 bool InsertHint( SwTextAttr * const pAttr,
323 const SetAttrMode nMode = SetAttrMode::DEFAULT );
326 SwTextAttr* InsertItem( SfxPoolItem& rAttr,
327 const sal_Int32 nStart, const sal_Int32 nEnd,
328 const SetAttrMode nMode = SetAttrMode::DEFAULT );
329
332 bool SetAttr( const SfxItemSet& rSet,
333 sal_Int32 nStt, sal_Int32 nEnd,
334 const SetAttrMode nMode = SetAttrMode::DEFAULT,
335 SwTextAttr **ppNewTextAttr = nullptr);
343 bool GetParaAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd,
344 const bool bOnlyTextAttr = false,
345 const bool bGetFromChrFormat = true,
346 const bool bMergeIndentValuesOfNumRule = false,
347 SwRootFrame const* pLayout = nullptr) const;
348
350 void FormatToTextAttr( SwTextNode* pNd );
351
353 void DeleteAttributes( const sal_uInt16 nWhich,
354 const sal_Int32 nStart, const sal_Int32 nEnd = 0 );
356 void DeleteAttribute ( SwTextAttr * const pTextAttr );
357
360 void CopyText( SwTextNode * const pDest,
361 const SwContentIndex &rStart,
362 const sal_Int32 nLen,
363 const bool bForceCopyOfAllAttrs );
364 void CopyText( SwTextNode * const pDest,
365 const SwContentIndex &rDestStart,
366 const SwContentIndex &rStart,
367 sal_Int32 nLen,
368 const bool bForceCopyOfAllAttrs = false );
369 void CopyText( SwTextNode * const pDest,
370 const SwContentIndex &rDestStart,
371 const SwPosition &rStart,
372 sal_Int32 nLen,
373 const bool bForceCopyOfAllAttrs = false );
374
375 void CutText(SwTextNode * const pDest,
376 const SwContentIndex & rStart, const sal_Int32 nLen);
377 inline void CutText(SwTextNode * const pDest, const SwContentIndex &rDestStart,
378 const SwContentIndex & rStart, const sal_Int32 nLen);
379
383 void ReplaceText( const SwContentIndex& rStart, const sal_Int32 nDelLen,
384 const OUString & rText );
385 void ReplaceText( SwPosition& rStart, const sal_Int32 nDelLen,
386 const OUString & rText );
387 void ReplaceTextOnly( sal_Int32 nPos, sal_Int32 nLen,
388 std::u16string_view aText,
389 const css::uno::Sequence<sal_Int32>& rOffsets );
390
392 virtual SwContentFrame *MakeFrame( SwFrame* ) override;
393 SwTextNode * SplitContentNode(const SwPosition &,
394 std::function<void (SwTextNode *, sw::mark::RestoreMode, bool AtStart)> const* pContentIndexRestore);
395 virtual SwContentNode *JoinNext() override;
396 void JoinPrev();
397
398 SwContentNode *AppendNode( const SwPosition & );
399
401 bool DontExpandFormat( sal_Int32 nContentIdx, bool bFlag = true,
402 bool bFormatToTextAttributes = true );
403
412 SwTextAttr *GetTextAttrAt(
413 sal_Int32 const nIndex,
414 sal_uInt16 const nWhich,
416
421 std::vector<SwTextAttr *> GetTextAttrsAt(
422 sal_Int32 const nIndex,
423 sal_uInt16 const nWhich ) const;
424
432 SwTextAttr *GetTextAttrForCharAt(
433 const sal_Int32 nIndex,
434 const sal_uInt16 nWhich = RES_TXTATR_END ) const;
435
442 SwTextAttr* GetTextAttrForEndCharAt(sal_Int32 nIndex, sal_uInt16 nWhich) const;
443
444 SwTextField* GetFieldTextAttrAt(
445 const sal_Int32 nIndex,
447
448 bool Spell(SwSpellArgs*);
449 bool Convert( SwConversionArgs & );
450
451 inline SwTextFormatColl *GetTextColl() const;
452 virtual SwFormatColl *ChgFormatColl( SwFormatColl* ) override;
453 void ChgTextCollUpdateNum( const SwTextFormatColl* pOld,
454 const SwTextFormatColl* pNew );
455
459 void CopyCollFormat(SwTextNode& rDestNd, bool bUndoForChgFormatColl = true);
460
461 // BEGIN OF BULLET/NUMBERING/OUTLINE STUFF:
462
470 SwNumRule *GetNumRule(bool bInParent = true) const;
471
472 const SwNodeNum* GetNum(SwRootFrame const* pLayout = nullptr,
474 void DoNum(std::function<void (SwNodeNum &)> const&);
475
476 SwNumberTree::tNumberVector GetNumberVector(SwRootFrame const* pLayout = nullptr,
478
485 bool IsOutline() const;
486
487 bool IsOutlineStateChanged() const;
488
489 void UpdateOutlineState();
490
494 void NumRuleChgd();
495
510 OUString GetNumString( const bool _bInclPrefixAndSuffixStrings = true,
511 const unsigned int _nRestrictToThisLevel = MAXLEVEL,
512 SwRootFrame const* pLayout = nullptr,
514
522 tools::Long GetLeftMarginWithNum( bool bTextLeft = false ) const;
523
534 bool GetFirstLineOfsWithNum( short& rFirstOffset ) const;
535
536 SwTwips GetAdditionalIndentForStartingNewList() const;
537
538 void ClearLRSpaceItemDueToListLevelIndents( std::shared_ptr<SvxLRSpaceItem>& o_rLRSpaceItem ) const;
539
545 tools::Long GetLeftMarginForTabCalculation() const;
546
556 bool HasNumber(SwRootFrame const* pLayout = nullptr) const;
557
567 bool HasBullet() const;
568
580 bool IsNumbered(SwRootFrame const* pLayout = nullptr) const;
581
587 bool HasMarkedLabel() const;
588
597 void SetAttrListLevel(int nLevel);
598
599 bool HasAttrListLevel() const;
600
601 int GetAttrListLevel() const;
602
608 int GetActualListLevel(SwListRedlineType eRedline = SwListRedlineType::SHOW) const;
609
630 int GetAttrOutlineLevel() const;
631
645 void SetAttrOutlineLevel(int nLevel);
646
652 void GetAttrOutlineContentVisible(bool& bOutlineContentVisibleAttr);
653 void SetAttrOutlineContentVisible(bool bVisible);
654
655 bool IsEmptyListStyleDueToSetOutlineLevelAttr() const { return mbEmptyListStyleSetDueToSetOutlineLevelAttr;}
656 void SetEmptyListStyleDueToSetOutlineLevelAttr();
657 void ResetEmptyListStyleDueToResetOutlineLevelAttr();
658
666 SwTwips GetWidthOfLeadingTabs() const;
667
676 bool HasVisibleNumberingOrBullet() const;
677
678 void SetListId(OUString const& rListId);
679 OUString GetListId() const;
680
695 bool AreListLevelIndentsApplicable() const;
696
705 bool GetListTabStopPosition( tools::Long& nListTabStopPosition ) const;
706
712 OUString GetLabelFollowedBy() const;
713
714 // END OF BULLET/NUMBERING/OUTLINE STUFF:
715
716 void fillSoftPageBreakList( SwSoftPageBreakList& rBreak ) const;
717
718 LanguageType GetLang( const sal_Int32 nBegin, const sal_Int32 nLen = 0,
719 sal_uInt16 nScript = 0 ) const;
720
722 bool IsSymbolAt(sal_Int32 nBegin) const; // In itratr.cxx.
723 virtual SwContentNode* MakeCopy(SwDoc&, SwNode& rWhere, bool bNewFrames) const override;
724
726 bool Hyphenate( SwInterHyphInfo &rHyphInf );
727 void DelSoftHyph( const sal_Int32 nStart, const sal_Int32 nEnd );
728
735 OUString GetExpandText( SwRootFrame const* pLayout,
736 const sal_Int32 nIdx = 0,
737 const sal_Int32 nLen = -1,
738 const bool bWithNum = false,
739 const bool bAddSpaceAfterListLabelStr = false,
740 const bool bWithSpacesForLevel = false,
742 bool CopyExpandText( SwTextNode& rDestNd, const SwContentIndex* pDestIdx,
743 sal_Int32 nIdx, sal_Int32 nLen,
744 SwRootFrame const* pLayout,
745 bool bWithNum = false, bool bWithFootnote = true,
746 bool bReplaceTabsWithSpaces = false ) const;
747
748 OUString GetRedlineText() const;
749
752 sal_Int32 GetDropLen(sal_Int32 nWishLen) const;
753
755 bool GetDropSize(int& rFontHeight, int& rDropHeight, int& rDropDescent) const;
756
759 { return m_pSwpHints && m_pSwpHints->CalcHiddenParaField(); }
762 { if (m_pSwpHints) m_pSwpHints->SetCalcHiddenParaField(); }
763
766 { return m_pSwpHints && m_pSwpHints->IsHiddenByParaField(); }
767
769
770 bool HasHiddenCharAttribute( bool bWholePara ) const
771 {
772 if ( m_bRecalcHiddenCharFlags )
773 CalcHiddenCharFlags();
774 return bWholePara ? m_bHiddenCharsHidePara : m_bContainsHiddenChars;
775 }
776
778 { m_bRecalcHiddenCharFlags = true; }
779
785 bool IsHidden() const;
786
787
789 virtual void Update(
790 SwContentIndex const & rPos,
791 const sal_Int32 nChangeLen,
792 UpdateMode eMode) override;
793
795 void TransliterateText( utl::TransliterationWrapper& rTrans,
796 sal_Int32 nStart, sal_Int32 nEnd,
797 SwUndoTransliterate* pUndo, bool bUseRedlining = false );
798
800 bool CountWords( SwDocStat& rStat, sal_Int32 nStart, sal_Int32 nEnd ) const;
801
804 bool IsNotificationEnabled() const;
805
807 bool IsNotifiable() const;
808
809 void SetListRestart( bool bRestart );
810 bool IsListRestart() const;
811
812 void SetAttrListRestartValue( SwNumberTree::tSwNumTreeNumber nNum );
813 bool HasAttrListRestartValue() const;
814 SwNumberTree::tSwNumTreeNumber GetAttrListRestartValue() const;
815 SwNumberTree::tSwNumTreeNumber GetActualListStartValue() const;
816
817 void SetCountedInList( bool bCounted );
818 bool IsCountedInList() const;
819
820 void AddToList();
821 void AddToListRLHidden();
822 void AddToListOrig();
823 void RemoveFromList();
824 void RemoveFromListRLHidden();
825 void RemoveFromListOrig();
826 bool IsInList() const;
827
828 bool IsFirstOfNumRule(SwRootFrame const& rLayout) const;
829
831 { return m_wXParagraph; }
832 SAL_DLLPRIVATE void SetXParagraph(rtl::Reference<SwXParagraph> const& xParagraph);
833
835 virtual ::sfx2::IXmlIdRegistry& GetRegistry() override;
836 virtual bool IsInClipboard() const override;
838 virtual bool IsInUndo() const override;
839 virtual bool IsInContent() const override;
840 virtual css::uno::Reference< css::rdf::XMetadatable > MakeUnoObject() override;
841
842 bool IsCollapse() const;
843
844 virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
845
846 sal_uInt32 GetRsid( sal_Int32 nStt, sal_Int32 nEnd ) const;
847 sal_uInt32 GetParRsid() const;
848
849 bool CompareRsid( const SwTextNode &rTextNode, sal_Int32 nStt1, sal_Int32 nStt2 ) const;
850 bool CompareParRsid( const SwTextNode &rTextNode ) const;
851
852 // Access to DrawingLayer FillAttributes in a preprocessed form for primitive usage
854
856 static bool IsIgnoredCharFormatForNumbering(const sal_uInt16 nWhich, bool bIsCharStyle = false);
857 void FormatDropNotify(const SwFormatDrop& rDrop) override
858 { TriggerNodeUpdate(sw::LegacyModifyHint(&rDrop, &rDrop)); };
859
860 void SetInSwUndo(bool bInUndo);
861};
862
864{
865 assert( m_pSwpHints );
866 return *m_pSwpHints;
867}
869{
870 assert( m_pSwpHints );
871 return *m_pSwpHints;
872}
873
875{
876 if ( !m_pSwpHints )
877 {
878 m_pSwpHints.reset(new SwpHints(*this));
879 }
880 return *m_pSwpHints;
881}
882
884{
885 if ( m_pSwpHints && m_pSwpHints->CanBeDeleted() )
886 {
887 m_pSwpHints.reset();
888 }
889}
890
892{
893 return const_cast<SwTextFormatColl*>(static_cast<const SwTextFormatColl*>(GetRegisteredIn()));
894}
895
898{
899 return SwNodeType::Text == m_nNodeType ? static_cast<SwTextNode*>(this) : nullptr;
900}
901
902inline const SwTextNode *SwNode::GetTextNode() const
903{
904 return SwNodeType::Text == m_nNodeType ? static_cast<const SwTextNode*>(this) : nullptr;
905}
906
907inline void
908SwTextNode::CutText(SwTextNode * const pDest, const SwContentIndex & rDestStart,
909 const SwContentIndex & rStart, const sal_Int32 nLen)
910{
911 CutImpl( pDest, rDestStart, rStart, nLen );
912}
913
914inline sal_Int32 SwTextNode::GetSpaceLeft() const
915{
916 // do not fill the String up to the max - need to be able to have a
917 // SwPosition "behind" the last character, i.e., at index TXTNODE_MAX + 1
918 const sal_Int32 TXTNODE_MAX = SAL_MAX_INT32 - 2;
919 return TXTNODE_MAX-m_Text.getLength();
920}
921
922/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
struct _xmlTextWriter * xmlTextWriterPtr
SwContentFrame is the layout for content nodes: a common base class for text (paragraph) and non-text...
Definition: cntfrm.hxx:58
Marks a character position inside a document model content node (SwContentNode)
virtual void SwClientNotify(const SwModify &, const SfxHint &rHint) override
Definition: node.cxx:1125
virtual drawinglayer::attribute::SdrAllFillAttributesHelperPtr getSdrAllFillAttributesHelper() const
Definition: node.cxx:2145
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:770
virtual SwContentNode * JoinNext()
Definition: node.cxx:1567
virtual bool SetAttr(const SfxPoolItem &)
made virtual
Definition: node.cxx:1601
virtual sal_Int32 Len() const
Definition: node.cxx:1263
virtual SwContentNode * MakeCopy(SwDoc &, SwNode &rWhere, bool bNewFrames) const =0
virtual SwFormatColl * ChgFormatColl(SwFormatColl *)
Definition: node.cxx:1265
virtual bool ResetAttr(sal_uInt16 nWhich1, sal_uInt16 nWhich2=0)
Definition: node.cxx:1694
virtual sal_uInt16 ResetAllAttr()
Definition: node.cxx:1764
virtual void NewAttrSet(SwAttrPool &)=0
Make respective nodes create the specific AttrSets.
Definition: doc.hxx:195
Base class of all fields.
Definition: fldbas.hxx:293
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:63
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:897
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:901
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:83
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:165
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:111
OUString m_Text
Definition: ndtxt.hxx:128
SAL_DLLPRIVATE unotools::WeakReference< SwXParagraph > const & GetXParagraph() const
Definition: ndtxt.hxx:830
bool IsEmptyListStyleDueToSetOutlineLevelAttr() const
Definition: ndtxt.hxx:655
void SetHiddenCharAttribute(bool bNewHiddenCharsHidePara, bool bNewContainsHiddenChars) const
Definition: ndtxt.hxx:184
sw::ParagraphIdleData m_aParagraphIdleData
Definition: ndtxt.hxx:130
sal_Int32 GetSpaceLeft() const
Definition: ndtxt.hxx:914
bool IsCalcHiddenCharFlags() const
Optimization: Asking for information about hidden characters at SwScriptInfo updates these flags.
Definition: ndtxt.hxx:182
bool CalcHiddenParaField()
Hidden Paragraph Field:
Definition: ndtxt.hxx:758
bool m_bRecalcHiddenCharFlags
The last two flags have to be recalculated if this flag is set:
Definition: ndtxt.hxx:138
SwpHints & GetOrCreateSwpHints()
Definition: ndtxt.hxx:874
void CutText(SwTextNode *const pDest, const SwContentIndex &rStart, const sal_Int32 nLen)
Definition: ndtxt.cxx:2494
std::unique_ptr< SwNodeNum > mpNodeNum
Numbering for this paragraph.
Definition: ndtxt.hxx:124
bool IsHiddenByParaField() const
is the paragraph visible?
Definition: ndtxt.hxx:765
void TryDeleteSwpHints()
Definition: ndtxt.hxx:883
std::optional< OUString > m_oNumStringCache
Definition: ndtxt.hxx:153
std::unique_ptr< SwpHints > m_pSwpHints
May be 0.
Definition: ndtxt.hxx:122
void FormatDropNotify(const SwFormatDrop &rDrop) override
Definition: ndtxt.hxx:857
bool HasHints() const
Definition: ndtxt.hxx:252
bool m_bContainsHiddenChars
Some of the chars this para are hidden.
Definition: ndtxt.hxx:134
unotools::WeakReference< SwXParagraph > m_wXParagraph
Definition: ndtxt.hxx:155
void SetCalcHiddenCharFlags() const
Definition: ndtxt.hxx:777
SwpHints & GetSwpHints()
getters for SwpHints
Definition: ndtxt.hxx:863
bool m_bHiddenCharsHidePara
The whole paragraph is hidden because of the hidden text attribute.
Definition: ndtxt.hxx:136
bool m_bInUndo
Is an undo operation in progress?
Definition: ndtxt.hxx:151
bool m_bLastOutlineState
Definition: ndtxt.hxx:140
drawinglayer::attribute::SdrAllFillAttributesHelperPtr maFillAttributes
Definition: ndtxt.hxx:158
void SetCalcHiddenParaField()
set CalcVisible flags
Definition: ndtxt.hxx:761
bool mbEmptyListStyleSetDueToSetOutlineLevelAttr
Definition: ndtxt.hxx:143
const SwpHints * GetpSwpHints() const
Definition: ndtxt.hxx:251
SAL_DLLPRIVATE void CutImpl(SwTextNode *const pDest, const SwContentIndex &rDestStart, const SwContentIndex &rStart, sal_Int32 nLen, const bool bUpdate=true)
Definition: ndtxt.cxx:2502
SwpHints * GetpSwpHints()
Definition: ndtxt.hxx:250
const OUString & GetText() const
Definition: ndtxt.hxx:242
bool mbInSetOrResetAttr
boolean, indicating that a <SetAttr(..)> or <ResetAttr(..)> or <ResetAllAttr(..)> method is running.
Definition: ndtxt.hxx:148
bool HasHiddenCharAttribute(bool bWholePara) const
Hidden Paragraph Field:
Definition: ndtxt.hxx:770
bool m_bNotifiable
Definition: ndtxt.hxx:141
std::unique_ptr< SwNodeNum > mpNodeNumOrig
Numbering for this paragraph (before changes)
Definition: ndtxt.hxx:126
SwTextFormatColl * GetTextColl() const
Definition: ndtxt.hxx:891
std::unique_ptr< SwNodeNum > mpNodeNumRLHidden
Numbering for this paragraph (hidden redlines)
Definition: ndtxt.hxx:125
An SwTextAttr container, stores all directly formatted text portions for a text node.
Definition: ndhints.hxx:68
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: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:86
GetTextAttrMode
Definition: swtypes.hxx:163
@ Expand
DEFAULT: (Start <= nIndex < End)
long Long
o3tl::sorted_vector< sal_Int32 > SwSoftPageBreakList
Definition: ndtxt.hxx:81
sal_uIntPtr sal_uLong
static LanguageType nLang
Definition: srtdlg.cxx:51
Marks a position in the document model.
Definition: pam.hxx:37
sal_uLong nNumberOfAsianWords
Definition: ndtxt.hxx:94
WrongState eWrongDirty
online spell checking needed/done?
Definition: ndtxt.hxx:98
sal_uLong nNumberOfCharsExcludingSpaces
Definition: ndtxt.hxx:96
std::unique_ptr< SwWrongList > pWrong
Definition: ndtxt.hxx:90
std::unique_ptr< SwWrongList > pSmartTags
Definition: ndtxt.hxx:92
sal_uLong nNumberOfWords
Definition: ndtxt.hxx:93
std::unique_ptr< SwGrammarMarkUp > pGrammarCheck
Definition: ndtxt.hxx:91
bool bAutoComplDirty
auto complete list dirty
Definition: ndtxt.hxx:101
sal_uLong nNumberOfChars
Definition: ndtxt.hxx:95
#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