LibreOffice Module sw (master)  1
doc.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_DOC_HXX
20 #define INCLUDED_SW_INC_DOC_HXX
21 
22 // SwDoc interfaces
23 #include <o3tl/deleter.hxx>
24 #include <o3tl/typed_flags_set.hxx>
25 #include <o3tl/sorted_vector.hxx>
26 #include <vcl/idle.hxx>
27 #include "swdllapi.h"
28 #include "swtypes.hxx"
29 #include "toxe.hxx"
30 #include "flyenum.hxx"
31 #include "flypos.hxx"
32 #include "swdbdata.hxx"
33 #include <sfx2/objsh.hxx>
34 #include <svl/style.hxx>
35 #include <editeng/numitem.hxx>
36 #include "tox.hxx"
37 #include "frmfmt.hxx"
38 #include "charfmt.hxx"
39 #include "docary.hxx"
40 #include "pagedesc.hxx"
41 #include "tblenum.hxx"
42 #include "ndarr.hxx"
43 #include "ndtyp.hxx"
44 #include <memory>
45 #include <mutex>
46 #include <set>
47 #include <tuple>
48 #include <unordered_map>
49 #include <vector>
50 
51 namespace editeng { class SvxBorderLine; }
52 
53 class SwExtTextInput;
54 class EditFieldInfo;
55 class Outliner;
56 class OutputDevice;
57 class Point;
58 class SbxArray;
59 class SdrObject;
60 class SdrUndoAction;
61 class SvNumberFormatter;
62 class SvxMacro;
63 class SwAutoCompleteWord;
65 class SwCellFrame;
66 class SwCellStyleTable;
67 class SwCursorShell;
68 class SwCursor;
69 class SwDocShell;
70 class SwDrawView;
71 class SwEditShell;
72 class SwFormat;
73 class SwFormatINetFormat;
74 class SwFormatRefMark;
75 class SwFootnoteIdxs;
76 class SwFootnoteInfo;
77 class SwEndNoteInfo;
78 class SwLineNumberInfo;
79 class SwDBManager;
80 class SwNodeIndex;
81 class SwNodeRange;
82 class SwNumRule;
84 class SwRootFrame;
85 class SwRubyListEntry;
86 class SwSectionFormat;
87 class SwSectionData;
88 class SwSelBoxes;
90 class SwTOXBaseSection;
91 class SwTabCols;
92 class SwTable;
93 class SwTableAutoFormat;
94 class SwTableBox;
95 class SwTableBoxFormat;
96 class SwTableFormat;
97 class SwTableLineFormat;
98 class SwTableNode;
99 class SwTextBlocks;
100 class SwURLStateChanged;
101 class SwUnoCursor;
102 class SwViewShell;
103 class SwDrawContact;
104 class SdrView;
105 class SdrMarkList;
106 class SwAuthEntry;
107 class SwLayoutCache;
108 class IStyleAccess;
109 struct SwCallMouseEvent;
110 struct SwDocStat;
111 struct SwSortOptions;
112 struct SwDefTOXBase_Impl;
113 class SwPrintUIOptions;
114 struct SwConversionArgs;
115 class IGrammarContact;
116 class SwRenderData;
117 class IDocumentUndoRedo;
124 class IDocumentListItems;
129 class IDocumentStatistics;
130 class IDocumentState;
134 class IDocumentMarkAccess;
135 class SetGetExpFields;
136 struct SwInsertTableOptions;
137 enum class SvMacroItemId : sal_uInt16;
138 enum class SvxFrameDirection;
139 enum class RndStdIds;
140 
141 namespace sw::mark { class MarkManager; }
142 namespace sw {
143  enum class RedlineMode;
144  enum class FieldmarkMode;
145  class MetaFieldManager;
146  class UndoManager;
147  class IShellCursorSupplier;
148  class DocumentSettingManager;
149  class DocumentDeviceManager;
150  class DocumentDrawModelManager;
151  class DocumentChartDataProviderManager;
152  class DocumentTimerManager;
153  class DocumentLinksAdministrationManager;
154  class DocumentListItemsManager;
155  class DocumentListsManager;
156  class DocumentOutlineNodesManager;
157  class DocumentContentOperationsManager;
158  class DocumentRedlineManager;
159  class DocumentFieldsManager;
160  class DocumentStatisticsManager;
161  class DocumentStateManager;
162  class DocumentLayoutManager;
163  class DocumentStylePoolManager;
164  class DocumentExternalDataManager;
165 }
166 
167 namespace com::sun::star {
168  namespace container {
169  class XNameContainer; //< for getXForms()/isXForms()/initXForms() methods
170  }
171  namespace embed { class XStorage; }
172  namespace linguistic2 { class XHyphenatedWord; }
173  namespace linguistic2 { class XProofreadingIterator; }
174  namespace linguistic2 { class XSpellChecker1; }
175  namespace script::vba { class XVBAEventProcessor; }
176 }
177 
178 namespace sfx2 {
179  class IXmlIdRegistry;
180 }
181 
182 void SetAllScriptItem( SfxItemSet& rSet, const SfxPoolItem& rItem );
183 
184 using SwRubyList = std::vector<std::unique_ptr<SwRubyListEntry>>;
185 
186 // Represents the model of a Writer document.
187 class SW_DLLPUBLIC SwDoc final
188 {
189  friend class ::sw::DocumentContentOperationsManager;
190 
191  friend void InitCore();
192  friend void FinitCore();
193 
194  // private Member
195  std::unique_ptr<SwNodes> m_pNodes; //< document content (Nodes Array)
196  SwAttrPool* mpAttrPool; //< the attribute pool
197  SwPageDescs m_PageDescs; //< PageDescriptors
198  Link<bool,void> maOle2Link; //< OLE 2.0-notification
199  /* @@@MAINTAINABILITY-HORROR@@@
200  Timer should not be members of the model
201  */
202  Idle maOLEModifiedIdle; //< Timer for update modified OLE-Objects
203  SwDBData maDBData; //< database descriptor
204  OUString msTOIAutoMarkURL; //< URL of table of index AutoMark file
205  std::vector<OUString> m_PatternNames; //< Array for names of document-templates
206  css::uno::Reference<css::container::XNameContainer>
207  mxXForms; //< container with XForms models
208  mutable css::uno::Reference< css::linguistic2::XProofreadingIterator > m_xGCIterator;
209 
210  const std::unique_ptr< ::sw::mark::MarkManager> mpMarkManager;
211  const std::unique_ptr< ::sw::MetaFieldManager > m_pMetaFieldManager;
212  const std::unique_ptr< ::sw::DocumentDrawModelManager > m_pDocumentDrawModelManager;
213  const std::unique_ptr< ::sw::DocumentRedlineManager > m_pDocumentRedlineManager;
214  const std::unique_ptr< ::sw::DocumentStateManager > m_pDocumentStateManager;
215  const std::unique_ptr< ::sw::UndoManager > m_pUndoManager;
216  const std::unique_ptr< ::sw::DocumentSettingManager > m_pDocumentSettingManager;
217  const std::unique_ptr< ::sw::DocumentChartDataProviderManager > m_pDocumentChartDataProviderManager;
218  std::unique_ptr< ::sw::DocumentDeviceManager > m_pDeviceAccess;
219  const std::unique_ptr< ::sw::DocumentTimerManager > m_pDocumentTimerManager;
220  const std::unique_ptr< ::sw::DocumentLinksAdministrationManager > m_pDocumentLinksAdministrationManager;
221  const std::unique_ptr< ::sw::DocumentListItemsManager > m_pDocumentListItemsManager;
222  const std::unique_ptr< ::sw::DocumentListsManager > m_pDocumentListsManager;
223  const std::unique_ptr< ::sw::DocumentOutlineNodesManager > m_pDocumentOutlineNodesManager;
224  const std::unique_ptr< ::sw::DocumentContentOperationsManager > m_pDocumentContentOperationsManager;
225  const std::unique_ptr< ::sw::DocumentFieldsManager > m_pDocumentFieldsManager;
226  const std::unique_ptr< ::sw::DocumentStatisticsManager > m_pDocumentStatisticsManager;
227  const std::unique_ptr< ::sw::DocumentLayoutManager > m_pDocumentLayoutManager;
228  const std::unique_ptr< ::sw::DocumentStylePoolManager > m_pDocumentStylePoolManager;
229  const std::unique_ptr< ::sw::DocumentExternalDataManager > m_pDocumentExternalDataManager;
230 
231  // Pointer
232  std::unique_ptr<SwFrameFormat> mpDfltFrameFormat; //< Default formats.
233  std::unique_ptr<SwFrameFormat> mpEmptyPageFormat; //< Format for the default empty page
234  std::unique_ptr<SwFrameFormat> mpColumnContFormat; //< Format for column container
235  std::unique_ptr<SwCharFormat> mpDfltCharFormat;
236  std::unique_ptr<SwTextFormatColl> mpDfltTextFormatColl; //< Defaultformatcollections
237  std::unique_ptr<SwGrfFormatColl> mpDfltGrfFormatColl;
238 
239  std::unique_ptr<SwFrameFormats> mpFrameFormatTable; //< Format table
240  std::unique_ptr<SwCharFormats> mpCharFormatTable;
241  std::unique_ptr<SwFrameFormats> mpSpzFrameFormatTable;
242  std::unique_ptr<SwSectionFormats> mpSectionFormatTable;
243  std::unique_ptr<SwFrameFormats> mpTableFrameFormatTable; //< For tables
244  std::unique_ptr<SwTextFormatColls> mpTextFormatCollTable; //< FormatCollections
245  std::unique_ptr<SwGrfFormatColls> mpGrfFormatCollTable;
246 
247  std::unique_ptr<SwTOXTypes> mpTOXTypes; //< Tables/indices
248  std::unique_ptr<SwDefTOXBase_Impl> mpDefTOXBases; //< defaults of SwTOXBase's
249 
250  std::unique_ptr<SwDBManager, o3tl::default_delete<SwDBManager>> m_pOwnDBManager; //< own DBManager
251  SwDBManager * m_pDBManager; //< DBManager for evaluation of DB-fields.
252 
254  std::unique_ptr<SwFootnoteInfo> mpFootnoteInfo;
255  std::unique_ptr<SwEndNoteInfo> mpEndNoteInfo;
256  std::unique_ptr<SwLineNumberInfo> mpLineNumberInfo;
257  std::unique_ptr<SwFootnoteIdxs> mpFootnoteIdxs;
258 
259  SwDocShell *mpDocShell; //< Ptr to SfxDocShell of Doc.
260  SfxObjectShellLock mxTmpDocShell; //< A temporary shell that is used to copy OLE-Nodes
261 
262  std::unique_ptr<SwAutoCorrExceptWord> mpACEWord;
264  std::unique_ptr<SwURLStateChanged> mpURLStateChgd; //< SfxClient for changes in INetHistory
265 
267  SvNumberFormatter* mpNumberFormatter; //< NumFormatter for tables / fields
268 
269  mutable std::unique_ptr<SwNumRuleTable> mpNumRuleTable; //< List of all named NumRules.
270 
271  // Hash map to find numrules by name
272  mutable std::unordered_map<OUString, SwNumRule *> maNumRuleMap;
273 
274  std::unique_ptr<SwPagePreviewPrtData> m_pPgPViewPrtData; //< Indenting / spacing for printing of page view.
276 
277  std::unique_ptr<IStyleAccess> mpStyleAccess; //< handling of automatic styles
278  std::unique_ptr<SwLayoutCache> mpLayoutCache;
281  std::unique_ptr<IGrammarContact> mpGrammarContact; //< for grammar checking in paragraphs during editing
282 
283  css::uno::Reference< css::script::vba::XVBAEventProcessor > mxVbaEvents;
284  css::uno::Reference<css::container::XNameContainer> m_xTemplateToProjectCache;
285 
287  std::unique_ptr<SwTableAutoFormatTable> m_pTableStyles;
289  std::unique_ptr<SwCellStyleTable> mpCellStyles;
290 private:
291  std::unique_ptr< ::sfx2::IXmlIdRegistry > m_pXmlIdRegistry;
292 
293  // other
294 
295  sal_uInt32 mnRsid; //< current session ID of the document
296  sal_uInt32 mnRsidRoot; //< session ID when the document was created
297 
298  oslInterlockedCount mReferenceCount;
299 
300  bool mbDtor : 1;
304  bool mbCopyIsMove : 1; //< TRUE: Copy is a hidden Move.
305  bool mbInReading : 1; //< TRUE: Document is in the process of being read.
306  bool mbInWriting : 1; //< TRUE: Document is in the process of being written.
307  bool mbInMailMerge : 1; //< TRUE: Document is in the process of being written by mail merge.
308  bool mbInXMLImport : 1; //< TRUE: During xml import, attribute portion building is not necessary.
309  bool mbInWriterfilterImport : 1; //< TRUE: writerfilter import (DOCX,RTF)
310  bool mbUpdateTOX : 1; //< TRUE: After loading document, update TOX.
311  bool mbInLoadAsynchron : 1; //< TRUE: Document is in the process of being loaded asynchronously.
312  bool mbIsAutoFormatRedline : 1; //< TRUE: Redlines are recorded by Autoformat.
313  bool mbOLEPrtNotifyPending : 1;
315  bool mbAllOLENotify : 1; //< True: Notification of all objects is required.
316  bool mbInsOnlyTextGlssry : 1; //< True: insert 'only text' glossary into doc
317  bool mbContains_MSVBasic : 1; //< True: MS-VBasic exist is in our storage
318  bool mbClipBoard : 1; //< TRUE: this document represents the clipboard
319  bool mbColumnSelection : 1; //< TRUE: this content has been created by a column selection (clipboard docs only)
320  bool mbIsPrepareSelAll : 1;
321 
322  enum MissingDictionary { False = -1, Undefined = 0, True = 1 };
324 
325  // true: Document contains at least one anchored object, which is anchored AT_PAGE with a content position.
326  // Thus, certain adjustment needed during formatting for these kind of anchored objects.
327  bool mbContainsAtPageObjWithContentAnchor : 1;
328 
329  static SwAutoCompleteWord *s_pAutoCompleteWords; //< List of all words for AutoComplete
330 
331  // private methods
332  SwFlyFrameFormat* MakeFlySection_( const SwPosition& rAnchPos,
333  const SwContentNode& rNode, RndStdIds eRequestId,
334  const SfxItemSet* pFlyAttrSet,
335  SwFrameFormat* );
336  sal_Int8 SetFlyFrameAnchor( SwFrameFormat& rFlyFormat, SfxItemSet& rSet, bool bNewFrames );
337 
338  typedef SwFormat* (SwDoc::*FNCopyFormat)( const OUString&, SwFormat*, bool, bool );
339  SwFormat* CopyFormat( const SwFormat& rFormat, const SwFormatsBase& rFormatArr,
340  FNCopyFormat fnCopyFormat, const SwFormat& rDfltFormat );
341  void CopyFormatArr( const SwFormatsBase& rSourceArr, SwFormatsBase const & rDestArr,
342  FNCopyFormat fnCopyFormat, SwFormat& rDfltFormat );
343  void CopyPageDescHeaderFooterImpl( bool bCpyHeader,
344  const SwFrameFormat& rSrcFormat, SwFrameFormat& rDestFormat );
345 
346  SwDoc( const SwDoc &) = delete;
347 
348  // Database fields:
349  void AddUsedDBToList( std::vector<OUString>& rDBNameList,
350  const std::vector<OUString>& rUsedDBNames );
351  void AddUsedDBToList( std::vector<OUString>& rDBNameList, const OUString& rDBName );
352  static bool IsNameInArray( const std::vector<OUString>& rOldNames, const OUString& rName );
353  void GetAllDBNames( std::vector<OUString>& rAllDBNames );
354  static OUString ReplaceUsedDBs( const std::vector<OUString>& rUsedDBNames,
355  const OUString& rNewName, const OUString& rFormula );
356  static std::vector<OUString>& FindUsedDBs( const std::vector<OUString>& rAllDBNames,
357  const OUString& rFormula,
358  std::vector<OUString>& rUsedDBNames );
359 
360  void EnsureNumberFormatter(); // must be called with mNumberFormatterMutex locked
361 
362  bool UnProtectTableCells( SwTable& rTable );
363 
366  bool SplitDoc( sal_uInt16 eDocType, const OUString& rPath, bool bOutline,
367  const SwTextFormatColl* pSplitColl, int nOutlineLevel = 0 );
368 
369  // Update charts of given table.
370  void UpdateCharts_( const SwTable& rTable, SwViewShell const & rVSh ) const;
371 
372  static bool SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rRubyEntry );
373 
374  // CharTimer calls this method.
375  void DoUpdateAllCharts();
376  DECL_LINK( DoUpdateModifiedOLE, Timer *, void );
377 
378 public:
379  SwFormat *MakeCharFormat_(const OUString &, SwFormat *, bool, bool );
380  SwFormat *MakeFrameFormat_(const OUString &, SwFormat *, bool, bool );
381 
382 private:
383  SwFormat *MakeTextFormatColl_(const OUString &, SwFormat *, bool, bool );
384 
385 private:
386  OUString msDocAccTitle;
387 
388  void InitTOXTypes();
389 
390 public:
393  DOCTYPE_MSWORD // This doc model comes from MS Word
394  };
396  DocumentType GetDocumentType() const { return meDocType; }
397  void SetDocumentType( DocumentType eDocType ) { meDocType = eDocType; }
398 
399  // Life cycle
400  SwDoc();
401  ~SwDoc();
402 
403  bool IsInDtor() const { return mbDtor; }
404 
405  /* @@@MAINTAINABILITY-HORROR@@@
406  Implementation details made public.
407  */
408  SwNodes & GetNodes() { return *m_pNodes; }
409  SwNodes const& GetNodes() const { return *m_pNodes; }
410 
411 private:
412  friend class ::rtl::Reference<SwDoc>;
413 
421  sal_Int32 acquire();
430  sal_Int32 release();
434 public:
435  sal_Int32 getReferenceCount() const;
436 
437  // IDocumentSettingAccess
438  IDocumentSettingAccess const & getIDocumentSettingAccess() const; //The IDocumentSettingAccess interface
439  IDocumentSettingAccess & getIDocumentSettingAccess();
440  ::sw::DocumentSettingManager & GetDocumentSettingManager(); //The implementation of the interface with some additional methods
441  ::sw::DocumentSettingManager const& GetDocumentSettingManager() const;
442  sal_uInt32 getRsid() const;
443  void setRsid( sal_uInt32 nVal );
444  sal_uInt32 getRsidRoot() const;
445  void setRsidRoot( sal_uInt32 nVal );
446 
447  // IDocumentDeviceAccess
448  IDocumentDeviceAccess const & getIDocumentDeviceAccess() const;
449  IDocumentDeviceAccess & getIDocumentDeviceAccess();
450 
451  // IDocumentMarkAccess
452  IDocumentMarkAccess* getIDocumentMarkAccess();
453  const IDocumentMarkAccess* getIDocumentMarkAccess() const;
454 
455  // IDocumentRedlineAccess
456  IDocumentRedlineAccess const& getIDocumentRedlineAccess() const;
457  IDocumentRedlineAccess& getIDocumentRedlineAccess();
458 
459  ::sw::DocumentRedlineManager const& GetDocumentRedlineManager() const;
460  ::sw::DocumentRedlineManager& GetDocumentRedlineManager();
461 
462  // IDocumentUndoRedo
463  IDocumentUndoRedo & GetIDocumentUndoRedo();
464  IDocumentUndoRedo const& GetIDocumentUndoRedo() const;
465 
466  // IDocumentLinksAdministration
467  IDocumentLinksAdministration const & getIDocumentLinksAdministration() const;
468  IDocumentLinksAdministration & getIDocumentLinksAdministration();
469 
470  ::sw::DocumentLinksAdministrationManager const & GetDocumentLinksAdministrationManager() const;
471  ::sw::DocumentLinksAdministrationManager & GetDocumentLinksAdministrationManager();
472 
473  // IDocumentFieldsAccess
474  IDocumentFieldsAccess const & getIDocumentFieldsAccess() const;
475  IDocumentFieldsAccess & getIDocumentFieldsAccess();
476 
477  ::sw::DocumentFieldsManager & GetDocumentFieldsManager();
478 
479  // Returns 0 if the field cannot hide para, or a positive integer indicating the field type
480  // "weight" when several hiding fields' FieldHidesPara() give conflicting results
481  int FieldCanHideParaWeight(SwFieldIds eFieldId) const;
482  bool FieldHidesPara(const SwField& rField) const;
483 
484  // IDocumentContentOperations
485  IDocumentContentOperations const & getIDocumentContentOperations() const;
486  IDocumentContentOperations & getIDocumentContentOperations();
487  ::sw::DocumentContentOperationsManager const & GetDocumentContentOperationsManager() const;
488  ::sw::DocumentContentOperationsManager & GetDocumentContentOperationsManager();
489 
490  bool UpdateParRsid( SwTextNode *pTextNode, sal_uInt32 nVal = 0 );
491  void UpdateRsid( const SwPaM &rRg, sal_Int32 nLen );
492 
493  // IDocumentStylePoolAccess
494  IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const;
495  IDocumentStylePoolAccess & getIDocumentStylePoolAccess();
496 
497  // SwLineNumberInfo
498  const SwLineNumberInfo& GetLineNumberInfo() const;
499  void SetLineNumberInfo(const SwLineNumberInfo& rInfo);
500 
501  // IDocumentStatistics
502  IDocumentStatistics const & getIDocumentStatistics() const;
503  IDocumentStatistics & getIDocumentStatistics();
504 
505  ::sw::DocumentStatisticsManager const & GetDocumentStatisticsManager() const;
506  ::sw::DocumentStatisticsManager & GetDocumentStatisticsManager();
507 
508  // IDocumentState
509  IDocumentState const & getIDocumentState() const;
510  IDocumentState & getIDocumentState();
511 
512  // IDocumentDrawModelAccess
513  void AddDrawUndo( std::unique_ptr<SdrUndoAction> );
514  IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const;
515  IDocumentDrawModelAccess & getIDocumentDrawModelAccess();
516 
517  ::sw::DocumentDrawModelManager const & GetDocumentDrawModelManager() const;
518  ::sw::DocumentDrawModelManager & GetDocumentDrawModelManager();
519 
520  // IDocumentLayoutAccess
521  IDocumentLayoutAccess const & getIDocumentLayoutAccess() const;
522  IDocumentLayoutAccess & getIDocumentLayoutAccess();
523 
524  ::sw::DocumentLayoutManager const & GetDocumentLayoutManager() const;
525  ::sw::DocumentLayoutManager & GetDocumentLayoutManager();
526 
527  // IDocumentTimerAccess
528  // Our own 'IdleTimer' calls the following method
529  IDocumentTimerAccess const & getIDocumentTimerAccess() const;
530  IDocumentTimerAccess & getIDocumentTimerAccess();
531 
532  // IDocumentChartDataProviderAccess
533  IDocumentChartDataProviderAccess const & getIDocumentChartDataProviderAccess() const;
534  IDocumentChartDataProviderAccess & getIDocumentChartDataProviderAccess();
535 
536  // IDocumentListItems
537  IDocumentListItems const & getIDocumentListItems() const;
538  IDocumentListItems & getIDocumentListItems();
539 
540  // IDocumentOutlineNodes
541  IDocumentOutlineNodes const & getIDocumentOutlineNodes() const;
542  IDocumentOutlineNodes & getIDocumentOutlineNodes();
543 
544  // IDocumentListsAccess
545  IDocumentListsAccess const & getIDocumentListsAccess() const;
546  IDocumentListsAccess & getIDocumentListsAccess();
547 
548  //IDocumentExternalData
549  IDocumentExternalData const & getIDocumentExternalData() const;
550  IDocumentExternalData & getIDocumentExternalData();
551 
552  //End of Interfaces
553 
554  void setDocAccTitle( const OUString& rTitle ) { msDocAccTitle = rTitle; }
555  const OUString& getDocAccTitle() const { return msDocAccTitle; }
556 
557  // INextInterface here
558  DECL_LINK(CalcFieldValueHdl, EditFieldInfo*, void);
559 
560  // OLE ???
561  bool IsOLEPrtNotifyPending() const { return mbOLEPrtNotifyPending; }
562  inline void SetOLEPrtNotifyPending( bool bSet = true );
563  void PrtOLENotify( bool bAll ); // All or only marked
564 
565  bool IsPrepareSelAll() const { return mbIsPrepareSelAll; }
566  void SetPrepareSelAll() { mbIsPrepareSelAll = true; }
567 
568  void SetContainsAtPageObjWithContentAnchor( const bool bFlag )
569  {
570  mbContainsAtPageObjWithContentAnchor = bFlag;
571  }
573  {
574  return mbContainsAtPageObjWithContentAnchor;
575  }
576 
582  SwPosFlyFrames GetAllFlyFormats( const SwPaM*,
583  bool bDrawAlso,
584  bool bAsCharAlso = false ) const;
585 
586  SwFlyFrameFormat *MakeFlyFrameFormat (const OUString &rFormatName, SwFrameFormat *pDerivedFrom);
587  SwDrawFrameFormat *MakeDrawFrameFormat(const OUString &rFormatName, SwFrameFormat *pDerivedFrom);
588 
589  // From now on this interface has to be used for Flys.
590  // pAnchorPos must be set, if they are not attached to pages AND
591  // Anchor is not already set at valid ContentPos
592  // in FlySet/FrameFormat.
593  /* new parameter bCalledFromShell
594 
595  true: An existing adjust item at pAnchorPos is propagated to
596  the content node of the new fly section. That propagation only
597  takes place if there is no adjust item in the paragraph style
598  for the new fly section.
599 
600  false: no propagation
601  */
602  SwFlyFrameFormat* MakeFlySection( RndStdIds eAnchorType,
603  const SwPosition* pAnchorPos,
604  const SfxItemSet* pSet = nullptr,
605  SwFrameFormat *pParent = nullptr,
606  bool bCalledFromShell = false );
607  SwFlyFrameFormat* MakeFlyAndMove( const SwPaM& rPam, const SfxItemSet& rSet,
608  const SwSelBoxes* pSelBoxes,
609  SwFrameFormat *pParent );
610 
611  // Helper that checks for unique items for DrawingLayer items of type NameOrIndex
612  // and evtl. corrects that items to ensure unique names for that type. This call may
613  // modify/correct entries inside of the given SfxItemSet, and it will apply a name to
614  // the items in question (what is essential to make the named slots associated with
615  // these items work for the UNO API and thus e.g. for ODF import/export)
616  void CheckForUniqueItemForLineFillNameOrIndex(SfxItemSet& rSet);
617 
618  bool SetFlyFrameAttr( SwFrameFormat& rFlyFormat, SfxItemSet& rSet );
619 
620  bool SetFrameFormatToFly( SwFrameFormat& rFlyFormat, SwFrameFormat& rNewFormat,
621  SfxItemSet* pSet = nullptr, bool bKeepOrient = false );
622  void SetFlyFrameTitle( SwFlyFrameFormat& rFlyFrameFormat,
623  const OUString& sNewTitle );
624  void SetFlyFrameDescription( SwFlyFrameFormat& rFlyFrameFormat,
625  const OUString& sNewDescription );
626 
627  // Footnotes
628  // Footnote information
629  const SwFootnoteInfo& GetFootnoteInfo() const { return *mpFootnoteInfo; }
630  void SetFootnoteInfo(const SwFootnoteInfo& rInfo);
631  const SwEndNoteInfo& GetEndNoteInfo() const { return *mpEndNoteInfo; }
632  void SetEndNoteInfo(const SwEndNoteInfo& rInfo);
633  SwFootnoteIdxs& GetFootnoteIdxs() { return *mpFootnoteIdxs; }
634  const SwFootnoteIdxs& GetFootnoteIdxs() const { return *mpFootnoteIdxs; }
636  bool SetCurFootnote( const SwPaM& rPam, const OUString& rNumStr,
637  bool bIsEndNote );
638 
642  css::uno::Any
643  Spell( SwPaM&, css::uno::Reference< css::linguistic2::XSpellChecker1 > const &,
644  sal_uInt16* pPageCnt, sal_uInt16* pPageSt, bool bGrammarCheck,
645  SwRootFrame const* pLayout, // for grammar-check
646  SwConversionArgs *pConvArgs = nullptr ) const;
647 
648  css::uno::Reference< css::linguistic2::XHyphenatedWord >
649  Hyphenate( SwPaM *pPam, const Point &rCursorPos,
650  sal_uInt16* pPageCnt, sal_uInt16* pPageSt );
651 
652  // count words in pam
653  static void CountWords( const SwPaM& rPaM, SwDocStat& rStat );
654 
655  // Glossary Document
656  bool IsInsOnlyTextGlossary() const { return mbInsOnlyTextGlssry; }
657 
658  void Summary(SwDoc& rExtDoc, sal_uInt8 nLevel, sal_uInt8 nPara, bool bImpress);
659 
660  void ChangeAuthorityData(const SwAuthEntry* pNewData);
661 
662  bool IsInHeaderFooter( const SwNodeIndex& rIdx ) const;
663  SvxFrameDirection GetTextDirection( const SwPosition& rPos,
664  const Point* pPt = nullptr ) const;
665  bool IsInVerticalText( const SwPosition& rPos ) const;
666 
667  // Database and DB-Manager
668  void SetDBManager( SwDBManager* pNewMgr ) { m_pDBManager = pNewMgr; }
669  SwDBManager* GetDBManager() const { return m_pDBManager; }
670  void ChangeDBFields( const std::vector<OUString>& rOldNames,
671  const OUString& rNewName );
672  void SetInitDBFields(bool b);
673 
674  // Find out which databases are used by fields.
675  void GetAllUsedDB( std::vector<OUString>& rDBNameList,
676  const std::vector<OUString>* pAllDBNames = nullptr );
677 
678  void ChgDBData( const SwDBData& rNewData );
679  SwDBData const & GetDBData();
680  const SwDBData& GetDBDesc();
681 
682  // Some helper functions
683  OUString GetUniqueGrfName() const;
684  OUString GetUniqueOLEName() const;
685  OUString GetUniqueFrameName() const;
686  OUString GetUniqueShapeName() const;
687  OUString GetUniqueDrawObjectName() const;
688 
689  o3tl::sorted_vector<SwRootFrame*> GetAllLayouts();
690 
691  void SetFlyName( SwFlyFrameFormat& rFormat, const OUString& rName );
692  const SwFlyFrameFormat* FindFlyByName( const OUString& rName, SwNodeType nNdTyp = SwNodeType::NONE ) const;
693 
694  static void GetGrfNms( const SwFlyFrameFormat& rFormat, OUString* pGrfName, OUString* pFltName );
695 
696  // Set a valid name for all Flys that have none (Called by Readers after reading).
697  void SetAllUniqueFlyNames();
698 
703  void ResetAttrs( const SwPaM &rRg,
704  bool bTextAttr = true,
706  const bool bSendDataChangedEvents = true,
707  SwRootFrame const* pLayout = nullptr);
708  void RstTextAttrs(const SwPaM &rRg, bool bInclRefToxMark = false,
709  bool bExactRange = false, SwRootFrame const* pLayout = nullptr);
710 
713  void SetAttr( const SfxPoolItem&, SwFormat& );
716  void SetAttr( const SfxItemSet&, SwFormat& );
717 
718  // method to reset a certain attribute at the given format
719  void ResetAttrAtFormat( const sal_uInt16 nWhichId,
720  SwFormat& rChangedFormat );
721 
724  void SetDefault( const SfxPoolItem& );
725  void SetDefault( const SfxItemSet& );
726 
727  // Query default attribute in this document.
728  const SfxPoolItem& GetDefault( sal_uInt16 nFormatHint ) const;
729  template<class T> const T& GetDefault( TypedWhichId<T> nWhich ) const
730  {
731  return static_cast<const T&>(GetDefault(sal_uInt16(nWhich)));
732  }
733 
734  // Do not expand text attributes.
735  bool DontExpandFormat( const SwPosition& rPos, bool bFlag = true );
736 
737  // Formats
738  const SwFrameFormats* GetFrameFormats() const { return mpFrameFormatTable.get(); }
739  SwFrameFormats* GetFrameFormats() { return mpFrameFormatTable.get(); }
740  const SwCharFormats* GetCharFormats() const { return mpCharFormatTable.get();}
741  SwCharFormats* GetCharFormats() { return mpCharFormatTable.get();}
742 
743  // LayoutFormats (frames, DrawObjects), sometimes const sometimes not
744  const SwFrameFormats* GetSpzFrameFormats() const { return mpSpzFrameFormatTable.get(); }
745  SwFrameFormats* GetSpzFrameFormats() { return mpSpzFrameFormatTable.get(); }
746 
747  const SwFrameFormat *GetDfltFrameFormat() const { return mpDfltFrameFormat.get(); }
748  SwFrameFormat *GetDfltFrameFormat() { return mpDfltFrameFormat.get(); }
749  const SwFrameFormat *GetEmptyPageFormat() const { return mpEmptyPageFormat.get(); }
750  SwFrameFormat *GetEmptyPageFormat() { return mpEmptyPageFormat.get(); }
751  const SwFrameFormat *GetColumnContFormat() const{ return mpColumnContFormat.get(); }
752  SwFrameFormat *GetColumnContFormat() { return mpColumnContFormat.get(); }
753  const SwCharFormat *GetDfltCharFormat() const { return mpDfltCharFormat.get();}
754  SwCharFormat *GetDfltCharFormat() { return mpDfltCharFormat.get();}
755 
756  // @return the interface of the management of (auto)styles
757  IStyleAccess& GetIStyleAccess() { return *mpStyleAccess; }
758 
759  // Remove all language dependencies from all existing formats
760  void RemoveAllFormatLanguageDependencies();
761 
762  static SwFormat* FindFormatByName(const SwFormatsBase& rFormatArr, std::u16string_view rName);
763 
764  SwFrameFormat *MakeFrameFormat(const OUString &rFormatName, SwFrameFormat *pDerivedFrom,
765  bool bBroadcast = false, bool bAuto = true);
766  void DelFrameFormat( SwFrameFormat *pFormat, bool bBroadcast = false );
767  SwFrameFormat* FindFrameFormatByName( std::u16string_view rName ) const;
768 
769  SwCharFormat *MakeCharFormat(const OUString &rFormatName, SwCharFormat *pDerivedFrom,
770  bool bBroadcast = false );
771  void DelCharFormat(size_t nFormat, bool bBroadcast = false);
772  void DelCharFormat(SwCharFormat const * pFormat, bool bBroadcast = false);
773  SwCharFormat* FindCharFormatByName( std::u16string_view rName ) const
774  { return static_cast<SwCharFormat*>(FindFormatByName( *mpCharFormatTable, rName )); }
775 
776  // Formatcollections (styles)
777  // TXT
778  const SwTextFormatColl* GetDfltTextFormatColl() const { return mpDfltTextFormatColl.get(); }
779  SwTextFormatColl* GetDfltTextFormatColl() { return mpDfltTextFormatColl.get(); }
780  const SwTextFormatColls *GetTextFormatColls() const { return mpTextFormatCollTable.get(); }
781  SwTextFormatColls *GetTextFormatColls() { return mpTextFormatCollTable.get(); }
782  SwTextFormatColl *MakeTextFormatColl( const OUString &rFormatName,
783  SwTextFormatColl *pDerivedFrom,
784  bool bBroadcast = false);
785  SwConditionTextFormatColl* MakeCondTextFormatColl( const OUString &rFormatName,
786  SwTextFormatColl *pDerivedFrom,
787  bool bBroadcast = false);
788  void DelTextFormatColl(size_t nFormat, bool bBroadcast = false);
789  void DelTextFormatColl( SwTextFormatColl const * pColl, bool bBroadcast = false );
797  bool SetTextFormatColl(const SwPaM &rRg, SwTextFormatColl *pFormat,
798  const bool bReset = true,
799  const bool bResetListAttrs = false,
800  SwRootFrame const* pLayout = nullptr);
801  SwTextFormatColl* FindTextFormatCollByName( std::u16string_view rName ) const
802  { return static_cast<SwTextFormatColl*>(FindFormatByName( *mpTextFormatCollTable, rName )); }
803 
804  void ChkCondColls();
805 
806  const SwGrfFormatColl* GetDfltGrfFormatColl() const { return mpDfltGrfFormatColl.get(); }
807  SwGrfFormatColl* GetDfltGrfFormatColl() { return mpDfltGrfFormatColl.get(); }
808  const SwGrfFormatColls *GetGrfFormatColls() const { return mpGrfFormatCollTable.get(); }
809  SwGrfFormatColl *MakeGrfFormatColl(const OUString &rFormatName,
810  SwGrfFormatColl *pDerivedFrom);
811 
812  // Table formatting
813  const SwFrameFormats* GetTableFrameFormats() const { return mpTableFrameFormatTable.get(); }
814  SwFrameFormats* GetTableFrameFormats() { return mpTableFrameFormatTable.get(); }
815  size_t GetTableFrameFormatCount( bool bUsed ) const;
816  SwFrameFormat& GetTableFrameFormat(size_t nFormat, bool bUsed ) const;
817  SwTableFormat* MakeTableFrameFormat(const OUString &rFormatName, SwFrameFormat *pDerivedFrom);
818  void DelTableFrameFormat( SwTableFormat* pFormat );
819  SwTableFormat* FindTableFormatByName( std::u16string_view rName, bool bAll = false ) const;
820 
823  size_t GetFlyCount( FlyCntType eType, bool bIgnoreTextBoxes = false ) const;
824  SwFrameFormat* GetFlyNum(size_t nIdx, FlyCntType eType, bool bIgnoreTextBoxes = false );
825  std::vector<SwFrameFormat const*> GetFlyFrameFormats(
826  FlyCntType eType,
827  bool bIgnoreTextBoxes);
828 
829  // Copy formats in own arrays and return them.
830  SwFrameFormat *CopyFrameFormat ( const SwFrameFormat& );
831  SwCharFormat *CopyCharFormat( const SwCharFormat& );
832  SwTextFormatColl* CopyTextColl( const SwTextFormatColl& rColl );
833  SwGrfFormatColl* CopyGrfColl( const SwGrfFormatColl& rColl );
834 
835  // Replace all styles with those from rSource.
836  void ReplaceStyles( const SwDoc& rSource, bool bIncludePageStyles = true );
837 
838  // Replace all property defaults with those from rSource.
839  void ReplaceDefaults( const SwDoc& rSource );
840 
841  // Replace all compatibility options with those from rSource.
842  void ReplaceCompatibilityOptions( const SwDoc& rSource );
843 
847  void ReplaceUserDefinedDocumentProperties( const css::uno::Reference< css::document::XDocumentProperties >& xSourceDocProps );
848 
853  void ReplaceDocumentProperties(const SwDoc& rSource, bool mailMerge = false);
854 
855  // Query if style (paragraph- / character- / frame- / page-) is used.
856  bool IsUsed( const sw::BroadcastingModify& ) const;
858  bool IsUsed( const SwTableAutoFormat& ) const;
859  bool IsUsed( const SwNumRule& );
860 
861  // Set name of newly loaded document template.
862  size_t SetDocPattern(const OUString& rPatternName);
863 
864  // @return name of document template. Can be 0!
865  const OUString* GetDocPattern(size_t nPos) const;
866 
867  // travel over PaM Ring
868  bool InsertGlossary( SwTextBlocks& rBlock, const OUString& rEntry,
869  SwPaM& rPaM, SwCursorShell* pShell = nullptr);
870 
873  static void CalculatePagesForPrinting( const SwRootFrame& rLayout, SwRenderData &rData, const SwPrintUIOptions &rOptions, bool bIsPDFExport,
874  sal_Int32 nDocPageCount );
875  static void UpdatePagesForPrintingWithPostItData( SwRenderData &rData, const SwPrintUIOptions &rOptions,
876  sal_Int32 nDocPageCount );
877  static void CalculatePagePairsForProspectPrinting( const SwRootFrame& rLayout, SwRenderData &rData, const SwPrintUIOptions &rOptions,
878  sal_Int32 nDocPageCount );
879  static void CalculateNonBlankPages( const SwRootFrame& rLayout, sal_uInt16& nDocPageCount, sal_uInt16& nActualPage );
880 
881  // PageDescriptor interface.
882  size_t GetPageDescCnt() const { return m_PageDescs.size(); }
883  const SwPageDesc& GetPageDesc(const size_t i) const { return *m_PageDescs[i]; }
884  SwPageDesc& GetPageDesc(size_t const i) { return *m_PageDescs[i]; }
885  SwPageDesc* FindPageDesc(const OUString& rName, size_t* pPos = nullptr) const;
886  // Just searches the pointer in the m_PageDescs vector!
887  bool ContainsPageDesc(const SwPageDesc *pDesc, size_t* pPos) const;
888 
891  void CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc,
892  bool bCopyPoolIds = true );
893 
896  void CopyHeader( const SwFrameFormat& rSrcFormat, SwFrameFormat& rDestFormat )
897  { CopyPageDescHeaderFooterImpl( true, rSrcFormat, rDestFormat ); }
898 
901  void CopyFooter( const SwFrameFormat& rSrcFormat, SwFrameFormat& rDestFormat )
902  { CopyPageDescHeaderFooterImpl( false, rSrcFormat, rDestFormat ); }
903 
904  // For Reader
905  void ChgPageDesc( const OUString & rName, const SwPageDesc& );
906  void ChgPageDesc( size_t i, const SwPageDesc& );
907  void DelPageDesc( const OUString & rName, bool bBroadcast = false);
908  void DelPageDesc( size_t i, bool bBroadcast = false );
909  void PreDelPageDesc(SwPageDesc const * pDel);
910  SwPageDesc* MakePageDesc(const OUString &rName, const SwPageDesc* pCpy = nullptr,
911  bool bRegardLanguage = true,
912  bool bBroadcast = false);
913  void BroadcastStyleOperation(const OUString& rName, SfxStyleFamily eFamily,
914  SfxHintId nOp);
915 
918  void CheckDefaultPageFormat();
919 
920  // Methods for tables/indices
921  static sal_uInt16 GetCurTOXMark( const SwPosition& rPos, SwTOXMarks& );
922  void DeleteTOXMark( const SwTOXMark* pTOXMark );
923  const SwTOXMark& GotoTOXMark( const SwTOXMark& rCurTOXMark,
924  SwTOXSearch eDir, bool bInReadOnly );
925 
926  // Insert/Renew table/index
927  SwTOXBaseSection* InsertTableOf( const SwPosition& rPos,
928  const SwTOXBase& rTOX,
929  const SfxItemSet* pSet = nullptr,
930  bool bExpand = false,
931  SwRootFrame const* pLayout = nullptr);
932  SwTOXBaseSection* InsertTableOf( const SwPaM& aPam,
933  const SwTOXBase& rTOX,
934  const SfxItemSet* pSet = nullptr,
935  bool bExpand = false,
936  SwRootFrame const* pLayout = nullptr );
937  void InsertTableOf( sal_uLong nSttNd, sal_uLong nEndNd,
938  const SwTOXBase& rTOX,
939  const SfxItemSet* pSet );
940  static SwTOXBase* GetCurTOX( const SwPosition& rPos );
941  static const SwAttrSet& GetTOXBaseAttrSet(const SwTOXBase& rTOX);
942 
943  bool DeleteTOX( const SwTOXBase& rTOXBase, bool bDelNodes );
944  OUString GetUniqueTOXBaseName( const SwTOXType& rType,
945  const OUString& sChkStr ) const;
946 
947  bool SetTOXBaseName(const SwTOXBase& rTOXBase, const OUString& rName);
948 
949  // After reading file update all tables/indices
950  void SetUpdateTOX( bool bFlag ) { mbUpdateTOX = bFlag; }
951  bool IsUpdateTOX() const { return mbUpdateTOX; }
952 
953  const OUString& GetTOIAutoMarkURL() const {return msTOIAutoMarkURL;}
954  void SetTOIAutoMarkURL(const OUString& rSet) {msTOIAutoMarkURL = rSet;}
955 
956  bool IsInReading() const { return mbInReading; }
957  void SetInReading( bool bNew ) { mbInReading = bNew; }
958 
959  bool IsInWriting() const { return mbInWriting; }
960  void SetInWriting(bool bNew) { mbInWriting = bNew; }
961 
962  bool IsInMailMerge() const { return mbInMailMerge; }
963  void SetInMailMerge( bool bNew ) { mbInMailMerge = bNew; }
964 
965  bool IsClipBoard() const { return mbClipBoard; }
966  // N.B.: must be called right after constructor! (@see GetXmlIdRegistry)
967  void SetClipBoard( bool bNew ) { mbClipBoard = bNew; }
968 
969  bool IsColumnSelection() const { return mbColumnSelection; }
970  void SetColumnSelection( bool bNew ) { mbColumnSelection = bNew; }
971 
972  bool IsInXMLImport() const { return mbInXMLImport; }
973  void SetInXMLImport( bool bNew ) { mbInXMLImport = bNew; }
974  bool IsInWriterfilterImport() const { return mbInWriterfilterImport; }
975  void SetInWriterfilterImport(bool const b) { mbInWriterfilterImport = b; }
976 
977  // Manage types of tables/indices
978  sal_uInt16 GetTOXTypeCount( TOXTypes eTyp ) const;
979  const SwTOXType* GetTOXType( TOXTypes eTyp, sal_uInt16 nId ) const;
980  const SwTOXType* InsertTOXType( const SwTOXType& rTyp );
981  const SwTOXTypes& GetTOXTypes() const { return *mpTOXTypes; }
982 
983  const SwTOXBase* GetDefaultTOXBase( TOXTypes eTyp, bool bCreate );
984  void SetDefaultTOXBase(const SwTOXBase& rBase);
985 
986  // Key for management of index.
987  void GetTOIKeys(SwTOIKeyType eTyp, std::vector<OUString>& rArr,
988  SwRootFrame const& rLayout) const;
989 
990  // Sort table text.
991  bool SortTable(const SwSelBoxes& rBoxes, const SwSortOptions&);
992  bool SortText(const SwPaM&, const SwSortOptions&);
993 
994  // Correct the SwPosition-Objects that are registered with the document
995  // e. g. Bookmarks or tables/indices.
996  // If bMoveCursor is set move Cursor too.
997 
998  // Set everything in rOldNode on rNewPos + Offset.
999  void CorrAbs(
1000  const SwNodeIndex& rOldNode,
1001  const SwPosition& rNewPos,
1002  const sal_Int32 nOffset = 0,
1003  bool bMoveCursor = false );
1004 
1005  // Set everything in the range of [rStartNode, rEndNode] to rNewPos.
1006  static void CorrAbs(
1007  const SwNodeIndex& rStartNode,
1008  const SwNodeIndex& rEndNode,
1009  const SwPosition& rNewPos,
1010  bool bMoveCursor = false );
1011 
1012  // Set everything in this range from rRange to rNewPos.
1013  static void CorrAbs(
1014  const SwPaM& rRange,
1015  const SwPosition& rNewPos,
1016  bool bMoveCursor = false );
1017 
1018  // Set everything in rOldNode to relative Pos.
1019  void CorrRel(
1020  const SwNodeIndex& rOldNode,
1021  const SwPosition& rNewPos,
1022  const sal_Int32 nOffset = 0,
1023  bool bMoveCursor = false );
1024 
1025  // Query / set rules for Outline.
1027  {
1028  return mpOutlineRule;
1029  }
1030  void SetOutlineNumRule( const SwNumRule& rRule );
1031  void PropagateOutlineRule();
1032 
1033  // Outline - promote / demote.
1034  bool OutlineUpDown(const SwPaM& rPam, short nOffset, SwRootFrame const* pLayout = nullptr);
1035 
1037  bool MoveOutlinePara( const SwPaM& rPam, SwOutlineNodes::difference_type nOffset);
1038 
1039  bool GotoOutline(SwPosition& rPos, const OUString& rName, SwRootFrame const* = nullptr) const;
1040 
1051  OUString SetNumRule( const SwPaM&,
1052  const SwNumRule&,
1053  bool bCreateNewList,
1054  SwRootFrame const* pLayout = nullptr,
1055  const OUString& sContinuedListId = OUString(),
1056  bool bSetItem = true,
1057  const bool bResetIndentAttrs = false );
1058  void SetCounted(const SwPaM&, bool bCounted, SwRootFrame const* pLayout);
1059 
1060  void MakeUniqueNumRules(const SwPaM & rPaM);
1061 
1062  void SetNumRuleStart( const SwPosition& rPos, bool bFlag = true );
1063  void SetNodeNumStart( const SwPosition& rPos, sal_uInt16 nStt );
1064 
1065  // sw_redlinehide: may set rPos to different node (the one with the NumRule)
1066  static SwNumRule* GetNumRuleAtPos(SwPosition& rPos, SwRootFrame const* pLayout = nullptr);
1067 
1068  const SwNumRuleTable& GetNumRuleTable() const { return *mpNumRuleTable; }
1069 
1075  void AddNumRule(SwNumRule * pRule);
1076 
1077  // add optional parameter <eDefaultNumberFormatPositionAndSpaceMode>
1078  sal_uInt16 MakeNumRule( const OUString &rName,
1079  const SwNumRule* pCpy = nullptr,
1080  bool bBroadcast = false,
1081  const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode =
1083  sal_uInt16 FindNumRule( std::u16string_view rName ) const;
1084  SwNumRule* FindNumRulePtr( const OUString& rName ) const;
1085 
1086  // Deletion only possible if Rule is not used!
1087  bool RenameNumRule(const OUString & aOldName, const OUString & aNewName,
1088  bool bBroadcast = false);
1089  bool DelNumRule( const OUString& rName, bool bBroadCast = false );
1090  OUString GetUniqueNumRuleName( const OUString* pChkStr = nullptr, bool bAutoNum = true ) const;
1091 
1092  void UpdateNumRule(); // Update all invalids.
1093  void ChgNumRuleFormats( const SwNumRule& rRule );
1094  bool ReplaceNumRule( const SwPosition& rPos, const OUString& rOldRule,
1095  const OUString& rNewRule );
1096 
1097  // Goto next/previous on same level.
1098  static bool GotoNextNum( SwPosition&, SwRootFrame const* pLayout,
1099  bool bOverUpper = true,
1100  sal_uInt8* pUpper = nullptr, sal_uInt8* pLower = nullptr );
1101  static bool GotoPrevNum( SwPosition&, SwRootFrame const* pLayout,
1102  bool bOverUpper = true );
1103 
1127  const SwNumRule * SearchNumRule(const SwPosition & rPos,
1128  const bool bForward,
1129  const bool bNum,
1130  const bool bOutline,
1131  int nNonEmptyAllowed,
1132  OUString& sListId,
1133  SwRootFrame const* pLayout,
1134  const bool bInvestigateStartNode = false );
1135 
1136  // Paragraphs without numbering but with indents.
1137  bool NoNum( const SwPaM& );
1138 
1139  // Delete, splitting of numbering list.
1140  void DelNumRules(const SwPaM&, SwRootFrame const* pLayout = nullptr);
1141 
1142  // Invalidates all numrules
1143  void InvalidateNumRules();
1144 
1145  bool NumUpDown(const SwPaM&, bool bDown, SwRootFrame const* pLayout = nullptr);
1146 
1149  bool MoveParagraph(SwPaM&, tools::Long nOffset, bool bIsOutlMv = false);
1150  bool MoveParagraphImpl(SwPaM&, tools::Long nOffset, bool bIsOutlMv, SwRootFrame const*);
1151 
1152  bool NumOrNoNum( const SwNodeIndex& rIdx, bool bDel = false);
1153 
1154  void StopNumRuleAnimations( const OutputDevice* );
1155 
1166  const SwTable* InsertTable( const SwInsertTableOptions& rInsTableOpts, // HeadlineNoBorder
1167  const SwPosition& rPos, sal_uInt16 nRows,
1168  sal_uInt16 nCols, sal_Int16 eAdjust,
1169  const SwTableAutoFormat* pTAFormat = nullptr,
1170  const std::vector<sal_uInt16> *pColArr = nullptr,
1171  bool bCalledFromShell = false,
1172  bool bNewModel = true );
1173 
1174  // If index is in a table, return TableNode, else 0.
1175  SwTableNode* IsIdxInTable( const SwNodeIndex& rIdx );
1176  inline const SwTableNode* IsIdxInTable( const SwNodeIndex& rIdx ) const;
1177 
1178  // Create a balanced table out of the selected range.
1179  const SwTable* TextToTable( const SwInsertTableOptions& rInsTableOpts, // HeadlineNoBorder,
1180  const SwPaM& rRange, sal_Unicode cCh,
1181  sal_Int16 eAdjust,
1182  const SwTableAutoFormat* );
1183 
1184  // text to table conversion - API support
1185  const SwTable* TextToTable( const std::vector< std::vector<SwNodeRange> >& rTableNodes );
1186 
1187  bool TableToText( const SwTableNode* pTableNd, sal_Unicode cCh );
1188 
1189  // Create columns / rows in table.
1190  void InsertCol( const SwCursor& rCursor,
1191  sal_uInt16 nCnt = 1, bool bBehind = true );
1192  bool InsertCol( const SwSelBoxes& rBoxes,
1193  sal_uInt16 nCnt = 1, bool bBehind = true );
1194  void InsertRow( const SwCursor& rCursor,
1195  sal_uInt16 nCnt = 1, bool bBehind = true );
1196  bool InsertRow( const SwSelBoxes& rBoxes,
1197  sal_uInt16 nCnt = 1, bool bBehind = true );
1198 
1199  // Delete Columns/Rows in table.
1200  enum class RowColMode { DeleteRow = 0, DeleteColumn = 1, DeleteProtected = 2 };
1201  bool DeleteRowCol(const SwSelBoxes& rBoxes, RowColMode eMode = RowColMode::DeleteRow);
1202  void DeleteRow( const SwCursor& rCursor );
1203  void DeleteCol( const SwCursor& rCursor );
1204 
1205  // Split / concatenate boxes in table.
1206  bool SplitTable( const SwSelBoxes& rBoxes, bool bVert,
1207  sal_uInt16 nCnt, bool bSameHeight = false );
1208 
1209  TableMergeErr MergeTable( SwPaM& rPam );
1210  OUString GetUniqueTableName() const;
1211  bool IsInsTableFormatNum() const;
1212  bool IsInsTableChangeNumFormat() const;
1213  bool IsInsTableAlignNum() const;
1214  bool IsSplitVerticalByDefault() const;
1215  void SetSplitVerticalByDefault(bool value);
1216 
1217  // From FEShell (for Undo and BModified).
1218  static void GetTabCols( SwTabCols &rFill, const SwCellFrame* pBoxFrame );
1219  void SetTabCols( const SwTabCols &rNew, bool bCurRowOnly,
1220  const SwCellFrame* pBoxFrame );
1221  static void GetTabRows( SwTabCols &rFill, const SwCellFrame* pBoxFrame );
1222  void SetTabRows( const SwTabCols &rNew, bool bCurColOnly,
1223  const SwCellFrame* pBoxFrame );
1224 
1225  // Direct access for UNO.
1226  void SetTabCols(SwTable& rTab, const SwTabCols &rNew, const SwTabCols &rOld,
1227  const SwTableBox *pStart, bool bCurRowOnly);
1228 
1229  void SetRowsToRepeat( SwTable &rTable, sal_uInt16 nSet );
1230 
1233  bool SetTableAutoFormat(const SwSelBoxes& rBoxes, const SwTableAutoFormat& rNew, bool bResetDirect = false, bool isSetStyleName = false);
1234 
1235  // Query attributes.
1236  bool GetTableAutoFormat( const SwSelBoxes& rBoxes, SwTableAutoFormat& rGet );
1237 
1239  SwTableAutoFormatTable& GetTableStyles();
1241  {
1242  return const_cast<SwDoc*>(this)->GetTableStyles();
1243  }
1245  bool HasTableStyles() const { return m_pTableStyles != nullptr; }
1246  // Create a new table style. Tracked by Undo.
1247  SwTableAutoFormat* MakeTableStyle(const OUString& rName, bool bBroadcast = false);
1248  // Delete table style named rName. Tracked by undo.
1249  std::unique_ptr<SwTableAutoFormat> DelTableStyle(const OUString& rName, bool bBroadcast = false);
1250  // Change (replace) a table style named rName. Tracked by undo.
1251  void ChgTableStyle(const OUString& rName, const SwTableAutoFormat& rNewFormat);
1252 
1253  const SwCellStyleTable& GetCellStyles() const { return *mpCellStyles; }
1254  SwCellStyleTable& GetCellStyles() { return *mpCellStyles; }
1255 
1256  void AppendUndoForInsertFromDB( const SwPaM& rPam, bool bIsTable );
1257 
1258  bool SetColRowWidthHeight( SwTableBox& rCurrentBox, TableChgWidthHeightType eType,
1259  SwTwips nAbsDiff, SwTwips nRelDiff );
1260  SwTableBoxFormat* MakeTableBoxFormat();
1261  SwTableLineFormat* MakeTableLineFormat();
1262 
1263  // helper function: cleanup before checking number value
1264  bool IsNumberFormat( const OUString& rString, sal_uInt32& F_Index, double& fOutNumber);
1265  // Check if box has numerical value. Change format of box if required.
1266  void ChkBoxNumFormat( SwTableBox& rCurrentBox, bool bCallUpdate );
1267  void SetTableBoxFormulaAttrs( SwTableBox& rBox, const SfxItemSet& rSet );
1268  void ClearBoxNumAttrs( const SwNodeIndex& rNode );
1269  void ClearLineNumAttrs( SwPosition const & rPos );
1270 
1271  bool InsCopyOfTable( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
1272  const SwTable* pCpyTable, bool bCpyName = false,
1273  bool bCorrPos = false );
1274 
1275  void UnProtectCells( std::u16string_view rTableName );
1276  bool UnProtectCells( const SwSelBoxes& rBoxes );
1277  void UnProtectTables( const SwPaM& rPam );
1278  bool HasTableAnyProtection( const SwPosition* pPos,
1279  const OUString* pTableName,
1280  bool* pFullTableProtection );
1281 
1282  // Split table at baseline position, i.e. create a new table.
1283  bool SplitTable( const SwPosition& rPos, SplitTable_HeadlineOption eMode,
1284  bool bCalcNewSize );
1285 
1288  bool MergeTable( const SwPosition& rPos, bool bWithPrev,
1289  sal_uInt16 nMode = 0 );
1290 
1291  // Make charts of given table update.
1292  void UpdateCharts( std::u16string_view rName ) const;
1293 
1294  // Update all charts, for that exists any table.
1295  void UpdateAllCharts() { DoUpdateAllCharts(); }
1296 
1297  // Table is renamed and refreshes charts.
1298  void SetTableName( SwFrameFormat& rTableFormat, const OUString &rNewName );
1299 
1300  // @return the reference in document that is set for name.
1301  const SwFormatRefMark* GetRefMark( std::u16string_view rName ) const;
1302 
1303  // @return RefMark via index - for UNO.
1304  const SwFormatRefMark* GetRefMark( sal_uInt16 nIndex ) const;
1305 
1308  sal_uInt16 GetRefMarks( std::vector<OUString>* = nullptr ) const;
1309 
1310  // Insert label. If a FlyFormat is created, return it.
1311  SwFlyFrameFormat* InsertLabel( const SwLabelType eType, const OUString &rText, const OUString& rSeparator,
1312  const OUString& rNumberingSeparator,
1313  const bool bBefore, const sal_uInt16 nId, const sal_uLong nIdx,
1314  const OUString& rCharacterStyle,
1315  const bool bCpyBrd );
1316  SwFlyFrameFormat* InsertDrawLabel(
1317  const OUString &rText, const OUString& rSeparator, const OUString& rNumberSeparator,
1318  const sal_uInt16 nId, const OUString& rCharacterStyle, SdrObject& rObj );
1319 
1320  // Query attribute pool.
1321  const SwAttrPool& GetAttrPool() const { return *mpAttrPool; }
1322  SwAttrPool& GetAttrPool() { return *mpAttrPool; }
1323 
1324  // Search for an EditShell.
1325  SwEditShell const * GetEditShell() const;
1326  SwEditShell* GetEditShell();
1327  ::sw::IShellCursorSupplier * GetIShellCursorSupplier();
1328 
1329  // OLE 2.0-notification.
1330  void SetOle2Link(const Link<bool,void>& rLink) {maOle2Link = rLink;}
1331  const Link<bool,void>& GetOle2Link() const {return maOle2Link;}
1332 
1333  // insert section (the ODF kind of section, not the nodesarray kind)
1334  SwSection * InsertSwSection(SwPaM const& rRange, SwSectionData &,
1335  std::tuple<SwTOXBase const*, sw::RedlineMode, sw::FieldmarkMode> const* pTOXBase,
1336  SfxItemSet const*const pAttr, bool const bUpdate = true);
1337  static sal_uInt16 IsInsRegionAvailable( const SwPaM& rRange,
1338  const SwNode** ppSttNd = nullptr );
1339  static SwSection* GetCurrSection( const SwPosition& rPos );
1340  SwSectionFormats& GetSections() { return *mpSectionFormatTable; }
1341  const SwSectionFormats& GetSections() const { return *mpSectionFormatTable; }
1342  SwSectionFormat *MakeSectionFormat();
1343  void DelSectionFormat( SwSectionFormat *pFormat, bool bDelNodes = false );
1344  void UpdateSection(size_t const nSect, SwSectionData &,
1345  SfxItemSet const*const = nullptr, bool const bPreventLinkUpdate = false);
1346  OUString GetUniqueSectionName( const OUString* pChkStr = nullptr ) const;
1347 
1348  /* @@@MAINTAINABILITY-HORROR@@@
1349  The model should not have anything to do with a shell.
1350  Unnecessary compile/link time dependency.
1351  */
1352 
1353  // Pointer to SfxDocShell from Doc. Can be 0!!
1354  SwDocShell* GetDocShell() { return mpDocShell; }
1355  const SwDocShell* GetDocShell() const { return mpDocShell; }
1356  void SetDocShell( SwDocShell* pDSh );
1357 
1360  void SetTmpDocShell( SfxObjectShellLock rLock ) { mxTmpDocShell = rLock; }
1361  const SfxObjectShellLock& GetTmpDocShell() const { return mxTmpDocShell; }
1362 
1363  // For Autotexts? (text modules) They have only one SVPersist at their disposal.
1364  SfxObjectShell* GetPersist() const;
1365 
1366  // Pointer to storage of SfxDocShells. Can be 0!!!
1367  css::uno::Reference< css::embed::XStorage > GetDocStorage();
1368 
1369  // Query / set flag indicating if document is loaded asynchronously at this moment.
1370  bool IsInLoadAsynchron() const { return mbInLoadAsynchron; }
1371  void SetInLoadAsynchron( bool bFlag ) { mbInLoadAsynchron = bFlag; }
1372 
1373  // For Drag&Move: (e.g. allow "moving" of RefMarks)
1374  bool IsCopyIsMove() const { return mbCopyIsMove; }
1375  void SetCopyIsMove( bool bFlag ) { mbCopyIsMove = bFlag; }
1376 
1377  SwDrawContact* GroupSelection( SdrView& );
1378  void UnGroupSelection( SdrView& );
1379  bool DeleteSelection( SwDrawView& );
1380 
1381  // Invalidates OnlineSpell-WrongLists.
1382  void SpellItAgainSam( bool bInvalid, bool bOnlyWrong, bool bSmartTags );
1383  void InvalidateAutoCompleteFlag();
1384 
1385  void SetCalcFieldValueHdl(Outliner* pOutliner);
1386 
1387  // Query if URL was visited.
1388  // Query via Doc, if only a Bookmark has been given.
1389  // In this case the document name has to be set in front.
1390  bool IsVisitedURL( const OUString& rURL );
1391 
1392  // Save current values for automatic registration of exceptions in Autocorrection.
1393  void SetAutoCorrExceptWord( std::unique_ptr<SwAutoCorrExceptWord> pNew );
1394  SwAutoCorrExceptWord* GetAutoCorrExceptWord() { return mpACEWord.get(); }
1395  void DeleteAutoCorrExceptWord();
1396 
1397  const SwFormatINetFormat* FindINetAttr( std::u16string_view rName ) const;
1398 
1399  // Call into intransparent Basic; expect possible Return String.
1400  void ExecMacro( const SvxMacro& rMacro, OUString* pRet, SbxArray* pArgs );
1401 
1402  // Call into intransparent Basic / JavaScript.
1403  sal_uInt16 CallEvent( SvMacroItemId nEvent, const SwCallMouseEvent& rCallEvent,
1404  bool bChkPtr = false );
1405 
1409  void MoveLeftMargin(const SwPaM& rPam, bool bRight, bool bModulus,
1410  SwRootFrame const* pLayout = nullptr);
1411 
1412  // Query NumberFormatter.
1414  {
1415  std::scoped_lock lock(mNumberFormatterMutex);
1416  if (bCreate)
1417  EnsureNumberFormatter();
1418  return mpNumberFormatter;
1419  }
1420 
1421  const SvNumberFormatter* GetNumberFormatter(bool bCreate = true) const
1422  {
1423  return const_cast<SwDoc*>(this)->GetNumberFormatter(bCreate);
1424  }
1425 
1426  bool HasInvisibleContent() const;
1427  // delete invisible content, like hidden sections and paragraphs
1428  bool RemoveInvisibleContent();
1429  // restore the invisible content if it's available on the undo stack
1430  bool RestoreInvisibleContent();
1431 
1432  bool ConvertFieldsToText(SwRootFrame const& rLayout);
1433 
1434  // Create sub-documents according to given collection.
1435  // If no collection is given, use chapter styles for 1st level.
1436  bool GenerateGlobalDoc( const OUString& rPath,
1437  const SwTextFormatColl* pSplitColl );
1438  bool GenerateGlobalDoc( const OUString& rPath, int nOutlineLevel );
1439  bool GenerateHTMLDoc( const OUString& rPath,
1440  const SwTextFormatColl* pSplitColl );
1441  bool GenerateHTMLDoc( const OUString& rPath, int nOutlineLevel );
1442 
1443  // Compare two documents.
1444  tools::Long CompareDoc( const SwDoc& rDoc );
1445 
1446  // Merge two documents.
1447  tools::Long MergeDoc( const SwDoc& rDoc );
1448 
1449  bool IsAutoFormatRedline() const { return mbIsAutoFormatRedline; }
1450  void SetAutoFormatRedline( bool bFlag ) { mbIsAutoFormatRedline = bFlag; }
1451 
1452  // For AutoFormat: with Undo/Redlining.
1453  void SetTextFormatCollByAutoFormat( const SwPosition& rPos, sal_uInt16 nPoolId,
1454  const SfxItemSet* pSet );
1455  void SetFormatItemByAutoFormat( const SwPaM& rPam, const SfxItemSet& );
1456 
1457  // Only for SW-textbloxks! Does not pay any attention to layout!
1458  void ClearDoc(); // Deletes all content!
1459 
1460  // Query /set data for PagePreview.
1461  const SwPagePreviewPrtData* GetPreviewPrtData() const { return m_pPgPViewPrtData.get(); }
1462 
1463  // If pointer == 0 destroy pointer in document.
1464  // Else copy object.
1465  // Pointer is not transferred to ownership by document!
1466  void SetPreviewPrtData( const SwPagePreviewPrtData* pData );
1467 
1470  void SetOLEObjModified();
1471 
1472  // Uno - Interfaces
1473  std::shared_ptr<SwUnoCursor> CreateUnoCursor( const SwPosition& rPos, bool bTableCursor = false );
1474 
1475  // FeShell - Interfaces
1476  // !!! These assume always an existing layout !!!
1477  bool ChgAnchor( const SdrMarkList& _rMrkList,
1478  RndStdIds _eAnchorType,
1479  const bool _bSameOnly,
1480  const bool _bPosCorr );
1481 
1482  void SetRowHeight( const SwCursor& rCursor, const SwFormatFrameSize &rNew );
1483  static std::unique_ptr<SwFormatFrameSize> GetRowHeight( const SwCursor& rCursor );
1484  void SetRowSplit( const SwCursor& rCursor, const SwFormatRowSplit &rNew );
1485  static std::unique_ptr<SwFormatRowSplit> GetRowSplit( const SwCursor& rCursor );
1486 
1490  bool BalanceRowHeight( const SwCursor& rCursor, bool bTstOnly, const bool bOptimize );
1491  void SetRowBackground( const SwCursor& rCursor, const SvxBrushItem &rNew );
1492  static bool GetRowBackground( const SwCursor& rCursor, std::unique_ptr<SvxBrushItem>& rToFill );
1493  void SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet );
1494  void SetTabLineStyle( const SwCursor& rCursor,
1495  const Color* pColor, bool bSetLine,
1496  const editeng::SvxBorderLine* pBorderLine );
1497  static void GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet );
1498  void SetBoxAttr( const SwCursor& rCursor, const SfxPoolItem &rNew );
1509  static bool GetBoxAttr( const SwCursor& rCursor, std::unique_ptr<SfxPoolItem>& rToFill );
1510  void SetBoxAlign( const SwCursor& rCursor, sal_uInt16 nAlign );
1511  static sal_uInt16 GetBoxAlign( const SwCursor& rCursor );
1515  void AdjustCellWidth( const SwCursor& rCursor, const bool bBalance, const bool bNoShrink );
1516 
1517  SwChainRet Chainable( const SwFrameFormat &rSource, const SwFrameFormat &rDest );
1518  SwChainRet Chain( SwFrameFormat &rSource, const SwFrameFormat &rDest );
1519  void Unchain( SwFrameFormat &rFormat );
1520 
1521  // For Copy/Move from FrameShell.
1522  SdrObject* CloneSdrObj( const SdrObject&, bool bMoveWithinDoc = false,
1523  bool bInsInPage = true );
1524 
1525  // FeShell - Interface end
1526 
1527  // Interface for TextInputData - for text input of Chinese and Japanese.
1528  SwExtTextInput* CreateExtTextInput( const SwPaM& rPam );
1529  void DeleteExtTextInput( SwExtTextInput* pDel );
1530  SwExtTextInput* GetExtTextInput( const SwNode& rNd,
1531  sal_Int32 nContentPos = -1) const;
1532  SwExtTextInput* GetExtTextInput() const;
1533 
1534  // Interface for access to AutoComplete-List.
1535  static SwAutoCompleteWord& GetAutoCompleteWords() { return *s_pAutoCompleteWords; }
1536 
1537  bool ContainsMSVBasic() const { return mbContains_MSVBasic; }
1538  void SetContainsMSVBasic( bool bFlag ) { mbContains_MSVBasic = bFlag; }
1539 
1540  // Interface for the list of Ruby - texts/attributes
1541  static sal_uInt16 FillRubyList( const SwPaM& rPam, SwRubyList& rList );
1542  void SetRubyList( const SwPaM& rPam, const SwRubyList& rList );
1543 
1544  void ReadLayoutCache( SvStream& rStream );
1545  void WriteLayoutCache( SvStream& rStream );
1546  SwLayoutCache* GetLayoutCache() const { return mpLayoutCache.get(); }
1547 
1552  bool ContainsHiddenChars() const;
1553 
1554  IGrammarContact* getGrammarContact() const { return mpGrammarContact.get(); }
1555 
1565  void MarkListLevel( const OUString& sListId,
1566  const int nListLevel,
1567  const bool bValue );
1568 
1569  // Change a format undoable.
1570  void ChgFormat(SwFormat & rFormat, const SfxItemSet & rSet);
1571 
1572  void RenameFormat(SwFormat & rFormat, const OUString & sNewName,
1573  bool bBroadcast = false);
1574 
1575  // Change a TOX undoable.
1576  void ChangeTOX(SwTOXBase & rTOX, const SwTOXBase & rNew);
1577 
1595  static OUString GetPaMDescr(const SwPaM & rPaM);
1596 
1597  static bool IsFirstOfNumRuleAtPos(const SwPosition & rPos, SwRootFrame const& rLayout);
1598 
1599  // access methods for XForms model(s)
1600 
1601  // access container for XForms model; will be NULL if !isXForms()
1602  const css::uno::Reference<css::container::XNameContainer>&
1603  getXForms() const { return mxXForms;}
1604 
1605  css::uno::Reference< css::linguistic2::XProofreadingIterator > const & GetGCIterator() const;
1606 
1607  // #i31958# is this an XForms document?
1608  bool isXForms() const;
1609 
1610  // #i31958# initialize XForms models; turn this into an XForms document
1611  void initXForms( bool bCreateDefaultModel );
1612 
1613  // #i113606# for disposing XForms
1614  void disposeXForms( );
1615 
1616  //Update all the page masters
1617  void SetDefaultPageMode(bool bSquaredPageMode);
1618  bool IsSquaredPageMode() const;
1619 
1620  css::uno::Reference< css::script::vba::XVBAEventProcessor > const & GetVbaEventProcessor();
1621  void SetVBATemplateToProjectCache( css::uno::Reference< css::container::XNameContainer > const & xCache ) { m_xTemplateToProjectCache = xCache; };
1622  const css::uno::Reference< css::container::XNameContainer >& GetVBATemplateToProjectCache() const { return m_xTemplateToProjectCache; };
1623  ::sfx2::IXmlIdRegistry& GetXmlIdRegistry();
1624  ::sw::MetaFieldManager & GetMetaFieldManager();
1625  ::sw::UndoManager & GetUndoManager();
1626  ::sw::UndoManager const& GetUndoManager() const;
1627 
1628  SfxObjectShell* CreateCopy(bool bCallInitNew, bool bEmpty) const;
1629  SwNodeIndex AppendDoc(const SwDoc& rSource, sal_uInt16 nStartPageNumber,
1630  bool bDeletePrevious, int physicalPageOffset,
1631  const sal_uLong nDocNo);
1632 
1636  void dumpAsXml(xmlTextWriterPtr = nullptr) const;
1637 
1638  std::set<Color> GetDocColors();
1639  std::vector< std::weak_ptr<SwUnoCursor> > mvUnoCursorTable;
1640 
1641  // Remove expired UnoCursor weak pointers the document keeps to notify about document death.
1643  {
1644  auto & rTable = const_cast<SwDoc*>(this)->mvUnoCursorTable;
1645  // In most cases we'll remove most of the elements.
1646  rTable.erase( std::remove_if(rTable.begin(),
1647  rTable.end(),
1648  [] (std::weak_ptr<SwUnoCursor> const & x) { return x.expired(); }),
1649  rTable.end());
1650  }
1651 
1656  bool StartGrammarChecking( bool bSkipStart = false );
1657 
1659  void SetMissingDictionaries( bool bIsMissing );
1661  bool IsDictionaryMissing() const { return meDictionaryMissing == MissingDictionary::True; }
1662 
1663  void SetLanguage(const LanguageType eLang, const sal_uInt16 nId);
1664 
1665 private:
1666  // Copies master header to left / first one, if necessary - used by ChgPageDesc().
1667  void CopyMasterHeader(const SwPageDesc &rChged, const SwFormatHeader &rHead, SwPageDesc &pDesc, bool bLeft, bool bFirst);
1668  // Copies master footer to left / first one, if necessary - used by ChgPageDesc().
1669  void CopyMasterFooter(const SwPageDesc &rChged, const SwFormatFooter &rFoot, SwPageDesc &pDesc, bool bLeft, bool bFirst);
1670 
1671 };
1672 
1673 namespace o3tl {
1674  template<> struct typed_flags<SwDoc::RowColMode> : is_typed_flags<SwDoc::RowColMode, 3> {};
1675 }
1676 
1677 // This method is called in Dtor of SwDoc and deletes cache of ContourObjects.
1678 void ClrContourCache();
1679 
1680 inline const SwTableNode* SwDoc::IsIdxInTable( const SwNodeIndex& rIdx ) const
1681 {
1682  return const_cast<SwDoc*>(this)->IsIdxInTable( rIdx );
1683 }
1684 
1685 inline void SwDoc::SetOLEPrtNotifyPending( bool bSet )
1686 {
1687  mbOLEPrtNotifyPending = bSet;
1688  if( !bSet )
1689  mbAllOLENotify = false;
1690 }
1691 
1692 bool sw_GetPostIts(const IDocumentFieldsAccess& rIDFA, SetGetExpFields * pSrtLst);
1693 
1694 #endif //_DOC_HXX
1695 
1696 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SwFrameFormats * GetSpzFrameFormats()
Definition: doc.hxx:745
SwPageDesc & GetPageDesc(size_t const i)
Definition: doc.hxx:884
void SetCopyIsMove(bool bFlag)
Definition: doc.hxx:1375
OUString msDocAccTitle
Definition: doc.hxx:386
const std::unique_ptr< ::sw::UndoManager > m_pUndoManager
Definition: doc.hxx:215
sal_uInt32 mnRsidRoot
Definition: doc.hxx:296
const SwGrfFormatColls * GetGrfFormatColls() const
Definition: doc.hxx:808
std::set< SwPosFlyFramePtr, SwPosFlyFrameCmp > SwPosFlyFrames
Definition: flypos.hxx:51
TOXTypes
Definition: toxe.hxx:39
SwPageDescs m_PageDescs
Definition: doc.hxx:197
bool IsInMailMerge() const
Definition: doc.hxx:962
SwCellStyleTable & GetCellStyles()
Definition: doc.hxx:1254
SfxHintId
SwAutoCorrExceptWord * GetAutoCorrExceptWord()
Definition: doc.hxx:1394
const T & GetDefault(TypedWhichId< T > nWhich) const
Definition: doc.hxx:729
SwLabelType
Definition: swtypes.hxx:87
Represents the style of a paragraph.
Definition: fmtcol.hxx:56
std::unique_ptr< SwDefTOXBase_Impl > mpDefTOXBases
Definition: doc.hxx:248
Marks a position in the document model.
Definition: pam.hxx:35
const OUString & GetTOIAutoMarkURL() const
Definition: doc.hxx:953
SwCharFormat * FindCharFormatByName(std::u16string_view rName) const
Definition: doc.hxx:773
size_t size() const
Definition: pagedesc.hxx:420
const std::unique_ptr< ::sw::DocumentOutlineNodesManager > m_pDocumentOutlineNodesManager
Definition: doc.hxx:223
void SetPrepareSelAll()
Definition: doc.hxx:566
const std::unique_ptr< ::sw::DocumentListItemsManager > m_pDocumentListItemsManager
Definition: doc.hxx:221
IGrammarContact * getGrammarContact() const
Definition: doc.hxx:1554
static SwAutoCompleteWord & GetAutoCompleteWords()
Definition: doc.hxx:1535
oslInterlockedCount mReferenceCount
Definition: doc.hxx:298
SwDocShell * GetDocShell()
Definition: doc.hxx:1354
SfxObjectShellLock mxTmpDocShell
Definition: doc.hxx:260
SvNumberFormatter * GetNumberFormatter(bool bCreate=true)
Definition: doc.hxx:1413
const SwFrameFormats * GetTableFrameFormats() const
Definition: doc.hxx:813
signed char sal_Int8
const std::unique_ptr< ::sw::DocumentLayoutManager > m_pDocumentLayoutManager
Definition: doc.hxx:227
const std::unique_ptr< ::sw::DocumentContentOperationsManager > m_pDocumentContentOperationsManager
Definition: doc.hxx:224
std::vector< OUString > m_PatternNames
Definition: doc.hxx:205
std::vector< SwNode * >::difference_type difference_type
sal_uInt16 char char * pDesc
SwDBManager * m_pDBManager
Definition: doc.hxx:251
Idle maOLEModifiedIdle
Definition: doc.hxx:202
std::unique_ptr< SwNodes > m_pNodes
Definition: doc.hxx:195
SwAttrPool & GetAttrPool()
Definition: doc.hxx:1322
sal_uIntPtr sal_uLong
std::vector< SwTOXMark * > SwTOXMarks
Definition: tox.hxx:45
long Long
Provides numbered items of a document.
SwTextFormatColl * GetDfltTextFormatColl()
Definition: doc.hxx:779
std::vector< std::unique_ptr< SwRubyListEntry >> SwRubyList
Definition: doc.hxx:184
Base class of all fields.
Definition: fldbas.hxx:289
Handle the background jobs of a Writer document.
DocumentType meDocType
Definition: doc.hxx:395
knows all meta-fields in the document.
Definition: fmtmeta.hxx:196
exports com.sun.star. embed
Provides access to the marks of a document.
Definition: doc.hxx:187
SwAttrPool * mpAttrPool
Definition: doc.hxx:196
void SetOle2Link(const Link< bool, void > &rLink)
Definition: doc.hxx:1330
TableChgWidthHeightType
Definition: tblenum.hxx:25
bool IsColumnSelection() const
Definition: doc.hxx:969
bool IsInWriting() const
Definition: doc.hxx:959
bool IsUpdateTOX() const
Definition: doc.hxx:951
const SwTableAutoFormatTable & GetTableStyles() const
Definition: doc.hxx:1240
SvMacroItemId
void SetTmpDocShell(SfxObjectShellLock rLock)
in case during copying of embedded object a new shell is created, it should be set here and cleaned l...
Definition: doc.hxx:1360
SvxFrameDirection
Dialog to specify the properties of date form field.
std::unordered_map< OUString, SwNumRule * > maNumRuleMap
Definition: doc.hxx:272
std::unique_ptr< IStyleAccess > mpStyleAccess
Definition: doc.hxx:277
void SetClipBoard(bool bNew)
Definition: doc.hxx:967
const SwCellStyleTable & GetCellStyles() const
Definition: doc.hxx:1253
float x
The root element of a Writer document layout.
Definition: rootfrm.hxx:82
bool IsInsOnlyTextGlossary() const
Definition: doc.hxx:656
const SwFrameFormats * GetSpzFrameFormats() const
Definition: doc.hxx:744
exports com.sun.star. linguistic2
FieldmarkMode
Definition: rootfrm.hxx:50
Array of Undo-history.
Definition: docary.hxx:197
exports com.sun.star. container
std::unique_ptr< SwURLStateChanged > mpURLStateChgd
Definition: doc.hxx:264
const SwSectionFormats & GetSections() const
Definition: doc.hxx:1341
TableMergeErr
Definition: tblenum.hxx:62
sal_uInt16 sal_Unicode
bool DoesContainAtPageObjWithContentAnchor()
Definition: doc.hxx:572
const SwCharFormat * GetDfltCharFormat() const
Definition: doc.hxx:753
A class that stores temporary data that is needed for rendering the document.
Definition: printdata.hxx:203
provides some methods for generic operations on lists that contain SwFormat* subclasses.
Definition: docary.hxx:43
static SwAutoCompleteWord * s_pAutoCompleteWords
Definition: doc.hxx:329
std::unique_ptr< SwFrameFormats > mpTableFrameFormatTable
Definition: doc.hxx:243
void cleanupUnoCursorTable() const
Definition: doc.hxx:1642
const std::unique_ptr< ::sw::DocumentRedlineManager > m_pDocumentRedlineManager
Definition: doc.hxx:213
const SwTextFormatColl * GetDfltTextFormatColl() const
Definition: doc.hxx:778
SwTOXSearch
Definition: toxe.hxx:22
const Link< bool, void > & GetOle2Link() const
Definition: doc.hxx:1331
std::unique_ptr< SwNumRuleTable > mpNumRuleTable
Definition: doc.hxx:269
Footer, for pageformats Client of FrameFormat describing the footer.
Definition: fmthdft.hxx:64
SwTOIKeyType
Definition: toxe.hxx:30
std::unique_ptr< IGrammarContact > mpGrammarContact
Definition: doc.hxx:281
void SetTOIAutoMarkURL(const OUString &rSet)
Definition: doc.hxx:954
std::unique_ptr< ::sw::DocumentDeviceManager > m_pDeviceAccess
Definition: doc.hxx:218
css::uno::Reference< css::container::XNameContainer > mxXForms
Definition: doc.hxx:207
sal_uInt32 mnRsid
Definition: doc.hxx:295
std::unique_ptr< SwFrameFormats > mpSpzFrameFormatTable
Definition: doc.hxx:241
void SetInXMLImport(bool bNew)
Definition: doc.hxx:973
RowColMode
Definition: doc.hxx:1200
SwDocShell * mpDocShell
Definition: doc.hxx:259
const std::unique_ptr< ::sw::DocumentListsManager > m_pDocumentListsManager
Definition: doc.hxx:222
SfxStyleFamily
SwFrameFormats * GetTableFrameFormats()
Definition: doc.hxx:814
SwCharFormat * GetDfltCharFormat()
Definition: doc.hxx:754
const std::unique_ptr< ::sw::DocumentStateManager > m_pDocumentStateManager
Definition: doc.hxx:214
void SetDocumentType(DocumentType eDocType)
Definition: doc.hxx:397
Specific frame formats (frames, DrawObjects).
SwLayoutCache * GetLayoutCache() const
Definition: doc.hxx:1546
void SetContainsAtPageObjWithContentAnchor(const bool bFlag)
Definition: doc.hxx:568
Base class for various Writer styles.
Definition: format.hxx:46
SwDBData maDBData
Definition: doc.hxx:203
const std::unique_ptr< ::sw::DocumentChartDataProviderManager > m_pDocumentChartDataProviderManager
Definition: doc.hxx:217
const SwPagePreviewPrtData * GetPreviewPrtData() const
Definition: doc.hxx:1461
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:136
struct _xmlTextWriter * xmlTextWriterPtr
std::unique_ptr< SwTableAutoFormatTable > m_pTableStyles
Table styles (autoformats that are applied with table changes).
Definition: doc.hxx:287
void SetOLEPrtNotifyPending(bool bSet=true)
Definition: doc.hxx:1685
bool sw_GetPostIts(const IDocumentFieldsAccess &rIDFA, SetGetExpFields *pSrtLst)
Definition: doc.cxx:515
std::unique_ptr< SwTextFormatColls > mpTextFormatCollTable
Definition: doc.hxx:244
void SetInWriterfilterImport(bool const b)
Definition: doc.hxx:975
const OUString & getDocAccTitle() const
Definition: doc.hxx:555
Style of a layout element.
Definition: frmfmt.hxx:58
bool IsPrepareSelAll() const
Definition: doc.hxx:565
bool IsOLEPrtNotifyPending() const
Definition: doc.hxx:561
SwNodeType
Definition: ndtyp.hxx:28
MissingDictionary meDictionaryMissing
Definition: doc.hxx:323
std::unique_ptr< SwTOXTypes > mpTOXTypes
Definition: doc.hxx:247
const SfxObjectShellLock & GetTmpDocShell() const
Definition: doc.hxx:1361
void SetDBManager(SwDBManager *pNewMgr)
Definition: doc.hxx:668
void SetAllScriptItem(SfxItemSet &rSet, const SfxPoolItem &rItem)
Definition: poolfmt.cxx:41
std::unique_ptr< SwLayoutCache > mpLayoutCache
Layout cache to read and save with the document for a faster formatting.
Definition: doc.hxx:278
Document statistics information.
const SwPageDesc & GetPageDesc(const size_t i) const
Definition: doc.hxx:883
std::vector< std::weak_ptr< SwUnoCursor > > mvUnoCursorTable
Definition: doc.hxx:1639
void SetInWriting(bool bNew)
Definition: doc.hxx:960
std::unique_ptr< SwEndNoteInfo > mpEndNoteInfo
Definition: doc.hxx:255
FlyCntType
Definition: flyenum.hxx:23
const std::unique_ptr< ::sw::mark::MarkManager > mpMarkManager
Definition: doc.hxx:210
const SwDocShell * GetDocShell() const
Definition: doc.hxx:1355
Document fields related interfaces.
void FinitCore()
Definition: init.cxx:671
SplitTable_HeadlineOption
Definition: tblenum.hxx:53
SwFieldIds
Definition: fldbas.hxx:44
void SetTextFormatColl(const css::uno::Any &rAny, SwPaM &rPaM)
const SwFrameFormat * GetEmptyPageFormat() const
Definition: doc.hxx:749
void SetUpdateTOX(bool bFlag)
Definition: doc.hxx:950
std::unique_ptr< SwTextFormatColl > mpDfltTextFormatColl
Definition: doc.hxx:236
std::unique_ptr< SwFrameFormat > mpColumnContFormat
Definition: doc.hxx:234
size_t GetPageDescCnt() const
Definition: doc.hxx:882
void setDocAccTitle(const OUString &rTitle)
Definition: doc.hxx:554
void UpdateAllCharts()
Definition: doc.hxx:1295
const SwFrameFormat * GetColumnContFormat() const
Definition: doc.hxx:751
void SetInLoadAsynchron(bool bFlag)
Definition: doc.hxx:1371
css::uno::Reference< css::linguistic2::XProofreadingIterator > m_xGCIterator
Definition: doc.hxx:208
Provides access to settings of a document.
std::mutex mNumberFormatterMutex
Definition: doc.hxx:266
SwNumRule * mpOutlineRule
Definition: doc.hxx:253
std::unique_ptr< SwPagePreviewPrtData > m_pPgPViewPrtData
Definition: doc.hxx:274
Link< bool, void > maOle2Link
Definition: doc.hxx:198
Marks a node in the document model.
Definition: ndindex.hxx:31
DocumentType
Definition: doc.hxx:391
Document links administration interface.
Text operation/manipulation interface.
void SetInReading(bool bNew)
Definition: doc.hxx:957
std::unique_ptr< SwGrfFormatColls > mpGrfFormatCollTable
Definition: doc.hxx:245
SwNodes const & GetNodes() const
Definition: doc.hxx:409
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
void CopyHeader(const SwFrameFormat &rSrcFormat, SwFrameFormat &rDestFormat)
Copy header (with contents) from SrcFormat to DestFormat (can also be copied into other document)...
Definition: doc.hxx:896
std::unique_ptr< SwFrameFormat > mpEmptyPageFormat
Definition: doc.hxx:233
bool IsInReading() const
Definition: doc.hxx:956
SvNumberFormatter * mpNumberFormatter
Definition: doc.hxx:267
tools::Long SwTwips
Definition: swtypes.hxx:49
const std::unique_ptr< ::sw::DocumentDrawModelManager > m_pDocumentDrawModelManager
Definition: doc.hxx:212
SwTable is one table in the document model, containing rows (which contain cells).
Definition: swtable.hxx:111
SwFrameFormats * GetFrameFormats()
Definition: doc.hxx:739
RedlineMode
Definition: rootfrm.hxx:45
const SwTOXTypes & GetTOXTypes() const
Definition: doc.hxx:981
Provides access to the lists of a document.
< purpose of derivation from SwClient: character style for displaying the numbers.
Definition: lineinfo.hxx:37
The Undo actions need to create new Shell cursors.
const SwFrameFormat * GetDfltFrameFormat() const
Definition: doc.hxx:747
std::unique_ptr< SwSectionFormats > mpSectionFormatTable
Definition: doc.hxx:242
std::unique_ptr< ::sfx2::IXmlIdRegistry > m_pXmlIdRegistry
Definition: doc.hxx:291
bool IsDictionaryMissing() const
Returns true if no dictionary can be found for any content.
Definition: doc.hxx:1661
Provides access to the formatting devices of a document.
const css::uno::Reference< css::container::XNameContainer > & getXForms() const
Definition: doc.hxx:1603
void ClrContourCache()
Definition: txtfly.cxx:145
OUString msTOIAutoMarkURL
Definition: doc.hxx:204
bool mbOLEPrtNotifyPending
TRUE: Printer has changed.
Definition: doc.hxx:313
const SvNumberFormatter * GetNumberFormatter(bool bCreate=true) const
Definition: doc.hxx:1421
const std::unique_ptr< ::sw::DocumentTimerManager > m_pDocumentTimerManager
Definition: doc.hxx:219
SwTextFormatColl * FindTextFormatCollByName(std::u16string_view rName) const
Definition: doc.hxx:801
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:80
void InitCore()
Definition: init.cxx:454
const SwFootnoteIdxs & GetFootnoteIdxs() const
Definition: doc.hxx:634
const std::unique_ptr< ::sw::MetaFieldManager > m_pMetaFieldManager
Definition: doc.hxx:211
std::unique_ptr< SwAutoCorrExceptWord > mpACEWord
For the automated takeover of auto-corrected words that are "re-corrected".
Definition: doc.hxx:262
const SwCharFormats * GetCharFormats() const
Definition: doc.hxx:740
const std::unique_ptr< ::sw::DocumentStatisticsManager > m_pDocumentStatisticsManager
Definition: doc.hxx:226
void CopyFooter(const SwFrameFormat &rSrcFormat, SwFrameFormat &rDestFormat)
Copy footer (with contents) from SrcFormat to DestFormat.
Definition: doc.hxx:901
SwTableNode * IsIdxInTable(const SwNodeIndex &rIdx)
Definition: ndtbl.cxx:212
const SwTextFormatColls * GetTextFormatColls() const
Definition: doc.hxx:780
std::unique_ptr< SwCharFormat > mpDfltCharFormat
Definition: doc.hxx:235
bool IsInLoadAsynchron() const
Definition: doc.hxx:1370
unsigned char sal_uInt8
Provides outline nodes of a document.
css::uno::Reference< css::container::XNameContainer > m_xTemplateToProjectCache
Definition: doc.hxx:284
bool IsCopyIsMove() const
Definition: doc.hxx:1374
const SwNumRuleTable & GetNumRuleTable() const
Definition: doc.hxx:1068
void SetColumnSelection(bool bNew)
Definition: doc.hxx:970
const css::uno::Reference< css::container::XNameContainer > & GetVBATemplateToProjectCache() const
Definition: doc.hxx:1622
std::unique_ptr< SwCharFormats > mpCharFormatTable
Definition: doc.hxx:240
bool IsClipBoard() const
Definition: doc.hxx:965
SwNodes & GetNodes()
Definition: doc.hxx:408
SwFrameFormat * GetColumnContFormat()
Definition: doc.hxx:752
const std::unique_ptr< ::sw::DocumentExternalDataManager > m_pDocumentExternalDataManager
Definition: doc.hxx:229
SwFrameFormat * GetEmptyPageFormat()
Definition: doc.hxx:750
std::unique_ptr< SwFrameFormats > mpFrameFormatTable
Definition: doc.hxx:239
SwTableBox is one table cell in the document model.
Definition: swtable.hxx:392
Get information about the current document state.
Organizer of the contact between SwTextNodes and grammar checker.
std::unique_ptr< SwFootnoteIdxs > mpFootnoteIdxs
Definition: doc.hxx:257
SwTextFormatColls * GetTextFormatColls()
Definition: doc.hxx:781
const std::unique_ptr< ::sw::DocumentFieldsManager > m_pDocumentFieldsManager
Definition: doc.hxx:225
Header, for PageFormats Client of FrameFormat describing the header.
Definition: fmthdft.hxx:33
bool IsAutoFormatRedline() const
Definition: doc.hxx:1449
std::unique_ptr< SwCellStyleTable > mpCellStyles
Cell Styles not assigned to a Table Style.
Definition: doc.hxx:289
const std::unique_ptr< ::sw::DocumentStylePoolManager > m_pDocumentStylePoolManager
Definition: doc.hxx:228
SwFormat *(SwDoc::* FNCopyFormat)(const OUString &, SwFormat *, bool, bool)
Definition: doc.hxx:338
std::unique_ptr< SwDBManager, o3tl::default_delete< SwDBManager > > m_pOwnDBManager
Definition: doc.hxx:250
bool IsInDtor() const
Definition: doc.hxx:403
Provides access to the layout of a document.
SwFootnoteIdxs & GetFootnoteIdxs()
Definition: doc.hxx:633
Access to the style pool.
bool HasTableStyles() const
Counts table styles without triggering lazy-load of them.
Definition: doc.hxx:1245
RndStdIds
std::unique_ptr< SwFrameFormat > mpDfltFrameFormat
Definition: doc.hxx:232
std::unique_ptr< SwLineNumberInfo > mpLineNumberInfo
Definition: doc.hxx:256
Give access to the data-provider for chart.
css::uno::Reference< css::script::vba::XVBAEventProcessor > mxVbaEvents
Definition: doc.hxx:283
const std::unique_ptr< ::sw::DocumentSettingManager > m_pDocumentSettingManager
Definition: doc.hxx:216
void SetInMailMerge(bool bNew)
Definition: doc.hxx:963
void SetLanguage(SwWrtShell &rWrtSh, std::u16string_view rLangText, bool bIsForSelection, SfxItemSet &rCoreSet)
Definition: langhelper.cxx:219
const SwFrameFormats * GetFrameFormats() const
Definition: doc.hxx:738
bool ContainsMSVBasic() const
Definition: doc.hxx:1537
const std::unique_ptr< ::sw::DocumentLinksAdministrationManager > m_pDocumentLinksAdministrationManager
Definition: doc.hxx:220
const SwGrfFormatColl * GetDfltGrfFormatColl() const
Definition: doc.hxx:806
IStyleAccess & GetIStyleAccess()
Definition: doc.hxx:757
std::unique_ptr< SwFootnoteInfo > mpFootnoteInfo
Definition: doc.hxx:254
SwFrameFormat * GetDfltFrameFormat()
Definition: doc.hxx:748
SwSectionFormats & GetSections()
Definition: doc.hxx:1340
void SetContainsMSVBasic(bool bFlag)
Definition: doc.hxx:1538
bool mbAllOLENotify
Definition: doc.hxx:315
SwChainRet
Definition: flyenum.hxx:33
std::shared_ptr< osl::Mutex > const & lock()
const SwFootnoteInfo & GetFootnoteInfo() const
Definition: doc.hxx:629
SwGrfFormatColl * GetDfltGrfFormatColl()
Definition: doc.hxx:807
DocumentType GetDocumentType() const
Definition: doc.hxx:396
const SwEndNoteInfo & GetEndNoteInfo() const
Definition: doc.hxx:631
SwCellFrame is one table cell in the document layout.
Definition: cellfrm.hxx:30
SwExtTextInput * mpExtInputRing
Definition: doc.hxx:275
SwDBManager * GetDBManager() const
Definition: doc.hxx:669
static SwPageDesc * FindPageDesc(SwDoc *pDoc, sal_uInt16 nPoolId)
Definition: htmlcss1.cxx:1327
bool IsInWriterfilterImport() const
Definition: doc.hxx:974
bool IsInXMLImport() const
Definition: doc.hxx:972
const SwAttrPool & GetAttrPool() const
Definition: doc.hxx:1321
std::unique_ptr< SwGrfFormatColl > mpDfltGrfFormatColl
Definition: doc.hxx:237
SwNumRule * GetOutlineNumRule() const
Definition: doc.hxx:1026
void SetVBATemplateToProjectCache(css::uno::Reference< css::container::XNameContainer > const &xCache)
Definition: doc.hxx:1621
MissingDictionary
Definition: doc.hxx:322
void SetAutoFormatRedline(bool bFlag)
Definition: doc.hxx:1450
SwCharFormats * GetCharFormats()
Definition: doc.hxx:741
Base class of the Writer document model elements.
Definition: node.hxx:80