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