64 for(
auto n = rSectFormats.
size();
n; )
66 const SwSection* pSect = rSectFormats[ --
n ]->GetGlobalDocSection();
69 std::unique_ptr<SwGlblDocContent> pNew;
75 assert(
dynamic_cast<const SwTOXBaseSection*
>( pSect) &&
"no TOXBaseSection!" );
84 rArr.
insert( std::move(pNew) );
96 for( ; nSttIdx < rNew.
GetDocPos(); ++nSttIdx )
97 if( ( pNd = pMyDoc->
GetNodes()[ nSttIdx ])->IsContentNode()
101 if( rArr.
insert( std::move(pNew) ).second )
115 for( ; nSttIdx < nNdEnd; ++nSttIdx )
116 if( ( pNd = pMyDoc->
GetNodes()[ nSttIdx ])->IsContentNode()
119 rArr.
insert( std::make_unique<SwGlblDocContent>( nSttIdx ) );
127 rArr.
insert( std::move(pNew) );
147 bool bEndUndo =
false;
184 bool bEndUndo =
false;
247 if( 1 == rArr.
size() )
262 if( ++nDelPos < rArr.
size() )
263 rPos.
Assign(rArr[ nDelPos ]->GetDocPos(), -1);
291 size_t nFromPos,
size_t nToPos,
295 nFromPos >= rArr.
size() || nToPos > rArr.
size() ||
296 nInsPos > rArr.
size() || nFromPos >= nToPos ||
297 ( nFromPos <= nInsPos && nInsPos <= nToPos ) )
309 if( nToPos < rArr.
size() )
310 aRg.
aEnd = rArr[ nToPos ]->GetDocPos();
315 if( nInsPos < rArr.
size() )
316 aInsPos = rArr[ nInsPos ]->GetDocPos();
353 m_PTR.pTOX =
nullptr;
@ GLOBAL_DOCUMENT_SAVE_LINKS
virtual bool AppendTextNode(SwPosition &rPos)=0
virtual bool MoveNodeRange(SwNodeRange &, SwNode &, SwMoveFlags)=0
virtual bool DelFullPara(SwPaM &)=0
Delete full paragraphs.
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
virtual void set(DocumentSettingId id, bool value)=0
Set the specified document setting.
virtual void SetModified()=0
Must be called manually at changes of format.
SwCursor * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
void EndCursorMove(const bool bIdleEnd=false)
SwSectionFormats & GetSections()
bool DeleteTOX(const SwTOXBase &rTOXBase, bool bDelNodes)
Delete table of contents.
IDocumentState const & getIDocumentState() const
IDocumentContentOperations const & getIDocumentContentOperations() const
IDocumentUndoRedo & GetIDocumentUndoRedo()
void DelSectionFormat(SwSectionFormat *pFormat, bool bDelNodes=false)
void StartAllAction()
For all views of this document.
void GotoGlobalDocContent(const SwGlblDocContent &rPos)
bool IsModified() const
Changes in document?
SwSection const * InsertSection(SwSectionData &rNewData, SfxItemSet const *const =nullptr)
void SetGlblDocSaveLinks(bool bFlag)
SwUndoId StartUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
bool Delete(bool isArtificialSelection=false)
Delete content of all ranges.
void DeleteGlobalDocContent(const SwGlblDocContents &rArr, size_t nPos)
void InsertTableOf(const SwTOXBase &rTOX, const SfxItemSet *pSet=nullptr)
Insert content table. Renew if required.
void InsertGlobalDocContent(const SwGlblDocContent &rPos, SwSectionData &rNew)
bool IsGlblDocSaveLinks() const
bool MoveGlobalDocContent(const SwGlblDocContents &rArr, size_t nFromPos, size_t nToPos, size_t nNewPos)
SwUndoId EndUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Closes parenthesis of nUndoId, not used by UI.
void GetGlobalDocContent(SwGlblDocContents &rArr) const
bool IsGlobalDoc() const
Interfaces for GlobalDocument.
const SwSection * GetSection() const
GlobalDocContentType m_eType
SwGlblDocContent(SwNodeOffset nPos)
GlobalDocContentType GetType() const
Query contents.
union SwGlblDocContent::@22 m_PTR
const SwTOXBase * GetTOX() const
SwNodeOffset GetDocPos() const
Marks a node in the document model.
Base class of the Writer document model elements.
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
SwNodeOffset GetIndex() const
bool IsSectionNode() const
SwContentNode * GetContentNode()
SwNode & GetEndOfExtras() const
This is the last EndNode of a special section.
SwNode & GetEndOfContent() const
Regular ContentSection (i.e. the BodyText).
SwContentNode * GoNext(SwNodeIndex *) const
PaM is Point and Mark: a selection of the document model.
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
const SwPosition * GetPoint() const
A section node represents the start of a section on the UI, i.e.
SwSectionFormat * GetFormat()
SectionType GetType() const
SwTextNode is a paragraph in the document model.
const OUString & GetText() const
const IDocumentSettingAccess & getIDocumentSettingAccess() const
Provides access to the document setting interface.
std::vector< Value >::size_type size_type
std::pair< const_iterator, bool > insert(Value &&x)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
o3tl::strong_int< sal_Int32, struct Tag_SwNodeOffset > SwNodeOffset
Marks a position in the document model.
void Adjust(SwNodeOffset nDelta)
Adjust node position, and resets content position to zero.
void Assign(const SwNode &rNd, SwNodeOffset nDelta, sal_Int32 nContentOffset=0)
These all set both nNode and nContent.
SwNodeOffset GetNodeIndex() const