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 
21 #include <cppuhelper/weakref.hxx>
22 
23 #include "swdllapi.h"
25 #include "SwNumberTreeTypes.hxx"
26 #include "hintids.hxx"
27 #include "modeltoviewhelper.hxx"
28 #include "ndhints.hxx"
29 #include "node.hxx"
30 #include "paratr.hxx"
31 
32 #include <sfx2/Metadatable.hxx>
33 #include <o3tl/sorted_vector.hxx>
34 #include <memory>
35 #include <vector>
36 #include <functional>
37 
38 class SfxHint;
39 class SwNumRule;
40 class SwNodeNum;
41 class SvxLRSpaceItem;
42 
43 namespace utl {
44  class TransliterationWrapper;
45 }
46 namespace vcl
47 {
48 class Font;
49 }
50 
51 class SwContentFrame;
52 class SwTextField;
53 class SwTextInputField;
54 class SfxItemSet;
56 struct SwSpellArgs;
57 struct SwConversionArgs;
58 class SwInterHyphInfo;
59 class SwWrongList;
60 class SwGrammarMarkUp;
61 struct SwDocStat;
62 struct SwParaIdleData_Impl;
63 enum class ExpandMode;
64 enum class SwFieldIds : sal_uInt16;
65 class SwField;
66 
67 namespace sw::mark { enum class RestoreMode; }
68 
69 namespace com::sun::star {
70  namespace uno {
71  template < class > class Sequence;
72  }
73  namespace text { class XTextContent; }
74 }
75 
77 
80  : public SwContentNode
81  , public ::sfx2::Metadatable
82  , public sw::FormatDropDefiner
83 {
84  friend class SwContentNode;
86  friend class SwDoc;
87  friend class SwNodes;
88  friend class SwTextFrame;
89  friend class SwScriptInfo;
90 
93  std::unique_ptr<SwpHints> m_pSwpHints;
94 
95  mutable std::unique_ptr<SwNodeNum> mpNodeNum;
96  mutable std::unique_ptr<SwNodeNum> mpNodeNumRLHidden;
97 
98  OUString m_Text;
99 
101 
104  mutable bool m_bContainsHiddenChars : 1;
106  mutable bool m_bHiddenCharsHidePara : 1;
108  mutable bool m_bRecalcHiddenCharFlags : 1;
109 
110  mutable bool m_bLastOutlineState : 1;
112 
114 
119 
120  std::unique_ptr< OUString > m_pNumStringCache;
121 
122  css::uno::WeakReference<css::text::XTextContent> m_wXParagraph;
123 
124  // DrawingLayer FillAttributes in a preprocessed form for primitive usage
126 
127  SAL_DLLPRIVATE SwTextNode( const SwNodeIndex &rWhere, SwTextFormatColl *pTextColl,
128  const SfxItemSet* pAutoAttr = nullptr );
129  virtual void SwClientNotify( const SwModify&, const SfxHint& ) override;
131  SAL_DLLPRIVATE void CopyAttr( SwTextNode *pDest, const sal_Int32 nStart, const sal_Int32 nOldPos);
132 
133  SAL_DLLPRIVATE SwTextNode* MakeNewTextNode( const SwNodeIndex&, bool bNext = true,
134  bool bChgFollow = true );
135 
136  SAL_DLLPRIVATE void CutImpl(
137  SwTextNode * const pDest, const SwIndex & rDestStart,
138  const SwIndex & rStart, /*const*/ sal_Int32 nLen,
139  const bool bUpdate = true );
140 
142  SAL_DLLPRIVATE void MoveTextAttr_To_AttrSet(); // Called by SplitNode.
143 
145  SAL_DLLPRIVATE virtual void NewAttrSet( SwAttrPool& ) override;
146 
150  { return m_bRecalcHiddenCharFlags; }
151  void SetHiddenCharAttribute( bool bNewHiddenCharsHidePara, bool bNewContainsHiddenChars ) const
152  {
153  m_bHiddenCharsHidePara = bNewHiddenCharsHidePara;
154  m_bContainsHiddenChars = bNewContainsHiddenChars;
155  m_bRecalcHiddenCharFlags = false;
156  }
157 
158  SAL_DLLPRIVATE void CalcHiddenCharFlags() const;
159 
160  SAL_DLLPRIVATE void SetLanguageAndFont( const SwPaM &rPaM,
161  LanguageType nLang, sal_uInt16 nLangWhichId,
162  const vcl::Font *pFont, sal_uInt16 nFontWhichId );
163 
165 
166  SAL_DLLPRIVATE void InitSwParaStatistics( bool bNew );
167 
168  inline void TryDeleteSwpHints();
169 
170  SAL_DLLPRIVATE void impl_FormatToTextAttr(const SfxItemSet& i_rAttrSet);
171 
172  const SwTextInputField* GetOverlappingInputField( const SwTextAttr& rTextAttr ) const;
173 
174  void DelFrames_TextNodePart();
175 
176 public:
177  enum class WrongState { TODO, PENDING, DONE };
178 
179  bool IsWordCountDirty() const;
180  WrongState GetWrongDirty() const;
181  bool IsWrongDirty() const;
182  bool IsGrammarCheckDirty() const;
183  bool IsSmartTagDirty() const;
184  bool IsAutoCompleteWordDirty() const;
185  void SetWordCountDirty( bool bNew ) const;
186  void SetWrongDirty(WrongState eNew) const;
187  void SetGrammarCheckDirty( bool bNew ) const;
188  void SetSmartTagDirty( bool bNew ) const;
189  void SetAutoCompleteWordDirty( bool bNew ) const;
190  void SetWrong( std::unique_ptr<SwWrongList> pNew );
191  void ClearWrong();
192  std::unique_ptr<SwWrongList> ReleaseWrong();
193  SwWrongList* GetWrong();
194  const SwWrongList* GetWrong() const;
195  void SetGrammarCheck( std::unique_ptr<SwGrammarMarkUp> pNew );
196  void ClearGrammarCheck();
197  std::unique_ptr<SwGrammarMarkUp> ReleaseGrammarCheck();
198  SwGrammarMarkUp* GetGrammarCheck();
199  // return SwWrongList because *function pointer* return values aren't covariant
200  SwWrongList const* GetGrammarCheck() const;
201  void SetSmartTags( std::unique_ptr<SwWrongList> pNew );
202  void ClearSmartTags();
203  std::unique_ptr<SwWrongList> ReleaseSmartTags();
204  SwWrongList* GetSmartTags();
205  SwWrongList const* GetSmartTags() const;
206 
208 
209 
210 public:
213  void TriggerNodeUpdate(const sw::LegacyModifyHint&);
214 
215  const OUString& GetText() const { return m_Text; }
216 
217  // returns the maximum number of characters that can still be added to the node
218  inline sal_Int32 GetSpaceLeft() const;
219 
221  inline SwpHints &GetSwpHints();
222  inline const SwpHints &GetSwpHints() const;
223  SwpHints *GetpSwpHints() { return m_pSwpHints.get(); }
224  const SwpHints *GetpSwpHints() const { return m_pSwpHints.get(); }
225  bool HasHints() const { return m_pSwpHints != nullptr; }
226  inline SwpHints &GetOrCreateSwpHints();
227 
228  virtual ~SwTextNode() override;
229 
230  virtual sal_Int32 Len() const override;
231 
233  void GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMax, sal_uLong &rAbs ) const;
234 
236  virtual bool SetAttr( const SfxPoolItem& ) override;
237  virtual bool SetAttr( const SfxItemSet& rSet ) override;
238  virtual bool ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 ) override;
239  virtual bool ResetAttr( const std::vector<sal_uInt16>& rWhichArr ) override;
240  virtual sal_uInt16 ResetAllAttr() override;
241 
246  OUString InsertText( const OUString & rStr, const SwIndex & rIdx,
247  const SwInsertFlags nMode
249 
254  void EraseText ( const SwIndex &rIdx, const sal_Int32 nCount = SAL_MAX_INT32,
255  const SwInsertFlags nMode = SwInsertFlags::DEFAULT );
256 
271  void RstTextAttr(
272  const SwIndex &rIdx,
273  const sal_Int32 nLen,
274  const sal_uInt16 nWhich = 0,
275  const SfxItemSet* pSet = nullptr,
276  const bool bInclRefToxMark = false,
277  const bool bExactRange = false );
278  void GCAttr();
279 
280  // Delete text attribute (needs to be deregistered at Pool!)
281  void DestroyAttr( SwTextAttr* pAttr );
282 
283  // delete all attributes from SwpHintsArray.
284  void ClearSwpHintsArr( bool bDelFields );
285 
287  void FileLoadedInitHints();
288 
290  bool InsertHint( SwTextAttr * const pAttr,
291  const SetAttrMode nMode = SetAttrMode::DEFAULT );
294  SwTextAttr* InsertItem( SfxPoolItem& rAttr,
295  const sal_Int32 nStart, const sal_Int32 nEnd,
296  const SetAttrMode nMode = SetAttrMode::DEFAULT );
297 
300  bool SetAttr( const SfxItemSet& rSet,
301  sal_Int32 nStt, sal_Int32 nEnd,
302  const SetAttrMode nMode = SetAttrMode::DEFAULT,
303  SwTextAttr **ppNewTextAttr = nullptr);
311  bool GetParaAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd,
312  const bool bOnlyTextAttr = false,
313  const bool bGetFromChrFormat = true,
314  const bool bMergeIndentValuesOfNumRule = false,
315  SwRootFrame const* pLayout = nullptr) const;
316 
318  void FormatToTextAttr( SwTextNode* pNd );
319 
321  void DeleteAttributes( const sal_uInt16 nWhich,
322  const sal_Int32 nStart, const sal_Int32 nEnd = 0 );
324  void DeleteAttribute ( SwTextAttr * const pTextAttr );
325 
328  void CopyText( SwTextNode * const pDest,
329  const SwIndex &rStart,
330  const sal_Int32 nLen,
331  const bool bForceCopyOfAllAttrs );
332  void CopyText( SwTextNode * const pDest,
333  const SwIndex &rDestStart,
334  const SwIndex &rStart,
335  sal_Int32 nLen,
336  const bool bForceCopyOfAllAttrs = false );
337 
338  void CutText(SwTextNode * const pDest,
339  const SwIndex & rStart, const sal_Int32 nLen);
340  inline void CutText(SwTextNode * const pDest, const SwIndex &rDestStart,
341  const SwIndex & rStart, const sal_Int32 nLen);
342 
346  void ReplaceText( const SwIndex& rStart, const sal_Int32 nDelLen,
347  const OUString & rText );
348  void ReplaceTextOnly( sal_Int32 nPos, sal_Int32 nLen,
349  const OUString& rText,
350  const css::uno::Sequence<sal_Int32>& rOffsets );
351 
353  virtual SwContentFrame *MakeFrame( SwFrame* ) override;
354  SwTextNode * SplitContentNode(const SwPosition &,
355  std::function<void (SwTextNode *, sw::mark::RestoreMode, bool AtStart)> const* pContentIndexRestore);
356  virtual SwContentNode *JoinNext() override;
357  void JoinPrev();
358 
359  SwContentNode *AppendNode( const SwPosition & );
360 
362  bool DontExpandFormat( const SwIndex& rIdx, bool bFlag = true,
363  bool bFormatToTextAttributes = true );
364 
369  };
370 
379  SwTextAttr *GetTextAttrAt(
380  sal_Int32 const nIndex,
381  sal_uInt16 const nWhich,
382  enum GetTextAttrMode const eMode = DEFAULT ) const;
383 
388  std::vector<SwTextAttr *> GetTextAttrsAt(
389  sal_Int32 const nIndex,
390  sal_uInt16 const nWhich ) const;
391 
399  SwTextAttr *GetTextAttrForCharAt(
400  const sal_Int32 nIndex,
401  const sal_uInt16 nWhich = RES_TXTATR_END ) const;
402 
403  SwTextField* GetFieldTextAttrAt(
404  const sal_Int32 nIndex,
405  const bool bIncludeInputFieldAtStart = false ) const;
406 
407  bool Spell(SwSpellArgs*);
408  bool Convert( SwConversionArgs & );
409 
410  inline SwTextFormatColl *GetTextColl() const;
411  virtual SwFormatColl *ChgFormatColl( SwFormatColl* ) override;
412  void ChgTextCollUpdateNum( const SwTextFormatColl* pOld,
413  const SwTextFormatColl* pNew );
414 
418  void CopyCollFormat(SwTextNode& rDestNd, bool bUndoForChgFormatColl = true);
419 
420  // BEGIN OF BULLET/NUMBERING/OUTLINE STUFF:
421 
429  SwNumRule *GetNumRule(bool bInParent = true) const;
430 
431  const SwNodeNum* GetNum(SwRootFrame const* pLayout = nullptr) const;
432  void DoNum(std::function<void (SwNodeNum &)> const&);
433 
434  SwNumberTree::tNumberVector GetNumberVector(SwRootFrame const* pLayout = nullptr) const;
435 
442  bool IsOutline() const;
443 
444  bool IsOutlineStateChanged() const;
445 
446  void UpdateOutlineState();
447 
451  void NumRuleChgd();
452 
467  OUString GetNumString( const bool _bInclPrefixAndSuffixStrings = true,
468  const unsigned int _nRestrictToThisLevel = MAXLEVEL,
469  SwRootFrame const* pLayout = nullptr) const;
470 
478  tools::Long GetLeftMarginWithNum( bool bTextLeft = false ) const;
479 
490  bool GetFirstLineOfsWithNum( short& rFirstOffset ) const;
491 
492  SwTwips GetAdditionalIndentForStartingNewList() const;
493 
494  void ClearLRSpaceItemDueToListLevelIndents( std::shared_ptr<SvxLRSpaceItem>& o_rLRSpaceItem ) const;
495 
501  tools::Long GetLeftMarginForTabCalculation() const;
502 
512  bool HasNumber() const;
513 
523  bool HasBullet() const;
524 
536  bool IsNumbered(SwRootFrame const* pLayout = nullptr) const;
537 
543  bool HasMarkedLabel() const;
544 
553  void SetAttrListLevel(int nLevel);
554 
555  bool HasAttrListLevel() const;
556 
557  int GetAttrListLevel() const;
558 
564  int GetActualListLevel() const;
565 
586  int GetAttrOutlineLevel() const;
587 
601  void SetAttrOutlineLevel(int nLevel);
602 
608  void GetAttrOutlineContentVisible(bool& bOutlineContentVisibleAttr);
609  void SetAttrOutlineContentVisible(bool bVisible);
610 
611  bool IsEmptyListStyleDueToSetOutlineLevelAttr() const { return mbEmptyListStyleSetDueToSetOutlineLevelAttr;}
612  void SetEmptyListStyleDueToSetOutlineLevelAttr();
613  void ResetEmptyListStyleDueToResetOutlineLevelAttr();
614 
622  SwTwips GetWidthOfLeadingTabs() const;
623 
632  bool HasVisibleNumberingOrBullet() const;
633 
634  void SetListId(OUString const& rListId);
635  OUString GetListId() const;
636 
651  bool AreListLevelIndentsApplicable() const;
652 
661  bool GetListTabStopPosition( tools::Long& nListTabStopPosition ) const;
662 
668  OUString GetLabelFollowedBy() const;
669 
670  // END OF BULLET/NUMBERING/OUTLINE STUFF:
671 
672  void fillSoftPageBreakList( SwSoftPageBreakList& rBreak ) const;
673 
674  LanguageType GetLang( const sal_Int32 nBegin, const sal_Int32 nLen = 0,
675  sal_uInt16 nScript = 0 ) const;
676 
678  bool IsSymbolAt(sal_Int32 nBegin) const; // In itratr.cxx.
679  virtual SwContentNode* MakeCopy(SwDoc&, const SwNodeIndex&, bool bNewFrames) const override;
680 
682  bool Hyphenate( SwInterHyphInfo &rHyphInf );
683  void DelSoftHyph( const sal_Int32 nStart, const sal_Int32 nEnd );
684 
691  OUString GetExpandText( SwRootFrame const* pLayout,
692  const sal_Int32 nIdx = 0,
693  const sal_Int32 nLen = -1,
694  const bool bWithNum = false,
695  const bool bAddSpaceAfterListLabelStr = false,
696  const bool bWithSpacesForLevel = false,
697  const ExpandMode eAdditionalMode = ExpandMode::ExpandFootnote) const;
698  bool CopyExpandText( SwTextNode& rDestNd, const SwIndex* pDestIdx,
699  sal_Int32 nIdx, sal_Int32 nLen,
700  SwRootFrame const* pLayout,
701  bool bWithNum = false, bool bWithFootnote = true,
702  bool bReplaceTabsWithSpaces = false ) const;
703 
704  OUString GetRedlineText() const;
705 
708  sal_Int32 GetDropLen(sal_Int32 nWishLen) const;
709 
711  bool GetDropSize(int& rFontHeight, int& rDropHeight, int& rDropDescent) const;
712 
715  { return m_pSwpHints && m_pSwpHints->CalcHiddenParaField(); }
718  { if (m_pSwpHints) m_pSwpHints->SetCalcHiddenParaField(); }
719 
721  bool IsHiddenByParaField() const
722  { return m_pSwpHints && m_pSwpHints->IsHiddenByParaField(); }
723 
725 
726  bool HasHiddenCharAttribute( bool bWholePara ) const
727  {
728  if ( m_bRecalcHiddenCharFlags )
729  CalcHiddenCharFlags();
730  return bWholePara ? m_bHiddenCharsHidePara : m_bContainsHiddenChars;
731  }
732 
734  { m_bRecalcHiddenCharFlags = true; }
735 
741  bool IsHidden() const;
742 
743 
745  virtual void Update(
746  SwIndex const & rPos,
747  const sal_Int32 nChangeLen,
748  const bool bNegative = false,
749  const bool bDelete = false ) override;
750 
752  void TransliterateText( utl::TransliterationWrapper& rTrans,
753  sal_Int32 nStart, sal_Int32 nEnd,
754  SwUndoTransliterate* pUndo, bool bUseRedlining = false );
755 
757  bool CountWords( SwDocStat& rStat, sal_Int32 nStart, sal_Int32 nEnd ) const;
758 
761  bool IsNotificationEnabled() const;
762 
764  bool IsNotifiable() const;
765 
766  void SetListRestart( bool bRestart );
767  bool IsListRestart() const;
768 
769  void SetAttrListRestartValue( SwNumberTree::tSwNumTreeNumber nNum );
770  bool HasAttrListRestartValue() const;
771  SwNumberTree::tSwNumTreeNumber GetAttrListRestartValue() const;
772  SwNumberTree::tSwNumTreeNumber GetActualListStartValue() const;
773 
774  void SetCountedInList( bool bCounted );
775  bool IsCountedInList() const;
776 
777  void AddToList();
778  void AddToListRLHidden();
779  void RemoveFromList();
780  void RemoveFromListRLHidden();
781  bool IsInList() const;
782 
783  bool IsFirstOfNumRule(SwRootFrame const& rLayout) const;
784 
785  SAL_DLLPRIVATE css::uno::WeakReference<css::text::XTextContent> const& GetXParagraph() const
786  { return m_wXParagraph; }
787  SAL_DLLPRIVATE void SetXParagraph(css::uno::Reference<css::text::XTextContent> const& xParagraph)
788  { m_wXParagraph = xParagraph; }
789 
791  virtual ::sfx2::IXmlIdRegistry& GetRegistry() override;
792  virtual bool IsInClipboard() const override;
793  virtual bool IsInUndo() const override;
794  virtual bool IsInContent() const override;
795  virtual css::uno::Reference< css::rdf::XMetadatable > MakeUnoObject() override;
796 
797  bool IsCollapse() const;
798 
799  virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
800 
801  sal_uInt32 GetRsid( sal_Int32 nStt, sal_Int32 nEnd ) const;
802  sal_uInt32 GetParRsid() const;
803 
804  bool CompareRsid( const SwTextNode &rTextNode, sal_Int32 nStt1, sal_Int32 nStt2 ) const;
805  bool CompareParRsid( const SwTextNode &rTextNode ) const;
806 
807  // Access to DrawingLayer FillAttributes in a preprocessed form for primitive usage
809 
811  static bool IsIgnoredCharFormatForNumbering(const sal_uInt16 nWhich, bool bIsCharStyle = false);
812  void FormatDropNotify(const SwFormatDrop& rDrop) override
813  { TriggerNodeUpdate(sw::LegacyModifyHint(&rDrop, &rDrop)); };
814 };
815 
817 {
818  assert( m_pSwpHints );
819  return *m_pSwpHints;
820 }
821 inline const SwpHints &SwTextNode::GetSwpHints() const
822 {
823  assert( m_pSwpHints );
824  return *m_pSwpHints;
825 }
826 
828 {
829  if ( !m_pSwpHints )
830  {
831  m_pSwpHints.reset(new SwpHints(*this));
832  }
833  return *m_pSwpHints;
834 }
835 
837 {
838  if ( m_pSwpHints && m_pSwpHints->CanBeDeleted() )
839  {
840  m_pSwpHints.reset();
841  }
842 }
843 
845 {
846  return const_cast<SwTextFormatColl*>(static_cast<const SwTextFormatColl*>(GetRegisteredIn()));
847 }
848 
851 {
852  return SwNodeType::Text == m_nNodeType ? static_cast<SwTextNode*>(this) : nullptr;
853 }
854 
855 inline const SwTextNode *SwNode::GetTextNode() const
856 {
857  return SwNodeType::Text == m_nNodeType ? static_cast<const SwTextNode*>(this) : nullptr;
858 }
859 
860 inline void
861 SwTextNode::CutText(SwTextNode * const pDest, const SwIndex & rDestStart,
862  const SwIndex & rStart, const sal_Int32 nLen)
863 {
864  CutImpl( pDest, rDestStart, rStart, nLen );
865 }
866 
867 inline sal_Int32 SwTextNode::GetSpaceLeft() const
868 {
869  // do not fill the String up to the max - need to be able to have a
870  // SwPosition "behind" the last character, i.e., at index TXTNODE_MAX + 1
871  const sal_Int32 TXTNODE_MAX = SAL_MAX_INT32 - 2;
872  return TXTNODE_MAX-m_Text.getLength();
873 }
874 
875 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Base class of the Writer layout elements.
Definition: frame.hxx:313
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:158
virtual sal_Int32 Len() const
Definition: node.cxx:1246
virtual void SwClientNotify(const SwModify &, const SfxHint &rHint) override
Definition: node.cxx:1108
void SetHiddenCharAttribute(bool bNewHiddenCharsHidePara, bool bNewContainsHiddenChars) const
Definition: ndtxt.hxx:151
Represents the style of a paragraph.
Definition: fmtcol.hxx:56
Marks a position in the document model.
Definition: pam.hxx:35
virtual css::uno::Reference< css::rdf::XMetadatable > MakeUnoObject()=0
const OUString & GetText() const
Definition: ndtxt.hxx:215
SwpHints * GetpSwpHints()
Definition: ndtxt.hxx:223
css::uno::WeakReference< css::text::XTextContent > m_wXParagraph
Definition: ndtxt.hxx:122
sal_Int32 GetSpaceLeft() const
Definition: ndtxt.hxx:867
sal_uIntPtr sal_uLong
long Long
Base class of all fields.
Definition: fldbas.hxx:289
virtual SwContentFrame * MakeFrame(SwFrame *pSib)=0
MakeFrame will be called for a certain layout pSib is another SwFrame of the same layout (e...
Definition: doc.hxx:188
void CutText(SwTextNode *const pDest, const SwIndex &rStart, const sal_Int32 nLen)
Definition: ndtxt.cxx:2388
constexpr sal_uInt8 MAXLEVEL
Definition: swtypes.hxx:90
bool IsHiddenByParaField() const
is the paragraph visible?
Definition: ndtxt.hxx:721
void TryDeleteSwpHints()
Definition: ndtxt.hxx:836
SAL_DLLPRIVATE css::uno::WeakReference< css::text::XTextContent > const & GetXParagraph() const
Definition: ndtxt.hxx:785
std::unique_ptr< SwNodeNum > mpNodeNum
Numbering for this paragraph.
Definition: ndtxt.hxx:95
virtual bool IsInContent() const =0
virtual bool IsInClipboard() const =0
The root element of a Writer document layout.
Definition: rootfrm.hxx:82
static LanguageType nLang
Definition: srtdlg.cxx:51
const SwpHints * GetpSwpHints() const
Definition: ndtxt.hxx:224
std::unique_ptr< OUString > m_pNumStringCache
Definition: ndtxt.hxx:120
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:881
virtual void Update(SwIndex const &rPos, const sal_Int32 nChangeLen, const bool bNegative=false, const bool bDelete=false)
Definition: index.cxx:237
A wrapper around SfxPoolItem to store the start position of (usually) a text portion, with an optional end.
Definition: txatbase.hxx:41
bool HasHiddenCharAttribute(bool bWholePara) const
Hidden Paragraph Field:
Definition: ndtxt.hxx:726
constexpr OUStringLiteral IsHidden(u"IsHidden")
bool CalcHiddenParaField()
Hidden Paragraph Field:
Definition: ndtxt.hxx:714
std::shared_ptr< SdrAllFillAttributesHelper > SdrAllFillAttributesHelperPtr
Definition: format.hxx:41
void SetCalcHiddenParaField()
set CalcVisible flags
Definition: ndtxt.hxx:717
bool IsEmptyListStyleDueToSetOutlineLevelAttr() const
Definition: ndtxt.hxx:611
void SetCalcHiddenCharFlags() const
Definition: ndtxt.hxx:733
void FormatDropNotify(const SwFormatDrop &rDrop) override
Definition: ndtxt.hxx:812
virtual bool ResetAttr(sal_uInt16 nWhich1, sal_uInt16 nWhich2=0)
Definition: node.cxx:1654
exports com.sun.star. text
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:136
struct _xmlTextWriter * xmlTextWriterPtr
o3tl::sorted_vector< sal_Int32 > SwSoftPageBreakList
Definition: ndtxt.hxx:76
#define SAL_MAX_INT32
SAL_DLLPRIVATE void CutImpl(SwTextNode *const pDest, const SwIndex &rDestStart, const SwIndex &rStart, sal_Int32 nLen, const bool bUpdate=true)
Definition: ndtxt.cxx:2396
SetAttrMode
Definition: swtypes.hxx:132
tools::Long tSwNumTreeNumber
SwFieldIds
Definition: fldbas.hxx:44
Marks a character position inside a document model node.
Definition: index.hxx:33
virtual bool IsInUndo() const =0
Marks a node in the document model.
Definition: ndindex.hxx:31
virtual sal_uInt16 ResetAllAttr()
Definition: node.cxx:1726
SwpHints & GetSwpHints()
getters for SwpHints
Definition: ndtxt.hxx:816
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
virtual SwFormatColl * ChgFormatColl(SwFormatColl *)
Definition: node.cxx:1248
bool IsCalcHiddenCharFlags() const
Optimization: Asking for information about hidden characters at SwScriptInfo updates these flags...
Definition: ndtxt.hxx:149
tools::Long SwTwips
Definition: swtypes.hxx:50
virtual void NewAttrSet(SwAttrPool &)=0
Make respective nodes create the specific AttrSets.
EXPAND : (Start < nIndex <= End)
Definition: ndtxt.hxx:368
RestoreMode
Definition: mvsave.hxx:72
SwNodeType m_nNodeType
Definition: node.hxx:85
bool mbEmptyListStyleSetDueToSetOutlineLevelAttr
Definition: ndtxt.hxx:113
std::vector< tSwNumTreeNumber > tNumberVector
DEFAULT: (Start <= nIndex < End)
Definition: ndtxt.hxx:367
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
bool m_bNotifiable
Definition: ndtxt.hxx:111
virtual SwContentNode * MakeCopy(SwDoc &, const SwNodeIndex &, bool bNewFrames) const =0
ExpandMode
Some helpers for converting model strings to view strings.
constexpr sal_uInt16 RES_TXTATR_END(RES_TXTATR_NOEND_END)
virtual bool SetAttr(const SfxPoolItem &)
made virtual
Definition: node.cxx:1559
An SwTextAttr container, stores all directly formatted text portions for a text node.
Definition: ndhints.hxx:67
std::unique_ptr< SwNodeNum > mpNodeNumRLHidden
Numbering for this paragraph (hidden redlines)
Definition: ndtxt.hxx:96
SwParaIdleData_Impl * m_pParaIdleData_Impl
Definition: ndtxt.hxx:100
virtual ::sfx2::IXmlIdRegistry & GetRegistry()=0
drawinglayer::attribute::SdrAllFillAttributesHelperPtr maFillAttributes
Definition: ndtxt.hxx:125
const SwModify * GetRegisteredIn() const
Definition: calbck.hxx:159
virtual SwContentNode * JoinNext()
Definition: node.cxx:1525
bool mbInSetOrResetAttr
boolean, indicating that a or or method is running...
Definition: ndtxt.hxx:118
virtual drawinglayer::attribute::SdrAllFillAttributesHelperPtr getSdrAllFillAttributesHelper() const
Definition: node.cxx:2085
std::unique_ptr< SwpHints > m_pSwpHints
May be 0.
Definition: ndtxt.hxx:93
If SwFormatDrop is a Client, it is the CharFormat that describes the font for the DropCaps...
Definition: paratr.hxx:62
const SfxPoolItem & GetAttr(sal_uInt16 nWhich, bool bInParent=true) const
SS for PoolItems: hard attributation.
Definition: node.hxx:722
SAL_DLLPRIVATE void SetXParagraph(css::uno::Reference< css::text::XTextContent > const &xParagraph)
Definition: ndtxt.hxx:787
SwNumRule * GetNumRule(SwTextFormatColl &rTextFormatColl)
determines the list style, which directly set at the given paragraph style
Definition: fmtcol.cxx:76
OUString m_Text
Definition: ndtxt.hxx:98
GetTextAttrMode
Definition: ndtxt.hxx:365
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:850
bool HasHints() const
Definition: ndtxt.hxx:225
SwpHints & GetOrCreateSwpHints()
Definition: ndtxt.hxx:827
SwTextFormatColl * GetTextColl() const
Definition: ndtxt.hxx:844