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 "doc.hxx"
25 #include "swdllapi.h"
26 #include "node.hxx"
27 #include "hintids.hxx"
28 #include "ndhints.hxx"
29 #include "SwNumberTreeTypes.hxx"
31 #include "modeltoviewhelper.hxx"
32 
33 #include <sfx2/Metadatable.hxx>
34 
35 #include <memory>
36 #include <vector>
37 #include <set>
38 #include <functional>
39 
40 class SfxHint;
41 class SwNumRule;
42 class SwNodeNum;
43 class SvxLRSpaceItem;
44 
45 namespace utl {
46  class TransliterationWrapper;
47 }
48 namespace vcl
49 {
50 class Font;
51 }
52 
53 class SwContentFrame;
54 class SwTextField;
55 class SwTextInputField;
56 class SfxItemSet;
58 struct SwSpellArgs;
59 struct SwConversionArgs;
60 class SwInterHyphInfo;
61 class SwWrongList;
62 class SwGrammarMarkUp;
63 struct SwDocStat;
64 struct SwParaIdleData_Impl;
65 enum class ExpandMode;
66 
67 namespace sw { namespace mark { enum class RestoreMode; } }
68 
69 namespace com { namespace sun { namespace star {
70  namespace uno {
71  template < class > class Sequence;
72  }
73  namespace text { class XTextContent; }
74 } } }
75 
76 typedef std::set< sal_Int32 > SwSoftPageBreakList;
77 
80  : public SwContentNode
81  , public ::sfx2::Metadatable
82  , public sw::BroadcasterMixin
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  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  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 
599  bool IsEmptyListStyleDueToSetOutlineLevelAttr() { return mbEmptyListStyleSetDueToSetOutlineLevelAttr;}
600  void SetEmptyListStyleDueToSetOutlineLevelAttr();
601  void ResetEmptyListStyleDueToResetOutlineLevelAttr();
602 
610  SwTwips GetWidthOfLeadingTabs() const;
611 
620  bool HasVisibleNumberingOrBullet() const;
621 
622  void SetListId(OUString const& rListId);
623  OUString GetListId() const;
624 
639  bool AreListLevelIndentsApplicable() const;
640 
649  bool GetListTabStopPosition( long& nListTabStopPosition ) const;
650 
656  OUString GetLabelFollowedBy() const;
657 
658  // END OF BULLET/NUMBERING/OUTLINE STUFF:
659 
660  void fillSoftPageBreakList( SwSoftPageBreakList& rBreak ) const;
661 
662  LanguageType GetLang( const sal_Int32 nBegin, const sal_Int32 nLen = 0,
663  sal_uInt16 nScript = 0 ) const;
664 
666  bool IsSymbolAt(sal_Int32 nBegin) const; // In itratr.cxx.
667  virtual SwContentNode* MakeCopy(SwDoc*, const SwNodeIndex&, bool bNewFrames) const override;
668 
670  bool Hyphenate( SwInterHyphInfo &rHyphInf );
671  void DelSoftHyph( const sal_Int32 nStart, const sal_Int32 nEnd );
672 
679  OUString GetExpandText( SwRootFrame const* pLayout,
680  const sal_Int32 nIdx = 0,
681  const sal_Int32 nLen = -1,
682  const bool bWithNum = false,
683  const bool bAddSpaceAfterListLabelStr = false,
684  const bool bWithSpacesForLevel = false,
685  const ExpandMode eAdditionalMode = ExpandMode::ExpandFootnote) const;
686  bool CopyExpandText( SwTextNode& rDestNd, const SwIndex* pDestIdx,
687  sal_Int32 nIdx, sal_Int32 nLen,
688  SwRootFrame const* pLayout,
689  bool bWithNum = false, bool bWithFootnote = true,
690  bool bReplaceTabsWithSpaces = false ) const;
691 
692  OUString GetRedlineText() const;
693 
696  sal_Int32 GetDropLen(sal_Int32 nWishLen) const;
697 
699  bool GetDropSize(int& rFontHeight, int& rDropHeight, int& rDropDescent) const;
700 
703  { return m_pSwpHints && m_pSwpHints->CalcHiddenParaField(); }
706  { if (m_pSwpHints) m_pSwpHints->SetCalcHiddenParaField(); }
707 
709  bool IsHiddenByParaField() const
710  { return m_pSwpHints && m_pSwpHints->IsHiddenByParaField(); }
711 
712  int FieldCanHideParaWeight(SwFieldIds eFieldId) const
713  {
714  return GetDoc()->FieldCanHideParaWeight(eFieldId);
715  }
716  bool FieldHidesPara(const SwField& rField) const
717  { return GetDoc()->FieldHidesPara(rField); }
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 );
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);
807 };
808 
810 {
811  assert( m_pSwpHints );
812  return *m_pSwpHints;
813 }
814 inline const SwpHints &SwTextNode::GetSwpHints() const
815 {
816  assert( m_pSwpHints );
817  return *m_pSwpHints;
818 }
819 
821 {
822  if ( !m_pSwpHints )
823  {
824  m_pSwpHints.reset(new SwpHints(*this));
825  }
826  return *m_pSwpHints;
827 }
828 
830 {
831  if ( m_pSwpHints && m_pSwpHints->CanBeDeleted() )
832  {
833  m_pSwpHints.reset();
834  }
835 }
836 
838 {
839  return static_cast<SwTextFormatColl*>(const_cast<SwModify*>(GetRegisteredIn()));
840 }
841 
844 {
845  return SwNodeType::Text == m_nNodeType ? static_cast<SwTextNode*>(this) : nullptr;
846 }
847 
848 inline const SwTextNode *SwNode::GetTextNode() const
849 {
850  return SwNodeType::Text == m_nNodeType ? static_cast<const SwTextNode*>(this) : nullptr;
851 }
852 
853 inline void
854 SwTextNode::CutText(SwTextNode * const pDest, const SwIndex & rDestStart,
855  const SwIndex & rStart, const sal_Int32 nLen)
856 {
857  CutImpl( pDest, rDestStart, rStart, nLen );
858 }
859 
860 inline sal_Int32 SwTextNode::GetSpaceLeft() const
861 {
862  // do not fill the String up to the max - need to be able to have a
863  // SwPosition "behind" the last character, i.e., at index TXTNODE_MAX + 1
864  const sal_Int32 TXTNODE_MAX = SAL_MAX_INT32 - 2;
865  return TXTNODE_MAX-m_Text.getLength();
866 }
867 
868 #endif
869 
870 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Base class of the Writer layout elements.
Definition: frame.hxx:295
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:149
virtual sal_Int32 Len() const
Definition: node.cxx:1183
virtual void SwClientNotify(const SwModify &, const SfxHint &rHint) override
Definition: node.cxx:1052
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
bool IsEmptyListStyleDueToSetOutlineLevelAttr()
Definition: ndtxt.hxx:599
virtual css::uno::Reference< css::rdf::XMetadatable > MakeUnoObject()=0
const OUString & GetText() const
Definition: ndtxt.hxx:211
bool FieldHidesPara(const SwField &rField) const
Definition: ndtxt.hxx:716
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:76
sal_Int32 GetSpaceLeft() const
Definition: ndtxt.hxx:860
sal_uIntPtr sal_uLong
Base class of all fields.
Definition: fldbas.hxx:279
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:185
void CutText(SwTextNode *const pDest, const SwIndex &rStart, const sal_Int32 nLen)
Definition: ndtxt.cxx:2402
bool IsHiddenByParaField() const
is the paragraph visible?
Definition: ndtxt.hxx:709
long SwTwips
Definition: swtypes.hxx:49
void TryDeleteSwpHints()
Definition: ndtxt.hxx:829
SAL_DLLPRIVATE css::uno::WeakReference< css::text::XTextContent > const & GetXParagraph() const
Definition: ndtxt.hxx:780
Dialog to specify the properties of date form field.
Definition: accfrmobj.cxx:40
std::unique_ptr< SwNodeNum > mpNodeNum
Numbering for this paragraph.
Definition: ndtxt.hxx:95
virtual bool IsInContent() const =0
#define RES_TXTATR_END
Definition: hintids.hxx:158
virtual bool IsInClipboard() const =0
The root element of a Writer document layout.
Definition: rootfrm.hxx:79
static LanguageType nLang
Definition: srtdlg.cxx:58
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:872
virtual void Update(SwIndex const &rPos, const sal_Int32 nChangeLen, const bool bNegative=false, const bool bDelete=false)
Definition: index.cxx:229
bool HasHiddenCharAttribute(bool bWholePara) const
Hidden Paragraph Field:
Definition: ndtxt.hxx:721
bool CalcHiddenParaField()
Hidden Paragraph Field:
Definition: ndtxt.hxx:702
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:705
void SetCalcHiddenCharFlags() const
Definition: ndtxt.hxx:728
virtual bool ResetAttr(sal_uInt16 nWhich1, sal_uInt16 nWhich2=0)
Definition: node.cxx:1583
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:2410
SetAttrMode
Definition: swtypes.hxx:143
SwFieldIds
Definition: fldbas.hxx:38
SwDoc * GetDoc()
Definition: node.hxx:702
Marks a character position inside a document model node.
Definition: index.hxx:37
virtual SwContentNode * MakeCopy(SwDoc *, const SwNodeIndex &, bool bNewFrames) const =0
virtual bool IsInUndo() const =0
Marks a node in the document model.
Definition: ndindex.hxx:31
virtual sal_uInt16 ResetAllAttr()
Definition: node.cxx:1670
SwpHints & GetSwpHints()
getters for SwpHints
Definition: ndtxt.hxx:809
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
virtual SwFormatColl * ChgFormatColl(SwFormatColl *)
Definition: node.cxx:1185
int FieldCanHideParaWeight(SwFieldIds eFieldId) const
Definition: doc.cxx:1363
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:70
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:79
bool m_bNotifiable
Definition: ndtxt.hxx:111
ExpandMode
Some helpers for converting model strings to view strings.
virtual bool SetAttr(const SfxPoolItem &)
made virtual
Definition: node.cxx:1471
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:137
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:157
bool FieldHidesPara(const SwField &rField) const
Definition: doc.cxx:1378
virtual SwContentNode * JoinNext()
Definition: node.cxx:1437
bool mbInSetOrResetAttr
boolean, indicating that a or or method is running...
Definition: ndtxt.hxx:118
def text(shape, st)
virtual drawinglayer::attribute::SdrAllFillAttributesHelperPtr getSdrAllFillAttributesHelper() const
Definition: node.cxx:2031
int FieldCanHideParaWeight(SwFieldIds eFieldId) const
Definition: ndtxt.hxx:712
std::unique_ptr< SwpHints > m_pSwpHints
May be 0.
Definition: ndtxt.hxx:93
SwNodeType const m_nNodeType
Definition: node.hxx:84
const SfxPoolItem & GetAttr(sal_uInt16 nWhich, bool bInParent=true) const
SS for PoolItems: hard attributation.
Definition: node.hxx:730
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:75
OUString m_Text
Definition: ndtxt.hxx:98
GetTextAttrMode
Definition: ndtxt.hxx:361
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:843
bool HasHints() const
Definition: ndtxt.hxx:221
SwpHints & GetOrCreateSwpHints()
Definition: ndtxt.hxx:820
SwTextFormatColl * GetTextColl() const
Definition: ndtxt.hxx:837