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 #ifndef INCLUDED_SW_INC_NDTXT_HXX
20 #define INCLUDED_SW_INC_NDTXT_HXX
21 
22 #include <cppuhelper/weakref.hxx>
23 
24 #include "swdllapi.h"
25 #include "node.hxx"
26 #include "hintids.hxx"
27 #include "ndhints.hxx"
28 #include "SwNumberTreeTypes.hxx"
30 #include "modeltoviewhelper.hxx"
31 
32 #include <sfx2/Metadatable.hxx>
33 
34 #include <memory>
35 #include <vector>
36 #include <set>
37 #include <functional>
38 
39 class SfxHint;
40 class SwNumRule;
41 class SwNodeNum;
42 class SvxLRSpaceItem;
43 
44 namespace utl {
45  class TransliterationWrapper;
46 }
47 namespace vcl
48 {
49 class Font;
50 }
51 
52 class SwContentFrame;
53 class SwTextField;
54 class SwTextInputField;
55 class SfxItemSet;
57 struct SwSpellArgs;
58 struct SwConversionArgs;
59 class SwInterHyphInfo;
60 class SwWrongList;
61 class SwGrammarMarkUp;
62 struct SwDocStat;
63 struct SwParaIdleData_Impl;
64 enum class ExpandMode;
65 enum class SwFieldIds : sal_uInt16;
66 class SwField;
67 
68 namespace sw::mark { enum class RestoreMode; }
69 
70 namespace com::sun::star {
71  namespace uno {
72  template < class > class Sequence;
73  }
74  namespace text { class XTextContent; }
75 }
76 
77 typedef std::set< sal_Int32 > SwSoftPageBreakList;
78 
81  : public SwContentNode
82  , public ::sfx2::Metadatable
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 
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( SwWrongList* pNew, bool bDelete = true );
191  SwWrongList* GetWrong();
192  const SwWrongList* GetWrong() const;
193  void SetGrammarCheck( SwGrammarMarkUp* pNew, bool bDelete = true );
194  SwGrammarMarkUp* GetGrammarCheck();
195  // return SwWrongList because *function pointer* return values aren't covariant
196  SwWrongList const* GetGrammarCheck() const;
197  void SetSmartTags( SwWrongList* pNew, bool bDelete = true );
198  SwWrongList* GetSmartTags();
199  SwWrongList const* GetSmartTags() const;
200  void TryCharSetExpandToNum(const SfxItemSet& pCharSet);
201 
203 
204 protected:
206  virtual void SwClientNotify( const SwModify&, const SfxHint& ) override;
207 
208 public:
210 
211  const OUString& GetText() const { return m_Text; }
212 
213  // returns the maximum number of characters that can still be added to the node
214  inline sal_Int32 GetSpaceLeft() const;
215 
217  inline SwpHints &GetSwpHints();
218  inline const SwpHints &GetSwpHints() const;
219  SwpHints *GetpSwpHints() { return m_pSwpHints.get(); }
220  const SwpHints *GetpSwpHints() const { return m_pSwpHints.get(); }
221  bool HasHints() const { return m_pSwpHints != nullptr; }
222  inline SwpHints &GetOrCreateSwpHints();
223 
224  virtual ~SwTextNode() override;
225 
226  virtual sal_Int32 Len() const override;
227 
229  void GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMax, sal_uLong &rAbs ) const;
230 
232  virtual bool SetAttr( const SfxPoolItem& ) override;
233  virtual bool SetAttr( const SfxItemSet& rSet ) override;
234  virtual bool ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 ) override;
235  virtual bool ResetAttr( const std::vector<sal_uInt16>& rWhichArr ) override;
236  virtual sal_uInt16 ResetAllAttr() override;
237 
242  OUString InsertText( const OUString & rStr, const SwIndex & rIdx,
243  const SwInsertFlags nMode
245 
250  void EraseText ( const SwIndex &rIdx, const sal_Int32 nCount = SAL_MAX_INT32,
251  const SwInsertFlags nMode = SwInsertFlags::DEFAULT );
252 
267  void RstTextAttr(
268  const SwIndex &rIdx,
269  const sal_Int32 nLen,
270  const sal_uInt16 nWhich = 0,
271  const SfxItemSet* pSet = nullptr,
272  const bool bInclRefToxMark = false,
273  const bool bExactRange = false );
274  void GCAttr();
275 
276  // Delete text attribute (needs to be deregistered at Pool!)
277  void DestroyAttr( SwTextAttr* pAttr );
278 
279  // delete all attributes from SwpHintsArray.
280  void ClearSwpHintsArr( bool bDelFields );
281 
283  void FileLoadedInitHints();
284 
286  bool InsertHint( SwTextAttr * const pAttr,
287  const SetAttrMode nMode = SetAttrMode::DEFAULT );
290  SwTextAttr* InsertItem( SfxPoolItem& rAttr,
291  const sal_Int32 nStart, const sal_Int32 nEnd,
292  const SetAttrMode nMode = SetAttrMode::DEFAULT );
293 
296  bool SetAttr( const SfxItemSet& rSet,
297  sal_Int32 nStt, sal_Int32 nEnd,
298  const SetAttrMode nMode = SetAttrMode::DEFAULT,
299  SwTextAttr **ppNewTextAttr = nullptr);
307  bool GetParaAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd,
308  const bool bOnlyTextAttr = false,
309  const bool bGetFromChrFormat = true,
310  const bool bMergeIndentValuesOfNumRule = false,
311  SwRootFrame const* pLayout = nullptr) const;
312 
314  void FormatToTextAttr( SwTextNode* pNd );
315 
317  void DeleteAttributes( const sal_uInt16 nWhich,
318  const sal_Int32 nStart, const sal_Int32 nEnd = 0 );
320  void DeleteAttribute ( SwTextAttr * const pTextAttr );
321 
324  void CopyText( SwTextNode * const pDest,
325  const SwIndex &rStart,
326  const sal_Int32 nLen,
327  const bool bForceCopyOfAllAttrs );
328  void CopyText( SwTextNode * const pDest,
329  const SwIndex &rDestStart,
330  const SwIndex &rStart,
331  sal_Int32 nLen,
332  const bool bForceCopyOfAllAttrs = false );
333 
334  void CutText(SwTextNode * const pDest,
335  const SwIndex & rStart, const sal_Int32 nLen);
336  inline void CutText(SwTextNode * const pDest, const SwIndex &rDestStart,
337  const SwIndex & rStart, const sal_Int32 nLen);
338 
342  void ReplaceText( const SwIndex& rStart, const sal_Int32 nDelLen,
343  const OUString & rText );
344  void ReplaceTextOnly( sal_Int32 nPos, sal_Int32 nLen,
345  const OUString& rText,
346  const css::uno::Sequence<sal_Int32>& rOffsets );
347 
349  virtual SwContentFrame *MakeFrame( SwFrame* ) override;
350  SwTextNode * SplitContentNode(const SwPosition &,
351  std::function<void (SwTextNode *, sw::mark::RestoreMode)> const* pContentIndexRestore);
352  virtual SwContentNode *JoinNext() override;
353  void JoinPrev();
354 
355  SwContentNode *AppendNode( const SwPosition & );
356 
358  bool DontExpandFormat( const SwIndex& rIdx, bool bFlag = true,
359  bool bFormatToTextAttributes = true );
360 
365  };
366 
375  SwTextAttr *GetTextAttrAt(
376  sal_Int32 const nIndex,
377  sal_uInt16 const nWhich,
378  enum GetTextAttrMode const eMode = DEFAULT ) const;
379 
384  std::vector<SwTextAttr *> GetTextAttrsAt(
385  sal_Int32 const nIndex,
386  sal_uInt16 const nWhich ) const;
387 
395  SwTextAttr *GetTextAttrForCharAt(
396  const sal_Int32 nIndex,
397  const sal_uInt16 nWhich = RES_TXTATR_END ) const;
398 
399  SwTextField* GetFieldTextAttrAt(
400  const sal_Int32 nIndex,
401  const bool bIncludeInputFieldAtStart = false ) const;
402 
403  bool Spell(SwSpellArgs*);
404  bool Convert( SwConversionArgs & );
405 
406  inline SwTextFormatColl *GetTextColl() const;
407  virtual SwFormatColl *ChgFormatColl( SwFormatColl* ) override;
408  void ChgTextCollUpdateNum( const SwTextFormatColl* pOld,
409  const SwTextFormatColl* pNew );
410 
414  void CopyCollFormat( SwTextNode& rDestNd );
415 
416  // BEGIN OF BULLET/NUMBERING/OUTLINE STUFF:
417 
425  SwNumRule *GetNumRule(bool bInParent = true) const;
426 
427  const SwNodeNum* GetNum(SwRootFrame const* pLayout = nullptr) const;
428  void DoNum(std::function<void (SwNodeNum &)> const&);
429 
430  SwNumberTree::tNumberVector GetNumberVector(SwRootFrame const* pLayout = nullptr) const;
431 
438  bool IsOutline() const;
439 
440  bool IsOutlineStateChanged() const;
441 
442  void UpdateOutlineState();
443 
447  void NumRuleChgd();
448 
463  OUString GetNumString( const bool _bInclPrefixAndSuffixStrings = true,
464  const unsigned int _nRestrictToThisLevel = MAXLEVEL,
465  SwRootFrame const* pLayout = nullptr) const;
466 
474  tools::Long GetLeftMarginWithNum( bool bTextLeft = false ) const;
475 
486  bool GetFirstLineOfsWithNum( short& rFirstOffset ) const;
487 
488  SwTwips GetAdditionalIndentForStartingNewList() const;
489 
490  void ClearLRSpaceItemDueToListLevelIndents( std::shared_ptr<SvxLRSpaceItem>& o_rLRSpaceItem ) const;
491 
497  tools::Long GetLeftMarginForTabCalculation() const;
498 
508  bool HasNumber() const;
509 
519  bool HasBullet() const;
520 
532  bool IsNumbered(SwRootFrame const* pLayout = nullptr) const;
533 
539  bool HasMarkedLabel() const;
540 
549  void SetAttrListLevel(int nLevel);
550 
551  bool HasAttrListLevel() const;
552 
553  int GetAttrListLevel() const;
554 
560  int GetActualListLevel() const;
561 
582  int GetAttrOutlineLevel() const;
583 
597  void SetAttrOutlineLevel(int nLevel);
598 
604  bool GetAttrOutlineContentVisible(bool& bOutlineContentVisibleAttr);
605  void SetAttrOutlineContentVisible(bool bVisible);
606 
607  bool IsEmptyListStyleDueToSetOutlineLevelAttr() const { return mbEmptyListStyleSetDueToSetOutlineLevelAttr;}
608  void SetEmptyListStyleDueToSetOutlineLevelAttr();
609  void ResetEmptyListStyleDueToResetOutlineLevelAttr();
610 
618  SwTwips GetWidthOfLeadingTabs() const;
619 
628  bool HasVisibleNumberingOrBullet() const;
629 
630  void SetListId(OUString const& rListId);
631  OUString GetListId() const;
632 
647  bool AreListLevelIndentsApplicable() const;
648 
657  bool GetListTabStopPosition( tools::Long& nListTabStopPosition ) const;
658 
664  OUString GetLabelFollowedBy() const;
665 
666  // END OF BULLET/NUMBERING/OUTLINE STUFF:
667 
668  void fillSoftPageBreakList( SwSoftPageBreakList& rBreak ) const;
669 
670  LanguageType GetLang( const sal_Int32 nBegin, const sal_Int32 nLen = 0,
671  sal_uInt16 nScript = 0 ) const;
672 
674  bool IsSymbolAt(sal_Int32 nBegin) const; // In itratr.cxx.
675  virtual SwContentNode* MakeCopy(SwDoc&, const SwNodeIndex&, bool bNewFrames) const override;
676 
678  bool Hyphenate( SwInterHyphInfo &rHyphInf );
679  void DelSoftHyph( const sal_Int32 nStart, const sal_Int32 nEnd );
680 
687  OUString GetExpandText( SwRootFrame const* pLayout,
688  const sal_Int32 nIdx = 0,
689  const sal_Int32 nLen = -1,
690  const bool bWithNum = false,
691  const bool bAddSpaceAfterListLabelStr = false,
692  const bool bWithSpacesForLevel = false,
693  const ExpandMode eAdditionalMode = ExpandMode::ExpandFootnote) const;
694  bool CopyExpandText( SwTextNode& rDestNd, const SwIndex* pDestIdx,
695  sal_Int32 nIdx, sal_Int32 nLen,
696  SwRootFrame const* pLayout,
697  bool bWithNum = false, bool bWithFootnote = true,
698  bool bReplaceTabsWithSpaces = false ) const;
699 
700  OUString GetRedlineText() const;
701 
704  sal_Int32 GetDropLen(sal_Int32 nWishLen) const;
705 
707  bool GetDropSize(int& rFontHeight, int& rDropHeight, int& rDropDescent) const;
708 
711  { return m_pSwpHints && m_pSwpHints->CalcHiddenParaField(); }
714  { if (m_pSwpHints) m_pSwpHints->SetCalcHiddenParaField(); }
715 
717  bool IsHiddenByParaField() const
718  { return m_pSwpHints && m_pSwpHints->IsHiddenByParaField(); }
719 
721 
722  bool HasHiddenCharAttribute( bool bWholePara ) const
723  {
724  if ( m_bRecalcHiddenCharFlags )
725  CalcHiddenCharFlags();
726  return bWholePara ? m_bHiddenCharsHidePara : m_bContainsHiddenChars;
727  }
728 
730  { m_bRecalcHiddenCharFlags = true; }
731 
737  bool IsHidden() const;
738 
739 
741  virtual void Update(
742  SwIndex const & rPos,
743  const sal_Int32 nChangeLen,
744  const bool bNegative = false,
745  const bool bDelete = false ) override;
746 
748  void TransliterateText( utl::TransliterationWrapper& rTrans,
749  sal_Int32 nStart, sal_Int32 nEnd,
750  SwUndoTransliterate* pUndo );
751 
753  bool CountWords( SwDocStat& rStat, sal_Int32 nStart, sal_Int32 nEnd ) const;
754 
757  bool IsNotificationEnabled() const;
758 
760  bool IsNotifiable() const;
761 
762  void SetListRestart( bool bRestart );
763  bool IsListRestart() const;
764 
765  void SetAttrListRestartValue( SwNumberTree::tSwNumTreeNumber nNum );
766  bool HasAttrListRestartValue() const;
767  SwNumberTree::tSwNumTreeNumber GetAttrListRestartValue() const;
768  SwNumberTree::tSwNumTreeNumber GetActualListStartValue() const;
769 
770  void SetCountedInList( bool bCounted );
771  bool IsCountedInList() const;
772 
773  void AddToList();
774  void AddToListRLHidden();
775  void RemoveFromList();
776  void RemoveFromListRLHidden();
777  bool IsInList() const;
778 
779  bool IsFirstOfNumRule(SwRootFrame const& rLayout) const;
780 
781  SAL_DLLPRIVATE css::uno::WeakReference<css::text::XTextContent> const& GetXParagraph() const
782  { return m_wXParagraph; }
783  SAL_DLLPRIVATE void SetXParagraph(css::uno::Reference<css::text::XTextContent> const& xParagraph)
784  { m_wXParagraph = xParagraph; }
785 
787  virtual ::sfx2::IXmlIdRegistry& GetRegistry() override;
788  virtual bool IsInClipboard() const override;
789  virtual bool IsInUndo() const override;
790  virtual bool IsInContent() const override;
791  virtual css::uno::Reference< css::rdf::XMetadatable > MakeUnoObject() override;
792 
793  bool IsCollapse() const;
794 
795  virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
796 
797  sal_uInt32 GetRsid( sal_Int32 nStt, sal_Int32 nEnd ) const;
798  sal_uInt32 GetParRsid() const;
799 
800  bool CompareRsid( const SwTextNode &rTextNode, sal_Int32 nStt1, sal_Int32 nStt2 ) const;
801  bool CompareParRsid( const SwTextNode &rTextNode ) const;
802 
803  // Access to DrawingLayer FillAttributes in a preprocessed form for primitive usage
805 
807  static bool IsIgnoredCharFormatForNumbering(const sal_uInt16 nWhich);
808 };
809 
811 {
812  assert( m_pSwpHints );
813  return *m_pSwpHints;
814 }
815 inline const SwpHints &SwTextNode::GetSwpHints() const
816 {
817  assert( m_pSwpHints );
818  return *m_pSwpHints;
819 }
820 
822 {
823  if ( !m_pSwpHints )
824  {
825  m_pSwpHints.reset(new SwpHints(*this));
826  }
827  return *m_pSwpHints;
828 }
829 
831 {
832  if ( m_pSwpHints && m_pSwpHints->CanBeDeleted() )
833  {
834  m_pSwpHints.reset();
835  }
836 }
837 
839 {
840  return static_cast<SwTextFormatColl*>(const_cast<SwModify*>(GetRegisteredIn()));
841 }
842 
845 {
846  return SwNodeType::Text == m_nNodeType ? static_cast<SwTextNode*>(this) : nullptr;
847 }
848 
849 inline const SwTextNode *SwNode::GetTextNode() const
850 {
851  return SwNodeType::Text == m_nNodeType ? static_cast<const SwTextNode*>(this) : nullptr;
852 }
853 
854 inline void
855 SwTextNode::CutText(SwTextNode * const pDest, const SwIndex & rDestStart,
856  const SwIndex & rStart, const sal_Int32 nLen)
857 {
858  CutImpl( pDest, rDestStart, rStart, nLen );
859 }
860 
861 inline sal_Int32 SwTextNode::GetSpaceLeft() const
862 {
863  // do not fill the String up to the max - need to be able to have a
864  // SwPosition "behind" the last character, i.e., at index TXTNODE_MAX + 1
865  const sal_Int32 TXTNODE_MAX = SAL_MAX_INT32 - 2;
866  return TXTNODE_MAX-m_Text.getLength();
867 }
868 
869 #endif
870 
871 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Base class of the Writer layout elements.
Definition: frame.hxx:297
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:151
virtual sal_Int32 Len() const
Definition: node.cxx:1225
virtual void SwClientNotify(const SwModify &, const SfxHint &rHint) override
Definition: node.cxx:1094
void SetHiddenCharAttribute(bool bNewHiddenCharsHidePara, bool bNewContainsHiddenChars) const
Definition: ndtxt.hxx:151
Represents the style of a paragraph.
Definition: fmtcol.hxx:55
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:211
SwpHints * GetpSwpHints()
Definition: ndtxt.hxx:219
css::uno::WeakReference< css::text::XTextContent > m_wXParagraph
Definition: ndtxt.hxx:122
std::set< sal_Int32 > SwSoftPageBreakList
Definition: ndtxt.hxx:77
sal_Int32 GetSpaceLeft() const
Definition: ndtxt.hxx:861
sal_uIntPtr sal_uLong
long Long
Base class of all fields.
Definition: fldbas.hxx:293
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:184
void CutText(SwTextNode *const pDest, const SwIndex &rStart, const sal_Int32 nLen)
Definition: ndtxt.cxx:2369
bool IsHiddenByParaField() const
is the paragraph visible?
Definition: ndtxt.hxx:717
long SwTwips
Definition: swtypes.hxx:49
void TryDeleteSwpHints()
Definition: ndtxt.hxx:830
SAL_DLLPRIVATE css::uno::WeakReference< css::text::XTextContent > const & GetXParagraph() const
Definition: ndtxt.hxx:781
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:80
static LanguageType nLang
Definition: srtdlg.cxx:51
const SwpHints * GetpSwpHints() const
Definition: ndtxt.hxx:220
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:876
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
virtual void Update(SwIndex const &rPos, const sal_Int32 nChangeLen, const bool bNegative=false, const bool bDelete=false)
Definition: index.cxx:237
bool HasHiddenCharAttribute(bool bWholePara) const
Hidden Paragraph Field:
Definition: ndtxt.hxx:722
constexpr OUStringLiteral IsHidden(u"IsHidden")
bool CalcHiddenParaField()
Hidden Paragraph Field:
Definition: ndtxt.hxx:710
std::shared_ptr< SdrAllFillAttributesHelper > SdrAllFillAttributesHelperPtr
Definition: format.hxx:38
const sal_uInt8 MAXLEVEL
Definition: swtypes.hxx:95
void SetCalcHiddenParaField()
set CalcVisible flags
Definition: ndtxt.hxx:713
bool IsEmptyListStyleDueToSetOutlineLevelAttr() const
Definition: ndtxt.hxx:607
void SetCalcHiddenCharFlags() const
Definition: ndtxt.hxx:729
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
#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:2377
SetAttrMode
Definition: swtypes.hxx:135
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:1741
SwpHints & GetSwpHints()
getters for SwpHints
Definition: ndtxt.hxx:810
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
virtual SwFormatColl * ChgFormatColl(SwFormatColl *)
Definition: node.cxx:1227
bool IsCalcHiddenCharFlags() const
Optimization: Asking for information about hidden characters at SwScriptInfo updates these flags...
Definition: ndtxt.hxx:149
virtual void NewAttrSet(SwAttrPool &)=0
Make respective nodes create the specific AttrSets.
EXPAND : (Start < nIndex <= End)
Definition: ndtxt.hxx:364
RestoreMode
Definition: mvsave.hxx:72
SwNodeType m_nNodeType
Definition: node.hxx:84
bool mbEmptyListStyleSetDueToSetOutlineLevelAttr
Definition: ndtxt.hxx:113
std::vector< tSwNumTreeNumber > tNumberVector
DEFAULT: (Start <= nIndex < End)
Definition: ndtxt.hxx:363
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:80
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:1542
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
std::set< sal_Int32 > SwSoftPageBreakList
Definition: wrtww8.hxx:129
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:1508
bool mbInSetOrResetAttr
boolean, indicating that a or or method is running...
Definition: ndtxt.hxx:118
virtual drawinglayer::attribute::SdrAllFillAttributesHelperPtr getSdrAllFillAttributesHelper() const
Definition: node.cxx:2102
std::unique_ptr< SwpHints > m_pSwpHints
May be 0.
Definition: ndtxt.hxx:93
const SfxPoolItem & GetAttr(sal_uInt16 nWhich, bool bInParent=true) const
SS for PoolItems: hard attributation.
Definition: node.hxx:729
SAL_DLLPRIVATE void SetXParagraph(css::uno::Reference< css::text::XTextContent > const &xParagraph)
Definition: ndtxt.hxx:783
SwNumRule * GetNumRule(SwTextFormatColl &rTextFormatColl)
determines the list style, which directly set at the given paragraph style
Definition: fmtcol.cxx:74
OUString m_Text
Definition: ndtxt.hxx:98
GetTextAttrMode
Definition: ndtxt.hxx:361
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:844
bool HasHints() const
Definition: ndtxt.hxx:221
SwpHints & GetOrCreateSwpHints()
Definition: ndtxt.hxx:821
SwTextFormatColl * GetTextColl() const
Definition: ndtxt.hxx:838