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( 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 
205 public:
208  void TriggerNodeUpdate(const sw::LegacyModifyHint&);
209 
210  const OUString& GetText() const { return m_Text; }
211 
212  // returns the maximum number of characters that can still be added to the node
213  inline sal_Int32 GetSpaceLeft() const;
214 
216  inline SwpHints &GetSwpHints();
217  inline const SwpHints &GetSwpHints() const;
218  SwpHints *GetpSwpHints() { return m_pSwpHints.get(); }
219  const SwpHints *GetpSwpHints() const { return m_pSwpHints.get(); }
220  bool HasHints() const { return m_pSwpHints != nullptr; }
221  inline SwpHints &GetOrCreateSwpHints();
222 
223  virtual ~SwTextNode() override;
224 
225  virtual sal_Int32 Len() const override;
226 
228  void GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMax, sal_uLong &rAbs ) const;
229 
231  virtual bool SetAttr( const SfxPoolItem& ) override;
232  virtual bool SetAttr( const SfxItemSet& rSet ) override;
233  virtual bool ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 ) override;
234  virtual bool ResetAttr( const std::vector<sal_uInt16>& rWhichArr ) override;
235  virtual sal_uInt16 ResetAllAttr() override;
236 
241  OUString InsertText( const OUString & rStr, const SwIndex & rIdx,
242  const SwInsertFlags nMode
244 
249  void EraseText ( const SwIndex &rIdx, const sal_Int32 nCount = SAL_MAX_INT32,
250  const SwInsertFlags nMode = SwInsertFlags::DEFAULT );
251 
266  void RstTextAttr(
267  const SwIndex &rIdx,
268  const sal_Int32 nLen,
269  const sal_uInt16 nWhich = 0,
270  const SfxItemSet* pSet = nullptr,
271  const bool bInclRefToxMark = false,
272  const bool bExactRange = false );
273  void GCAttr();
274 
275  // Delete text attribute (needs to be deregistered at Pool!)
276  void DestroyAttr( SwTextAttr* pAttr );
277 
278  // delete all attributes from SwpHintsArray.
279  void ClearSwpHintsArr( bool bDelFields );
280 
282  void FileLoadedInitHints();
283 
285  bool InsertHint( SwTextAttr * const pAttr,
286  const SetAttrMode nMode = SetAttrMode::DEFAULT );
289  SwTextAttr* InsertItem( SfxPoolItem& rAttr,
290  const sal_Int32 nStart, const sal_Int32 nEnd,
291  const SetAttrMode nMode = SetAttrMode::DEFAULT );
292 
295  bool SetAttr( const SfxItemSet& rSet,
296  sal_Int32 nStt, sal_Int32 nEnd,
297  const SetAttrMode nMode = SetAttrMode::DEFAULT,
298  SwTextAttr **ppNewTextAttr = nullptr);
306  bool GetParaAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd,
307  const bool bOnlyTextAttr = false,
308  const bool bGetFromChrFormat = true,
309  const bool bMergeIndentValuesOfNumRule = false,
310  SwRootFrame const* pLayout = nullptr) const;
311 
313  void FormatToTextAttr( SwTextNode* pNd );
314 
316  void DeleteAttributes( const sal_uInt16 nWhich,
317  const sal_Int32 nStart, const sal_Int32 nEnd = 0 );
319  void DeleteAttribute ( SwTextAttr * const pTextAttr );
320 
323  void CopyText( SwTextNode * const pDest,
324  const SwIndex &rStart,
325  const sal_Int32 nLen,
326  const bool bForceCopyOfAllAttrs );
327  void CopyText( SwTextNode * const pDest,
328  const SwIndex &rDestStart,
329  const SwIndex &rStart,
330  sal_Int32 nLen,
331  const bool bForceCopyOfAllAttrs = false );
332 
333  void CutText(SwTextNode * const pDest,
334  const SwIndex & rStart, const sal_Int32 nLen);
335  inline void CutText(SwTextNode * const pDest, const SwIndex &rDestStart,
336  const SwIndex & rStart, const sal_Int32 nLen);
337 
341  void ReplaceText( const SwIndex& rStart, const sal_Int32 nDelLen,
342  const OUString & rText );
343  void ReplaceTextOnly( sal_Int32 nPos, sal_Int32 nLen,
344  const OUString& rText,
345  const css::uno::Sequence<sal_Int32>& rOffsets );
346 
348  virtual SwContentFrame *MakeFrame( SwFrame* ) override;
349  SwTextNode * SplitContentNode(const SwPosition &,
350  std::function<void (SwTextNode *, sw::mark::RestoreMode, bool AtStart)> const* pContentIndexRestore);
351  virtual SwContentNode *JoinNext() override;
352  void JoinPrev();
353 
354  SwContentNode *AppendNode( const SwPosition & );
355 
357  bool DontExpandFormat( const SwIndex& rIdx, bool bFlag = true,
358  bool bFormatToTextAttributes = true );
359 
364  };
365 
374  SwTextAttr *GetTextAttrAt(
375  sal_Int32 const nIndex,
376  sal_uInt16 const nWhich,
377  enum GetTextAttrMode const eMode = DEFAULT ) const;
378 
383  std::vector<SwTextAttr *> GetTextAttrsAt(
384  sal_Int32 const nIndex,
385  sal_uInt16 const nWhich ) const;
386 
394  SwTextAttr *GetTextAttrForCharAt(
395  const sal_Int32 nIndex,
396  const sal_uInt16 nWhich = RES_TXTATR_END ) const;
397 
398  SwTextField* GetFieldTextAttrAt(
399  const sal_Int32 nIndex,
400  const bool bIncludeInputFieldAtStart = false ) const;
401 
402  bool Spell(SwSpellArgs*);
403  bool Convert( SwConversionArgs & );
404 
405  inline SwTextFormatColl *GetTextColl() const;
406  virtual SwFormatColl *ChgFormatColl( SwFormatColl* ) override;
407  void ChgTextCollUpdateNum( const SwTextFormatColl* pOld,
408  const SwTextFormatColl* pNew );
409 
413  void CopyCollFormat(SwTextNode& rDestNd, bool bUndoForChgFormatColl = true);
414 
415  // BEGIN OF BULLET/NUMBERING/OUTLINE STUFF:
416 
424  SwNumRule *GetNumRule(bool bInParent = true) const;
425 
426  const SwNodeNum* GetNum(SwRootFrame const* pLayout = nullptr) const;
427  void DoNum(std::function<void (SwNodeNum &)> const&);
428 
429  SwNumberTree::tNumberVector GetNumberVector(SwRootFrame const* pLayout = nullptr) const;
430 
437  bool IsOutline() const;
438 
439  bool IsOutlineStateChanged() const;
440 
441  void UpdateOutlineState();
442 
446  void NumRuleChgd();
447 
462  OUString GetNumString( const bool _bInclPrefixAndSuffixStrings = true,
463  const unsigned int _nRestrictToThisLevel = MAXLEVEL,
464  SwRootFrame const* pLayout = nullptr) const;
465 
473  tools::Long GetLeftMarginWithNum( bool bTextLeft = false ) const;
474 
485  bool GetFirstLineOfsWithNum( short& rFirstOffset ) const;
486 
487  SwTwips GetAdditionalIndentForStartingNewList() const;
488 
489  void ClearLRSpaceItemDueToListLevelIndents( std::shared_ptr<SvxLRSpaceItem>& o_rLRSpaceItem ) const;
490 
496  tools::Long GetLeftMarginForTabCalculation() const;
497 
507  bool HasNumber() const;
508 
518  bool HasBullet() const;
519 
531  bool IsNumbered(SwRootFrame const* pLayout = nullptr) const;
532 
538  bool HasMarkedLabel() const;
539 
548  void SetAttrListLevel(int nLevel);
549 
550  bool HasAttrListLevel() const;
551 
552  int GetAttrListLevel() const;
553 
559  int GetActualListLevel() const;
560 
581  int GetAttrOutlineLevel() const;
582 
596  void SetAttrOutlineLevel(int nLevel);
597 
603  bool GetAttrOutlineContentVisible(bool& bOutlineContentVisibleAttr);
604  void SetAttrOutlineContentVisible(bool bVisible);
605 
606  bool IsEmptyListStyleDueToSetOutlineLevelAttr() const { return mbEmptyListStyleSetDueToSetOutlineLevelAttr;}
607  void SetEmptyListStyleDueToSetOutlineLevelAttr();
608  void ResetEmptyListStyleDueToResetOutlineLevelAttr();
609 
617  SwTwips GetWidthOfLeadingTabs() const;
618 
627  bool HasVisibleNumberingOrBullet() const;
628 
629  void SetListId(OUString const& rListId);
630  OUString GetListId() const;
631 
646  bool AreListLevelIndentsApplicable() const;
647 
656  bool GetListTabStopPosition( tools::Long& nListTabStopPosition ) const;
657 
663  OUString GetLabelFollowedBy() const;
664 
665  // END OF BULLET/NUMBERING/OUTLINE STUFF:
666 
667  void fillSoftPageBreakList( SwSoftPageBreakList& rBreak ) const;
668 
669  LanguageType GetLang( const sal_Int32 nBegin, const sal_Int32 nLen = 0,
670  sal_uInt16 nScript = 0 ) const;
671 
673  bool IsSymbolAt(sal_Int32 nBegin) const; // In itratr.cxx.
674  virtual SwContentNode* MakeCopy(SwDoc&, const SwNodeIndex&, bool bNewFrames) const override;
675 
677  bool Hyphenate( SwInterHyphInfo &rHyphInf );
678  void DelSoftHyph( const sal_Int32 nStart, const sal_Int32 nEnd );
679 
686  OUString GetExpandText( SwRootFrame const* pLayout,
687  const sal_Int32 nIdx = 0,
688  const sal_Int32 nLen = -1,
689  const bool bWithNum = false,
690  const bool bAddSpaceAfterListLabelStr = false,
691  const bool bWithSpacesForLevel = false,
692  const ExpandMode eAdditionalMode = ExpandMode::ExpandFootnote) const;
693  bool CopyExpandText( SwTextNode& rDestNd, const SwIndex* pDestIdx,
694  sal_Int32 nIdx, sal_Int32 nLen,
695  SwRootFrame const* pLayout,
696  bool bWithNum = false, bool bWithFootnote = true,
697  bool bReplaceTabsWithSpaces = false ) const;
698 
699  OUString GetRedlineText() const;
700 
703  sal_Int32 GetDropLen(sal_Int32 nWishLen) const;
704 
706  bool GetDropSize(int& rFontHeight, int& rDropHeight, int& rDropDescent) const;
707 
710  { return m_pSwpHints && m_pSwpHints->CalcHiddenParaField(); }
713  { if (m_pSwpHints) m_pSwpHints->SetCalcHiddenParaField(); }
714 
716  bool IsHiddenByParaField() const
717  { return m_pSwpHints && m_pSwpHints->IsHiddenByParaField(); }
718 
720 
721  bool HasHiddenCharAttribute( bool bWholePara ) const
722  {
723  if ( m_bRecalcHiddenCharFlags )
724  CalcHiddenCharFlags();
725  return bWholePara ? m_bHiddenCharsHidePara : m_bContainsHiddenChars;
726  }
727 
729  { m_bRecalcHiddenCharFlags = true; }
730 
736  bool IsHidden() const;
737 
738 
740  virtual void Update(
741  SwIndex const & rPos,
742  const sal_Int32 nChangeLen,
743  const bool bNegative = false,
744  const bool bDelete = false ) override;
745 
747  void TransliterateText( utl::TransliterationWrapper& rTrans,
748  sal_Int32 nStart, sal_Int32 nEnd,
749  SwUndoTransliterate* pUndo, bool bUseRedlining = false );
750 
752  bool CountWords( SwDocStat& rStat, sal_Int32 nStart, sal_Int32 nEnd ) const;
753 
756  bool IsNotificationEnabled() const;
757 
759  bool IsNotifiable() const;
760 
761  void SetListRestart( bool bRestart );
762  bool IsListRestart() const;
763 
764  void SetAttrListRestartValue( SwNumberTree::tSwNumTreeNumber nNum );
765  bool HasAttrListRestartValue() const;
766  SwNumberTree::tSwNumTreeNumber GetAttrListRestartValue() const;
767  SwNumberTree::tSwNumTreeNumber GetActualListStartValue() const;
768 
769  void SetCountedInList( bool bCounted );
770  bool IsCountedInList() const;
771 
772  void AddToList();
773  void AddToListRLHidden();
774  void RemoveFromList();
775  void RemoveFromListRLHidden();
776  bool IsInList() const;
777 
778  bool IsFirstOfNumRule(SwRootFrame const& rLayout) const;
779 
780  SAL_DLLPRIVATE css::uno::WeakReference<css::text::XTextContent> const& GetXParagraph() const
781  { return m_wXParagraph; }
782  SAL_DLLPRIVATE void SetXParagraph(css::uno::Reference<css::text::XTextContent> const& xParagraph)
783  { m_wXParagraph = xParagraph; }
784 
786  virtual ::sfx2::IXmlIdRegistry& GetRegistry() override;
787  virtual bool IsInClipboard() const override;
788  virtual bool IsInUndo() const override;
789  virtual bool IsInContent() const override;
790  virtual css::uno::Reference< css::rdf::XMetadatable > MakeUnoObject() override;
791 
792  bool IsCollapse() const;
793 
794  virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
795 
796  sal_uInt32 GetRsid( sal_Int32 nStt, sal_Int32 nEnd ) const;
797  sal_uInt32 GetParRsid() const;
798 
799  bool CompareRsid( const SwTextNode &rTextNode, sal_Int32 nStt1, sal_Int32 nStt2 ) const;
800  bool CompareParRsid( const SwTextNode &rTextNode ) const;
801 
802  // Access to DrawingLayer FillAttributes in a preprocessed form for primitive usage
804 
806  static bool IsIgnoredCharFormatForNumbering(const sal_uInt16 nWhich, bool bIsCharStyle = false);
807  void FormatDropNotify(const SwFormatDrop& rDrop) override
808  { TriggerNodeUpdate(sw::LegacyModifyHint(&rDrop, &rDrop)); };
809 };
810 
812 {
813  assert( m_pSwpHints );
814  return *m_pSwpHints;
815 }
816 inline const SwpHints &SwTextNode::GetSwpHints() const
817 {
818  assert( m_pSwpHints );
819  return *m_pSwpHints;
820 }
821 
823 {
824  if ( !m_pSwpHints )
825  {
826  m_pSwpHints.reset(new SwpHints(*this));
827  }
828  return *m_pSwpHints;
829 }
830 
832 {
833  if ( m_pSwpHints && m_pSwpHints->CanBeDeleted() )
834  {
835  m_pSwpHints.reset();
836  }
837 }
838 
840 {
841  return const_cast<SwTextFormatColl*>(static_cast<const SwTextFormatColl*>(GetRegisteredIn()));
842 }
843 
846 {
847  return SwNodeType::Text == m_nNodeType ? static_cast<SwTextNode*>(this) : nullptr;
848 }
849 
850 inline const SwTextNode *SwNode::GetTextNode() const
851 {
852  return SwNodeType::Text == m_nNodeType ? static_cast<const SwTextNode*>(this) : nullptr;
853 }
854 
855 inline void
856 SwTextNode::CutText(SwTextNode * const pDest, const SwIndex & rDestStart,
857  const SwIndex & rStart, const sal_Int32 nLen)
858 {
859  CutImpl( pDest, rDestStart, rStart, nLen );
860 }
861 
862 inline sal_Int32 SwTextNode::GetSpaceLeft() const
863 {
864  // do not fill the String up to the max - need to be able to have a
865  // SwPosition "behind" the last character, i.e., at index TXTNODE_MAX + 1
866  const sal_Int32 TXTNODE_MAX = SAL_MAX_INT32 - 2;
867  return TXTNODE_MAX-m_Text.getLength();
868 }
869 
870 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Base class of the Writer layout elements.
Definition: frame.hxx:298
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:157
virtual sal_Int32 Len() const
Definition: node.cxx:1245
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:210
SwpHints * GetpSwpHints()
Definition: ndtxt.hxx:218
css::uno::WeakReference< css::text::XTextContent > m_wXParagraph
Definition: ndtxt.hxx:122
sal_Int32 GetSpaceLeft() const
Definition: ndtxt.hxx:862
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:187
void CutText(SwTextNode *const pDest, const SwIndex &rStart, const sal_Int32 nLen)
Definition: ndtxt.cxx:2403
bool IsHiddenByParaField() const
is the paragraph visible?
Definition: ndtxt.hxx:716
void TryDeleteSwpHints()
Definition: ndtxt.hxx:831
SAL_DLLPRIVATE css::uno::WeakReference< css::text::XTextContent > const & GetXParagraph() const
Definition: ndtxt.hxx:780
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:219
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
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
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:721
constexpr OUStringLiteral IsHidden(u"IsHidden")
bool CalcHiddenParaField()
Hidden Paragraph Field:
Definition: ndtxt.hxx:709
std::shared_ptr< SdrAllFillAttributesHelper > SdrAllFillAttributesHelperPtr
Definition: format.hxx:41
const sal_uInt8 MAXLEVEL
Definition: swtypes.hxx:95
void SetCalcHiddenParaField()
set CalcVisible flags
Definition: ndtxt.hxx:712
bool IsEmptyListStyleDueToSetOutlineLevelAttr() const
Definition: ndtxt.hxx:606
void SetCalcHiddenCharFlags() const
Definition: ndtxt.hxx:728
void FormatDropNotify(const SwFormatDrop &rDrop) override
Definition: ndtxt.hxx:807
virtual bool ResetAttr(sal_uInt16 nWhich1, sal_uInt16 nWhich2=0)
Definition: node.cxx:1653
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:2411
SetAttrMode
Definition: swtypes.hxx:137
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:1725
SwpHints & GetSwpHints()
getters for SwpHints
Definition: ndtxt.hxx:811
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
virtual SwFormatColl * ChgFormatColl(SwFormatColl *)
Definition: node.cxx:1247
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:49
virtual void NewAttrSet(SwAttrPool &)=0
Make respective nodes create the specific AttrSets.
EXPAND : (Start < nIndex <= End)
Definition: ndtxt.hxx:363
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:362
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:1558
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:1524
bool mbInSetOrResetAttr
boolean, indicating that a or or method is running...
Definition: ndtxt.hxx:118
virtual drawinglayer::attribute::SdrAllFillAttributesHelperPtr getSdrAllFillAttributesHelper() const
Definition: node.cxx:2084
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:725
SAL_DLLPRIVATE void SetXParagraph(css::uno::Reference< css::text::XTextContent > const &xParagraph)
Definition: ndtxt.hxx:782
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:360
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:845
bool HasHints() const
Definition: ndtxt.hxx:220
SwpHints & GetOrCreateSwpHints()
Definition: ndtxt.hxx:822
SwTextFormatColl * GetTextColl() const
Definition: ndtxt.hxx:839