LibreOffice Module sw (master) 1
ndtxt.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#pragma once
20
22#include <com/sun/star/text/XTextContent.hpp>
23
24#include "swdllapi.h"
26#include "SwNumberTreeTypes.hxx"
27#include "hintids.hxx"
28#include "list.hxx"
29#include "modeltoviewhelper.hxx"
30#include "ndhints.hxx"
31#include "node.hxx"
32#include "paratr.hxx"
33
34#include <sfx2/Metadatable.hxx>
36#include <memory>
37#include <vector>
38#include <functional>
39
40class SfxHint;
41class SwNumRule;
42class SwNodeNum;
43class SvxLRSpaceItem;
44
45namespace utl {
46 class TransliterationWrapper;
47}
48namespace vcl
49{
50class Font;
51}
52
53class SwContentFrame;
54class SwTextField;
56class SfxItemSet;
58struct SwSpellArgs;
59struct SwConversionArgs;
60class SwInterHyphInfo;
61class SwWrongList;
62class SwGrammarMarkUp;
63struct SwDocStat;
65enum class ExpandMode;
66enum class SwFieldIds : sal_uInt16;
67class SwField;
68
69namespace sw::mark { enum class RestoreMode; }
70
71namespace com::sun::star {
72 namespace uno {
73 template < class > class Sequence;
74 }
75}
76
78
81 : public SwContentNode
82 , public ::sfx2::Metadatable
84{
85 friend class SwContentNode;
87 friend class SwDoc;
88 friend class SwNodes;
89 friend class SwTextFrame;
90 friend class SwScriptInfo;
91
94 std::unique_ptr<SwpHints> m_pSwpHints;
95
96 mutable std::unique_ptr<SwNodeNum> mpNodeNum;
97 mutable std::unique_ptr<SwNodeNum> mpNodeNumRLHidden;
98 mutable std::unique_ptr<SwNodeNum> mpNodeNumOrig;
99
100 OUString m_Text;
101
103
106 mutable bool m_bContainsHiddenChars : 1;
108 mutable bool m_bHiddenCharsHidePara : 1;
110 mutable bool m_bRecalcHiddenCharFlags : 1;
111
112 mutable bool m_bLastOutlineState : 1;
114
116
121
124
125 std::optional< OUString > m_oNumStringCache;
126
127 css::uno::WeakReference<css::text::XTextContent> m_wXParagraph;
128
129 // DrawingLayer FillAttributes in a preprocessed form for primitive usage
131
132 SAL_DLLPRIVATE SwTextNode( const SwNodeIndex &rWhere, SwTextFormatColl *pTextColl,
133 const SfxItemSet* pAutoAttr = nullptr );
134 virtual void SwClientNotify( const SwModify&, const SfxHint& ) override;
136 SAL_DLLPRIVATE void CopyAttr( SwTextNode *pDest, const sal_Int32 nStart, const sal_Int32 nOldPos);
137
138 SAL_DLLPRIVATE SwTextNode* MakeNewTextNode( const SwNodeIndex&, bool bNext = true,
139 bool bChgFollow = true );
140
141 SAL_DLLPRIVATE void CutImpl(
142 SwTextNode * const pDest, const SwIndex & rDestStart,
143 const SwIndex & rStart, /*const*/ sal_Int32 nLen,
144 const bool bUpdate = true );
145
147 SAL_DLLPRIVATE void MoveTextAttr_To_AttrSet(); // Called by SplitNode.
148
150 SAL_DLLPRIVATE virtual void NewAttrSet( SwAttrPool& ) override;
151
155 { return m_bRecalcHiddenCharFlags; }
156 void SetHiddenCharAttribute( bool bNewHiddenCharsHidePara, bool bNewContainsHiddenChars ) const
157 {
158 m_bHiddenCharsHidePara = bNewHiddenCharsHidePara;
159 m_bContainsHiddenChars = bNewContainsHiddenChars;
160 m_bRecalcHiddenCharFlags = false;
161 }
162
163 SAL_DLLPRIVATE void CalcHiddenCharFlags() const;
164
165 SAL_DLLPRIVATE void SetLanguageAndFont( const SwPaM &rPaM,
166 LanguageType nLang, sal_uInt16 nLangWhichId,
167 const vcl::Font *pFont, sal_uInt16 nFontWhichId );
168
170
171 SAL_DLLPRIVATE void InitSwParaStatistics( bool bNew );
172
173 inline void TryDeleteSwpHints();
174
175 SAL_DLLPRIVATE void impl_FormatToTextAttr(const SfxItemSet& i_rAttrSet);
176
177 const SwTextInputField* GetOverlappingInputField( const SwTextAttr& rTextAttr ) const;
178
179 void DelFrames_TextNodePart();
180
181public:
182 enum class WrongState { TODO, PENDING, DONE };
183
184 bool IsWordCountDirty() const;
185 WrongState GetWrongDirty() const;
186 bool IsWrongDirty() const;
187 bool IsGrammarCheckDirty() const;
188 bool IsSmartTagDirty() const;
189 bool IsAutoCompleteWordDirty() const;
190 void SetWordCountDirty( bool bNew ) const;
191 void SetWrongDirty(WrongState eNew) const;
192 void SetGrammarCheckDirty( bool bNew ) const;
193 void SetSmartTagDirty( bool bNew ) const;
194 void SetAutoCompleteWordDirty( bool bNew ) const;
195 void SetWrong( std::unique_ptr<SwWrongList> pNew );
196 void ClearWrong();
197 std::unique_ptr<SwWrongList> ReleaseWrong();
198 SwWrongList* GetWrong();
199 const SwWrongList* GetWrong() const;
200 void SetGrammarCheck( std::unique_ptr<SwGrammarMarkUp> pNew );
201 void ClearGrammarCheck();
202 std::unique_ptr<SwGrammarMarkUp> ReleaseGrammarCheck();
203 SwGrammarMarkUp* GetGrammarCheck();
204 // return SwWrongList because *function pointer* return values aren't covariant
205 SwWrongList const* GetGrammarCheck() const;
206 void SetSmartTags( std::unique_ptr<SwWrongList> pNew );
207 void ClearSmartTags();
208 std::unique_ptr<SwWrongList> ReleaseSmartTags();
209 SwWrongList* GetSmartTags();
210 SwWrongList const* GetSmartTags() const;
211
213
214
215public:
218 void TriggerNodeUpdate(const sw::LegacyModifyHint&);
219
220 const OUString& GetText() const { return m_Text; }
221
222 // returns the maximum number of characters that can still be added to the node
223 inline sal_Int32 GetSpaceLeft() const;
224
226 inline SwpHints &GetSwpHints();
227 inline const SwpHints &GetSwpHints() const;
228 SwpHints *GetpSwpHints() { return m_pSwpHints.get(); }
229 const SwpHints *GetpSwpHints() const { return m_pSwpHints.get(); }
230 bool HasHints() const { return m_pSwpHints != nullptr; }
231 inline SwpHints &GetOrCreateSwpHints();
232
233 virtual ~SwTextNode() override;
234
235 virtual sal_Int32 Len() const override;
236
238 void GetMinMaxSize( SwNodeOffset nIndex, sal_uLong& rMin, sal_uLong &rMax, sal_uLong &rAbs ) const;
239
241 virtual bool SetAttr( const SfxPoolItem& ) override;
242 virtual bool SetAttr( const SfxItemSet& rSet ) override;
243 virtual bool ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 ) override;
244 virtual bool ResetAttr( const std::vector<sal_uInt16>& rWhichArr ) override;
245 virtual sal_uInt16 ResetAllAttr() override;
246
251 OUString InsertText( const OUString & rStr, const SwIndex & rIdx,
252 const SwInsertFlags nMode
254
259 void EraseText ( const SwIndex &rIdx, const sal_Int32 nCount = SAL_MAX_INT32,
261
276 void RstTextAttr(
277 const SwIndex &rIdx,
278 const sal_Int32 nLen,
279 const sal_uInt16 nWhich = 0,
280 const SfxItemSet* pSet = nullptr,
281 const bool bInclRefToxMark = false,
282 const bool bExactRange = false );
283 void GCAttr();
284
285 // Delete text attribute (needs to be deregistered at Pool!)
286 void DestroyAttr( SwTextAttr* pAttr );
287
288 // delete all attributes from SwpHintsArray.
289 void ClearSwpHintsArr( bool bDelFields );
290
292 void FileLoadedInitHints();
293
295 bool InsertHint( SwTextAttr * const pAttr,
296 const SetAttrMode nMode = SetAttrMode::DEFAULT );
299 SwTextAttr* InsertItem( SfxPoolItem& rAttr,
300 const sal_Int32 nStart, const sal_Int32 nEnd,
301 const SetAttrMode nMode = SetAttrMode::DEFAULT );
302
305 bool SetAttr( const SfxItemSet& rSet,
306 sal_Int32 nStt, sal_Int32 nEnd,
307 const SetAttrMode nMode = SetAttrMode::DEFAULT,
308 SwTextAttr **ppNewTextAttr = nullptr);
316 bool GetParaAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd,
317 const bool bOnlyTextAttr = false,
318 const bool bGetFromChrFormat = true,
319 const bool bMergeIndentValuesOfNumRule = false,
320 SwRootFrame const* pLayout = nullptr) const;
321
323 void FormatToTextAttr( SwTextNode* pNd );
324
326 void DeleteAttributes( const sal_uInt16 nWhich,
327 const sal_Int32 nStart, const sal_Int32 nEnd = 0 );
329 void DeleteAttribute ( SwTextAttr * const pTextAttr );
330
333 void CopyText( SwTextNode * const pDest,
334 const SwIndex &rStart,
335 const sal_Int32 nLen,
336 const bool bForceCopyOfAllAttrs );
337 void CopyText( SwTextNode * const pDest,
338 const SwIndex &rDestStart,
339 const SwIndex &rStart,
340 sal_Int32 nLen,
341 const bool bForceCopyOfAllAttrs = false );
342
343 void CutText(SwTextNode * const pDest,
344 const SwIndex & rStart, const sal_Int32 nLen);
345 inline void CutText(SwTextNode * const pDest, const SwIndex &rDestStart,
346 const SwIndex & rStart, const sal_Int32 nLen);
347
351 void ReplaceText( const SwIndex& rStart, const sal_Int32 nDelLen,
352 const OUString & rText );
353 void ReplaceTextOnly( sal_Int32 nPos, sal_Int32 nLen,
354 const OUString& rText,
355 const css::uno::Sequence<sal_Int32>& rOffsets );
356
358 virtual SwContentFrame *MakeFrame( SwFrame* ) override;
359 SwTextNode * SplitContentNode(const SwPosition &,
360 std::function<void (SwTextNode *, sw::mark::RestoreMode, bool AtStart)> const* pContentIndexRestore);
361 virtual SwContentNode *JoinNext() override;
362 void JoinPrev();
363
364 SwContentNode *AppendNode( const SwPosition & );
365
367 bool DontExpandFormat( const SwIndex& rIdx, bool bFlag = true,
368 bool bFormatToTextAttributes = true );
369
374 };
375
384 SwTextAttr *GetTextAttrAt(
385 sal_Int32 const nIndex,
386 sal_uInt16 const nWhich,
387 enum GetTextAttrMode const eMode = DEFAULT ) const;
388
393 std::vector<SwTextAttr *> GetTextAttrsAt(
394 sal_Int32 const nIndex,
395 sal_uInt16 const nWhich ) const;
396
404 SwTextAttr *GetTextAttrForCharAt(
405 const sal_Int32 nIndex,
406 const sal_uInt16 nWhich = RES_TXTATR_END ) const;
407
414 SwTextAttr* GetTextAttrForEndCharAt(sal_Int32 nIndex, sal_uInt16 nWhich) const;
415
416 SwTextField* GetFieldTextAttrAt(
417 const sal_Int32 nIndex,
418 const bool bIncludeInputFieldAtStart = false ) const;
419
420 bool Spell(SwSpellArgs*);
421 bool Convert( SwConversionArgs & );
422
423 inline SwTextFormatColl *GetTextColl() const;
424 virtual SwFormatColl *ChgFormatColl( SwFormatColl* ) override;
425 void ChgTextCollUpdateNum( const SwTextFormatColl* pOld,
426 const SwTextFormatColl* pNew );
427
431 void CopyCollFormat(SwTextNode& rDestNd, bool bUndoForChgFormatColl = true);
432
433 // BEGIN OF BULLET/NUMBERING/OUTLINE STUFF:
434
442 SwNumRule *GetNumRule(bool bInParent = true) const;
443
444 const SwNodeNum* GetNum(SwRootFrame const* pLayout = nullptr,
446 void DoNum(std::function<void (SwNodeNum &)> const&);
447
448 SwNumberTree::tNumberVector GetNumberVector(SwRootFrame const* pLayout = nullptr,
450
457 bool IsOutline() const;
458
459 bool IsOutlineStateChanged() const;
460
461 void UpdateOutlineState();
462
466 void NumRuleChgd();
467
482 OUString GetNumString( const bool _bInclPrefixAndSuffixStrings = true,
483 const unsigned int _nRestrictToThisLevel = MAXLEVEL,
484 SwRootFrame const* pLayout = nullptr,
486
494 tools::Long GetLeftMarginWithNum( bool bTextLeft = false ) const;
495
506 bool GetFirstLineOfsWithNum( short& rFirstOffset ) const;
507
508 SwTwips GetAdditionalIndentForStartingNewList() const;
509
510 void ClearLRSpaceItemDueToListLevelIndents( std::shared_ptr<SvxLRSpaceItem>& o_rLRSpaceItem ) const;
511
517 tools::Long GetLeftMarginForTabCalculation() const;
518
528 bool HasNumber(SwRootFrame const* pLayout = nullptr) const;
529
539 bool HasBullet() const;
540
552 bool IsNumbered(SwRootFrame const* pLayout = nullptr) const;
553
559 bool HasMarkedLabel() const;
560
569 void SetAttrListLevel(int nLevel);
570
571 bool HasAttrListLevel() const;
572
573 int GetAttrListLevel() const;
574
580 int GetActualListLevel(SwListRedlineType eRedline = SwListRedlineType::SHOW) const;
581
602 int GetAttrOutlineLevel() const;
603
617 void SetAttrOutlineLevel(int nLevel);
618
624 void GetAttrOutlineContentVisible(bool& bOutlineContentVisibleAttr);
625 void SetAttrOutlineContentVisible(bool bVisible);
626
627 bool IsEmptyListStyleDueToSetOutlineLevelAttr() const { return mbEmptyListStyleSetDueToSetOutlineLevelAttr;}
628 void SetEmptyListStyleDueToSetOutlineLevelAttr();
629 void ResetEmptyListStyleDueToResetOutlineLevelAttr();
630
638 SwTwips GetWidthOfLeadingTabs() const;
639
648 bool HasVisibleNumberingOrBullet() const;
649
650 void SetListId(OUString const& rListId);
651 OUString GetListId() const;
652
667 bool AreListLevelIndentsApplicable() const;
668
677 bool GetListTabStopPosition( tools::Long& nListTabStopPosition ) const;
678
684 OUString GetLabelFollowedBy() const;
685
686 // END OF BULLET/NUMBERING/OUTLINE STUFF:
687
688 void fillSoftPageBreakList( SwSoftPageBreakList& rBreak ) const;
689
690 LanguageType GetLang( const sal_Int32 nBegin, const sal_Int32 nLen = 0,
691 sal_uInt16 nScript = 0 ) const;
692
694 bool IsSymbolAt(sal_Int32 nBegin) const; // In itratr.cxx.
695 virtual SwContentNode* MakeCopy(SwDoc&, const SwNodeIndex&, bool bNewFrames) const override;
696
698 bool Hyphenate( SwInterHyphInfo &rHyphInf );
699 void DelSoftHyph( const sal_Int32 nStart, const sal_Int32 nEnd );
700
707 OUString GetExpandText( SwRootFrame const* pLayout,
708 const sal_Int32 nIdx = 0,
709 const sal_Int32 nLen = -1,
710 const bool bWithNum = false,
711 const bool bAddSpaceAfterListLabelStr = false,
712 const bool bWithSpacesForLevel = false,
713 const ExpandMode eAdditionalMode = ExpandMode::ExpandFootnote) const;
714 bool CopyExpandText( SwTextNode& rDestNd, const SwIndex* pDestIdx,
715 sal_Int32 nIdx, sal_Int32 nLen,
716 SwRootFrame const* pLayout,
717 bool bWithNum = false, bool bWithFootnote = true,
718 bool bReplaceTabsWithSpaces = false ) const;
719
720 OUString GetRedlineText() const;
721
724 sal_Int32 GetDropLen(sal_Int32 nWishLen) const;
725
727 bool GetDropSize(int& rFontHeight, int& rDropHeight, int& rDropDescent) const;
728
731 { return m_pSwpHints && m_pSwpHints->CalcHiddenParaField(); }
734 { if (m_pSwpHints) m_pSwpHints->SetCalcHiddenParaField(); }
735
738 { return m_pSwpHints && m_pSwpHints->IsHiddenByParaField(); }
739
741
742 bool HasHiddenCharAttribute( bool bWholePara ) const
743 {
744 if ( m_bRecalcHiddenCharFlags )
745 CalcHiddenCharFlags();
746 return bWholePara ? m_bHiddenCharsHidePara : m_bContainsHiddenChars;
747 }
748
750 { m_bRecalcHiddenCharFlags = true; }
751
757 bool IsHidden() const;
758
759
761 virtual void Update(
762 SwIndex const & rPos,
763 const sal_Int32 nChangeLen,
764 const bool bNegative = false,
765 const bool bDelete = false ) override;
766
768 void TransliterateText( utl::TransliterationWrapper& rTrans,
769 sal_Int32 nStart, sal_Int32 nEnd,
770 SwUndoTransliterate* pUndo, bool bUseRedlining = false );
771
773 bool CountWords( SwDocStat& rStat, sal_Int32 nStart, sal_Int32 nEnd ) const;
774
777 bool IsNotificationEnabled() const;
778
780 bool IsNotifiable() const;
781
782 void SetListRestart( bool bRestart );
783 bool IsListRestart() const;
784
785 void SetAttrListRestartValue( SwNumberTree::tSwNumTreeNumber nNum );
786 bool HasAttrListRestartValue() const;
787 SwNumberTree::tSwNumTreeNumber GetAttrListRestartValue() const;
788 SwNumberTree::tSwNumTreeNumber GetActualListStartValue() const;
789
790 void SetCountedInList( bool bCounted );
791 bool IsCountedInList() const;
792
793 void AddToList();
794 void AddToListRLHidden();
795 void AddToListOrig();
796 void RemoveFromList();
797 void RemoveFromListRLHidden();
798 void RemoveFromListOrig();
799 bool IsInList() const;
800
801 bool IsFirstOfNumRule(SwRootFrame const& rLayout) const;
802
803 SAL_DLLPRIVATE css::uno::WeakReference<css::text::XTextContent> const& GetXParagraph() const
804 { return m_wXParagraph; }
805 SAL_DLLPRIVATE void SetXParagraph(css::uno::Reference<css::text::XTextContent> const& xParagraph)
806 { m_wXParagraph = xParagraph; }
807
809 virtual ::sfx2::IXmlIdRegistry& GetRegistry() override;
810 virtual bool IsInClipboard() const override;
812 virtual bool IsInUndo() const override;
813 virtual bool IsInContent() const override;
814 virtual css::uno::Reference< css::rdf::XMetadatable > MakeUnoObject() override;
815
816 bool IsCollapse() const;
817
818 virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
819
820 sal_uInt32 GetRsid( sal_Int32 nStt, sal_Int32 nEnd ) const;
821 sal_uInt32 GetParRsid() const;
822
823 bool CompareRsid( const SwTextNode &rTextNode, sal_Int32 nStt1, sal_Int32 nStt2 ) const;
824 bool CompareParRsid( const SwTextNode &rTextNode ) const;
825
826 // Access to DrawingLayer FillAttributes in a preprocessed form for primitive usage
828
830 static bool IsIgnoredCharFormatForNumbering(const sal_uInt16 nWhich, bool bIsCharStyle = false);
831 void FormatDropNotify(const SwFormatDrop& rDrop) override
832 { TriggerNodeUpdate(sw::LegacyModifyHint(&rDrop, &rDrop)); };
833
834 void SetInSwUndo(bool bInUndo);
835};
836
838{
839 assert( m_pSwpHints );
840 return *m_pSwpHints;
841}
843{
844 assert( m_pSwpHints );
845 return *m_pSwpHints;
846}
847
849{
850 if ( !m_pSwpHints )
851 {
852 m_pSwpHints.reset(new SwpHints(*this));
853 }
854 return *m_pSwpHints;
855}
856
858{
859 if ( m_pSwpHints && m_pSwpHints->CanBeDeleted() )
860 {
861 m_pSwpHints.reset();
862 }
863}
864
866{
867 return const_cast<SwTextFormatColl*>(static_cast<const SwTextFormatColl*>(GetRegisteredIn()));
868}
869
872{
873 return SwNodeType::Text == m_nNodeType ? static_cast<SwTextNode*>(this) : nullptr;
874}
875
876inline const SwTextNode *SwNode::GetTextNode() const
877{
878 return SwNodeType::Text == m_nNodeType ? static_cast<const SwTextNode*>(this) : nullptr;
879}
880
881inline void
882SwTextNode::CutText(SwTextNode * const pDest, const SwIndex & rDestStart,
883 const SwIndex & rStart, const sal_Int32 nLen)
884{
885 CutImpl( pDest, rDestStart, rStart, nLen );
886}
887
888inline sal_Int32 SwTextNode::GetSpaceLeft() const
889{
890 // do not fill the String up to the max - need to be able to have a
891 // SwPosition "behind" the last character, i.e., at index TXTNODE_MAX + 1
892 const sal_Int32 TXTNODE_MAX = SAL_MAX_INT32 - 2;
893 return TXTNODE_MAX-m_Text.getLength();
894}
895
896/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OUString m_Text
struct _xmlTextWriter * xmlTextWriterPtr
const SwModify * GetRegisteredIn() const
Definition: calbck.hxx:164
SwContentFrame is the layout for content nodes: a common base class for text (paragraph) and non-text...
Definition: cntfrm.hxx:58
virtual void SwClientNotify(const SwModify &, const SfxHint &rHint) override
Definition: node.cxx:1099
virtual drawinglayer::attribute::SdrAllFillAttributesHelperPtr getSdrAllFillAttributesHelper() const
Definition: node.cxx:2086
virtual SwContentFrame * MakeFrame(SwFrame *pSib)=0
MakeFrame will be called for a certain layout pSib is another SwFrame of the same layout (e....
const SfxPoolItem & GetAttr(sal_uInt16 nWhich, bool bInParent=true) const
SS for PoolItems: hard attributation.
Definition: node.hxx:733
virtual SwContentNode * JoinNext()
Definition: node.cxx:1532
virtual bool SetAttr(const SfxPoolItem &)
made virtual
Definition: node.cxx:1566
virtual sal_Int32 Len() const
Definition: node.cxx:1237
virtual SwContentNode * MakeCopy(SwDoc &, const SwNodeIndex &, bool bNewFrames) const =0
virtual SwFormatColl * ChgFormatColl(SwFormatColl *)
Definition: node.cxx:1239
virtual bool ResetAttr(sal_uInt16 nWhich1, sal_uInt16 nWhich2=0)
Definition: node.cxx:1659
virtual sal_uInt16 ResetAllAttr()
Definition: node.cxx:1729
virtual void NewAttrSet(SwAttrPool &)=0
Make respective nodes create the specific AttrSets.
Definition: doc.hxx:188
Base class of all fields.
Definition: fldbas.hxx:292
If SwFormatDrop is a Client, it is the CharFormat that describes the font for the DropCaps.
Definition: paratr.hxx:63
Base class of the Writer layout elements.
Definition: frame.hxx:315
virtual void Update(SwIndex const &rPos, const sal_Int32 nChangeLen, const bool bNegative=false, const bool bDelete=false)
Definition: index.cxx:237
Marks a character position inside a document model node.
Definition: index.hxx:34
Marks a node in the document model.
Definition: ndindex.hxx:31
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:871
SwNodeType m_nNodeType
Definition: node.hxx:86
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
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:138
The root element of a Writer document layout.
Definition: rootfrm.hxx:82
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
Definition: txatbase.hxx:44
Represents the style of a paragraph.
Definition: fmtcol.hxx:59
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:163
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:84
OUString m_Text
Definition: ndtxt.hxx:100
bool IsEmptyListStyleDueToSetOutlineLevelAttr() const
Definition: ndtxt.hxx:627
void SetHiddenCharAttribute(bool bNewHiddenCharsHidePara, bool bNewContainsHiddenChars) const
Definition: ndtxt.hxx:156
sal_Int32 GetSpaceLeft() const
Definition: ndtxt.hxx:888
bool IsCalcHiddenCharFlags() const
Optimization: Asking for information about hidden characters at SwScriptInfo updates these flags.
Definition: ndtxt.hxx:154
bool CalcHiddenParaField()
Hidden Paragraph Field:
Definition: ndtxt.hxx:730
bool m_bRecalcHiddenCharFlags
The last two flags have to be recalculated if this flag is set:
Definition: ndtxt.hxx:110
SwpHints & GetOrCreateSwpHints()
Definition: ndtxt.hxx:848
void CutText(SwTextNode *const pDest, const SwIndex &rStart, const sal_Int32 nLen)
Definition: ndtxt.cxx:2416
SAL_DLLPRIVATE css::uno::WeakReference< css::text::XTextContent > const & GetXParagraph() const
Definition: ndtxt.hxx:803
std::unique_ptr< SwNodeNum > mpNodeNum
Numbering for this paragraph.
Definition: ndtxt.hxx:96
bool IsHiddenByParaField() const
is the paragraph visible?
Definition: ndtxt.hxx:737
void TryDeleteSwpHints()
Definition: ndtxt.hxx:857
std::optional< OUString > m_oNumStringCache
Definition: ndtxt.hxx:125
std::unique_ptr< SwpHints > m_pSwpHints
May be 0.
Definition: ndtxt.hxx:94
void FormatDropNotify(const SwFormatDrop &rDrop) override
Definition: ndtxt.hxx:831
bool HasHints() const
Definition: ndtxt.hxx:230
bool m_bContainsHiddenChars
Some of the chars this para are hidden.
Definition: ndtxt.hxx:106
void SetCalcHiddenCharFlags() const
Definition: ndtxt.hxx:749
SwpHints & GetSwpHints()
getters for SwpHints
Definition: ndtxt.hxx:837
bool m_bHiddenCharsHidePara
The whole paragraph is hidden because of the hidden text attribute.
Definition: ndtxt.hxx:108
bool m_bInUndo
Is an undo operation in progress?
Definition: ndtxt.hxx:123
css::uno::WeakReference< css::text::XTextContent > m_wXParagraph
Definition: ndtxt.hxx:127
bool m_bLastOutlineState
Definition: ndtxt.hxx:112
SAL_DLLPRIVATE void CutImpl(SwTextNode *const pDest, const SwIndex &rDestStart, const SwIndex &rStart, sal_Int32 nLen, const bool bUpdate=true)
Definition: ndtxt.cxx:2424
drawinglayer::attribute::SdrAllFillAttributesHelperPtr maFillAttributes
Definition: ndtxt.hxx:130
void SetCalcHiddenParaField()
set CalcVisible flags
Definition: ndtxt.hxx:733
SAL_DLLPRIVATE void SetXParagraph(css::uno::Reference< css::text::XTextContent > const &xParagraph)
Definition: ndtxt.hxx:805
bool mbEmptyListStyleSetDueToSetOutlineLevelAttr
Definition: ndtxt.hxx:115
const SwpHints * GetpSwpHints() const
Definition: ndtxt.hxx:229
SwParaIdleData_Impl * m_pParaIdleData_Impl
Definition: ndtxt.hxx:102
SwpHints * GetpSwpHints()
Definition: ndtxt.hxx:228
const OUString & GetText() const
Definition: ndtxt.hxx:220
bool mbInSetOrResetAttr
boolean, indicating that a <SetAttr(..)> or <ResetAttr(..)> or <ResetAllAttr(..)> method is running.
Definition: ndtxt.hxx:120
bool HasHiddenCharAttribute(bool bWholePara) const
Hidden Paragraph Field:
Definition: ndtxt.hxx:742
GetTextAttrMode
Definition: ndtxt.hxx:370
@ EXPAND
DEFAULT: (Start <= nIndex < End)
Definition: ndtxt.hxx:372
@ PARENT
EXPAND : (Start < nIndex <= End)
Definition: ndtxt.hxx:373
bool m_bNotifiable
Definition: ndtxt.hxx:113
std::unique_ptr< SwNodeNum > mpNodeNumOrig
Numbering for this paragraph (before changes)
Definition: ndtxt.hxx:98
SwTextFormatColl * GetTextColl() const
Definition: ndtxt.hxx:865
std::unique_ptr< SwNodeNum > mpNodeNumRLHidden
Numbering for this paragraph (hidden redlines)
Definition: ndtxt.hxx:97
An SwTextAttr container, stores all directly formatted text portions for a text node.
Definition: ndhints.hxx:68
virtual css::uno::Reference< css::rdf::XMetadatable > MakeUnoObject()=0
virtual bool IsInClipboard() const=0
virtual bool IsInUndo() const=0
virtual bool IsInContent() const=0
virtual ::sfx2::IXmlIdRegistry & GetRegistry()=0
constexpr OUStringLiteral IsHidden(u"IsHidden")
SwFieldIds
Definition: fldbas.hxx:45
constexpr sal_uInt16 RES_TXTATR_END(RES_TXTATR_NOEND_END)
SwListRedlineType
Definition: list.hxx:33
ExpandMode
Some helpers for converting model strings to view strings.
tools::Long tSwNumTreeNumber
std::vector< tSwNumTreeNumber > tNumberVector
SwNumRule * GetNumRule(SwTextFormatColl &rTextFormatColl)
determines the list style, which directly set at the given paragraph style
Definition: fmtcol.cxx:76
@ Sequence
std::shared_ptr< SdrAllFillAttributesHelper > SdrAllFillAttributesHelperPtr
Definition: format.hxx:41
RestoreMode
Definition: mvsave.hxx:72
long Long
o3tl::sorted_vector< sal_Int32 > SwSoftPageBreakList
Definition: ndtxt.hxx:77
sal_uIntPtr sal_uLong
static LanguageType nLang
Definition: srtdlg.cxx:51
Marks a position in the document model.
Definition: pam.hxx:37
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
SetAttrMode
Definition: swtypes.hxx:133
tools::Long SwTwips
Definition: swtypes.hxx:51
constexpr sal_uInt8 MAXLEVEL
Definition: swtypes.hxx:92
#define SAL_MAX_INT32