xref: /AOO41X/main/sw/inc/doc.hxx (revision ca62e2c2083b5d0995f1245bad6c2edfb455fbec)
11d2dbeb0SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
31d2dbeb0SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
41d2dbeb0SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
51d2dbeb0SAndrew Rist  * distributed with this work for additional information
61d2dbeb0SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
71d2dbeb0SAndrew Rist  * to you under the Apache License, Version 2.0 (the
81d2dbeb0SAndrew Rist  * "License"); you may not use this file except in compliance
91d2dbeb0SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
111d2dbeb0SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
131d2dbeb0SAndrew Rist  * Unless required by applicable law or agreed to in writing,
141d2dbeb0SAndrew Rist  * software distributed under the License is distributed on an
151d2dbeb0SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
161d2dbeb0SAndrew Rist  * KIND, either express or implied.  See the License for the
171d2dbeb0SAndrew Rist  * specific language governing permissions and limitations
181d2dbeb0SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
201d2dbeb0SAndrew Rist  *************************************************************/
211d2dbeb0SAndrew Rist 
221d2dbeb0SAndrew Rist 
23cdf0e10cSrcweir #ifndef SW_DOC_HXX
24cdf0e10cSrcweir #define SW_DOC_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir /** SwDoc interfaces */
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #include <IInterface.hxx>
29cdf0e10cSrcweir #include <IDocumentSettingAccess.hxx>
30cdf0e10cSrcweir #include <IDocumentDeviceAccess.hxx>
31cdf0e10cSrcweir #include <IDocumentMarkAccess.hxx>
32cdf0e10cSrcweir #include <IDocumentRedlineAccess.hxx>
33cdf0e10cSrcweir #include <IDocumentLinksAdministration.hxx>
34cdf0e10cSrcweir #include <IDocumentFieldsAccess.hxx>
35cdf0e10cSrcweir #include <IDocumentContentOperations.hxx>
36cdf0e10cSrcweir #include <IDocumentStylePoolAccess.hxx>
37cdf0e10cSrcweir #include <IDocumentLineNumberAccess.hxx>
38cdf0e10cSrcweir #include <IDocumentStatistics.hxx>
39cdf0e10cSrcweir #include <IDocumentState.hxx>
40cdf0e10cSrcweir #include <IDocumentDrawModelAccess.hxx>
41cdf0e10cSrcweir #include <IDocumentLayoutAccess.hxx>
42cdf0e10cSrcweir #include <IDocumentTimerAccess.hxx>
43cdf0e10cSrcweir #include <IDocumentChartDataProviderAccess.hxx>
44cdf0e10cSrcweir // --> OD 2007-10-26 #i83479#
45cdf0e10cSrcweir #include <IDocumentOutlineNodes.hxx>
46cdf0e10cSrcweir #include <IDocumentListItems.hxx>
47cdf0e10cSrcweir #include <set>
48cdf0e10cSrcweir // <--
49cdf0e10cSrcweir // --> OD 2008-03-12 #refactorlists#
50cdf0e10cSrcweir #include <IDocumentListsAccess.hxx>
51cdf0e10cSrcweir class SwList;
52cdf0e10cSrcweir // <--
53cdf0e10cSrcweir #include <IDocumentExternalData.hxx>
54cdf0e10cSrcweir #define _SVSTDARR_STRINGSDTOR
55cdf0e10cSrcweir #include <svl/svstdarr.hxx>
56cdf0e10cSrcweir #include <com/sun/star/embed/XEmbeddedObject.hpp>
57cdf0e10cSrcweir #include <com/sun/star/embed/XStorage.hpp>
58cdf0e10cSrcweir #include <vcl/timer.hxx>
59cdf0e10cSrcweir #include "swdllapi.h"
60cdf0e10cSrcweir #include <swtypes.hxx>
61cdf0e10cSrcweir #include <swatrset.hxx>
62cdf0e10cSrcweir #include <toxe.hxx>   	  		// enums
63cdf0e10cSrcweir #include <flyenum.hxx>
64cdf0e10cSrcweir #include <itabenum.hxx>
65cdf0e10cSrcweir #include <swdbdata.hxx>
66cdf0e10cSrcweir #include <chcmprse.hxx>
67cdf0e10cSrcweir #include <com/sun/star/linguistic2/XSpellChecker1.hpp>
68cdf0e10cSrcweir #include <com/sun/star/linguistic2/XHyphenatedWord.hpp>
69cdf0e10cSrcweir #include <vos/ref.hxx>
70cdf0e10cSrcweir #include <svx/svdtypes.hxx>
71cdf0e10cSrcweir #include <sfx2/objsh.hxx>
72cdf0e10cSrcweir #include <svl/style.hxx>
73cdf0e10cSrcweir #include <editeng/numitem.hxx>
74cdf0e10cSrcweir #include "comphelper/implementationreference.hxx"
75cdf0e10cSrcweir #include <com/sun/star/chart2/data/XDataProvider.hpp>
76cdf0e10cSrcweir #include <com/sun/star/linguistic2/XProofreadingIterator.hpp>
77cdf0e10cSrcweir #ifdef FUTURE_VBA
78cdf0e10cSrcweir #include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
79cdf0e10cSrcweir #endif
80cdf0e10cSrcweir 
81cdf0e10cSrcweir #include <hash_map>
82cdf0e10cSrcweir #include <stringhash.hxx>
83cdf0e10cSrcweir 
84cdf0e10cSrcweir #include <svtools/embedhlp.hxx>
85cdf0e10cSrcweir #include <vector>
86cdf0e10cSrcweir #include <set>
87cdf0e10cSrcweir #include <map>
88cdf0e10cSrcweir #include <memory>
89cdf0e10cSrcweir 
90cdf0e10cSrcweir #include <boost/scoped_ptr.hpp>
918bfab1dfSMathias Bauer #include <boost/shared_ptr.hpp>
9237fb9221SArmin Le Grand #include <flypos.hxx>
93cdf0e10cSrcweir 
94cdf0e10cSrcweir class SvxForbiddenCharactersTable;
95cdf0e10cSrcweir class SwExtTextInput;
96cdf0e10cSrcweir class DateTime;
97cdf0e10cSrcweir class EditFieldInfo;
98cdf0e10cSrcweir class JobSetup;
99cdf0e10cSrcweir class Color;
100cdf0e10cSrcweir class KeyCode;
101cdf0e10cSrcweir class Outliner;
102cdf0e10cSrcweir class OutputDevice;
103cdf0e10cSrcweir class Point;
104cdf0e10cSrcweir class SbxArray;
105cdf0e10cSrcweir class SdrModel;
106cdf0e10cSrcweir class SdrObject;
107cdf0e10cSrcweir class SdrUndoAction;
108cdf0e10cSrcweir class VirtualDevice;
109cdf0e10cSrcweir class SfxPrinter;
110cdf0e10cSrcweir class SvNumberFormatter;
111cdf0e10cSrcweir class SvStringsSort;
112cdf0e10cSrcweir class SvUShorts;
113cdf0e10cSrcweir class SvUShortsSort;
114cdf0e10cSrcweir class SvxMacro;
115cdf0e10cSrcweir class SvxMacroTableDtor;
116cdf0e10cSrcweir class SvxBorderLine;
117cdf0e10cSrcweir class SwAutoCompleteWord;
118cdf0e10cSrcweir class SwAutoCorrExceptWord;
119cdf0e10cSrcweir class SwCalc;
120cdf0e10cSrcweir class SwCellFrm;
121cdf0e10cSrcweir class SwCharFmt;
122cdf0e10cSrcweir class SwCharFmts;
123cdf0e10cSrcweir class SwConditionTxtFmtColl;
124cdf0e10cSrcweir class SwCrsrShell;
125cdf0e10cSrcweir class SwCursor;
126cdf0e10cSrcweir class SwDBNameInfField;
127cdf0e10cSrcweir class SwDocShell;
128cdf0e10cSrcweir class SwDocUpdtFld;
129cdf0e10cSrcweir class SwDrawFrmFmt;
130cdf0e10cSrcweir class SwDrawView;
131cdf0e10cSrcweir class SwEditShell;
132cdf0e10cSrcweir class SwFieldType;
133cdf0e10cSrcweir class SwField;
134cdf0e10cSrcweir class SwTxtFld;
135cdf0e10cSrcweir class SwFldTypes;
136cdf0e10cSrcweir class SwFlyFrmFmt;
137cdf0e10cSrcweir class SwFmt;
138cdf0e10cSrcweir class SwFmtINetFmt;
139cdf0e10cSrcweir class SwFmtRefMark;
140cdf0e10cSrcweir class SwFrmFmt;
141cdf0e10cSrcweir class SwFrmFmts;
142cdf0e10cSrcweir class SwFtnIdxs;
143cdf0e10cSrcweir class SwFtnInfo;
144cdf0e10cSrcweir class SwEndNoteInfo;
145cdf0e10cSrcweir class GraphicObject;
146cdf0e10cSrcweir class SwGrfFmtColl;
147cdf0e10cSrcweir class SwGrfFmtColls;
148cdf0e10cSrcweir class SwLineNumberInfo;
149cdf0e10cSrcweir class SwNewDBMgr;
150cdf0e10cSrcweir class SwNoTxtNode;
151cdf0e10cSrcweir class SwNodeIndex;
152cdf0e10cSrcweir class SwNodeRange;
153cdf0e10cSrcweir class SwNodes;
154cdf0e10cSrcweir class SwNumRule;
155cdf0e10cSrcweir class SwNumRuleTbl;
156cdf0e10cSrcweir class SwPageDesc;
157cdf0e10cSrcweir class SwPagePreViewPrtData;
158cdf0e10cSrcweir class SwRedline;
159cdf0e10cSrcweir class SwRedlineTbl;
160cdf0e10cSrcweir class SwRootFrm;
161cdf0e10cSrcweir class SwRubyList;
162cdf0e10cSrcweir class SwRubyListEntry;
163cdf0e10cSrcweir class SwSectionFmt;
164cdf0e10cSrcweir class SwSectionFmts;
165cdf0e10cSrcweir class SwSectionData;
166cdf0e10cSrcweir class SwSelBoxes;
167cdf0e10cSrcweir class SwSpzFrmFmts;
168cdf0e10cSrcweir class SwTOXBase;
169cdf0e10cSrcweir class SwTOXBaseSection;
170cdf0e10cSrcweir class SwTOXMark;
171cdf0e10cSrcweir class SwTOXMarks;
172cdf0e10cSrcweir class SwTOXType;
173cdf0e10cSrcweir class SwTOXTypes;
174cdf0e10cSrcweir class SwTabCols;
175cdf0e10cSrcweir class SwTable;
176cdf0e10cSrcweir class SwTableAutoFmt;
177cdf0e10cSrcweir class SwTableBox;
178cdf0e10cSrcweir class SwTableBoxFmt;
179cdf0e10cSrcweir class SwTableFmt;
180cdf0e10cSrcweir class SwTableLineFmt;
181cdf0e10cSrcweir class SwTableNode;
182cdf0e10cSrcweir class SwTextBlocks;
183cdf0e10cSrcweir class SwTxtFmtColl;
184cdf0e10cSrcweir class SwTxtFmtColls;
185cdf0e10cSrcweir class SwURLStateChanged;
186cdf0e10cSrcweir class SwUnoCrsr;
187cdf0e10cSrcweir class SwUnoCrsrTbl;
188cdf0e10cSrcweir class ViewShell;
189cdf0e10cSrcweir class _SetGetExpFld;
190cdf0e10cSrcweir class SwDrawContact;
191cdf0e10cSrcweir class SwLayouter;
192cdf0e10cSrcweir class SdrView;
193cdf0e10cSrcweir class SdrMarkList;
194cdf0e10cSrcweir class SwAuthEntry;
195cdf0e10cSrcweir class SwLayoutCache;
196cdf0e10cSrcweir class IStyleAccess;
197cdf0e10cSrcweir struct SwCallMouseEvent;
198cdf0e10cSrcweir struct SwDocStat;
199cdf0e10cSrcweir struct SwHash;
200cdf0e10cSrcweir struct SwSortOptions;
201cdf0e10cSrcweir struct SwDefTOXBase_Impl;
202cdf0e10cSrcweir class SwPrintData;
203cdf0e10cSrcweir class SwPrintUIOptions;
204cdf0e10cSrcweir class SdrPageView;
205cdf0e10cSrcweir struct SwConversionArgs;
206cdf0e10cSrcweir class SwRewriter;
207cdf0e10cSrcweir class SwMsgPoolItem;
208cdf0e10cSrcweir class SwChartDataProvider;
209cdf0e10cSrcweir class SwChartLockController_Helper;
210cdf0e10cSrcweir class IGrammarContact;
211cdf0e10cSrcweir class SwPrintData;
212cdf0e10cSrcweir class SwRenderData;
213cdf0e10cSrcweir class SwPageFrm;
214cdf0e10cSrcweir class SwViewOption;
215cdf0e10cSrcweir class IDocumentUndoRedo;
216cdf0e10cSrcweir 
217cdf0e10cSrcweir namespace sw { namespace mark {
218cdf0e10cSrcweir     class MarkManager;
219cdf0e10cSrcweir }}
220cdf0e10cSrcweir namespace sw {
221cdf0e10cSrcweir     class MetaFieldManager;
222cdf0e10cSrcweir     class UndoManager;
223cdf0e10cSrcweir     class IShellCursorSupplier;
224cdf0e10cSrcweir }
225cdf0e10cSrcweir 
226cdf0e10cSrcweir namespace com { namespace sun { namespace star {
227cdf0e10cSrcweir namespace i18n {
228cdf0e10cSrcweir 	struct ForbiddenCharacters;    // comes from the I18N UNO interface
229cdf0e10cSrcweir }
230cdf0e10cSrcweir namespace uno {
231cdf0e10cSrcweir 	template < class > class Sequence;
232cdf0e10cSrcweir }
233cdf0e10cSrcweir namespace container {
234cdf0e10cSrcweir 	class XNameContainer; // for getXForms()/isXForms()/initXForms() methods
235cdf0e10cSrcweir }
236cdf0e10cSrcweir }}}
237cdf0e10cSrcweir 
238cdf0e10cSrcweir namespace sfx2 {
239cdf0e10cSrcweir 	class SvLinkSource;
240cdf0e10cSrcweir     class IXmlIdRegistry;
241cdf0e10cSrcweir     class LinkManager;
242cdf0e10cSrcweir }
243cdf0e10cSrcweir 
244cdf0e10cSrcweir //PageDescriptor-Schnittstelle, Array hier wegen inlines.
245cdf0e10cSrcweir typedef SwPageDesc* SwPageDescPtr;
246cdf0e10cSrcweir SV_DECL_PTRARR_DEL( SwPageDescs, SwPageDescPtr, 4, 4 )
247cdf0e10cSrcweir 
248cdf0e10cSrcweir // forward declartion
249cdf0e10cSrcweir void SetAllScriptItem( SfxItemSet& rSet, const SfxPoolItem& rItem );
250cdf0e10cSrcweir 
251cdf0e10cSrcweir // global function to start grammar checking in the document
252cdf0e10cSrcweir void StartGrammarChecking( SwDoc &rDoc );
253cdf0e10cSrcweir 
254cdf0e10cSrcweir class SW_DLLPUBLIC SwDoc :
255cdf0e10cSrcweir     public IInterface,
256cdf0e10cSrcweir     public IDocumentSettingAccess,
257cdf0e10cSrcweir     public IDocumentDeviceAccess,
258cdf0e10cSrcweir     public IDocumentRedlineAccess,
259cdf0e10cSrcweir     public IDocumentLinksAdministration,
260cdf0e10cSrcweir     public IDocumentFieldsAccess,
261cdf0e10cSrcweir     public IDocumentContentOperations,
262cdf0e10cSrcweir     public IDocumentStylePoolAccess,
263cdf0e10cSrcweir     public IDocumentLineNumberAccess,
264cdf0e10cSrcweir     public IDocumentStatistics,
265cdf0e10cSrcweir     public IDocumentState,
266cdf0e10cSrcweir     public IDocumentDrawModelAccess,
267cdf0e10cSrcweir     public IDocumentLayoutAccess,
268cdf0e10cSrcweir     public IDocumentTimerAccess,
269cdf0e10cSrcweir     public IDocumentChartDataProviderAccess,
270cdf0e10cSrcweir     // --> OD 2007-10-26 #i83479#
271cdf0e10cSrcweir     public IDocumentListItems,
272cdf0e10cSrcweir     public IDocumentOutlineNodes,
273cdf0e10cSrcweir     // <--
274cdf0e10cSrcweir     // --> OD 2008-03-12 #refactorlists#
275cdf0e10cSrcweir     public IDocumentListsAccess,
276cdf0e10cSrcweir     // <--
277cdf0e10cSrcweir     public IDocumentExternalData
278cdf0e10cSrcweir {
279cdf0e10cSrcweir 
280cdf0e10cSrcweir 	friend void _InitCore();
281cdf0e10cSrcweir 	friend void _FinitCore();
282cdf0e10cSrcweir 
283cdf0e10cSrcweir     //---------------- private Member --------------------------------
284cdf0e10cSrcweir 
285cdf0e10cSrcweir 	// -------------------------------------------------------------------
286cdf0e10cSrcweir     ::boost::scoped_ptr<SwNodes> m_pNodes;  /// document content (Nodes Array)
287cdf0e10cSrcweir 	SwAttrPool*	mpAttrPool;				// der Attribut Pool
288cdf0e10cSrcweir 	SwPageDescs	aPageDescs;				// PageDescriptoren
289cdf0e10cSrcweir 	Link 		aOle2Link;				// OLE 2.0-Benachrichtigung
290cdf0e10cSrcweir     /* @@@MAINTAINABILITY-HORROR@@@
291cdf0e10cSrcweir        Timer should not be members of the model
292cdf0e10cSrcweir     */
293cdf0e10cSrcweir     Timer       aIdleTimer;             // der eigene IdleTimer
294cdf0e10cSrcweir 	Timer		aOLEModifiedTimer; 		// Timer for update modified OLE-Objecs
295cdf0e10cSrcweir 	SwDBData	aDBData;				// database descriptor
296cdf0e10cSrcweir 	::com::sun::star::uno::Sequence <sal_Int8 > aRedlinePasswd;
297cdf0e10cSrcweir 	String		sTOIAutoMarkURL; 		// ::com::sun::star::util::URL of table of index AutoMark file
298cdf0e10cSrcweir 	SvStringsDtor aPatternNms;			// Array fuer die Namen der Dokument-Vorlagen
299cdf0e10cSrcweir 	com::sun::star::uno::Reference<com::sun::star::container::XNameContainer>
300cdf0e10cSrcweir         xXForms;                        // container with XForms models
301cdf0e10cSrcweir     mutable com::sun::star::uno::Reference< com::sun::star::linguistic2::XProofreadingIterator > m_xGCIterator;
302cdf0e10cSrcweir 
303cdf0e10cSrcweir     const ::boost::scoped_ptr< ::sw::mark::MarkManager> pMarkManager;
304cdf0e10cSrcweir     const ::boost::scoped_ptr< ::sw::MetaFieldManager > m_pMetaFieldManager;
305cdf0e10cSrcweir     const ::boost::scoped_ptr< ::sw::UndoManager > m_pUndoManager;
306cdf0e10cSrcweir 
307cdf0e10cSrcweir 	// -------------------------------------------------------------------
308cdf0e10cSrcweir 	// die Pointer
309cdf0e10cSrcweir 								//Defaultformate
310cdf0e10cSrcweir 	SwFrmFmt		*pDfltFrmFmt;
311cdf0e10cSrcweir  	SwFrmFmt		*pEmptyPageFmt;		// Format fuer die Default-Leerseite.
312cdf0e10cSrcweir 	SwFrmFmt		*pColumnContFmt; 	// Format fuer Spaltencontainer
313cdf0e10cSrcweir 	SwCharFmt		*pDfltCharFmt;
314cdf0e10cSrcweir 	SwTxtFmtColl	*pDfltTxtFmtColl;	// Defaultformatcollections
315cdf0e10cSrcweir 	SwGrfFmtColl	*pDfltGrfFmtColl;
316cdf0e10cSrcweir 
317cdf0e10cSrcweir 	SwFrmFmts		*pFrmFmtTbl;		// Formattabellen
318cdf0e10cSrcweir 	SwCharFmts		*pCharFmtTbl;
319cdf0e10cSrcweir 	SwSpzFrmFmts	*pSpzFrmFmtTbl;
320cdf0e10cSrcweir 	SwSectionFmts	*pSectionFmtTbl;
321cdf0e10cSrcweir 	SwFrmFmts		*pTblFrmFmtTbl;		// spz. fuer Tabellen
322cdf0e10cSrcweir 	SwTxtFmtColls	*pTxtFmtCollTbl;	// FormatCollections
323cdf0e10cSrcweir 	SwGrfFmtColls	*pGrfFmtCollTbl;
324cdf0e10cSrcweir 
325cdf0e10cSrcweir 	SwTOXTypes		*pTOXTypes;			// Verzeichnisse
326cdf0e10cSrcweir 	SwDefTOXBase_Impl * pDefTOXBases;	// defaults of SwTOXBase's
327cdf0e10cSrcweir 
328cdf0e10cSrcweir 	ViewShell		*pCurrentView;	// SwDoc should get a new member pCurrentView//swmod 071225
3298bfab1dfSMathias Bauer 	boost::shared_ptr<SwRootFrm> pLayoutPtr;
330cdf0e10cSrcweir 	SdrModel		*pDrawModel;		// StarView Drawing
331cdf0e10cSrcweir 
332cdf0e10cSrcweir 	SwDocUpdtFld 	*pUpdtFlds;			// Struktur zum Field-Update
333cdf0e10cSrcweir 	SwFldTypes		*pFldTypes;			// Feldtypen
334cdf0e10cSrcweir 	SwNewDBMgr 		*pNewDBMgr;			// Pointer auf den neuen DBMgr fuer
335cdf0e10cSrcweir 										// Evaluierung der DB-Fields
336cdf0e10cSrcweir 
337cdf0e10cSrcweir     VirtualDevice   *pVirDev;           // can be used for formatting
338cdf0e10cSrcweir     SfxPrinter      *pPrt;              // can be used for formatting
339cdf0e10cSrcweir     SwPrintData     *pPrtData;          // Print configuration
340cdf0e10cSrcweir 
341cdf0e10cSrcweir 	SwDoc			*pGlossaryDoc;		// Pointer auf das Glossary-Dokument. Dieses
342cdf0e10cSrcweir 
343cdf0e10cSrcweir 	SwNumRule		*pOutlineRule;
344cdf0e10cSrcweir 	SwFtnInfo		*pFtnInfo;
345cdf0e10cSrcweir 	SwEndNoteInfo 	*pEndNoteInfo;
346cdf0e10cSrcweir     SwLineNumberInfo*pLineNumberInfo;
347cdf0e10cSrcweir 	SwFtnIdxs		*pFtnIdxs;
348cdf0e10cSrcweir 	SwDocStat		*pDocStat;			// Statistic Informationen
349cdf0e10cSrcweir 	SvxMacroTableDtor *pMacroTable; 	// Tabelle der dokumentglobalen Macros
350cdf0e10cSrcweir 
351cdf0e10cSrcweir 	SwDocShell		*pDocShell;			// Ptr auf die SfxDocShell vom Doc
352cdf0e10cSrcweir     SfxObjectShellLock xTmpDocShell;    // A temporary shell that is used to copy OLE-Nodes
353cdf0e10cSrcweir 
354cdf0e10cSrcweir 	sfx2::LinkManager	*pLinkMgr;			// Liste von Verknuepften (Grafiken/DDE/OLE)
355cdf0e10cSrcweir 
356cdf0e10cSrcweir 	SwAutoCorrExceptWord *pACEWord;		// fuer die automatische Uebernahme von
357cdf0e10cSrcweir 										// autokorrigierten Woertern, die "zurueck"
358cdf0e10cSrcweir 										// verbessert werden
359cdf0e10cSrcweir 	SwURLStateChanged *pURLStateChgd;	// SfxClient fuer Aenderungen in der
360cdf0e10cSrcweir 										// INetHistory
361cdf0e10cSrcweir 	SvNumberFormatter *pNumberFormatter;	// NumFormatter fuer die Tabellen/Felder
362cdf0e10cSrcweir 
363cdf0e10cSrcweir     mutable SwNumRuleTbl    *pNumRuleTbl;           // Liste aller benannten NumRules
364cdf0e10cSrcweir 
365cdf0e10cSrcweir     // Hash map to find numrules by name
366cdf0e10cSrcweir     mutable std::hash_map<String, SwNumRule *, StringHash> maNumRuleMap;
367cdf0e10cSrcweir 
368cdf0e10cSrcweir     // --> OD 2008-03-12 #refactorlists#
369cdf0e10cSrcweir     typedef std::hash_map< String, SwList*, StringHash > tHashMapForLists;
370cdf0e10cSrcweir     // container to hold the lists of the text document
371cdf0e10cSrcweir     tHashMapForLists maLists;
372cdf0e10cSrcweir     // relation between list style and its default list
373cdf0e10cSrcweir     tHashMapForLists maListStyleLists;
374cdf0e10cSrcweir     // <--
375cdf0e10cSrcweir 
376cdf0e10cSrcweir 	SwRedlineTbl	*pRedlineTbl;			// Liste aller Redlines
377cdf0e10cSrcweir 	String			*pAutoFmtRedlnComment;	// Kommentar fuer Redlines, die
378cdf0e10cSrcweir 										// uebers Autoformat eingefuegt werden
379cdf0e10cSrcweir 	SwUnoCrsrTbl	*pUnoCrsrTbl;
380cdf0e10cSrcweir 
381cdf0e10cSrcweir 	SwPagePreViewPrtData *pPgPViewPrtData;		// Einzuege/Abstaende fuers
382cdf0e10cSrcweir 										// Drucken der Seitenansicht
383cdf0e10cSrcweir 	SwPaM			*pExtInputRing;
384cdf0e10cSrcweir 
385cdf0e10cSrcweir 	SwLayouter		*pLayouter;		// ::com::sun::star::frame::Controller for complex layout formatting
386cdf0e10cSrcweir 									// like footnote/endnote in sections
387cdf0e10cSrcweir     IStyleAccess    *pStyleAccess;  // handling of automatic styles
388cdf0e10cSrcweir     SwLayoutCache   *pLayoutCache;  // Layout cache to read and save with the
389cdf0e10cSrcweir                                     // document for a faster formatting
390cdf0e10cSrcweir 
391cdf0e10cSrcweir     SwModify *pUnoCallBack;
392cdf0e10cSrcweir     IGrammarContact *mpGrammarContact;   // for grammar checking in paragraphs during editing
393cdf0e10cSrcweir 
394cdf0e10cSrcweir     mutable  comphelper::ImplementationReference< SwChartDataProvider
395cdf0e10cSrcweir         , ::com::sun::star::chart2::data::XDataProvider >
396cdf0e10cSrcweir                                 aChartDataProviderImplRef;
397cdf0e10cSrcweir     SwChartLockController_Helper  *pChartControllerHelper;
398cdf0e10cSrcweir 
399cdf0e10cSrcweir 	// table of forbidden characters of this document
400cdf0e10cSrcweir 	vos::ORef<SvxForbiddenCharactersTable>	xForbiddenCharsTable;
401cdf0e10cSrcweir #ifdef FUTURE_VBA
402cdf0e10cSrcweir     com::sun::star::uno::Reference< com::sun::star::script::vba::XVBAEventProcessor > mxVbaEvents;
403cdf0e10cSrcweir #endif
404cdf0e10cSrcweir     // --> OD 2007-10-26 #i83479#
405cdf0e10cSrcweir public:
406cdf0e10cSrcweir     struct lessThanNodeNum
407cdf0e10cSrcweir     {
408cdf0e10cSrcweir         bool operator()( const SwNodeNum* pNodeNumOne,
409cdf0e10cSrcweir                          const SwNodeNum* pNodeNumTwo ) const;
410cdf0e10cSrcweir     };
411cdf0e10cSrcweir 
412cdf0e10cSrcweir     typedef ::std::set< const SwNodeNum*, lessThanNodeNum > tImplSortedNodeNumList;
413cdf0e10cSrcweir private:
414cdf0e10cSrcweir     tImplSortedNodeNumList* mpListItemsList;
415cdf0e10cSrcweir     // <--
416cdf0e10cSrcweir 
417cdf0e10cSrcweir     ::std::auto_ptr< ::sfx2::IXmlIdRegistry > m_pXmlIdRegistry;
418cdf0e10cSrcweir 
419cdf0e10cSrcweir 	// -------------------------------------------------------------------
420cdf0e10cSrcweir 	// sonstige
421cdf0e10cSrcweir 
422cdf0e10cSrcweir 	sal_uInt16 nAutoFmtRedlnCommentNo;	// SeqNo fuers UI-seitige zusammenfassen
423cdf0e10cSrcweir 									// von AutoFmt-Redlines. Wird vom SwAutoFmt
424cdf0e10cSrcweir 									// verwaltet!
425cdf0e10cSrcweir 	sal_uInt16	nLinkUpdMode;		// UpdateMode fuer Links
426cdf0e10cSrcweir     SwFldUpdateFlags    eFldUpdMode;        // Mode fuer Felder/Charts automatisch aktualisieren
427cdf0e10cSrcweir 	RedlineMode_t eRedlineMode;		// aktueller Redline Modus
428cdf0e10cSrcweir 	SwCharCompressType eChrCmprType;	// for ASIAN: compress punctuation/kana
429cdf0e10cSrcweir 
430cdf0e10cSrcweir     sal_Int32   mReferenceCount;
431cdf0e10cSrcweir     sal_Int32   mIdleBlockCount;
432cdf0e10cSrcweir 	sal_Int8	nLockExpFld;		// Wenn != 0 hat UpdateExpFlds() keine Wirkung
433cdf0e10cSrcweir 
434cdf0e10cSrcweir     /* Draw Model Layer IDs
435cdf0e10cSrcweir      * LayerIds, Heaven == ueber dem Dokument
436cdf0e10cSrcweir      * Hell   == unter dem Dokument
437cdf0e10cSrcweir      * Controls == ganz oben
438cdf0e10cSrcweir      */
439cdf0e10cSrcweir     SdrLayerID  nHeaven;
440cdf0e10cSrcweir     SdrLayerID  nHell;
441cdf0e10cSrcweir     SdrLayerID  nControls;
442cdf0e10cSrcweir     SdrLayerID  nInvisibleHeaven;
443cdf0e10cSrcweir     SdrLayerID  nInvisibleHell;
444cdf0e10cSrcweir     SdrLayerID  nInvisibleControls;
445cdf0e10cSrcweir 
446cdf0e10cSrcweir     bool mbGlossDoc              : 1;    //sal_True: ist ein Textbaustein Dokument
447cdf0e10cSrcweir     bool mbModified              : 1;    //sal_True: Dokument ist veraendert
448cdf0e10cSrcweir     bool mbDtor                  : 1;    //sal_True: ist im SwDoc DTOR
449cdf0e10cSrcweir                                          //      leider auch temporaer von
450cdf0e10cSrcweir                                          //      SwSwgReader::InLayout(), wenn fehlerhafte
451cdf0e10cSrcweir                                          //      Frames geloescht werden muessen
452cdf0e10cSrcweir     bool mbPageNums              : 1;    // TRUE: es gibt virtuelle Seitennummern
453cdf0e10cSrcweir     bool mbLoaded                : 1;    // TRUE: ein geladenes Doc
454cdf0e10cSrcweir     bool mbUpdateExpFld          : 1;    // TRUE: Expression-Felder updaten
455cdf0e10cSrcweir     bool mbNewDoc                : 1;    // TRUE: neues Doc
456cdf0e10cSrcweir     bool mbNewFldLst             : 1;    // TRUE: Felder-Liste neu aufbauen
457cdf0e10cSrcweir     bool mbCopyIsMove            : 1;    // TRUE: Copy ist ein verstecktes Move
458cdf0e10cSrcweir     bool mbVisibleLinks          : 1;    // TRUE: Links werden sichtbar eingefuegt
459cdf0e10cSrcweir     bool mbInReading             : 1;    // TRUE: Dokument wird gerade gelesen
460cdf0e10cSrcweir     bool mbInXMLImport           : 1;    // TRUE: During xml import, attribute portion building is not necessary
461cdf0e10cSrcweir     bool mbUpdateTOX             : 1;    // TRUE: nach Dokument laden die TOX Updaten
462cdf0e10cSrcweir     bool mbInLoadAsynchron       : 1;    // TRUE: Dokument wird gerade asynchron geladen
463cdf0e10cSrcweir     bool mbHTMLMode              : 1;    // TRUE: Dokument ist im HTMLMode
464cdf0e10cSrcweir     bool mbInCallModified        : 1;    // TRUE: im Set/Reset-Modified Link
465cdf0e10cSrcweir     bool mbIsGlobalDoc           : 1;    // TRUE: es ist ein GlobalDokument
466cdf0e10cSrcweir     bool mbGlblDocSaveLinks      : 1;    // TRUE: im GlobalDoc. gelinkte Sect. mit speichern
467cdf0e10cSrcweir     bool mbIsLabelDoc            : 1;    // TRUE: es ist ein Etiketten-Dokument
468cdf0e10cSrcweir     bool mbIsAutoFmtRedline      : 1;    // TRUE: die Redlines werden vom Autoformat aufgezeichnet
469cdf0e10cSrcweir     bool mbOLEPrtNotifyPending   : 1;    // TRUE: Printer  ist geaendert und beim
470cdf0e10cSrcweir                                          //       Erzeugen der ::com::sun::star::sdbcx::View ist eine Benachrichtigung
471cdf0e10cSrcweir                                          //       der OLE-Objekte PrtOLENotify() notwendig.
472cdf0e10cSrcweir     bool mbAllOLENotify          : 1;    // True: Benachrichtigung aller Objekte ist notwendig
473cdf0e10cSrcweir     bool mbIsRedlineMove         : 1;    // True: die Redlines werden in/aus der Section verschoben
474cdf0e10cSrcweir     bool mbInsOnlyTxtGlssry      : 1;    // True: insert 'only text' glossary into doc
475cdf0e10cSrcweir     bool mbContains_MSVBasic     : 1;    // True: MS-VBasic exist is in our storage
476cdf0e10cSrcweir     bool mbPurgeOLE              : 1;    // sal_True: Purge OLE-Objects
477cdf0e10cSrcweir     bool mbKernAsianPunctuation  : 1;    // sal_True: kerning also for ASIAN punctuation
478cdf0e10cSrcweir     bool mbReadlineChecked       : 1;    // sal_True: if the query was already shown
479cdf0e10cSrcweir     bool mbLinksUpdated          : 1;    // OD 2005-02-11 #i38810#
480cdf0e10cSrcweir                                          // flag indicating, that the links have been updated.
481cdf0e10cSrcweir     bool mbClipBoard             : 1;    // true: this document represents the clipboard
482cdf0e10cSrcweir     bool mbColumnSelection       : 1;    // true: this content has bee created by a column selection
483cdf0e10cSrcweir                                          //       (clipboard docs only)
484*ca62e2c2SSteve Yin 	//IAccessibility2 Implementation 2009-----
485*ca62e2c2SSteve Yin 	sal_Bool	bIsPrepareSelAll		:1;
486*ca62e2c2SSteve Yin 	//-----IAccessibility2 Implementation 2009
487cdf0e10cSrcweir 
488cdf0e10cSrcweir #ifdef DBG_UTIL
489cdf0e10cSrcweir     bool mbXMLExport : 1;                // sal_True: during XML export
490cdf0e10cSrcweir #endif
491cdf0e10cSrcweir 
492cdf0e10cSrcweir     // --> OD 2006-03-21 #b6375613#
493cdf0e10cSrcweir     // Document flag to trigger conversion, which applys the workaround for documents,
494cdf0e10cSrcweir     // which uses a certain layout defect in OOo 1.x to layout the documents.
495cdf0e10cSrcweir     // This conversion is performed, when the frames for the layout are created.
496cdf0e10cSrcweir     // Thus, this document flag has to be set after load a document and before
497cdf0e10cSrcweir     // creating the document view.
498cdf0e10cSrcweir     bool mbApplyWorkaroundForB6375613 : 1;
499cdf0e10cSrcweir     // <--
500cdf0e10cSrcweir 
5016fddd742SOliver-Rainer Wittmann     // true: Document contains at least one anchored object, which is anchored AT_PAGE with a content position.
5026fddd742SOliver-Rainer Wittmann     //       Thus, certain adjustment needed during formatting for these kind of anchored objects.
5036fddd742SOliver-Rainer Wittmann     bool mbContainsAtPageObjWithContentAnchor : 1;
5046fddd742SOliver-Rainer Wittmann 
505cdf0e10cSrcweir     //
506cdf0e10cSrcweir     // COMPATIBILITY FLAGS START
507cdf0e10cSrcweir     //
508cdf0e10cSrcweir     //
509cdf0e10cSrcweir     // HISTORY OF THE COMPATIBILITY FLAGS:
510cdf0e10cSrcweir     //
511cdf0e10cSrcweir     // SO5:
512cdf0e10cSrcweir     // mbParaSpaceMax                        def = sal_False, sal_True since SO8
513cdf0e10cSrcweir     // mbParaSpaceMaxAtPages                 def = sal_False, sal_True since SO8
514cdf0e10cSrcweir     //
515cdf0e10cSrcweir     // SO6:
516cdf0e10cSrcweir     // mbTabCompat                           def = sal_False, sal_True since SO8
517cdf0e10cSrcweir     //
518cdf0e10cSrcweir     // SO7:
519cdf0e10cSrcweir     // mbUseVirtualDevice                    def = sal_True
520cdf0e10cSrcweir     // mbAddFlyOffsets                       def = sal_False, hidden
521cdf0e10cSrcweir     //
522cdf0e10cSrcweir     // SO7pp1:
523cdf0e10cSrcweir     // bOldNumbering                        def = sal_False, hidden
524cdf0e10cSrcweir     //
525cdf0e10cSrcweir     // SO8:
526cdf0e10cSrcweir     // mbAddExternalLeading                  def = sal_True
527cdf0e10cSrcweir     // mbUseHiResolutionVirtualDevice        def = sal_True, hidden
528cdf0e10cSrcweir     // mbOldLineSpacing                      def = sal_False
529cdf0e10cSrcweir     // mbAddParaSpacingToTableCells          def = sal_True
530cdf0e10cSrcweir     // mbUseFormerObjectPos                  def = sal_False
531cdf0e10cSrcweir     // mbUseFormerTextWrapping               def = sal_False
532cdf0e10cSrcweir     // mbConsiderWrapOnObjPos                def = sal_False
533cdf0e10cSrcweir     //
534cdf0e10cSrcweir     // SO8pp1:
535cdf0e10cSrcweir     // mbIgnoreFirstLineIndentInNumbering    def = sal_False, hidden
536cdf0e10cSrcweir     // mbDoNotJustifyLinesWithManualBreak    def = sal_False, hidden
537cdf0e10cSrcweir     // mbDoNotResetParaAttrsForNumFont       def = sal_False, hidden
538cdf0e10cSrcweir     //
539cdf0e10cSrcweir     // SO8pp3
540cdf0e10cSrcweir     // mbDoNotCaptureDrawObjsOnPage         def = sal_False, hidden
541cdf0e10cSrcweir     // - Relevant for drawing objects, which don't follow the text flow, but
542cdf0e10cSrcweir     //   whose position is outside the page area:
543cdf0e10cSrcweir     //   sal_False: Such drawing objects are captured on the page area of its anchor.
544cdf0e10cSrcweir     //   sal_True: Such drawing objects can leave the page area, they aren't captured.
545cdf0e10cSrcweir     // mbTableRowKeep                            def = sal_False, hidden
546cdf0e10cSrcweir     // mbIgnoreTabsAndBlanksForLineCalculation   def = sal_False, hidden
547cdf0e10cSrcweir     // mbClipAsCharacterAnchoredWriterFlyFrame   def = sal_False, hidden
548cdf0e10cSrcweir     // - Introduced in order to re-activate clipping of as-character anchored
549cdf0e10cSrcweir     //   Writer fly frames in method <SwFlyInCntFrm::MakeAll()> for documents,
550cdf0e10cSrcweir     //   which are created with version prior SO8/OOo 2.0
551cdf0e10cSrcweir     //
552cdf0e10cSrcweir     // SO8pp4
553cdf0e10cSrcweir     // mbUnixForceZeroExtLeading                def = sal_False, hidden
554cdf0e10cSrcweir     //
555cdf0e10cSrcweir     // SO8pu8
556cdf0e10cSrcweir     // mbOldPrinterMetrics                      def = sal_False, hidden
557cdf0e10cSrcweir     //
558cdf0e10cSrcweir     // SO9
559cdf0e10cSrcweir     // #i24363# tab stops relative to indent
560cdf0e10cSrcweir     // mbTabRelativeToIndent                    def = sal_True, hidden
561cdf0e10cSrcweir     // #i89181# suppress tab stop at left indent for paragraphs in lists, whose
562cdf0e10cSrcweir     // list level position and space mode equals LABEL_ALIGNMENT and whose list
563cdf0e10cSrcweir     // label is followed by a tab character.
564cdf0e10cSrcweir     // mbTabAtLeftIndentForParagraphsInList     def = sal_False, hidden
565cdf0e10cSrcweir 
566cdf0e10cSrcweir     bool mbParaSpaceMax                     : 1;
567cdf0e10cSrcweir     bool mbParaSpaceMaxAtPages              : 1;
568cdf0e10cSrcweir     bool mbTabCompat                        : 1;
569cdf0e10cSrcweir     bool mbUseVirtualDevice                 : 1;
570cdf0e10cSrcweir     bool mbAddFlyOffsets                    : 1;
571cdf0e10cSrcweir     bool mbAddExternalLeading               : 1;
572cdf0e10cSrcweir     bool mbUseHiResolutionVirtualDevice     : 1;
573cdf0e10cSrcweir     bool mbOldLineSpacing                   : 1;    // OD  2004-01-06 #i11859#
574cdf0e10cSrcweir     bool mbAddParaSpacingToTableCells       : 1;    // OD  2004-02-16 #106629#
575cdf0e10cSrcweir     bool mbUseFormerObjectPos               : 1;    // OD  2004-03-12 #i11860#
576cdf0e10cSrcweir     bool mbUseFormerTextWrapping            : 1;    // FME 2005-05-11 #108724#
577cdf0e10cSrcweir     bool mbConsiderWrapOnObjPos             : 1;    // OD  2004-05-05 #i28701#
578cdf0e10cSrcweir                                                     // sal_True: object positioning algorithm has consider the wrapping style of                                                    //       the floating screen objects as given by its attribute 'WrapInfluenceOnObjPos'
579cdf0e10cSrcweir     bool mbMathBaselineAlignment            : 1;    // TL  2010-10-29 #i972#
580cdf0e10cSrcweir 
581cdf0e10cSrcweir     // non-ui-compatibility flags:
582cdf0e10cSrcweir     bool mbOldNumbering                             : 1;   // HBRINKM #111955#
583cdf0e10cSrcweir     bool mbIgnoreFirstLineIndentInNumbering         : 1;   // FME 2005-05-30# i47448#
584cdf0e10cSrcweir     bool mbDoNotJustifyLinesWithManualBreak         : 1;   // FME 2005-06-08 #i49277#
585cdf0e10cSrcweir     bool mbDoNotResetParaAttrsForNumFont            : 1;   // FME 2005-08-11 #i53199#
586cdf0e10cSrcweir     bool mbTableRowKeep                             : 1;   // FME 2006-02-10 #131283#
587cdf0e10cSrcweir     bool mbIgnoreTabsAndBlanksForLineCalculation    : 1;   // FME 2006-03-01 #i3952#
588cdf0e10cSrcweir     bool mbDoNotCaptureDrawObjsOnPage               : 1;   // OD 2006-03-14 #i62875#
589cdf0e10cSrcweir     bool mbOutlineLevelYieldsOutlineRule            : 1;
590cdf0e10cSrcweir     bool mbClipAsCharacterAnchoredWriterFlyFrames   : 1;   // OD 2006-04-13 #b6402800#
591cdf0e10cSrcweir     bool mbUnixForceZeroExtLeading                  : 1;   // FME 2006-10-09 #i60945#
592cdf0e10cSrcweir     bool mbOldPrinterMetrics                        : 1;   // FME 2007-05-14 #147385#
593cdf0e10cSrcweir     bool mbTabRelativeToIndent                      : 1;   // #i24363# tab stops relative to indent
594cdf0e10cSrcweir     bool mbProtectForm                              : 1;
595cdf0e10cSrcweir     bool mbTabAtLeftIndentForParagraphsInList;             // OD 2008-06-05 #i89181# - see above
596cdf0e10cSrcweir 
597cdf0e10cSrcweir     bool mbLastBrowseMode                           : 1;
598cdf0e10cSrcweir 
599cdf0e10cSrcweir 	// #i78591#
600cdf0e10cSrcweir 	sal_uInt32  n32DummyCompatabilityOptions1;
601cdf0e10cSrcweir 	sal_uInt32  n32DummyCompatabilityOptions2;
602cdf0e10cSrcweir     //
603cdf0e10cSrcweir     // COMPATIBILITY FLAGS END
604cdf0e10cSrcweir     //
605cdf0e10cSrcweir 
606cdf0e10cSrcweir     sal_Bool    mbStartIdleTimer                 ;    // idle timer mode start/stop
607cdf0e10cSrcweir 
608cdf0e10cSrcweir 	static SwAutoCompleteWord *pACmpltWords;	// Liste aller Worte fuers AutoComplete
609cdf0e10cSrcweir 
610cdf0e10cSrcweir 	//---------------- private Methoden ------------------------------
611cdf0e10cSrcweir 	void checkRedlining(RedlineMode_t& _rReadlineMode);
612cdf0e10cSrcweir 
613cdf0e10cSrcweir 	DECL_LINK( AddDrawUndo, SdrUndoAction * );
614cdf0e10cSrcweir 										// DrawModel
615cdf0e10cSrcweir 	void DrawNotifyUndoHdl();	// wegen CLOOKs
616cdf0e10cSrcweir 
617cdf0e10cSrcweir 		// nur fuer den internen Gebrauch deshalb privat.
618cdf0e10cSrcweir 		// Kopieren eines Bereiches im oder in ein anderes Dokument !
619cdf0e10cSrcweir 		// Die Position darf nicht im Bereich liegen !!
620cdf0e10cSrcweir     bool CopyImpl( SwPaM&, SwPosition&, const bool MakeNewFrms /*= true */,
621cdf0e10cSrcweir             const bool bCopyAll, SwPaM *const pCpyRng /*= 0*/ ) const;
622cdf0e10cSrcweir 
623cdf0e10cSrcweir 	SwFlyFrmFmt* _MakeFlySection( const SwPosition& rAnchPos,
624cdf0e10cSrcweir 								const SwCntntNode& rNode, RndStdIds eRequestId,
625cdf0e10cSrcweir 								const SfxItemSet* pFlyAttrSet,
626cdf0e10cSrcweir 								SwFrmFmt* = 0 );
627cdf0e10cSrcweir 
628cdf0e10cSrcweir 	SwFlyFrmFmt* _InsNoTxtNode( const SwPosition&rPos, SwNoTxtNode*,
629cdf0e10cSrcweir 								const SfxItemSet* pFlyAttrSet,
630cdf0e10cSrcweir 								const SfxItemSet* pGrfAttrSet,
631cdf0e10cSrcweir 								SwFrmFmt* = 0 );
632cdf0e10cSrcweir 
633cdf0e10cSrcweir     void CopyFlyInFlyImpl(  const SwNodeRange& rRg,
634cdf0e10cSrcweir                             const xub_StrLen nEndContentIndex,
635cdf0e10cSrcweir                             const SwNodeIndex& rStartIdx,
636cdf0e10cSrcweir                             const bool bCopyFlyAtFly = false ) const;
637cdf0e10cSrcweir     sal_Int8 SetFlyFrmAnchor( SwFrmFmt& rFlyFmt, SfxItemSet& rSet, sal_Bool bNewFrms );
638cdf0e10cSrcweir 
639cdf0e10cSrcweir     // --> OD 2005-01-13 #i40550#
640cdf0e10cSrcweir     typedef SwFmt* (SwDoc:: *FNCopyFmt)( const String&, SwFmt*, sal_Bool, sal_Bool );
641cdf0e10cSrcweir     // <--
642cdf0e10cSrcweir 	SwFmt* CopyFmt( const SwFmt& rFmt, const SvPtrarr& rFmtArr,
643cdf0e10cSrcweir 						FNCopyFmt fnCopyFmt, const SwFmt& rDfltFmt );
644cdf0e10cSrcweir 	void CopyFmtArr( const SvPtrarr& rSourceArr, SvPtrarr& rDestArr,
645cdf0e10cSrcweir 						FNCopyFmt fnCopyFmt, SwFmt& rDfltFmt );
646cdf0e10cSrcweir     void CopyPageDescHeaderFooterImpl( bool bCpyHeader,
647cdf0e10cSrcweir 								const SwFrmFmt& rSrcFmt, SwFrmFmt& rDestFmt );
648cdf0e10cSrcweir 	SwFmt* FindFmtByName( const SvPtrarr& rFmtArr,
649cdf0e10cSrcweir 									const String& rName ) const;
650cdf0e10cSrcweir 
651cdf0e10cSrcweir     VirtualDevice& CreateVirtualDevice_() const;
652cdf0e10cSrcweir     SfxPrinter& CreatePrinter_() const;
653cdf0e10cSrcweir 	void		PrtDataChanged();	//Printer oder JobSetup geandert, es muss
654cdf0e10cSrcweir 									//fuer entsprechende Invalidierungen und
655cdf0e10cSrcweir 									//Benachrichtigungen gesorgt werden.
656cdf0e10cSrcweir 
657cdf0e10cSrcweir 	// gcc: aFtnInfo::CopyCtor ist private, also muessen wir uns auch schuetzen
658cdf0e10cSrcweir 	SwDoc( const SwDoc &);
659cdf0e10cSrcweir 
660cdf0e10cSrcweir     // fuer Felder:
661cdf0e10cSrcweir 	void _InitFieldTypes(); 	// wird vom CTOR gerufen!!
662cdf0e10cSrcweir 	void _MakeFldList( int eMode );
663cdf0e10cSrcweir 
664cdf0e10cSrcweir 	// Datenbankfelder:
665cdf0e10cSrcweir 	void UpdateDBNumFlds( SwDBNameInfField& rDBFld, SwCalc& rCalc );
666cdf0e10cSrcweir 	void AddUsedDBToList( SvStringsDtor& rDBNameList,
667cdf0e10cSrcweir 						  const SvStringsDtor& rUsedDBNames );
668cdf0e10cSrcweir 	void AddUsedDBToList( SvStringsDtor& rDBNameList, const String& rDBName );
669cdf0e10cSrcweir 	sal_Bool IsNameInArray( const SvStringsDtor& rOldNames, const String& rName );
670cdf0e10cSrcweir 	void GetAllDBNames( SvStringsDtor& rAllDBNames );
671cdf0e10cSrcweir 	void ReplaceUsedDBs( const SvStringsDtor& rUsedDBNames,
672cdf0e10cSrcweir 						const String& rNewName, String& rFormel );
673cdf0e10cSrcweir 	SvStringsDtor& FindUsedDBs( const SvStringsDtor& rAllDBNames,
674cdf0e10cSrcweir 								const String& rFormel,
675cdf0e10cSrcweir 								SvStringsDtor& rUsedDBNames );
676cdf0e10cSrcweir 
677cdf0e10cSrcweir 	void InitDrawModel();
678cdf0e10cSrcweir 	void ReleaseDrawModel();
679cdf0e10cSrcweir 
680cdf0e10cSrcweir 	void _CreateNumberFormatter();
681cdf0e10cSrcweir 
682cdf0e10cSrcweir 	sal_Bool _UnProtectTblCells( SwTable& rTbl );
683cdf0e10cSrcweir 
684cdf0e10cSrcweir 	// erzeuge Anhand der vorgebenen Collection Teildokumente
685cdf0e10cSrcweir 	// falls keine angegeben ist, nehme die Kapitelvorlage der 1. Ebene
686cdf0e10cSrcweir 	sal_Bool SplitDoc( sal_uInt16 eDocType, const String& rPath,
687cdf0e10cSrcweir 						const SwTxtFmtColl* pSplitColl );
688cdf0e10cSrcweir 	sal_Bool SplitDoc( sal_uInt16 eDocType, const String& rPath, int nOutlineLevel = 0 ); //#outline level,add by zhaijianwei.
689cdf0e10cSrcweir 
690cdf0e10cSrcweir 
691cdf0e10cSrcweir 	// Charts der angegebenen Tabelle updaten
692cdf0e10cSrcweir 	void _UpdateCharts( const SwTable& rTbl, ViewShell& rVSh ) const;
693cdf0e10cSrcweir 
694cdf0e10cSrcweir 	sal_Bool _SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rRubyEntry,
695cdf0e10cSrcweir 								sal_uInt16 nMode );
696cdf0e10cSrcweir 
697cdf0e10cSrcweir 	// unser eigener 'IdlTimer' ruft folgende Methode
698cdf0e10cSrcweir 	DECL_LINK( DoIdleJobs, Timer * );
699cdf0e10cSrcweir 	// der CharTimer ruft diese Methode
700cdf0e10cSrcweir 	DECL_LINK( DoUpdateAllCharts, Timer * );
701cdf0e10cSrcweir 	DECL_LINK( DoUpdateModifiedOLE, Timer * );
702cdf0e10cSrcweir 
703cdf0e10cSrcweir      SwFmt *_MakeCharFmt(const String &, SwFmt *, sal_Bool, sal_Bool );
704cdf0e10cSrcweir      SwFmt *_MakeFrmFmt(const String &, SwFmt *, sal_Bool, sal_Bool );
705cdf0e10cSrcweir      SwFmt *_MakeTxtFmtColl(const String &, SwFmt *, sal_Bool, sal_Bool );
706cdf0e10cSrcweir 
707*ca62e2c2SSteve Yin //IAccessibility2 Implementation 2009-----
708*ca62e2c2SSteve Yin private:
709*ca62e2c2SSteve Yin 	sal_Bool bReadOnly;
710*ca62e2c2SSteve Yin 	String msDocAccTitle;
711*ca62e2c2SSteve Yin 
712cdf0e10cSrcweir      void InitTOXTypes();
713cdf0e10cSrcweir      void   Paste( const SwDoc& );
714cdf0e10cSrcweir      bool DeleteAndJoinImpl(SwPaM&, const bool);
715cdf0e10cSrcweir      bool DeleteAndJoinWithRedlineImpl(SwPaM&, const bool unused = false);
716cdf0e10cSrcweir      bool DeleteRangeImpl(SwPaM&, const bool unused = false);
717cdf0e10cSrcweir      bool DeleteRangeImplImpl(SwPaM &);
718cdf0e10cSrcweir      bool ReplaceRangeImpl(SwPaM&, String const&, const bool);
719cdf0e10cSrcweir 
720cdf0e10cSrcweir public:
721*ca62e2c2SSteve Yin 	virtual void setDocReadOnly( sal_Bool b) { bReadOnly = b; }
722*ca62e2c2SSteve Yin 	virtual sal_Bool getDocReadOnly() const { return bReadOnly; }
723*ca62e2c2SSteve Yin 	virtual void setDocAccTitle( const String& rTitle ) { msDocAccTitle = rTitle; }
724*ca62e2c2SSteve Yin 	virtual const String getDocAccTitle() const { return msDocAccTitle; }
725*ca62e2c2SSteve Yin 	//-----IAccessibility2 Implementation 2009
726*ca62e2c2SSteve Yin 
727ca2e0b95SLei De Bin 	enum DocumentType {
728ca2e0b95SLei De Bin 		DOCTYPE_NATIVE,
729ca2e0b95SLei De Bin 		DOCTYPE_MSWORD				//This doc medul is come from Ms Word
730ca2e0b95SLei De Bin 		};
731ca2e0b95SLei De Bin 	DocumentType	meDocType;
732ca2e0b95SLei De Bin 	DocumentType	GetDocumentType(){ return meDocType; }
733ca2e0b95SLei De Bin 	void			SetDocumentType( DocumentType eDocType ) { meDocType = eDocType; }
734cdf0e10cSrcweir 
735cdf0e10cSrcweir     /** Life cycle
736cdf0e10cSrcweir     */
737cdf0e10cSrcweir 	SwDoc();
738cdf0e10cSrcweir 	~SwDoc();
739cdf0e10cSrcweir 
740cdf0e10cSrcweir     inline bool IsInDtor() const { return mbDtor; }
741cdf0e10cSrcweir 
742cdf0e10cSrcweir     /* @@@MAINTAINABILITY-HORROR@@@
743cdf0e10cSrcweir 	   Implementation details made public.
744cdf0e10cSrcweir 	*/
745cdf0e10cSrcweir     SwNodes      & GetNodes()       { return *m_pNodes; }
746cdf0e10cSrcweir     SwNodes const& GetNodes() const { return *m_pNodes; }
747cdf0e10cSrcweir 
748cdf0e10cSrcweir     /** IInterface
749cdf0e10cSrcweir     */
750cdf0e10cSrcweir     virtual sal_Int32 acquire();
751cdf0e10cSrcweir     virtual sal_Int32 release();
752cdf0e10cSrcweir     virtual sal_Int32 getReferenceCount() const;
753cdf0e10cSrcweir 
754cdf0e10cSrcweir     /** IDocumentSettingAccess
755cdf0e10cSrcweir     */
756cdf0e10cSrcweir     virtual bool get(/*[in]*/ DocumentSettingId id) const;
757cdf0e10cSrcweir     virtual void set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value);
758cdf0e10cSrcweir     virtual const com::sun::star::i18n::ForbiddenCharacters* getForbiddenCharacters(/*[in]*/ sal_uInt16 nLang, /*[in]*/ bool bLocaleData ) const;
759cdf0e10cSrcweir     virtual void setForbiddenCharacters(/*[in]*/ sal_uInt16 nLang, /*[in]*/ const com::sun::star::i18n::ForbiddenCharacters& rForbiddenCharacters );
760cdf0e10cSrcweir     virtual vos::ORef<SvxForbiddenCharactersTable>& getForbiddenCharacterTable();
761cdf0e10cSrcweir     virtual const vos::ORef<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() const;
762cdf0e10cSrcweir     virtual sal_uInt16 getLinkUpdateMode( /*[in]*/bool bGlobalSettings ) const;
763cdf0e10cSrcweir     virtual void setLinkUpdateMode( /*[in]*/ sal_uInt16 nMode );
764cdf0e10cSrcweir     virtual SwFldUpdateFlags getFieldUpdateFlags( /*[in]*/bool bGlobalSettings ) const;
765cdf0e10cSrcweir     virtual void setFieldUpdateFlags( /*[in]*/ SwFldUpdateFlags eMode );
766cdf0e10cSrcweir     virtual SwCharCompressType getCharacterCompressionType() const;
767cdf0e10cSrcweir     virtual void setCharacterCompressionType( /*[in]*/SwCharCompressType nType );
768cdf0e10cSrcweir 
769cdf0e10cSrcweir     /** IDocumentDeviceAccess
770cdf0e10cSrcweir     */
771cdf0e10cSrcweir     virtual SfxPrinter* getPrinter(/*[in]*/ bool bCreate ) const;
772cdf0e10cSrcweir     virtual void setPrinter(/*[in]*/ SfxPrinter* pP,/*[in]*/ bool bDeleteOld,/*[in]*/ bool bCallPrtDataChanged );
773cdf0e10cSrcweir     virtual VirtualDevice* getVirtualDevice(/*[in]*/ bool bCreate ) const;
774cdf0e10cSrcweir     virtual void setVirtualDevice(/*[in]*/ VirtualDevice* pVd,/*[in]*/ bool bDeleteOld, /*[in]*/ bool bCallVirDevDataChanged );
775cdf0e10cSrcweir     virtual OutputDevice* getReferenceDevice(/*[in]*/ bool bCreate ) const;
776cdf0e10cSrcweir     virtual void setReferenceDeviceType(/*[in]*/ bool bNewVirtual,/*[in]*/ bool bNewHiRes );
777cdf0e10cSrcweir     virtual const JobSetup* getJobsetup() const;
778cdf0e10cSrcweir     virtual void setJobsetup(/*[in]*/ const JobSetup& rJobSetup );
779cdf0e10cSrcweir     virtual const SwPrintData & getPrintData() const;
780cdf0e10cSrcweir     virtual void setPrintData(/*[in]*/ const SwPrintData& rPrtData);
781cdf0e10cSrcweir 
782cdf0e10cSrcweir     /** IDocumentMarkAccess
783cdf0e10cSrcweir     */
784cdf0e10cSrcweir     IDocumentMarkAccess* getIDocumentMarkAccess();
785cdf0e10cSrcweir     const IDocumentMarkAccess* getIDocumentMarkAccess() const;
786cdf0e10cSrcweir 
787cdf0e10cSrcweir     /** IDocumentRedlineAccess
788cdf0e10cSrcweir     */
789cdf0e10cSrcweir     virtual RedlineMode_t GetRedlineMode() const;
790cdf0e10cSrcweir 	virtual void SetRedlineMode_intern(/*[in]*/RedlineMode_t eMode);
791cdf0e10cSrcweir 	virtual void SetRedlineMode(/*[in]*/RedlineMode_t eMode);
792cdf0e10cSrcweir 	virtual bool IsRedlineOn() const;
793cdf0e10cSrcweir 	virtual bool IsIgnoreRedline() const;
794cdf0e10cSrcweir     virtual bool IsInRedlines(const SwNode& rNode) const;
795cdf0e10cSrcweir 	virtual const SwRedlineTbl& GetRedlineTbl() const;
796cdf0e10cSrcweir 	virtual bool AppendRedline(/*[in]*/SwRedline* pPtr, /*[in]*/bool bCallDelete);
797cdf0e10cSrcweir 	virtual bool SplitRedline(const SwPaM& rPam);
798cdf0e10cSrcweir 	virtual bool DeleteRedline(/*[in]*/const SwPaM& rPam, /*[in]*/bool bSaveInUndo, /*[in]*/sal_uInt16 nDelType);
799cdf0e10cSrcweir 	virtual bool DeleteRedline(/*[in]*/const SwStartNode& rSection, /*[in]*/bool bSaveInUndo, /*[in]*/sal_uInt16 nDelType);
800cdf0e10cSrcweir     virtual sal_uInt16 GetRedlinePos(/*[in]*/const SwNode& rNode, /*[in]*/sal_uInt16 nType) const;
801cdf0e10cSrcweir 	virtual void CompressRedlines();
802cdf0e10cSrcweir     virtual const SwRedline* GetRedline(/*[in]*/const SwPosition& rPos, /*[in]*/sal_uInt16* pFndPos) const;
803cdf0e10cSrcweir 	virtual bool IsRedlineMove() const;
804cdf0e10cSrcweir 	virtual void SetRedlineMove(/*[in]*/bool bFlag);
805cdf0e10cSrcweir 	virtual bool AcceptRedline(/*[in]*/sal_uInt16 nPos, /*[in]*/bool bCallDelete);
806cdf0e10cSrcweir     virtual bool AcceptRedline(/*[in]*/const SwPaM& rPam, /*[in]*/bool bCallDelete);
807cdf0e10cSrcweir 	virtual bool RejectRedline(/*[in]*/sal_uInt16 nPos, /*[in]*/bool bCallDelete);
808cdf0e10cSrcweir     virtual bool RejectRedline(/*[in]*/const SwPaM& rPam, /*[in]*/bool bCallDelete);
809cdf0e10cSrcweir     virtual const SwRedline* SelNextRedline(/*[in]*/SwPaM& rPam) const;
810cdf0e10cSrcweir 	virtual const SwRedline* SelPrevRedline(/*[in]*/SwPaM& rPam) const;
811cdf0e10cSrcweir 	virtual void UpdateRedlineAttr();
812cdf0e10cSrcweir     virtual sal_uInt16 GetRedlineAuthor();
813cdf0e10cSrcweir 	virtual sal_uInt16 InsertRedlineAuthor(const String& rAuthor);
814cdf0e10cSrcweir 	virtual bool SetRedlineComment(/*[in]*/const SwPaM& rPam, /*[in]*/const String& rComment);
815cdf0e10cSrcweir 	virtual const ::com::sun::star::uno::Sequence <sal_Int8>& GetRedlinePassword() const;
816cdf0e10cSrcweir 	virtual void SetRedlinePassword(/*[in]*/const ::com::sun::star::uno::Sequence <sal_Int8>& rNewPassword);
817cdf0e10cSrcweir 
818cdf0e10cSrcweir     /** IDocumentUndoRedo
819cdf0e10cSrcweir     */
820cdf0e10cSrcweir     IDocumentUndoRedo      & GetIDocumentUndoRedo();
821cdf0e10cSrcweir     IDocumentUndoRedo const& GetIDocumentUndoRedo() const;
822cdf0e10cSrcweir 
823cdf0e10cSrcweir     /** IDocumentLinksAdministration
824cdf0e10cSrcweir     */
825cdf0e10cSrcweir     virtual bool IsVisibleLinks() const;
826cdf0e10cSrcweir 	virtual void SetVisibleLinks(bool bFlag);
827cdf0e10cSrcweir     virtual sfx2::LinkManager& GetLinkManager();
828cdf0e10cSrcweir 	virtual const sfx2::LinkManager& GetLinkManager() const;
829cdf0e10cSrcweir     virtual void UpdateLinks(sal_Bool bUI);
830cdf0e10cSrcweir 	virtual bool GetData(const String& rItem, const String& rMimeType, ::com::sun::star::uno::Any& rValue) const;
831cdf0e10cSrcweir 	virtual bool SetData(const String& rItem, const String& rMimeType, const ::com::sun::star::uno::Any& rValue);
832cdf0e10cSrcweir     virtual ::sfx2::SvLinkSource* CreateLinkSource(const String& rItem);
833cdf0e10cSrcweir 	virtual bool EmbedAllLinks();
834cdf0e10cSrcweir     virtual void SetLinksUpdated(const bool bNewLinksUpdated);
835cdf0e10cSrcweir     virtual bool LinksUpdated() const;
836cdf0e10cSrcweir 
837cdf0e10cSrcweir     /** IDocumentFieldsAccess
838cdf0e10cSrcweir     */
839cdf0e10cSrcweir     virtual const SwFldTypes *GetFldTypes() const;
840cdf0e10cSrcweir 	virtual SwFieldType *InsertFldType(const SwFieldType &);
841cdf0e10cSrcweir 	virtual SwFieldType *GetSysFldType( const sal_uInt16 eWhich ) const;
842cdf0e10cSrcweir 	virtual SwFieldType* GetFldType(sal_uInt16 nResId, const String& rName, bool bDbFieldMatching) const;
843cdf0e10cSrcweir     virtual void RemoveFldType(sal_uInt16 nFld);
844cdf0e10cSrcweir     virtual void UpdateFlds( SfxPoolItem* pNewHt, bool bCloseDB);
845cdf0e10cSrcweir     virtual void InsDeletedFldType(SwFieldType &);
846cdf0e10cSrcweir     virtual bool PutValueToField(const SwPosition & rPos, const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich);
847cdf0e10cSrcweir     virtual bool UpdateFld(SwTxtFld * rDstFmtFld, SwField & rSrcFld, SwMsgPoolItem * pMsgHnt, bool bUpdateTblFlds);
848cdf0e10cSrcweir 	virtual void UpdateRefFlds(SfxPoolItem* pHt);
849cdf0e10cSrcweir     virtual void UpdateTblFlds(SfxPoolItem* pHt);
850cdf0e10cSrcweir     virtual void UpdateExpFlds(SwTxtFld* pFld, bool bUpdateRefFlds);
851cdf0e10cSrcweir     virtual void UpdateUsrFlds();
852cdf0e10cSrcweir     virtual void UpdatePageFlds(SfxPoolItem*);
853cdf0e10cSrcweir     virtual void LockExpFlds();
854cdf0e10cSrcweir     virtual void UnlockExpFlds();
855cdf0e10cSrcweir     virtual bool IsExpFldsLocked() const;
856cdf0e10cSrcweir     virtual SwDocUpdtFld& GetUpdtFlds() const;
857cdf0e10cSrcweir 	virtual bool SetFieldsDirty(bool b, const SwNode* pChk, sal_uLong nLen);
858cdf0e10cSrcweir 	virtual void SetFixFields(bool bOnlyTimeDate, const DateTime* pNewDateTime);
859cdf0e10cSrcweir 	virtual void FldsToCalc(SwCalc& rCalc, sal_uLong nLastNd, sal_uInt16 nLastCnt);
860cdf0e10cSrcweir 	virtual void FldsToCalc(SwCalc& rCalc, const _SetGetExpFld& rToThisFld);
861cdf0e10cSrcweir 	virtual void FldsToExpand(SwHash**& ppTbl, sal_uInt16& rTblSize, const _SetGetExpFld& rToThisFld);
862cdf0e10cSrcweir 	virtual bool IsNewFldLst() const;
863cdf0e10cSrcweir 	virtual void SetNewFldLst( bool bFlag);
864cdf0e10cSrcweir 	virtual void InsDelFldInFldLst(bool bIns, const SwTxtFld& rFld);
865cdf0e10cSrcweir 
866cdf0e10cSrcweir     /** Returns the field at a certain position.
867cdf0e10cSrcweir        @param rPos position to search at
868cdf0e10cSrcweir        @return pointer to field at the given position or NULL in case no field is found
869cdf0e10cSrcweir     */
870cdf0e10cSrcweir     static SwField* GetField(const SwPosition& rPos);
871cdf0e10cSrcweir 
872cdf0e10cSrcweir     /** Returns the field at a certain position.
873cdf0e10cSrcweir        @param rPos position to search at
874cdf0e10cSrcweir        @return pointer to field at the given position or NULL in case no field is found
875cdf0e10cSrcweir     */
876cdf0e10cSrcweir     static SwTxtFld* GetTxtFld(const SwPosition& rPos);
877cdf0e10cSrcweir 
878cdf0e10cSrcweir     /** IDocumentContentOperations
879cdf0e10cSrcweir     */
880cdf0e10cSrcweir     virtual bool CopyRange(SwPaM&, SwPosition&, const bool bCopyAll) const;
881cdf0e10cSrcweir 	virtual void DeleteSection(SwNode* pNode);
882cdf0e10cSrcweir     virtual bool DeleteRange(SwPaM&);
883cdf0e10cSrcweir 	virtual bool DelFullPara(SwPaM&);
884cdf0e10cSrcweir     // --> OD 2009-08-20 #i100466#
885cdf0e10cSrcweir     // Add optional parameter <bForceJoinNext>, default value <false>
886cdf0e10cSrcweir     // Needed for hiding of deletion redlines
887cdf0e10cSrcweir     virtual bool DeleteAndJoin( SwPaM&,
888cdf0e10cSrcweir                                 const bool bForceJoinNext = false );
889cdf0e10cSrcweir     // <--
890cdf0e10cSrcweir     virtual bool MoveRange(SwPaM&, SwPosition&, SwMoveFlags);
891cdf0e10cSrcweir     virtual bool MoveNodeRange(SwNodeRange&, SwNodeIndex&, SwMoveFlags);
892cdf0e10cSrcweir 	virtual bool MoveAndJoin(SwPaM&, SwPosition&, SwMoveFlags);
893cdf0e10cSrcweir 	virtual bool Overwrite(const SwPaM &rRg, const String& rStr);
894cdf0e10cSrcweir     virtual bool InsertString(const SwPaM &rRg, const String&,
895cdf0e10cSrcweir               const enum InsertFlags nInsertMode = INS_EMPTYEXPAND );
896cdf0e10cSrcweir 	virtual SwFlyFrmFmt* Insert(const SwPaM &rRg, const String& rGrfName, const String& rFltName, const Graphic* pGraphic,
897cdf0e10cSrcweir 						const SfxItemSet* pFlyAttrSet, const SfxItemSet* pGrfAttrSet, SwFrmFmt*);
898cdf0e10cSrcweir 	virtual SwFlyFrmFmt* Insert(const SwPaM& rRg, const GraphicObject& rGrfObj,	const SfxItemSet* pFlyAttrSet,
899cdf0e10cSrcweir 						const SfxItemSet* pGrfAttrSet, SwFrmFmt*);
900cdf0e10cSrcweir     virtual SwDrawFrmFmt* Insert(const SwPaM &rRg, SdrObject& rDrawObj, const SfxItemSet* pFlyAttrSet, SwFrmFmt*);
901cdf0e10cSrcweir     virtual SwFlyFrmFmt* Insert(const SwPaM &rRg, const svt::EmbeddedObjectRef& xObj, const SfxItemSet* pFlyAttrSet,
902cdf0e10cSrcweir 						const SfxItemSet* pGrfAttrSet, SwFrmFmt*);
903abbaf3ecSJian Hong Cheng 	//Modify here for #119405, by chengjh, 2012-08-16
904abbaf3ecSJian Hong Cheng 	//Add a para for the char attribute exp...
905cdf0e10cSrcweir     virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem&,
906abbaf3ecSJian Hong Cheng                                 const SetAttrMode nFlags,bool bExpandCharToPara=false);
907abbaf3ecSJian Hong Cheng 	//End
908cdf0e10cSrcweir     virtual bool InsertItemSet (const SwPaM &rRg, const SfxItemSet&,
909cdf0e10cSrcweir                                 const SetAttrMode nFlags);
910cdf0e10cSrcweir 	virtual void ReRead(SwPaM&, const String& rGrfName, const String& rFltName, const Graphic* pGraphic, const GraphicObject* pGrfObj);
911cdf0e10cSrcweir     virtual void TransliterateText(const SwPaM& rPaM, utl::TransliterationWrapper&);
912cdf0e10cSrcweir 	virtual SwFlyFrmFmt* InsertOLE(const SwPaM &rRg, const String& rObjName, sal_Int64 nAspect, const SfxItemSet* pFlyAttrSet,
913cdf0e10cSrcweir                            const SfxItemSet* pGrfAttrSet, SwFrmFmt*);
914cdf0e10cSrcweir 	virtual bool SplitNode(const SwPosition &rPos, bool bChkTableStart);
915cdf0e10cSrcweir 	virtual bool AppendTxtNode(SwPosition& rPos);
916cdf0e10cSrcweir         virtual void SetModified(SwPaM &rPaM);
917cdf0e10cSrcweir     virtual bool ReplaceRange(SwPaM& rPam, const String& rNewStr,
918cdf0e10cSrcweir                               const bool bRegExReplace);
919cdf0e10cSrcweir     virtual void RemoveLeadingWhiteSpace(const SwPosition & rPos );
920cdf0e10cSrcweir 
921cdf0e10cSrcweir     /** IDocumentStylePoolAccess
922cdf0e10cSrcweir     */
923cdf0e10cSrcweir     virtual SwTxtFmtColl* GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage = true );
924cdf0e10cSrcweir     virtual SwFmt* GetFmtFromPool( sal_uInt16 nId );
925cdf0e10cSrcweir     virtual SwFrmFmt* GetFrmFmtFromPool( sal_uInt16 nId );
926cdf0e10cSrcweir     virtual SwCharFmt* GetCharFmtFromPool( sal_uInt16 nId );
927cdf0e10cSrcweir     virtual SwPageDesc* GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage = true );
928cdf0e10cSrcweir     virtual SwNumRule* GetNumRuleFromPool( sal_uInt16 nId );
929cdf0e10cSrcweir     virtual bool IsPoolTxtCollUsed( sal_uInt16 nId ) const;
930cdf0e10cSrcweir     virtual bool IsPoolFmtUsed( sal_uInt16 nId ) const;
931cdf0e10cSrcweir     virtual bool IsPoolPageDescUsed( sal_uInt16 nId ) const;
932cdf0e10cSrcweir 
933cdf0e10cSrcweir     /** IDocumentLineNumberAccess
934cdf0e10cSrcweir     */
935cdf0e10cSrcweir     virtual const SwLineNumberInfo& GetLineNumberInfo() const;
936cdf0e10cSrcweir     virtual void SetLineNumberInfo(const SwLineNumberInfo& rInfo);
937cdf0e10cSrcweir 
938cdf0e10cSrcweir 	/** IDocumentStatistics
939cdf0e10cSrcweir 	*/
940cdf0e10cSrcweir 	virtual void DocInfoChgd();
941cdf0e10cSrcweir 	virtual const SwDocStat	&GetDocStat() const;
942cdf0e10cSrcweir 	virtual void SetDocStat(const SwDocStat& rStat);
943cdf0e10cSrcweir 	virtual void UpdateDocStat(SwDocStat& rStat);
944cdf0e10cSrcweir 
945cdf0e10cSrcweir 	/** IDocumentState
946cdf0e10cSrcweir 	*/
947cdf0e10cSrcweir 	virtual void SetModified();
948cdf0e10cSrcweir 	virtual void ResetModified();
949cdf0e10cSrcweir 	virtual bool IsModified() const;
950cdf0e10cSrcweir 	virtual bool IsLoaded() const;
951cdf0e10cSrcweir     virtual bool IsUpdateExpFld() const;
952cdf0e10cSrcweir 	virtual bool IsNewDoc() const;
953cdf0e10cSrcweir     virtual bool IsPageNums() const;
954cdf0e10cSrcweir     virtual void SetPageNums(bool b);
955cdf0e10cSrcweir 	virtual void SetNewDoc(bool b);
956cdf0e10cSrcweir 	virtual void SetUpdateExpFldStat(bool b);
957cdf0e10cSrcweir 	virtual void SetLoaded(bool b);
958cdf0e10cSrcweir 
959cdf0e10cSrcweir     /** IDocumentDrawModelAccess
960cdf0e10cSrcweir     */
961cdf0e10cSrcweir     virtual const SdrModel* GetDrawModel() const;
962cdf0e10cSrcweir     virtual SdrModel* GetDrawModel();
963cdf0e10cSrcweir     virtual SdrLayerID GetHeavenId() const;
964cdf0e10cSrcweir     virtual SdrLayerID GetHellId() const;
965cdf0e10cSrcweir     virtual SdrLayerID GetControlsId() const;
966cdf0e10cSrcweir     virtual SdrLayerID GetInvisibleHeavenId() const;
967cdf0e10cSrcweir     virtual SdrLayerID GetInvisibleHellId() const;
968cdf0e10cSrcweir     virtual SdrLayerID GetInvisibleControlsId() const;
969cdf0e10cSrcweir     virtual void NotifyInvisibleLayers( SdrPageView& _rSdrPageView );
970cdf0e10cSrcweir     virtual bool IsVisibleLayerId( const SdrLayerID& _nLayerId ) const;
971cdf0e10cSrcweir     virtual SdrLayerID GetVisibleLayerIdByInvisibleOne( const SdrLayerID& _nInvisibleLayerId );
972cdf0e10cSrcweir     virtual SdrLayerID GetInvisibleLayerIdByVisibleOne( const SdrLayerID& _nVisibleLayerId );
973cdf0e10cSrcweir     virtual SdrModel* _MakeDrawModel();
974cdf0e10cSrcweir     virtual SdrModel* GetOrCreateDrawModel();
975cdf0e10cSrcweir 
976cdf0e10cSrcweir     /** IDocumentLayoutAccess
977cdf0e10cSrcweir     */
978cdf0e10cSrcweir 	virtual void SetCurrentViewShell( ViewShell* pNew );//swmod 071225
979cdf0e10cSrcweir     virtual SwLayouter* GetLayouter();
980cdf0e10cSrcweir     virtual const SwLayouter* GetLayouter() const;
981cdf0e10cSrcweir     virtual void SetLayouter( SwLayouter* pNew );
982cdf0e10cSrcweir     virtual SwFrmFmt* MakeLayoutFmt( RndStdIds eRequest, const SfxItemSet* pSet );
983cdf0e10cSrcweir     virtual void DelLayoutFmt( SwFrmFmt *pFmt );
984cdf0e10cSrcweir     virtual SwFrmFmt* CopyLayoutFmt( const SwFrmFmt& rSrc, const SwFmtAnchor& rNewAnchor, bool bSetTxtFlyAtt, bool bMakeFrms );
985cdf0e10cSrcweir 	virtual const ViewShell *GetCurrentViewShell() const;	//swmod 080219
986cdf0e10cSrcweir 	virtual ViewShell *GetCurrentViewShell();//swmod 080219 It must be able to communicate to a ViewShell.This is going to be removerd later.
987cdf0e10cSrcweir 	virtual const SwRootFrm *GetCurrentLayout() const;
988cdf0e10cSrcweir 	virtual SwRootFrm *GetCurrentLayout();//swmod 080219
989cdf0e10cSrcweir     virtual bool HasLayout() const;
990cdf0e10cSrcweir 
991cdf0e10cSrcweir     /** IDocumentTimerAccess
992cdf0e10cSrcweir     */
993cdf0e10cSrcweir 	virtual void StartIdling();
994cdf0e10cSrcweir 	virtual void StopIdling();
995cdf0e10cSrcweir 	virtual void BlockIdling();
996cdf0e10cSrcweir 	virtual void UnblockIdling();
997cdf0e10cSrcweir 
998cdf0e10cSrcweir     /** IDocumentChartDataProviderAccess
999cdf0e10cSrcweir     */
1000cdf0e10cSrcweir     virtual SwChartDataProvider * GetChartDataProvider( bool bCreate = false ) const;
1001cdf0e10cSrcweir     virtual void CreateChartInternalDataProviders( const SwTable *pTable );
1002cdf0e10cSrcweir     virtual SwChartLockController_Helper & GetChartControllerHelper();
1003cdf0e10cSrcweir 
1004cdf0e10cSrcweir     /** IDocumentListItems
1005cdf0e10cSrcweir 
1006cdf0e10cSrcweir         OD 2007-10-26 #i83479#
1007cdf0e10cSrcweir     */
1008cdf0e10cSrcweir     virtual void addListItem( const SwNodeNum& rNodeNum );
1009cdf0e10cSrcweir     virtual void removeListItem( const SwNodeNum& rNodeNum );
1010cdf0e10cSrcweir     virtual String getListItemText( const SwNodeNum& rNodeNum,
1011cdf0e10cSrcweir                                     const bool bWithNumber = true,
1012cdf0e10cSrcweir                                     const bool bWithSpacesForLevel = false ) const;
1013cdf0e10cSrcweir     virtual void getListItems( IDocumentListItems::tSortedNodeNumList& orNodeNumList ) const;
1014cdf0e10cSrcweir     virtual void getNumItems( IDocumentListItems::tSortedNodeNumList& orNodeNumList ) const;
1015cdf0e10cSrcweir 
1016cdf0e10cSrcweir     /** IDocumentOutlineNodes
1017cdf0e10cSrcweir 
1018cdf0e10cSrcweir         OD 2007-11-15 #i83479#
1019cdf0e10cSrcweir     */
1020cdf0e10cSrcweir     virtual sal_Int32 getOutlineNodesCount() const;
1021cdf0e10cSrcweir     virtual int getOutlineLevel( const sal_Int32 nIdx ) const;
1022cdf0e10cSrcweir     virtual String getOutlineText( const sal_Int32 nIdx,
1023cdf0e10cSrcweir                                    const bool bWithNumber,
1024cdf0e10cSrcweir                                    const bool bWithSpacesForLevel ) const;
1025cdf0e10cSrcweir     virtual SwTxtNode* getOutlineNode( const sal_Int32 nIdx ) const;
1026cdf0e10cSrcweir     virtual void getOutlineNodes( IDocumentOutlineNodes::tSortedOutlineNodeList& orOutlineNodeList ) const;
1027cdf0e10cSrcweir 
1028cdf0e10cSrcweir     /** IDocumentListsAccess
1029cdf0e10cSrcweir 
1030cdf0e10cSrcweir         OD 2008-03-26 #refactorlists#
1031cdf0e10cSrcweir     */
1032cdf0e10cSrcweir     virtual SwList* createList( String sListId,
1033cdf0e10cSrcweir                                 const String sDefaultListStyleName );
1034cdf0e10cSrcweir     virtual void deleteList( const String sListId );
1035cdf0e10cSrcweir     virtual SwList* getListByName( const String sListId ) const;
1036cdf0e10cSrcweir     virtual SwList* createListForListStyle( const String sListStyleName );
1037cdf0e10cSrcweir     virtual SwList* getListForListStyle( const String sListStyleName ) const;
1038cdf0e10cSrcweir     virtual void deleteListForListStyle( const String sListStyleName );
1039cdf0e10cSrcweir     // --> OD 2008-07-08 #i91400#
1040cdf0e10cSrcweir     virtual void trackChangeOfListStyleName( const String sListStyleName,
1041cdf0e10cSrcweir                                              const String sNewListStyleName );
1042cdf0e10cSrcweir     // <--
1043cdf0e10cSrcweir 
1044cdf0e10cSrcweir     /** IDocumentExternalData */
1045cdf0e10cSrcweir     virtual void setExternalData(::sw::tExternalDataType eType,
1046cdf0e10cSrcweir                                  ::sw::tExternalDataPointer pPayload);
1047cdf0e10cSrcweir     virtual ::sw::tExternalDataPointer getExternalData(::sw::tExternalDataType eType);
1048cdf0e10cSrcweir 
1049cdf0e10cSrcweir 
1050cdf0e10cSrcweir     /** INextInterface here
1051cdf0e10cSrcweir     */
1052cdf0e10cSrcweir 
1053cdf0e10cSrcweir     DECL_STATIC_LINK( SwDoc, BackgroundDone, SvxBrushItem *);
1054cdf0e10cSrcweir     DECL_LINK(CalcFieldValueHdl, EditFieldInfo*);
1055cdf0e10cSrcweir 
1056cdf0e10cSrcweir     /** OLE ???
1057cdf0e10cSrcweir     */
1058cdf0e10cSrcweir     bool IsOLEPrtNotifyPending() const  { return mbOLEPrtNotifyPending; }
1059cdf0e10cSrcweir     inline void SetOLEPrtNotifyPending( bool bSet = true );
1060cdf0e10cSrcweir 	void PrtOLENotify( sal_Bool bAll );	//Alle oder nur Markierte
1061cdf0e10cSrcweir 
1062cdf0e10cSrcweir #ifdef DBG_UTIL
1063cdf0e10cSrcweir     bool InXMLExport() const            { return mbXMLExport; }
1064cdf0e10cSrcweir     void SetXMLExport( bool bFlag )     { mbXMLExport = bFlag; }
1065cdf0e10cSrcweir #endif
1066*ca62e2c2SSteve Yin 	//-----IAccessibility2 Implementation 2009
1067*ca62e2c2SSteve Yin 	void SetSelAll( sal_Bool bSel )
1068*ca62e2c2SSteve Yin 	{
1069*ca62e2c2SSteve Yin 		bIsPrepareSelAll = bSel;
1070*ca62e2c2SSteve Yin 	}
1071*ca62e2c2SSteve Yin 	sal_Bool IsPrepareSelAll()  { return bIsPrepareSelAll; }
1072*ca62e2c2SSteve Yin 	void SetPrepareSelAll() { bIsPrepareSelAll = sal_True; }
1073*ca62e2c2SSteve Yin 	//IAccessibility2 Implementation 2009-----
1074cdf0e10cSrcweir 
10756fddd742SOliver-Rainer Wittmann     void SetContainsAtPageObjWithContentAnchor( const bool bFlag )
10766fddd742SOliver-Rainer Wittmann     {
10776fddd742SOliver-Rainer Wittmann         mbContainsAtPageObjWithContentAnchor = bFlag;
10786fddd742SOliver-Rainer Wittmann     }
10796fddd742SOliver-Rainer Wittmann     bool DoesContainAtPageObjWithContentAnchor()
10806fddd742SOliver-Rainer Wittmann     {
10816fddd742SOliver-Rainer Wittmann         return mbContainsAtPageObjWithContentAnchor;
10826fddd742SOliver-Rainer Wittmann     }
10836fddd742SOliver-Rainer Wittmann 
1084cdf0e10cSrcweir 	// liefert zu allen fliegenden Rahmen die Position im Dokument.
1085cdf0e10cSrcweir 	// Wird ein Pam-Pointer uebergeben, muessen die absatzgebundenen
1086cdf0e10cSrcweir 	// FlyFrames von der ::com::sun::star::awt::Selection vollstaendig umschlossen sein
1087cdf0e10cSrcweir 	// ( Start < Pos < End ) !!!
1088cdf0e10cSrcweir 	// (wird fuer die Writer benoetigt)
108937fb9221SArmin Le Grand 	SwPosFlyFrms GetAllFlyFmts( const SwPaM* = 0, sal_Bool bDrawAlso = sal_False ) const;
1090cdf0e10cSrcweir 
1091cdf0e10cSrcweir     // wegen swrtf.cxx und define private public, jetzt hier
1092cdf0e10cSrcweir 	SwFlyFrmFmt  *MakeFlyFrmFmt (const String &rFmtName, SwFrmFmt *pDerivedFrom);
1093cdf0e10cSrcweir 	SwDrawFrmFmt *MakeDrawFrmFmt(const String &rFmtName, SwFrmFmt *pDerivedFrom);
1094cdf0e10cSrcweir 
1095cdf0e10cSrcweir     // JP 08.05.98: fuer Flys muss jetzt diese Schnittstelle benutzt
1096cdf0e10cSrcweir 	//				werden. pAnchorPos muss gesetzt sein, wenn keine
1097cdf0e10cSrcweir 	//				Seitenbindung vorliegt UND der ::com::sun::star::chaos::Anchor nicht schon
1098cdf0e10cSrcweir 	//				im FlySet/FrmFmt mit gueltiger CntntPos gesetzt ist
1099cdf0e10cSrcweir     /* #109161# new parameter bCalledFromShell
1100cdf0e10cSrcweir 
1101cdf0e10cSrcweir        sal_True: An existing adjust item at pAnchorPos is propagated to
1102cdf0e10cSrcweir        the content node of the new fly section. That propagation only
1103cdf0e10cSrcweir        takes place if there is no adjust item in the paragraph style
1104cdf0e10cSrcweir        for the new fly section.
1105cdf0e10cSrcweir 
1106cdf0e10cSrcweir        sal_False: no propagation
1107cdf0e10cSrcweir     */
1108cdf0e10cSrcweir 	SwFlyFrmFmt* MakeFlySection( RndStdIds eAnchorType,
1109cdf0e10cSrcweir                                  const SwPosition* pAnchorPos,
1110cdf0e10cSrcweir                                  const SfxItemSet* pSet = 0,
1111cdf0e10cSrcweir                                  SwFrmFmt *pParent = 0,
1112cdf0e10cSrcweir                                  sal_Bool bCalledFromShell = sal_False );
1113cdf0e10cSrcweir 	SwFlyFrmFmt* MakeFlyAndMove( const SwPaM& rPam, const SfxItemSet& rSet,
1114cdf0e10cSrcweir 								const SwSelBoxes* pSelBoxes = 0,
1115cdf0e10cSrcweir 								SwFrmFmt *pParent = 0 );
1116cdf0e10cSrcweir 
1117cdf0e10cSrcweir 	void CopyWithFlyInFly( const SwNodeRange& rRg,
1118cdf0e10cSrcweir                             const xub_StrLen nEndContentIndex,
1119cdf0e10cSrcweir 							const SwNodeIndex& rInsPos,
1120cdf0e10cSrcweir 							sal_Bool bMakeNewFrms = sal_True,
1121cdf0e10cSrcweir 							sal_Bool bDelRedlines = sal_True,
1122cdf0e10cSrcweir 							sal_Bool bCopyFlyAtFly = sal_False ) const;
1123cdf0e10cSrcweir 
1124cdf0e10cSrcweir     sal_Bool SetFlyFrmAttr( SwFrmFmt& rFlyFmt, SfxItemSet& rSet );
1125cdf0e10cSrcweir 
1126cdf0e10cSrcweir     sal_Bool SetFrmFmtToFly( SwFrmFmt& rFlyFmt, SwFrmFmt& rNewFmt,
1127cdf0e10cSrcweir 						SfxItemSet* pSet = 0, sal_Bool bKeepOrient = sal_False );
1128cdf0e10cSrcweir     // --> OD 2009-07-20 #i73249#
1129cdf0e10cSrcweir     void SetFlyFrmTitle( SwFlyFrmFmt& rFlyFrmFmt,
1130cdf0e10cSrcweir                          const String& sNewTitle );
1131cdf0e10cSrcweir     void SetFlyFrmDescription( SwFlyFrmFmt& rFlyFrmFmt,
1132cdf0e10cSrcweir                                const String& sNewDescription );
1133cdf0e10cSrcweir     // <--
1134cdf0e10cSrcweir 
1135cdf0e10cSrcweir     /** Footnotes
1136cdf0e10cSrcweir     */
1137cdf0e10cSrcweir 	// Fussnoten Informationen
1138cdf0e10cSrcweir 	const SwFtnInfo& GetFtnInfo() const			{ return *pFtnInfo; }
1139cdf0e10cSrcweir 	void SetFtnInfo(const SwFtnInfo& rInfo);
1140cdf0e10cSrcweir 	const SwEndNoteInfo& GetEndNoteInfo() const { return *pEndNoteInfo; }
1141cdf0e10cSrcweir 	void SetEndNoteInfo(const SwEndNoteInfo& rInfo);
1142cdf0e10cSrcweir 		  SwFtnIdxs& GetFtnIdxs() 		{ return *pFtnIdxs; }
1143cdf0e10cSrcweir 	const SwFtnIdxs& GetFtnIdxs() const { return *pFtnIdxs; }
1144cdf0e10cSrcweir     // change footnotes in area
1145cdf0e10cSrcweir     bool SetCurFtn( const SwPaM& rPam, const String& rNumStr,
1146cdf0e10cSrcweir                     sal_uInt16 nNumber, bool bIsEndNote );
1147cdf0e10cSrcweir 
1148cdf0e10cSrcweir     /** Operations on the content of the document e.g.
1149cdf0e10cSrcweir         spell-checking/hyphenating/word-counting
1150cdf0e10cSrcweir     */
1151cdf0e10cSrcweir     ::com::sun::star::uno::Any
1152cdf0e10cSrcweir 			Spell( SwPaM&, ::com::sun::star::uno::Reference<
1153cdf0e10cSrcweir 							::com::sun::star::linguistic2::XSpellChecker1 > &,
1154cdf0e10cSrcweir                    sal_uInt16* pPageCnt, sal_uInt16* pPageSt, bool bGrammarCheck,
1155cdf0e10cSrcweir                    SwConversionArgs *pConvArgs = 0 ) const;
1156cdf0e10cSrcweir 
1157cdf0e10cSrcweir 	::com::sun::star::uno::Reference<
1158cdf0e10cSrcweir 		::com::sun::star::linguistic2::XHyphenatedWord >
1159cdf0e10cSrcweir 			Hyphenate( SwPaM *pPam, const Point &rCrsrPos,
1160cdf0e10cSrcweir 			  		   sal_uInt16* pPageCnt, sal_uInt16* pPageSt );
1161cdf0e10cSrcweir 
1162cdf0e10cSrcweir     // count words in pam
1163cdf0e10cSrcweir     void CountWords( const SwPaM& rPaM, SwDocStat& rStat ) const;
1164cdf0e10cSrcweir 
1165cdf0e10cSrcweir 
1166cdf0e10cSrcweir     /** ???
1167cdf0e10cSrcweir     */
1168cdf0e10cSrcweir     // Textbaustein Dokument?
1169cdf0e10cSrcweir     void SetGlossDoc( bool bGlssDc = true ) { mbGlossDoc = bGlssDc; }
1170cdf0e10cSrcweir     bool IsInsOnlyTextGlossary() const      { return mbInsOnlyTxtGlssry; }
1171cdf0e10cSrcweir 
1172cdf0e10cSrcweir 	// Abstakt fuellen
1173cdf0e10cSrcweir 	void Summary( SwDoc* pExtDoc, sal_uInt8 nLevel, sal_uInt8 nPara, sal_Bool bImpress );
1174cdf0e10cSrcweir 
1175cdf0e10cSrcweir     void ChangeAuthorityData(const SwAuthEntry* pNewData);
1176cdf0e10cSrcweir 
1177cdf0e10cSrcweir     bool IsInCallModified() const      { return mbInCallModified; }
1178cdf0e10cSrcweir 	sal_Bool IsInHeaderFooter( const SwNodeIndex& rIdx ) const;
1179cdf0e10cSrcweir     short GetTextDirection( const SwPosition& rPos,
1180cdf0e10cSrcweir                             const Point* pPt = 0 ) const;
1181cdf0e10cSrcweir     sal_Bool IsInVerticalText( const SwPosition& rPos,
1182cdf0e10cSrcweir 							   const Point* pPt = 0 ) const;
1183cdf0e10cSrcweir     /** Database ???
1184cdf0e10cSrcweir     */
1185cdf0e10cSrcweir 
1186cdf0e10cSrcweir 	/*	Datenbank &&  DB-Manager */
1187cdf0e10cSrcweir 	void SetNewDBMgr( SwNewDBMgr* pNewMgr )		{ pNewDBMgr = pNewMgr; }
1188cdf0e10cSrcweir 	SwNewDBMgr* GetNewDBMgr() const 			{ return pNewDBMgr; }
1189cdf0e10cSrcweir 	void ChangeDBFields( const SvStringsDtor& rOldNames,
1190cdf0e10cSrcweir 						const String& rNewName );
1191cdf0e10cSrcweir 	void SetInitDBFields(sal_Bool b);
1192cdf0e10cSrcweir 	// Von Feldern verwendete Datenbanken herausfinden
1193cdf0e10cSrcweir 	void GetAllUsedDB( SvStringsDtor& rDBNameList,
1194cdf0e10cSrcweir 					   const SvStringsDtor* pAllDBNames = 0 );
1195cdf0e10cSrcweir 
1196cdf0e10cSrcweir 	void ChgDBData( const SwDBData& rNewData );
1197cdf0e10cSrcweir 	SwDBData GetDBData();
1198cdf0e10cSrcweir 	const SwDBData& GetDBDesc();
1199cdf0e10cSrcweir 	const SwDBData& _GetDBDesc() const { return aDBData; }
1200cdf0e10cSrcweir 
1201cdf0e10cSrcweir     /** Some helper functions
1202cdf0e10cSrcweir     */
1203cdf0e10cSrcweir     String GetUniqueGrfName() const;
1204cdf0e10cSrcweir     String GetUniqueOLEName() const;
1205cdf0e10cSrcweir 	String GetUniqueFrameName() const;
1206cdf0e10cSrcweir 
1207cdf0e10cSrcweir 	std::set<SwRootFrm*> GetAllLayouts();//swmod 080225
1208cdf0e10cSrcweir 
1209cdf0e10cSrcweir 	void SetFlyName( SwFlyFrmFmt& rFmt, const String& rName );
1210cdf0e10cSrcweir 	const SwFlyFrmFmt* FindFlyByName( const String& rName, sal_Int8 nNdTyp = 0 ) const;
1211cdf0e10cSrcweir 
1212cdf0e10cSrcweir 	void GetGrfNms( const SwFlyFrmFmt& rFmt, String* pGrfName,
1213cdf0e10cSrcweir 					String* pFltName ) const;
1214cdf0e10cSrcweir 
1215cdf0e10cSrcweir 	// setze bei allen Flys ohne Namen einen gueltigen (Wird von den Readern
1216cdf0e10cSrcweir 	// nach dem Einlesen gerufen )
1217cdf0e10cSrcweir 	void SetAllUniqueFlyNames();
1218cdf0e10cSrcweir 
1219cdf0e10cSrcweir 		//Zuruecksetzen der Attribute; es werden alle TxtHints und bei
1220cdf0e10cSrcweir 		//vollstaendiger Selektion harte Formatierung (AUTO-Formate) entfernt
1221cdf0e10cSrcweir     // --> OD 2008-11-28 #i96644#
1222cdf0e10cSrcweir     // introduce new optional parameter <bSendDataChangedEvents> in order to
1223cdf0e10cSrcweir     // control, if the side effect "send data changed events" is triggered or not.
1224cdf0e10cSrcweir     void ResetAttrs( const SwPaM &rRg,
1225cdf0e10cSrcweir                      sal_Bool bTxtAttr = sal_True,
1226cdf0e10cSrcweir                      const SvUShortsSort* = 0,
1227cdf0e10cSrcweir                      const bool bSendDataChangedEvents = true );
1228cdf0e10cSrcweir     // <--
1229cdf0e10cSrcweir     void RstTxtAttrs(const SwPaM &rRg, sal_Bool bInclRefToxMark = sal_False );
1230cdf0e10cSrcweir 
1231cdf0e10cSrcweir 		// Setze das Attribut im angegebenen Format. Ist Undo aktiv, wird
1232cdf0e10cSrcweir 		// das alte in die Undo-History aufgenommen
1233cdf0e10cSrcweir 	void SetAttr( const SfxPoolItem&, SwFmt& );
1234cdf0e10cSrcweir 	void SetAttr( const SfxItemSet&, SwFmt& );
1235cdf0e10cSrcweir 
1236cdf0e10cSrcweir     // --> OD 2008-02-12 #newlistlevelattrs#
1237cdf0e10cSrcweir     // method to reset a certain attribute at the given format
1238cdf0e10cSrcweir     void ResetAttrAtFormat( const sal_uInt16 nWhichId,
1239cdf0e10cSrcweir                             SwFmt& rChangedFormat );
1240cdf0e10cSrcweir     // <--
1241cdf0e10cSrcweir 
1242cdf0e10cSrcweir 		// Setze das Attribut als neues default Attribut in diesem Dokument.
1243cdf0e10cSrcweir 		// Ist Undo aktiv, wird das alte in die Undo-History aufgenommen
1244cdf0e10cSrcweir 	void SetDefault( const SfxPoolItem& );
1245cdf0e10cSrcweir 	void SetDefault( const SfxItemSet& );
1246cdf0e10cSrcweir 
1247cdf0e10cSrcweir 	// Erfrage das Default Attribut in diesem Dokument.
1248cdf0e10cSrcweir 	const SfxPoolItem& GetDefault( sal_uInt16 nFmtHint ) const;
1249cdf0e10cSrcweir 	// TextAttribute nicht mehr aufspannen lassen
1250cdf0e10cSrcweir 	sal_Bool DontExpandFmt( const SwPosition& rPos, sal_Bool bFlag = sal_True );
1251cdf0e10cSrcweir 
1252cdf0e10cSrcweir 	/* Formate */
1253cdf0e10cSrcweir 	const SwFrmFmts* GetFrmFmts() const 	{ return pFrmFmtTbl; }
1254cdf0e10cSrcweir 		  SwFrmFmts* GetFrmFmts()			{ return pFrmFmtTbl; }
1255cdf0e10cSrcweir 	const SwCharFmts* GetCharFmts() const	{ return pCharFmtTbl;}
1256cdf0e10cSrcweir 
1257cdf0e10cSrcweir 	/* LayoutFormate (Rahmen, DrawObjecte), mal const mal nicht */
1258cdf0e10cSrcweir 	const SwSpzFrmFmts* GetSpzFrmFmts() const	{ return pSpzFrmFmtTbl; }
1259cdf0e10cSrcweir 		  SwSpzFrmFmts* GetSpzFrmFmts() 		{ return pSpzFrmFmtTbl; }
1260cdf0e10cSrcweir 
1261cdf0e10cSrcweir 	const SwFrmFmt *GetDfltFrmFmt() const	{ return pDfltFrmFmt; }
1262cdf0e10cSrcweir 		  SwFrmFmt *GetDfltFrmFmt() 		{ return pDfltFrmFmt; }
1263cdf0e10cSrcweir 	const SwFrmFmt *GetEmptyPageFmt() const { return pEmptyPageFmt; }
1264cdf0e10cSrcweir 		  SwFrmFmt *GetEmptyPageFmt()		{ return pEmptyPageFmt; }
1265cdf0e10cSrcweir 	const SwFrmFmt *GetColumnContFmt() const{ return pColumnContFmt; }
1266cdf0e10cSrcweir 		  SwFrmFmt *GetColumnContFmt()		{ return pColumnContFmt; }
1267cdf0e10cSrcweir 	const SwCharFmt *GetDfltCharFmt() const { return pDfltCharFmt;}
1268cdf0e10cSrcweir 		  SwCharFmt *GetDfltCharFmt()		{ return pDfltCharFmt;}
1269cdf0e10cSrcweir 
1270cdf0e10cSrcweir     // Returns the interface of the management of (auto)styles
1271cdf0e10cSrcweir     IStyleAccess& GetIStyleAccess() { return *pStyleAccess; }
1272cdf0e10cSrcweir 
1273cdf0e10cSrcweir 	// Remove all language dependencies from all existing formats
1274cdf0e10cSrcweir 	void RemoveAllFmtLanguageDependencies();
1275cdf0e10cSrcweir 
1276cdf0e10cSrcweir 	SwFrmFmt  *MakeFrmFmt(const String &rFmtName, SwFrmFmt *pDerivedFrom,
1277cdf0e10cSrcweir                           sal_Bool bBroadcast = sal_False, sal_Bool bAuto = sal_True);
1278cdf0e10cSrcweir 	void	   DelFrmFmt( SwFrmFmt *pFmt, sal_Bool bBroadcast = sal_False );
1279cdf0e10cSrcweir 	SwFrmFmt* FindFrmFmtByName( const String& rName ) const
1280cdf0e10cSrcweir 		{	return (SwFrmFmt*)FindFmtByName( (SvPtrarr&)*pFrmFmtTbl, rName ); }
1281cdf0e10cSrcweir 
1282cdf0e10cSrcweir     // --> OD 2005-01-13 #i40550#
1283cdf0e10cSrcweir     SwCharFmt *MakeCharFmt(const String &rFmtName, SwCharFmt *pDerivedFrom,
1284cdf0e10cSrcweir                            sal_Bool bBroadcast = sal_False,
1285cdf0e10cSrcweir                            sal_Bool bAuto = sal_True );
1286cdf0e10cSrcweir     // <--
1287cdf0e10cSrcweir 	void	   DelCharFmt(sal_uInt16 nFmt, sal_Bool bBroadcast = sal_False);
1288cdf0e10cSrcweir 	void	   DelCharFmt(SwCharFmt* pFmt, sal_Bool bBroadcast = sal_False);
1289cdf0e10cSrcweir 	SwCharFmt* FindCharFmtByName( const String& rName ) const
1290cdf0e10cSrcweir 		{	return (SwCharFmt*)FindFmtByName( (SvPtrarr&)*pCharFmtTbl, rName ); }
1291cdf0e10cSrcweir 
1292cdf0e10cSrcweir 	/* Formatcollections (Vorlagen) */
1293cdf0e10cSrcweir 	// TXT
1294cdf0e10cSrcweir 	const SwTxtFmtColl* GetDfltTxtFmtColl() const { return pDfltTxtFmtColl; }
1295cdf0e10cSrcweir 	const SwTxtFmtColls *GetTxtFmtColls() const { return pTxtFmtCollTbl; }
1296cdf0e10cSrcweir     // --> OD 2005-01-13 #i40550#
1297cdf0e10cSrcweir     SwTxtFmtColl *MakeTxtFmtColl( const String &rFmtName,
1298cdf0e10cSrcweir 								  SwTxtFmtColl *pDerivedFrom,
1299cdf0e10cSrcweir                                   sal_Bool bBroadcast = sal_False,
1300cdf0e10cSrcweir                                   sal_Bool bAuto = sal_True );
1301cdf0e10cSrcweir     // <--
1302cdf0e10cSrcweir 	SwConditionTxtFmtColl* MakeCondTxtFmtColl( const String &rFmtName,
1303cdf0e10cSrcweir 											   SwTxtFmtColl *pDerivedFrom,
1304cdf0e10cSrcweir                                                sal_Bool bBroadcast = sal_False);
1305cdf0e10cSrcweir 	void DelTxtFmtColl(sal_uInt16 nFmt, sal_Bool bBroadcast = sal_False);
1306cdf0e10cSrcweir 	void DelTxtFmtColl( SwTxtFmtColl* pColl, sal_Bool bBroadcast = sal_False );
1307cdf0e10cSrcweir     // --> OD 2007-11-06 #i62675#
1308cdf0e10cSrcweir     // Add 4th optional parameter <bResetListAttrs>.
1309cdf0e10cSrcweir     // 'side effect' of <SetTxtFmtColl> with <bReset = true> is that the hard
1310cdf0e10cSrcweir     // attributes of the affected text nodes are cleared, except the break
1311cdf0e10cSrcweir     // attribute, the page description attribute and the list style attribute.
1312cdf0e10cSrcweir     // The new parameter <bResetListAttrs> indicates, if the list attributes
1313cdf0e10cSrcweir     // (list style, restart at and restart with) are cleared as well in case
1314cdf0e10cSrcweir     // that <bReset = true> and the paragraph style has a list style attribute set.
1315cdf0e10cSrcweir     sal_Bool SetTxtFmtColl( const SwPaM &rRg, SwTxtFmtColl *pFmt,
1316cdf0e10cSrcweir                             bool bReset = true,
1317cdf0e10cSrcweir                             bool bResetListAttrs = false );
1318cdf0e10cSrcweir     // <--
1319cdf0e10cSrcweir 	SwTxtFmtColl* FindTxtFmtCollByName( const String& rName ) const
1320cdf0e10cSrcweir 		{	return (SwTxtFmtColl*)FindFmtByName( (SvPtrarr&)*pTxtFmtCollTbl, rName ); }
1321cdf0e10cSrcweir 
1322cdf0e10cSrcweir     void ChkCondColls();
1323cdf0e10cSrcweir 
1324cdf0e10cSrcweir 		// GRF
1325cdf0e10cSrcweir 	const SwGrfFmtColl* GetDfltGrfFmtColl() const	{ return pDfltGrfFmtColl; }
1326cdf0e10cSrcweir 	const SwGrfFmtColls *GetGrfFmtColls() const		{ return pGrfFmtCollTbl; }
1327cdf0e10cSrcweir 	SwGrfFmtColl *MakeGrfFmtColl(const String &rFmtName,
1328cdf0e10cSrcweir 									SwGrfFmtColl *pDerivedFrom);
1329cdf0e10cSrcweir 	SwGrfFmtColl* FindGrfFmtCollByName( const String& rName ) const
1330cdf0e10cSrcweir 		{	return (SwGrfFmtColl*)FindFmtByName( (SvPtrarr&)*pGrfFmtCollTbl, rName ); }
1331cdf0e10cSrcweir 
1332cdf0e10cSrcweir 		// Tabellen-Formate
1333cdf0e10cSrcweir 	const SwFrmFmts* GetTblFrmFmts() const	{ return pTblFrmFmtTbl; }
1334cdf0e10cSrcweir 		  SwFrmFmts* GetTblFrmFmts()		{ return pTblFrmFmtTbl; }
1335cdf0e10cSrcweir 	sal_uInt16 GetTblFrmFmtCount( sal_Bool bUsed ) const;
1336cdf0e10cSrcweir 	SwFrmFmt& GetTblFrmFmt(sal_uInt16 nFmt, sal_Bool bUsed ) const;
1337cdf0e10cSrcweir 	SwTableFmt* MakeTblFrmFmt(const String &rFmtName, SwFrmFmt *pDerivedFrom);
1338cdf0e10cSrcweir 	void	    DelTblFrmFmt( SwTableFmt* pFmt );
1339cdf0e10cSrcweir 	SwTableFmt* FindTblFmtByName( const String& rName, sal_Bool bAll = sal_False ) const;
1340cdf0e10cSrcweir 
1341cdf0e10cSrcweir 	//Rahmenzugriff
1342cdf0e10cSrcweir 	//iterieren ueber Flys - fuer Basic-Collections
1343cdf0e10cSrcweir 	sal_uInt16 GetFlyCount( FlyCntType eType = FLYCNTTYPE_ALL) const;
1344cdf0e10cSrcweir 	SwFrmFmt* GetFlyNum(sal_uInt16 nIdx, FlyCntType eType = FLYCNTTYPE_ALL);
1345cdf0e10cSrcweir 
1346cdf0e10cSrcweir 
1347cdf0e10cSrcweir 	// kopiere die Formate in die eigenen Arrays und returne diese
1348cdf0e10cSrcweir 	SwFrmFmt  *CopyFrmFmt ( const SwFrmFmt& );
1349cdf0e10cSrcweir 	SwCharFmt *CopyCharFmt( const SwCharFmt& );
1350cdf0e10cSrcweir 	SwTxtFmtColl* CopyTxtColl( const SwTxtFmtColl& rColl );
1351cdf0e10cSrcweir 	SwGrfFmtColl* CopyGrfColl( const SwGrfFmtColl& rColl );
1352cdf0e10cSrcweir 
1353cdf0e10cSrcweir 		// ersetze alle Formate mit denen aus rSource
1354cdf0e10cSrcweir 	void ReplaceStyles( SwDoc& rSource );
1355cdf0e10cSrcweir 
1356cdf0e10cSrcweir 	// erfrage ob die Absatz-/Zeichen-/Rahmen-/Seiten - Vorlage benutzt wird
1357cdf0e10cSrcweir 	sal_Bool IsUsed( const SwModify& ) const;
1358cdf0e10cSrcweir 	sal_Bool IsUsed( const SwNumRule& ) const;
1359cdf0e10cSrcweir 
1360cdf0e10cSrcweir 		// setze den Namen der neu geladenen Dokument-Vorlage
1361cdf0e10cSrcweir 	sal_uInt16 SetDocPattern( const String& rPatternName );
1362cdf0e10cSrcweir         // gebe den Dok-VorlagenNamen zurueck. !!! Kann auch 0 sein !!!
1363cdf0e10cSrcweir 	String* GetDocPattern( sal_uInt16 nPos ) const { return aPatternNms[nPos]; }
1364cdf0e10cSrcweir 
1365cdf0e10cSrcweir 		// Loesche alle nicht referenzierten FeldTypen
1366cdf0e10cSrcweir 	void GCFieldTypes();				// impl. in docfld.cxx
1367cdf0e10cSrcweir 
1368cdf0e10cSrcweir 		// akt. Dokument mit Textbausteindokument verbinden/erfragen
1369cdf0e10cSrcweir 	void SetGlossaryDoc( SwDoc* pDoc ) { pGlossaryDoc = pDoc; }
1370cdf0e10cSrcweir 
1371cdf0e10cSrcweir 	// travel over PaM Ring
1372cdf0e10cSrcweir 	sal_Bool InsertGlossary( SwTextBlocks& rBlock, const String& rEntry,
1373cdf0e10cSrcweir 						SwPaM& rPaM, SwCrsrShell* pShell = 0);
1374cdf0e10cSrcweir 
1375cdf0e10cSrcweir     // get the set of printable pages for the XRenderable API by
1376cdf0e10cSrcweir     // evaluating the respective settings (see implementation)
1377cdf0e10cSrcweir     void CalculatePagesForPrinting( const SwRootFrm& rLayout, SwRenderData &rData, const SwPrintUIOptions &rOptions, bool bIsPDFExport,
1378cdf0e10cSrcweir             sal_Int32 nDocPageCount );
1379cdf0e10cSrcweir     void UpdatePagesForPrintingWithPostItData( SwRenderData &rData, const SwPrintUIOptions &rOptions, bool bIsPDFExport,
1380cdf0e10cSrcweir             sal_Int32 nDocPageCount );
1381cdf0e10cSrcweir     void CalculatePagePairsForProspectPrinting( const SwRootFrm& rLayout, SwRenderData &rData, const SwPrintUIOptions &rOptions,
1382cdf0e10cSrcweir             sal_Int32 nDocPageCount );
1383cdf0e10cSrcweir 
1384cdf0e10cSrcweir 		//PageDescriptor-Schnittstelle
1385cdf0e10cSrcweir 	sal_uInt16 GetPageDescCnt() const { return aPageDescs.Count(); }
1386cdf0e10cSrcweir 	const SwPageDesc& GetPageDesc( const sal_uInt16 i ) const { return *aPageDescs[i]; }
1387cdf0e10cSrcweir 	SwPageDesc* FindPageDescByName( const String& rName,
1388cdf0e10cSrcweir 									sal_uInt16* pPos = 0 ) const;
1389cdf0e10cSrcweir 
1390cdf0e10cSrcweir 		// kopiere den gesamten PageDesc - ueber Dokumentgrenzen und "tief"!
1391cdf0e10cSrcweir 		// optional kann das kopieren der PoolFmtId, -HlpId verhindert werden
1392cdf0e10cSrcweir 	void CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc,
1393cdf0e10cSrcweir 						sal_Bool bCopyPoolIds = sal_True );
1394cdf0e10cSrcweir 
1395cdf0e10cSrcweir 		// kopiere die Kopzeile (mit dem Inhalt!) aus dem SrcFmt
1396cdf0e10cSrcweir 		// ins DestFmt ( auch ueber Doc grenzen hinaus!)
1397cdf0e10cSrcweir 	void CopyHeader( const SwFrmFmt& rSrcFmt, SwFrmFmt& rDestFmt )
1398cdf0e10cSrcweir         { CopyPageDescHeaderFooterImpl( true, rSrcFmt, rDestFmt ); }
1399cdf0e10cSrcweir 		// kopiere die Fusszeile (mit dem Inhalt!) aus dem SrcFmt
1400cdf0e10cSrcweir 		// ins DestFmt ( auch ueber Doc grenzen hinaus!)
1401cdf0e10cSrcweir 	void CopyFooter( const SwFrmFmt& rSrcFmt, SwFrmFmt& rDestFmt )
1402cdf0e10cSrcweir         { CopyPageDescHeaderFooterImpl( false, rSrcFmt, rDestFmt ); }
1403cdf0e10cSrcweir 
1404cdf0e10cSrcweir 		//fuer Reader
1405cdf0e10cSrcweir 
1406cdf0e10cSrcweir     SwPageDesc * GetPageDesc( const String & rName );
1407cdf0e10cSrcweir 	SwPageDesc& _GetPageDesc( sal_uInt16 i ) const { return *aPageDescs[i]; }
1408cdf0e10cSrcweir 	void ChgPageDesc( const String & rName, const SwPageDesc& );
1409cdf0e10cSrcweir 	void ChgPageDesc( sal_uInt16 i, const SwPageDesc& );
1410cdf0e10cSrcweir     sal_Bool FindPageDesc( const String & rName, sal_uInt16 * pFound );
1411cdf0e10cSrcweir     // -> #116530#
1412cdf0e10cSrcweir     void DelPageDesc( const String & rName, sal_Bool bBroadcast = sal_False);
1413cdf0e10cSrcweir 	void DelPageDesc( sal_uInt16 i, sal_Bool bBroadcast = sal_False );
1414cdf0e10cSrcweir     // <- #116530#
1415cdf0e10cSrcweir     void PreDelPageDesc(SwPageDesc * pDel); // #i7983#
1416cdf0e10cSrcweir     // -> #116530#
1417cdf0e10cSrcweir 	sal_uInt16 MakePageDesc( const String &rName, const SwPageDesc* pCpy = 0,
1418cdf0e10cSrcweir                              sal_Bool bRegardLanguage = sal_True,
1419cdf0e10cSrcweir                              sal_Bool bBroadcast = sal_False);
1420cdf0e10cSrcweir     void BroadcastStyleOperation(String rName, SfxStyleFamily eFamily,
1421cdf0e10cSrcweir                                  sal_uInt16 nOp);
1422cdf0e10cSrcweir     // <- #116530#
1423cdf0e10cSrcweir 
1424cdf0e10cSrcweir 
1425cdf0e10cSrcweir     // --> FME 2005-03-16 #i44963# The html import sometimes overwrites the
1426cdf0e10cSrcweir     // page sizes set in the page descriptions. This function is used to
1427cdf0e10cSrcweir     // correct this.
1428cdf0e10cSrcweir     void CheckDefaultPageFmt();
1429cdf0e10cSrcweir     // <--
1430cdf0e10cSrcweir 
1431cdf0e10cSrcweir 		// Methoden fuer die Verzeichnisse:
1432cdf0e10cSrcweir 		// - Verzeichnismarke einfuegen loeschen travel
1433cdf0e10cSrcweir 	sal_uInt16 GetCurTOXMark( const SwPosition& rPos, SwTOXMarks& ) const;
1434cdf0e10cSrcweir     void DeleteTOXMark( const SwTOXMark* pTOXMark );
1435cdf0e10cSrcweir 	const SwTOXMark& GotoTOXMark( const SwTOXMark& rCurTOXMark,
1436cdf0e10cSrcweir 								SwTOXSearch eDir, sal_Bool bInReadOnly );
1437cdf0e10cSrcweir 
1438cdf0e10cSrcweir 		// - Verzeichnis einfuegen, und bei Bedarf erneuern
1439cdf0e10cSrcweir 	const SwTOXBaseSection* InsertTableOf( const SwPosition& rPos,
1440cdf0e10cSrcweir 											const SwTOXBase& rTOX,
1441cdf0e10cSrcweir 											const SfxItemSet* pSet = 0,
1442cdf0e10cSrcweir 											sal_Bool bExpand = sal_False );
1443cdf0e10cSrcweir 	const SwTOXBaseSection* InsertTableOf( sal_uLong nSttNd, sal_uLong nEndNd,
1444cdf0e10cSrcweir 											const SwTOXBase& rTOX,
1445cdf0e10cSrcweir 											const SfxItemSet* pSet = 0											);
1446cdf0e10cSrcweir 	const SwTOXBase* GetCurTOX( const SwPosition& rPos ) const;
1447cdf0e10cSrcweir 	const SwAttrSet& GetTOXBaseAttrSet(const SwTOXBase& rTOX) const;
1448cdf0e10cSrcweir 
1449cdf0e10cSrcweir 	sal_Bool DeleteTOX( const SwTOXBase& rTOXBase, sal_Bool bDelNodes = sal_False );
1450cdf0e10cSrcweir 	String GetUniqueTOXBaseName( const SwTOXType& rType,
1451cdf0e10cSrcweir 								const String* pChkStr = 0 ) const;
1452cdf0e10cSrcweir 
1453cdf0e10cSrcweir 	sal_Bool SetTOXBaseName(const SwTOXBase& rTOXBase, const String& rName);
1454cdf0e10cSrcweir 	void SetTOXBaseProtection(const SwTOXBase& rTOXBase, sal_Bool bProtect);
1455cdf0e10cSrcweir 
1456cdf0e10cSrcweir 	// nach einlesen einer Datei alle Verzeichnisse updaten
1457cdf0e10cSrcweir     void SetUpdateTOX( bool bFlag = true )     { mbUpdateTOX = bFlag; }
1458cdf0e10cSrcweir     bool IsUpdateTOX() const                   { return mbUpdateTOX; }
1459cdf0e10cSrcweir 
1460cdf0e10cSrcweir 	const String&	GetTOIAutoMarkURL() const {return sTOIAutoMarkURL;}
1461cdf0e10cSrcweir 	void			SetTOIAutoMarkURL(const String& rSet)  {sTOIAutoMarkURL = rSet;}
1462cdf0e10cSrcweir 	void 			ApplyAutoMark();
1463cdf0e10cSrcweir 
1464cdf0e10cSrcweir     bool IsInReading() const                    { return mbInReading; }
1465cdf0e10cSrcweir     void SetInReading( bool bNew )              { mbInReading = bNew; }
1466cdf0e10cSrcweir 
1467cdf0e10cSrcweir     bool IsClipBoard() const                    { return mbClipBoard; }
1468cdf0e10cSrcweir     // N.B.: must be called right after constructor! (@see GetXmlIdRegistry)
1469cdf0e10cSrcweir     void SetClipBoard( bool bNew )              { mbClipBoard = bNew; }
1470cdf0e10cSrcweir 
1471cdf0e10cSrcweir     bool IsColumnSelection() const              { return mbColumnSelection; }
1472cdf0e10cSrcweir     void SetColumnSelection( bool bNew )        { mbColumnSelection = bNew; }
1473cdf0e10cSrcweir 
1474cdf0e10cSrcweir     bool IsInXMLImport() const { return mbInXMLImport; }
1475cdf0e10cSrcweir     void SetInXMLImport( bool bNew ) { mbInXMLImport = bNew; }
1476cdf0e10cSrcweir 
1477cdf0e10cSrcweir 	// - Verzeichnis-Typen verwalten
1478cdf0e10cSrcweir 	sal_uInt16 GetTOXTypeCount( TOXTypes eTyp ) const;
1479cdf0e10cSrcweir 	const SwTOXType* GetTOXType( TOXTypes eTyp, sal_uInt16 nId ) const;
1480cdf0e10cSrcweir 	sal_Bool DeleteTOXType( TOXTypes eTyp, sal_uInt16 nId );
1481cdf0e10cSrcweir 	const SwTOXType* InsertTOXType( const SwTOXType& rTyp );
1482cdf0e10cSrcweir 	const SwTOXTypes& GetTOXTypes() const { return *pTOXTypes; }
1483cdf0e10cSrcweir 
1484cdf0e10cSrcweir 	const SwTOXBase* 	GetDefaultTOXBase( TOXTypes eTyp, sal_Bool bCreate = sal_False );
1485cdf0e10cSrcweir 	void				SetDefaultTOXBase(const SwTOXBase& rBase);
1486cdf0e10cSrcweir 
1487cdf0e10cSrcweir 	// - Schluessel fuer die Indexverwaltung
1488cdf0e10cSrcweir 	sal_uInt16 GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const;
1489cdf0e10cSrcweir 
1490cdf0e10cSrcweir 	// Sortieren Tabellen Text
1491cdf0e10cSrcweir 	sal_Bool SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions&);
1492cdf0e10cSrcweir 	sal_Bool SortText(const SwPaM&, const SwSortOptions&);
1493cdf0e10cSrcweir 
1494cdf0e10cSrcweir 		// korrigiere die im Dokument angemeldeten SwPosition-Objecte,
1495cdf0e10cSrcweir 		// wie z.B. die ::com::sun::star::text::Bookmarks oder die Verzeichnisse.
1496cdf0e10cSrcweir 		// JP 22.06.95: ist bMoveCrsr gesetzt, verschiebe auch die Crsr
1497cdf0e10cSrcweir 
1498cdf0e10cSrcweir 		// Setzt alles in rOldNode auf rNewPos + Offset
1499cdf0e10cSrcweir 	void CorrAbs( const SwNodeIndex& rOldNode, const SwPosition& rNewPos,
1500cdf0e10cSrcweir 					const xub_StrLen nOffset = 0, sal_Bool bMoveCrsr = sal_False );
1501cdf0e10cSrcweir 		// Setzt alles im Bereich von [rStartNode, rEndNode] nach rNewPos
1502cdf0e10cSrcweir 	void CorrAbs( const SwNodeIndex& rStartNode, const SwNodeIndex& rEndNode,
1503cdf0e10cSrcweir 					const SwPosition& rNewPos, sal_Bool bMoveCrsr = sal_False );
1504cdf0e10cSrcweir 		// Setzt alles im Bereich von rRange nach rNewPos
1505cdf0e10cSrcweir 	void CorrAbs( const SwPaM& rRange, const SwPosition& rNewPos,
1506cdf0e10cSrcweir 					sal_Bool bMoveCrsr = sal_False );
1507cdf0e10cSrcweir 		// Setzt alles in rOldNode auf relative Pos
1508cdf0e10cSrcweir 	void CorrRel( const SwNodeIndex& rOldNode, const SwPosition& rNewPos,
1509cdf0e10cSrcweir 					const xub_StrLen nOffset = 0, sal_Bool bMoveCrsr = sal_False );
1510cdf0e10cSrcweir 
1511cdf0e10cSrcweir 		// GliederungsRegeln erfragen / setzen
1512cdf0e10cSrcweir     // --> OD 2005-11-02 #i51089 - TUNING#
1513cdf0e10cSrcweir     inline SwNumRule* GetOutlineNumRule() const
1514cdf0e10cSrcweir     {
1515cdf0e10cSrcweir         return pOutlineRule;
1516cdf0e10cSrcweir     }
1517cdf0e10cSrcweir     // <--
1518cdf0e10cSrcweir 	void SetOutlineNumRule( const SwNumRule& rRule );
1519cdf0e10cSrcweir     void PropagateOutlineRule();
1520cdf0e10cSrcweir 
1521cdf0e10cSrcweir 	// Gliederung - hoch-/runterstufen
1522cdf0e10cSrcweir 	sal_Bool OutlineUpDown( const SwPaM& rPam, short nOffset = 1 );
1523cdf0e10cSrcweir 	// Gliederung - hoch-/runtermoven
1524cdf0e10cSrcweir 	sal_Bool MoveOutlinePara( const SwPaM& rPam, short nOffset = 1);
1525cdf0e10cSrcweir 		// zu diesem Gliederungspunkt
1526cdf0e10cSrcweir 	sal_Bool GotoOutline( SwPosition& rPos, const String& rName ) const;
1527cdf0e10cSrcweir 	// die Aenderungen an den Gliederungsvorlagen in die OutlineRule uebernehmen
1528cdf0e10cSrcweir 
1529cdf0e10cSrcweir 		// setzt, wenn noch keine Numerierung, sonst wird geaendert
1530cdf0e10cSrcweir 		// arbeitet mit alten und neuen Regeln, nur Differenzen aktualisieren
1531cdf0e10cSrcweir     // --> OD 2005-02-18 #i42921# - re-use unused 3rd parameter
1532cdf0e10cSrcweir     // --> OD 2008-02-08 #newlistlevelattrs#
1533cdf0e10cSrcweir     // Add optional parameter <bResetIndentAttrs> - default value sal_False.
1534cdf0e10cSrcweir     // If <bResetIndentAttrs> equals true, the indent attributes "before text"
1535cdf0e10cSrcweir     // and "first line indent" are additionally reset at the provided PaM, if
1536cdf0e10cSrcweir     // the list style makes use of the new list level attributes.
1537cdf0e10cSrcweir     // --> OD 2008-03-17 #refactorlists#
1538cdf0e10cSrcweir     // introduce parameters <bCreateNewList> and <sContinuedListId>
1539cdf0e10cSrcweir     // <bCreateNewList> indicates, if a new list is created by applying the
1540cdf0e10cSrcweir     // given list style.
1541cdf0e10cSrcweir     void SetNumRule( const SwPaM&,
1542cdf0e10cSrcweir                      const SwNumRule&,
1543cdf0e10cSrcweir                      const bool bCreateNewList,
1544cdf0e10cSrcweir                      const String sContinuedListId = String(),
1545cdf0e10cSrcweir                      sal_Bool bSetItem = sal_True,
1546cdf0e10cSrcweir                      const bool bResetIndentAttrs = false );
1547cdf0e10cSrcweir     // <--
1548cdf0e10cSrcweir     void SetCounted( const SwPaM&, bool bCounted);
1549cdf0e10cSrcweir 
1550cdf0e10cSrcweir     // --> OD 2009-08-25 #i86492#
1551cdf0e10cSrcweir     // no longer needed.
1552cdf0e10cSrcweir     // SwDoc::SetNumRule( rPaM, rNumRule, false, <ListId>, sal_True, true ) have to be used instead.
1553cdf0e10cSrcweir //    /**
1554cdf0e10cSrcweir //       Replace numbering rules in a PaM by another numbering rule.
1555cdf0e10cSrcweir 
1556cdf0e10cSrcweir //       \param rPaM         PaM to replace the numbering rules in
1557cdf0e10cSrcweir //       \param rNumRule     numbering rule to replace the present numbering rules
1558cdf0e10cSrcweir //     */
1559cdf0e10cSrcweir //    void ReplaceNumRule(const SwPaM & rPaM, const SwNumRule & rNumRule);
1560cdf0e10cSrcweir 
1561cdf0e10cSrcweir     void MakeUniqueNumRules(const SwPaM & rPaM);
1562cdf0e10cSrcweir 
1563cdf0e10cSrcweir 	void SetNumRuleStart( const SwPosition& rPos, sal_Bool bFlag = sal_True );
1564cdf0e10cSrcweir     void SetNodeNumStart( const SwPosition& rPos, sal_uInt16 nStt );
1565cdf0e10cSrcweir 
1566cdf0e10cSrcweir 	SwNumRule* GetCurrNumRule( const SwPosition& rPos ) const;
1567cdf0e10cSrcweir 
1568cdf0e10cSrcweir     const SwNumRuleTbl& GetNumRuleTbl() const { return *pNumRuleTbl; }
1569cdf0e10cSrcweir 
1570cdf0e10cSrcweir     // #i36749#
1571cdf0e10cSrcweir     /**
1572cdf0e10cSrcweir        Add numbering rule to document.
1573cdf0e10cSrcweir 
1574cdf0e10cSrcweir        @param pRule    rule to add
1575cdf0e10cSrcweir     */
1576cdf0e10cSrcweir     void AddNumRule(SwNumRule * pRule);
1577cdf0e10cSrcweir 
1578cdf0e10cSrcweir     // --> OD 2008-02-11 #newlistlevelattrs#
1579cdf0e10cSrcweir     // add optional parameter <eDefaultNumberFormatPositionAndSpaceMode>
1580cdf0e10cSrcweir     sal_uInt16 MakeNumRule( const String &rName,
1581cdf0e10cSrcweir         const SwNumRule* pCpy = 0,
1582cdf0e10cSrcweir         sal_Bool bBroadcast = sal_False,
1583cdf0e10cSrcweir         const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode =
1584cdf0e10cSrcweir             SvxNumberFormat::LABEL_WIDTH_AND_POSITION );
1585cdf0e10cSrcweir     // <--
1586cdf0e10cSrcweir 	sal_uInt16 FindNumRule( const String& rName ) const;
1587cdf0e10cSrcweir 	SwNumRule* FindNumRulePtr( const String& rName ) const;
1588cdf0e10cSrcweir 
1589cdf0e10cSrcweir 	// loeschen geht nur, wenn die ::com::sun::star::chaos::Rule niemand benutzt!
1590cdf0e10cSrcweir     // #106897#
1591cdf0e10cSrcweir     sal_Bool RenameNumRule(const String & aOldName, const String & aNewName,
1592cdf0e10cSrcweir                            sal_Bool bBroadcast = sal_False);
1593cdf0e10cSrcweir 	sal_Bool DelNumRule( const String& rName, sal_Bool bBroadCast = sal_False );
1594cdf0e10cSrcweir 	String GetUniqueNumRuleName( const String* pChkStr = 0, sal_Bool bAutoNum = sal_True ) const;
1595cdf0e10cSrcweir 
1596cdf0e10cSrcweir 	void UpdateNumRule();	// alle invaliden Updaten
1597cdf0e10cSrcweir     // #106897#
1598cdf0e10cSrcweir 	void ChgNumRuleFmts( const SwNumRule& rRule, const String * pOldName = 0 );
1599cdf0e10cSrcweir 	sal_Bool ReplaceNumRule( const SwPosition& rPos, const String& rOldRule,
1600cdf0e10cSrcweir 						const String& rNewRule );
1601cdf0e10cSrcweir 
1602cdf0e10cSrcweir 		// zum naechsten/vorhergehenden Punkt auf gleicher Ebene
1603cdf0e10cSrcweir 	sal_Bool GotoNextNum( SwPosition&, sal_Bool bOverUpper = sal_True,
1604cdf0e10cSrcweir 						sal_uInt8* pUpper = 0, sal_uInt8* pLower = 0 );
1605cdf0e10cSrcweir 	sal_Bool GotoPrevNum( SwPosition&, sal_Bool bOverUpper = sal_True,
1606cdf0e10cSrcweir 						sal_uInt8* pUpper = 0, sal_uInt8* pLower = 0 );
1607cdf0e10cSrcweir 
1608cdf0e10cSrcweir     // #i23731#
1609cdf0e10cSrcweir     /** Searches for a text node with a numbering rule.
1610cdf0e10cSrcweir 
1611cdf0e10cSrcweir        OD 2005-10-24 #i55391# - add optional parameter <bInvestigateStartNode>
1612cdf0e10cSrcweir        OD 2008-03-18 #refactorlists# - add output parameter <sListId>
1613cdf0e10cSrcweir 
1614cdf0e10cSrcweir        \param rPos         position to start search
1615cdf0e10cSrcweir        \param bForward     - sal_True:  search forward
1616cdf0e10cSrcweir                            - sal_False: search backward
1617cdf0e10cSrcweir 	   \param bNum		   - sal_True:  search for enumeration
1618cdf0e10cSrcweir 		                   - sal_False: search for itemize
1619cdf0e10cSrcweir        \param bOutline     - sal_True:  search for outline numbering rule
1620cdf0e10cSrcweir                            - sal_False: search for non-outline numbering rule
1621cdf0e10cSrcweir        \param nNonEmptyAllowed   number of non-empty paragraphs allowed between
1622cdf0e10cSrcweir                                  rPos and found paragraph
1623cdf0e10cSrcweir 
1624cdf0e10cSrcweir         @param sListId
1625cdf0e10cSrcweir         output parameter - in case a list style is found, <sListId> holds the
1626cdf0e10cSrcweir         list id, to which the text node belongs, which applies the found list style.
1627cdf0e10cSrcweir 
1628cdf0e10cSrcweir         @param bInvestigateStartNode
1629cdf0e10cSrcweir         input parameter - boolean, indicating, if start node, determined by given
1630cdf0e10cSrcweir         start position has to be investigated or not.
1631cdf0e10cSrcweir      */
1632cdf0e10cSrcweir     const SwNumRule * SearchNumRule(const SwPosition & rPos,
1633cdf0e10cSrcweir                                     const bool bForward,
1634cdf0e10cSrcweir                                     const bool bNum,
1635cdf0e10cSrcweir                                     const bool bOutline,
1636cdf0e10cSrcweir                                     int nNonEmptyAllowed,
1637cdf0e10cSrcweir                                     String& sListId,
1638cdf0e10cSrcweir                                     const bool bInvestigateStartNode = false );
1639cdf0e10cSrcweir 
1640cdf0e10cSrcweir 		// Absaetze ohne Numerierung, aber mit Einzuegen
1641cdf0e10cSrcweir 	sal_Bool NoNum( const SwPaM& );
1642cdf0e10cSrcweir 		// Loeschen, Splitten der Aufzaehlungsliste
1643cdf0e10cSrcweir     void DelNumRules( const SwPaM& );
1644cdf0e10cSrcweir 
1645cdf0e10cSrcweir     // Invalidates all numrules
1646cdf0e10cSrcweir     void InvalidateNumRules();
1647cdf0e10cSrcweir 
1648cdf0e10cSrcweir 		// Hoch-/Runterstufen
1649cdf0e10cSrcweir 	sal_Bool NumUpDown( const SwPaM&, sal_Bool bDown = sal_True );
1650cdf0e10cSrcweir 		// Bewegt selektierte Absaetze (nicht nur Numerierungen)
1651cdf0e10cSrcweir 		// entsprechend des Offsets. (negativ: zum Doc-Anf.)
1652cdf0e10cSrcweir 	sal_Bool MoveParagraph( const SwPaM&, long nOffset = 1, sal_Bool bIsOutlMv = sal_False );
1653cdf0e10cSrcweir 		// No-/Numerierung ueber Delete/Backspace ein/abschalten #115901#
1654cdf0e10cSrcweir 	sal_Bool NumOrNoNum( const SwNodeIndex& rIdx, sal_Bool bDel = sal_False);
1655cdf0e10cSrcweir 		// Animation der Grafiken stoppen
1656cdf0e10cSrcweir 	void StopNumRuleAnimations( OutputDevice* );
1657cdf0e10cSrcweir 
1658cdf0e10cSrcweir 		// fuege eine neue Tabelle auf der Position rPos ein. (es
1659cdf0e10cSrcweir 		// wird vor dem Node eingefuegt !!)
1660cdf0e10cSrcweir 		//JP 28.10.96:
1661cdf0e10cSrcweir 		// 	fuer AutoFormat bei der Eingabe: dann muessen die Spalten
1662cdf0e10cSrcweir 		//	auf die vordefinierten Breite gesetzt werden. Im Array stehen die
1663cdf0e10cSrcweir 		// 	Positionen der Spalten!! (nicht deren Breite!)
1664cdf0e10cSrcweir     /* #109161# new parameter bCalledFromShell:
1665cdf0e10cSrcweir 
1666cdf0e10cSrcweir        sal_True: called from shell -> propagate existing adjust item at
1667cdf0e10cSrcweir        rPos to every new cell. A existing adjust item in the table
1668cdf0e10cSrcweir        heading or table contents paragraph style prevent that
1669cdf0e10cSrcweir        propagation.
1670cdf0e10cSrcweir 
1671cdf0e10cSrcweir        sal_False: do not propagate
1672cdf0e10cSrcweir     */
1673cdf0e10cSrcweir     const SwTable* InsertTable( const SwInsertTableOptions& rInsTblOpts,  // HEADLINE_NO_BORDER
1674cdf0e10cSrcweir                                 const SwPosition& rPos, sal_uInt16 nRows,
1675cdf0e10cSrcweir                                 sal_uInt16 nCols, short eAdjust,
1676cdf0e10cSrcweir                                 const SwTableAutoFmt* pTAFmt = 0,
1677cdf0e10cSrcweir                                 const SvUShorts* pColArr = 0,
1678cdf0e10cSrcweir                                 sal_Bool bCalledFromShell = sal_False,
1679cdf0e10cSrcweir                                 sal_Bool bNewModel = sal_True );
1680cdf0e10cSrcweir 
1681cdf0e10cSrcweir     // steht der Index in einer Tabelle, dann returne den TableNode sonst 0
1682cdf0e10cSrcweir 				 SwTableNode* IsIdxInTbl( const SwNodeIndex& rIdx );
1683cdf0e10cSrcweir 	inline const SwTableNode* IsIdxInTbl( const SwNodeIndex& rIdx ) const;
1684cdf0e10cSrcweir 
1685cdf0e10cSrcweir 		// erzeuge aus dem makierten Bereich eine ausgeglichene Tabelle
1686cdf0e10cSrcweir     const SwTable* TextToTable( const SwInsertTableOptions& rInsTblOpts, // HEADLINE_NO_BORDER,
1687cdf0e10cSrcweir                                 const SwPaM& rRange, sal_Unicode cCh,
1688cdf0e10cSrcweir                                 short eAdjust,
1689cdf0e10cSrcweir                                 const SwTableAutoFmt* = 0 );
1690cdf0e10cSrcweir     // text to table conversion - API support
1691cdf0e10cSrcweir     const SwTable* TextToTable( const std::vector< std::vector<SwNodeRange> >& rTableNodes );
1692cdf0e10cSrcweir 		// erzeuge aus der Tabelle wieder normalen Text
1693cdf0e10cSrcweir 	sal_Bool TableToText( const SwTableNode* pTblNd, sal_Unicode cCh );
1694cdf0e10cSrcweir 		// einfuegen von Spalten/Zeilen in der Tabelle
1695cdf0e10cSrcweir 	sal_Bool InsertCol( const SwCursor& rCursor,
1696cdf0e10cSrcweir 					sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True );
1697cdf0e10cSrcweir 	sal_Bool InsertCol( const SwSelBoxes& rBoxes,
1698cdf0e10cSrcweir 					sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True );
1699cdf0e10cSrcweir 	sal_Bool InsertRow( const SwCursor& rCursor,
1700cdf0e10cSrcweir 					sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True );
1701cdf0e10cSrcweir 	sal_Bool InsertRow( const SwSelBoxes& rBoxes,
1702cdf0e10cSrcweir 					sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True );
1703cdf0e10cSrcweir 		// loeschen von Spalten/Zeilen in der Tabelle
1704cdf0e10cSrcweir 	sal_Bool DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn = false );
1705cdf0e10cSrcweir 	sal_Bool DeleteRow( const SwCursor& rCursor );
1706cdf0e10cSrcweir 	sal_Bool DeleteCol( const SwCursor& rCursor );
1707cdf0e10cSrcweir 		// teilen / zusammenfassen von Boxen in der Tabelle
1708cdf0e10cSrcweir     sal_Bool SplitTbl( const SwSelBoxes& rBoxes, sal_Bool bVert = sal_True,
1709cdf0e10cSrcweir                        sal_uInt16 nCnt = 1, sal_Bool bSameHeight = sal_False );
1710cdf0e10cSrcweir 		// returnt den enum TableMergeErr
1711cdf0e10cSrcweir 	sal_uInt16 MergeTbl( SwPaM& rPam );
1712cdf0e10cSrcweir 	String GetUniqueTblName() const;
1713cdf0e10cSrcweir 	sal_Bool IsInsTblFormatNum() const;
1714cdf0e10cSrcweir 	sal_Bool IsInsTblChangeNumFormat() const;
1715cdf0e10cSrcweir 	sal_Bool IsInsTblAlignNum() const;
1716cdf0e10cSrcweir 
1717cdf0e10cSrcweir 		// aus der FEShell wg.. Undo und bModified
1718cdf0e10cSrcweir     void GetTabCols( SwTabCols &rFill, const SwCursor* pCrsr,
1719cdf0e10cSrcweir 					const SwCellFrm* pBoxFrm = 0 ) const;
1720cdf0e10cSrcweir 	void SetTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly,
1721cdf0e10cSrcweir 					const SwCursor* pCrsr, const SwCellFrm* pBoxFrm = 0 );
1722cdf0e10cSrcweir     void GetTabRows( SwTabCols &rFill, const SwCursor* pCrsr,
1723cdf0e10cSrcweir                     const SwCellFrm* pBoxFrm = 0 ) const;
1724cdf0e10cSrcweir     void SetTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly, const SwCursor* pCrsr,
1725cdf0e10cSrcweir                      const SwCellFrm* pBoxFrm = 0 );
1726cdf0e10cSrcweir 
1727cdf0e10cSrcweir 
1728cdf0e10cSrcweir 	// Direktzugriff fuer Uno
1729cdf0e10cSrcweir     void SetTabCols(SwTable& rTab, const SwTabCols &rNew, const SwTabCols &rOld,
1730cdf0e10cSrcweir 									const SwTableBox *pStart, sal_Bool bCurRowOnly);
1731cdf0e10cSrcweir 
1732cdf0e10cSrcweir     void SetRowsToRepeat( SwTable &rTable, sal_uInt16 nSet );
1733cdf0e10cSrcweir 
1734cdf0e10cSrcweir 		// AutoFormat fuer die Tabelle/TabellenSelection
1735cdf0e10cSrcweir 	sal_Bool SetTableAutoFmt( const SwSelBoxes& rBoxes, const SwTableAutoFmt& rNew );
1736cdf0e10cSrcweir 		// Erfrage wie attributiert ist
1737cdf0e10cSrcweir 	sal_Bool GetTableAutoFmt( const SwSelBoxes& rBoxes, SwTableAutoFmt& rGet );
1738cdf0e10cSrcweir 		// setze das InsertDB als Tabelle Undo auf:
1739cdf0e10cSrcweir 	void AppendUndoForInsertFromDB( const SwPaM& rPam, sal_Bool bIsTable );
1740cdf0e10cSrcweir 		// setze die Spalten/Zeilen/ZTellen Breite/Hoehe
1741cdf0e10cSrcweir 	sal_Bool SetColRowWidthHeight( SwTableBox& rAktBox, sal_uInt16 eType,
1742cdf0e10cSrcweir 								SwTwips nAbsDiff, SwTwips nRelDiff );
1743cdf0e10cSrcweir 	SwTableBoxFmt* MakeTableBoxFmt();
1744cdf0e10cSrcweir 	SwTableLineFmt* MakeTableLineFmt();
1745cdf0e10cSrcweir 	// teste ob die Box ein numerischen Wert darstellt und aender dann ggfs.
1746cdf0e10cSrcweir 	// das Format der Box
1747cdf0e10cSrcweir 	void ChkBoxNumFmt( SwTableBox& rAktBox, sal_Bool bCallUpdate );
1748cdf0e10cSrcweir 	void SetTblBoxFormulaAttrs( SwTableBox& rBox, const SfxItemSet& rSet );
1749cdf0e10cSrcweir 	void ClearBoxNumAttrs( const SwNodeIndex& rNode );
1750cdf0e10cSrcweir 
1751cdf0e10cSrcweir 	sal_Bool InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
1752cdf0e10cSrcweir 						const SwTable* pCpyTbl = 0, sal_Bool bCpyName = sal_False,
1753cdf0e10cSrcweir 						sal_Bool bCorrPos = sal_False );
1754cdf0e10cSrcweir 
1755cdf0e10cSrcweir 	sal_Bool UnProtectCells( const String& rTblName );
1756cdf0e10cSrcweir 	sal_Bool UnProtectCells( const SwSelBoxes& rBoxes );
1757cdf0e10cSrcweir 	sal_Bool UnProtectTbls( const SwPaM& rPam );
1758cdf0e10cSrcweir 	sal_Bool HasTblAnyProtection( const SwPosition* pPos,
1759cdf0e10cSrcweir 							  const String* pTblName = 0,
1760cdf0e10cSrcweir 							  sal_Bool* pFullTblProtection = 0 );
1761cdf0e10cSrcweir 
1762cdf0e10cSrcweir 	// Tabelle an der Position in der GrundLine aufsplitten, sprich eine
1763cdf0e10cSrcweir 	// neue Tabelle erzeugen.
1764cdf0e10cSrcweir 	sal_Bool SplitTable( const SwPosition& rPos, sal_uInt16 eMode = 0,
1765cdf0e10cSrcweir 						sal_Bool bCalcNewSize = sal_False );
1766cdf0e10cSrcweir 	// und die Umkehrung davon. rPos muss in der Tabelle stehen, die bestehen
1767cdf0e10cSrcweir 	// bleibt. Das Flag besagt ob die aktuelle mit der davor oder dahinter
1768cdf0e10cSrcweir 	// stehenden vereint wird.
1769cdf0e10cSrcweir 	sal_Bool MergeTable( const SwPosition& rPos, sal_Bool bWithPrev = sal_True,
1770cdf0e10cSrcweir 						sal_uInt16 nMode = 0 );
1771cdf0e10cSrcweir 
1772cdf0e10cSrcweir 	// Charts der angegebenen Tabelle zum Update bewegen
1773cdf0e10cSrcweir 	void UpdateCharts( const String &rName ) const;
1774cdf0e10cSrcweir 	// update all charts, for that exists any table
1775cdf0e10cSrcweir     void UpdateAllCharts()          { DoUpdateAllCharts( 0 ); }
1776cdf0e10cSrcweir 	// Tabelle wird umbenannt und aktualisiert die Charts
1777cdf0e10cSrcweir 	void SetTableName( SwFrmFmt& rTblFmt, const String &rNewName );
1778cdf0e10cSrcweir 
1779cdf0e10cSrcweir 	// returne zum Namen die im Doc gesetzte Referenz
1780cdf0e10cSrcweir 	const SwFmtRefMark* GetRefMark( const String& rName ) const;
1781cdf0e10cSrcweir 	// returne die RefMark per Index - fuer Uno
1782cdf0e10cSrcweir 	const SwFmtRefMark* GetRefMark( sal_uInt16 nIndex ) const;
1783cdf0e10cSrcweir 	// returne die Namen aller im Doc gesetzten Referenzen.
1784cdf0e10cSrcweir 	// 	Ist der ArrayPointer 0 dann returne nur, ob im Doc. eine RefMark
1785cdf0e10cSrcweir 	//	gesetzt ist
1786cdf0e10cSrcweir 	sal_uInt16 GetRefMarks( SvStringsDtor* = 0 ) const;
1787cdf0e10cSrcweir 
1788cdf0e10cSrcweir 	//Einfuegen einer Beschriftung - falls ein FlyFormat erzeugt wird, so
1789cdf0e10cSrcweir 	// returne dieses.
1790cdf0e10cSrcweir     SwFlyFrmFmt* InsertLabel( const SwLabelType eType, const String &rTxt, const String& rSeparator,
1791cdf0e10cSrcweir                     const String& rNumberingSeparator,
1792cdf0e10cSrcweir 					const sal_Bool bBefore, const sal_uInt16 nId, const sal_uLong nIdx,
1793cdf0e10cSrcweir                     const String& rCharacterStyle,
1794cdf0e10cSrcweir 					const sal_Bool bCpyBrd = sal_True );
1795cdf0e10cSrcweir     SwFlyFrmFmt* InsertDrawLabel(
1796cdf0e10cSrcweir         const String &rTxt, const String& rSeparator, const String& rNumberSeparator,
1797cdf0e10cSrcweir         const sal_uInt16 nId, const String& rCharacterStyle, SdrObject& rObj );
1798cdf0e10cSrcweir 
1799cdf0e10cSrcweir 	// erfrage den Attribut Pool
1800cdf0e10cSrcweir 	const SwAttrPool& GetAttrPool() const	{ return *mpAttrPool; }
1801cdf0e10cSrcweir 		  SwAttrPool& GetAttrPool() 		{ return *mpAttrPool; }
1802cdf0e10cSrcweir 
1803cdf0e10cSrcweir 	// suche ueber das Layout eine EditShell und ggfs. eine ViewShell
1804cdf0e10cSrcweir 	SwEditShell* GetEditShell( ViewShell** ppSh = 0 ) const;
1805cdf0e10cSrcweir     ::sw::IShellCursorSupplier * GetIShellCursorSupplier();
1806cdf0e10cSrcweir 
1807cdf0e10cSrcweir 	// OLE 2.0-Benachrichtung
1808cdf0e10cSrcweir 	inline		 void  SetOle2Link(const Link& rLink) {aOle2Link = rLink;}
1809cdf0e10cSrcweir 	inline const Link& GetOle2Link() const {return aOle2Link;}
1810cdf0e10cSrcweir 
1811cdf0e10cSrcweir     // insert section (the ODF kind of section, not the nodesarray kind)
1812cdf0e10cSrcweir     SwSection * InsertSwSection(SwPaM const& rRange, SwSectionData &,
1813cdf0e10cSrcweir             SwTOXBase const*const pTOXBase = 0,
1814cdf0e10cSrcweir             SfxItemSet const*const pAttr = 0, bool const bUpdate = true);
1815cdf0e10cSrcweir 	sal_uInt16 IsInsRegionAvailable( const SwPaM& rRange,
1816cdf0e10cSrcweir 								const SwNode** ppSttNd = 0 ) const;
1817cdf0e10cSrcweir 	SwSection* GetCurrSection( const SwPosition& rPos ) const;
1818cdf0e10cSrcweir 	SwSectionFmts& GetSections() { return *pSectionFmtTbl; }
1819cdf0e10cSrcweir 	const SwSectionFmts& GetSections() const { return *pSectionFmtTbl; }
1820cdf0e10cSrcweir 	SwSectionFmt *MakeSectionFmt( SwSectionFmt *pDerivedFrom );
1821cdf0e10cSrcweir 	void DelSectionFmt( SwSectionFmt *pFmt, sal_Bool bDelNodes = sal_False );
1822cdf0e10cSrcweir     void UpdateSection(sal_uInt16 const nSect, SwSectionData &,
1823cdf0e10cSrcweir             SfxItemSet const*const = 0, bool const bPreventLinkUpdate = false);
1824cdf0e10cSrcweir 	String GetUniqueSectionName( const String* pChkStr = 0 ) const;
1825cdf0e10cSrcweir 
1826cdf0e10cSrcweir     /* @@@MAINTAINABILITY-HORROR@@@
1827cdf0e10cSrcweir        The model should not have anything to do with a shell.
1828cdf0e10cSrcweir        Unnecessary compile/link time dependency.
1829cdf0e10cSrcweir     */
1830cdf0e10cSrcweir 	// Pointer auf die SfxDocShell vom Doc, kann 0 sein !!!
1831cdf0e10cSrcweir 		  SwDocShell* GetDocShell() 		{ return pDocShell; }
1832cdf0e10cSrcweir 	const SwDocShell* GetDocShell() const	{ return pDocShell; }
1833cdf0e10cSrcweir 	void SetDocShell( SwDocShell* pDSh );
1834cdf0e10cSrcweir 
18358bfab1dfSMathias Bauer 	void ShareLayout( boost::shared_ptr<SwRootFrm>& rPtr);
18368bfab1dfSMathias Bauer 
1837cdf0e10cSrcweir 	// in case during copying of embedded object a new shell is created,
1838cdf0e10cSrcweir     // it should be set here and cleaned later
1839cdf0e10cSrcweir     void SetTmpDocShell( SfxObjectShellLock rLock )    { xTmpDocShell = rLock; }
1840cdf0e10cSrcweir     SfxObjectShellLock GetTmpDocShell()    { return xTmpDocShell; }
1841cdf0e10cSrcweir 
1842cdf0e10cSrcweir     // fuer die TextBausteine - diese habe nur ein SvPersist zur
1843cdf0e10cSrcweir     // Verfuegung
1844cdf0e10cSrcweir     SfxObjectShell* GetPersist() const;
1845cdf0e10cSrcweir 
1846cdf0e10cSrcweir 	// Pointer auf den Storage des SfxDocShells, kann 0 sein !!!
1847cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > GetDocStorage();
1848cdf0e10cSrcweir 
1849cdf0e10cSrcweir 		// abfrage/setze Flag, ob das Dokument im asynchronen Laden ist
1850cdf0e10cSrcweir     bool IsInLoadAsynchron() const             { return mbInLoadAsynchron; }
1851cdf0e10cSrcweir     void SetInLoadAsynchron( bool bFlag )       { mbInLoadAsynchron = bFlag; }
1852cdf0e10cSrcweir 
1853cdf0e10cSrcweir 	// erzeuge um das zu Servende Object eine Selektion
1854cdf0e10cSrcweir 	sal_Bool SelectServerObj( const String& rStr, SwPaM*& rpPam,
1855cdf0e10cSrcweir 							SwNodeRange*& rpRange ) const;
1856cdf0e10cSrcweir 
1857cdf0e10cSrcweir 	// fuer Drag&Move: ( z.B. RefMarks "verschieben" erlauben )
1858cdf0e10cSrcweir     bool IsCopyIsMove() const              { return mbCopyIsMove; }
1859cdf0e10cSrcweir     void SetCopyIsMove( bool bFlag )        { mbCopyIsMove = bFlag; }
1860cdf0e10cSrcweir 
1861cdf0e10cSrcweir 	SwDrawContact* GroupSelection( SdrView& );
1862cdf0e10cSrcweir 	void UnGroupSelection( SdrView& );
1863cdf0e10cSrcweir 	sal_Bool DeleteSelection( SwDrawView& );
1864cdf0e10cSrcweir 
1865cdf0e10cSrcweir 	// Invalidiert OnlineSpell-WrongListen
1866cdf0e10cSrcweir 	void SpellItAgainSam( sal_Bool bInvalid, sal_Bool bOnlyWrong, sal_Bool bSmartTags );
1867cdf0e10cSrcweir 	void InvalidateAutoCompleteFlag();
1868cdf0e10cSrcweir 
1869cdf0e10cSrcweir     // <--
1870cdf0e10cSrcweir 	void SetCalcFieldValueHdl(Outliner* pOutliner);
1871cdf0e10cSrcweir 
1872cdf0e10cSrcweir 	// erfrage ob die ::com::sun::star::util::URL besucht war. Uebers Doc, falls nur ein ::com::sun::star::text::Bookmark
1873cdf0e10cSrcweir 	// angegeben ist. Dann muss der Doc. Name davor gesetzt werden!
1874cdf0e10cSrcweir 	sal_Bool IsVisitedURL( const String& rURL ) const;
1875cdf0e10cSrcweir 
1876cdf0e10cSrcweir 	// speicher die akt. Werte fuer die automatische Aufnahme von Ausnahmen
1877cdf0e10cSrcweir 	// in die Autokorrektur
1878cdf0e10cSrcweir 	void SetAutoCorrExceptWord( SwAutoCorrExceptWord* pNew );
1879cdf0e10cSrcweir 	SwAutoCorrExceptWord* GetAutoCorrExceptWord()		{ return pACEWord; }
1880cdf0e10cSrcweir 
1881cdf0e10cSrcweir 	const SwFmtINetFmt* FindINetAttr( const String& rName ) const;
1882cdf0e10cSrcweir 
1883cdf0e10cSrcweir 	// rufe ins dunkle Basic, mit evt. Return String
1884cdf0e10cSrcweir 	sal_Bool ExecMacro( const SvxMacro& rMacro, String* pRet = 0, SbxArray* pArgs = 0 );
1885cdf0e10cSrcweir 	// rufe ins dunkle Basic/JavaScript
1886cdf0e10cSrcweir 	sal_uInt16 CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEvent,
1887cdf0e10cSrcweir 						sal_Bool bChkPtr = sal_False, SbxArray* pArgs = 0,
1888cdf0e10cSrcweir 						const Link* pCallBack = 0 );
1889cdf0e10cSrcweir 
1890cdf0e10cSrcweir 	// linken Rand ueber Objectleiste einstellen (aenhlich dem Stufen von
1891cdf0e10cSrcweir 	// Numerierungen), optional kann man "um" den Offset stufen oder "auf"
1892cdf0e10cSrcweir 	// die Position gestuft werden (bModulus = sal_True)
1893cdf0e10cSrcweir 	void MoveLeftMargin( const SwPaM& rPam, sal_Bool bRight = sal_True,
1894cdf0e10cSrcweir 						sal_Bool bModulus = sal_True );
1895cdf0e10cSrcweir 
1896cdf0e10cSrcweir 	// Numberformatter erfragen
1897cdf0e10cSrcweir 	inline	  	 SvNumberFormatter* GetNumberFormatter( sal_Bool bCreate = sal_True );
1898cdf0e10cSrcweir 	inline const SvNumberFormatter* GetNumberFormatter( sal_Bool bCreate = sal_True ) const;
1899cdf0e10cSrcweir 
1900cdf0e10cSrcweir     bool HasInvisibleContent() const;
1901cdf0e10cSrcweir     /// delete invisible content, like hidden sections and paragraphs
1902cdf0e10cSrcweir     bool RemoveInvisibleContent();
1903cdf0e10cSrcweir     /// restore the invisible content if it's available on the undo stack
1904cdf0e10cSrcweir     bool RestoreInvisibleContent();
1905cdf0e10cSrcweir     // replace fields by text - mailmerge support
1906cdf0e10cSrcweir     sal_Bool ConvertFieldsToText();
1907cdf0e10cSrcweir 
1908cdf0e10cSrcweir 	// erzeuge Anhand der vorgebenen Collection Teildokumente
1909cdf0e10cSrcweir 	// falls keine angegeben ist, nehme die Kapitelvorlage der 1. Ebene
1910cdf0e10cSrcweir 	sal_Bool GenerateGlobalDoc( const String& rPath,
1911cdf0e10cSrcweir 								const SwTxtFmtColl* pSplitColl = 0 );
1912cdf0e10cSrcweir 	sal_Bool GenerateGlobalDoc( const String& rPath, int nOutlineLevel = 0 );	//#outline level,add by zhaojianwei
1913cdf0e10cSrcweir 	sal_Bool GenerateHTMLDoc( const String& rPath,
1914cdf0e10cSrcweir 								const SwTxtFmtColl* pSplitColl = 0 );
1915cdf0e10cSrcweir 	sal_Bool GenerateHTMLDoc( const String& rPath, int nOutlineLevel = 0 );	//#outline level,add by zhaojianwei
1916cdf0e10cSrcweir 
1917cdf0e10cSrcweir 	//  vergleiche zwei Dokument miteinander
1918cdf0e10cSrcweir 	long CompareDoc( const SwDoc& rDoc );
1919cdf0e10cSrcweir 	// merge zweier Dokumente
1920cdf0e10cSrcweir 	long MergeDoc( const SwDoc& rDoc );
1921cdf0e10cSrcweir 	// setze Kommentar-Text fuers Redline, das dann per AppendRedline
1922cdf0e10cSrcweir 	// hereinkommt. Wird vom Autoformat benutzt. 0-Pointer setzt den Modus
1923cdf0e10cSrcweir 	// wieder zurueck. Die SequenceNummer ist fuers UI-seitige zusammen-
1924cdf0e10cSrcweir 	// fassen von Redlines.
1925cdf0e10cSrcweir 	void SetAutoFmtRedlineComment( const String* pTxt, sal_uInt16 nSeqNo = 0 );
1926cdf0e10cSrcweir 
1927cdf0e10cSrcweir     bool IsAutoFmtRedline() const           { return mbIsAutoFmtRedline; }
1928cdf0e10cSrcweir     void SetAutoFmtRedline( bool bFlag )    { mbIsAutoFmtRedline = bFlag; }
1929cdf0e10cSrcweir 
1930cdf0e10cSrcweir 	// fuer AutoFormat: mit Undo/Redlining - Behandlung
1931cdf0e10cSrcweir 	void SetTxtFmtCollByAutoFmt( const SwPosition& rPos, sal_uInt16 nPoolId,
1932cdf0e10cSrcweir 								const SfxItemSet* pSet = 0 );
1933cdf0e10cSrcweir 	void SetFmtItemByAutoFmt( const SwPaM& rPam, const SfxItemSet& );
1934cdf0e10cSrcweir 
1935cdf0e10cSrcweir 	// !!!NUR fuer die SW-Textblocks!! beachtet kein LAYOUT!!!
1936cdf0e10cSrcweir 	void ClearDoc(); 		// loescht den gesamten Inhalt.
1937cdf0e10cSrcweir 
1938cdf0e10cSrcweir 	// erfrage / setze die Daten fuer die PagePreView
1939cdf0e10cSrcweir 	const SwPagePreViewPrtData* GetPreViewPrtData() const { return pPgPViewPrtData; }
1940cdf0e10cSrcweir 	// wenn der Pointer == 0 ist, dann wird im Doc der Pointer zerstoert,
1941cdf0e10cSrcweir 	// ansonsten wird das Object kopiert.
1942cdf0e10cSrcweir 	// Der Pointer geht NICHT in den Besitz des Doc's!!
1943cdf0e10cSrcweir 	void SetPreViewPrtData( const SwPagePreViewPrtData* pData );
1944cdf0e10cSrcweir 
1945cdf0e10cSrcweir 	// update all modified OLE-Objects. The modification is called over the
1946cdf0e10cSrcweir 	// StarOne - Interface				--> Bug 67026
1947cdf0e10cSrcweir 	void SetOLEObjModified()
1948cdf0e10cSrcweir 	{	if( GetCurrentViewShell() ) aOLEModifiedTimer.Start(); }	//swmod 071107//swmod 071225
1949cdf0e10cSrcweir 
1950cdf0e10cSrcweir 	// -------------------- Uno - Schnittstellen ---------------------------
1951cdf0e10cSrcweir 	const SwUnoCrsrTbl& GetUnoCrsrTbl() const 		{ return *pUnoCrsrTbl; }
1952cdf0e10cSrcweir 	SwUnoCrsr* CreateUnoCrsr( const SwPosition& rPos, sal_Bool bTblCrsr = sal_False );
1953cdf0e10cSrcweir 	// -------------------- Uno - Schnittstellen ---------------------------
1954cdf0e10cSrcweir 
1955cdf0e10cSrcweir 	// -------------------- FeShell - Schnittstellen -----------------------
1956cdf0e10cSrcweir 	// !!!!! diese gehen immer davon aus, das ein Layout existiert  !!!!
1957cdf0e10cSrcweir     sal_Bool ChgAnchor( const SdrMarkList& _rMrkList,
1958cdf0e10cSrcweir                         RndStdIds _eAnchorType,
1959cdf0e10cSrcweir                         const sal_Bool _bSameOnly,
1960cdf0e10cSrcweir                         const sal_Bool _bPosCorr );
1961cdf0e10cSrcweir 
1962cdf0e10cSrcweir 	void SetRowHeight( const SwCursor& rCursor, const SwFmtFrmSize &rNew );
1963cdf0e10cSrcweir 	void GetRowHeight( const SwCursor& rCursor, SwFmtFrmSize *& rpSz ) const;
1964cdf0e10cSrcweir     void SetRowSplit( const SwCursor& rCursor, const SwFmtRowSplit &rNew );
1965cdf0e10cSrcweir     void GetRowSplit( const SwCursor& rCursor, SwFmtRowSplit *& rpSz ) const;
1966cdf0e10cSrcweir 	sal_Bool BalanceRowHeight( const SwCursor& rCursor, sal_Bool bTstOnly = sal_True );
1967cdf0e10cSrcweir 	void SetRowBackground( const SwCursor& rCursor, const SvxBrushItem &rNew );
1968cdf0e10cSrcweir 	sal_Bool GetRowBackground( const SwCursor& rCursor, SvxBrushItem &rToFill ) const;
1969cdf0e10cSrcweir 	void SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet );
1970cdf0e10cSrcweir 	void SetTabLineStyle( const SwCursor& rCursor,
1971cdf0e10cSrcweir 						  const Color* pColor, sal_Bool bSetLine,
1972cdf0e10cSrcweir 						  const SvxBorderLine* pBorderLine );
1973cdf0e10cSrcweir 	void GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const;
1974cdf0e10cSrcweir 	void SetBoxAttr( const SwCursor& rCursor, const SfxPoolItem &rNew );
1975cdf0e10cSrcweir     sal_Bool GetBoxAttr( const SwCursor& rCursor, SfxPoolItem &rToFill ) const;
1976cdf0e10cSrcweir     void SetBoxAlign( const SwCursor& rCursor, sal_uInt16 nAlign );
1977cdf0e10cSrcweir 	sal_uInt16 GetBoxAlign( const SwCursor& rCursor ) const;
1978cdf0e10cSrcweir 	void AdjustCellWidth( const SwCursor& rCursor, sal_Bool bBalance = sal_False );
1979cdf0e10cSrcweir 
1980cdf0e10cSrcweir 	int Chainable( const SwFrmFmt &rSource, const SwFrmFmt &rDest );
1981cdf0e10cSrcweir 	int Chain( SwFrmFmt &rSource, const SwFrmFmt &rDest );
1982cdf0e10cSrcweir 	void Unchain( SwFrmFmt &rFmt );
1983cdf0e10cSrcweir 
1984cdf0e10cSrcweir 	// fuers Copy/Move aus der FrmShell
1985cdf0e10cSrcweir 	SdrObject* CloneSdrObj( const SdrObject&, sal_Bool bMoveWithinDoc = sal_False,
1986cdf0e10cSrcweir 							sal_Bool bInsInPage = sal_True );
1987cdf0e10cSrcweir 
1988cdf0e10cSrcweir 	//
1989cdf0e10cSrcweir 	// -------------------- FeShell - Schnittstellen Ende ------------------
1990cdf0e10cSrcweir 
1991cdf0e10cSrcweir 
1992cdf0e10cSrcweir 	// Schnittstelle fuer die TextInputDaten - ( fuer die Texteingabe
1993cdf0e10cSrcweir 	// von japanischen/chinesischen Zeichen)
1994cdf0e10cSrcweir 	SwExtTextInput* CreateExtTextInput( const SwPaM& rPam );
1995cdf0e10cSrcweir 	void DeleteExtTextInput( SwExtTextInput* pDel );
1996cdf0e10cSrcweir 	SwExtTextInput* GetExtTextInput( const SwNode& rNd,
1997cdf0e10cSrcweir 								xub_StrLen nCntntPos = STRING_NOTFOUND) const;
1998cdf0e10cSrcweir 	SwExtTextInput* GetExtTextInput() const;
1999cdf0e10cSrcweir 
2000cdf0e10cSrcweir 	// Schnistelle fuer den Zugriff auf die AutoComplete-Liste
2001cdf0e10cSrcweir 	static SwAutoCompleteWord& GetAutoCompleteWords() { return *pACmpltWords; }
2002cdf0e10cSrcweir 
2003cdf0e10cSrcweir     bool ContainsMSVBasic() const          { return mbContains_MSVBasic; }
2004cdf0e10cSrcweir     void SetContainsMSVBasic( bool bFlag )  { mbContains_MSVBasic = bFlag; }
2005cdf0e10cSrcweir 
2006cdf0e10cSrcweir     // Interface for the list of Ruby - texts/attributes
2007cdf0e10cSrcweir 	sal_uInt16 FillRubyList( const SwPaM& rPam, SwRubyList& rList,
2008cdf0e10cSrcweir 						sal_uInt16 nMode );
2009cdf0e10cSrcweir 	sal_uInt16 SetRubyList( const SwPaM& rPam, const SwRubyList& rList,
2010cdf0e10cSrcweir 						sal_uInt16 nMode );
2011cdf0e10cSrcweir 
2012cdf0e10cSrcweir     void ReadLayoutCache( SvStream& rStream );
2013cdf0e10cSrcweir     void WriteLayoutCache( SvStream& rStream );
2014cdf0e10cSrcweir     SwLayoutCache* GetLayoutCache() const { return pLayoutCache; }
2015cdf0e10cSrcweir 
2016cdf0e10cSrcweir     /** Checks if any of the text node contains hidden characters.
2017cdf0e10cSrcweir         Used for optimization. Changing the view option 'view hidden text'
2018cdf0e10cSrcweir         has to trigger a reformatting only if some of the text is hidden.
2019cdf0e10cSrcweir     */
2020cdf0e10cSrcweir     bool ContainsHiddenChars() const;
2021cdf0e10cSrcweir 
2022cdf0e10cSrcweir 	// call back for API wrapper
2023cdf0e10cSrcweir 	SwModify*	GetUnoCallBack() const;
2024cdf0e10cSrcweir 
2025cdf0e10cSrcweir     IGrammarContact* getGrammarContact() const { return mpGrammarContact; }
2026cdf0e10cSrcweir 
2027cdf0e10cSrcweir     // -> #i27615#
2028cdf0e10cSrcweir     /** Marks/Unmarks a list level of a certain list
2029cdf0e10cSrcweir 
2030cdf0e10cSrcweir         OD 2008-04-02 #refactorlists#
2031cdf0e10cSrcweir         levels of a certain lists are marked now
2032cdf0e10cSrcweir 
2033cdf0e10cSrcweir         @param sListId    list Id of the list whose level has to be marked/unmarked
2034cdf0e10cSrcweir         @param nListLevel level to mark
2035cdf0e10cSrcweir         @param bValue     - sal_True  mark the level
2036cdf0e10cSrcweir                           - sal_False unmark the level
2037cdf0e10cSrcweir     */
2038cdf0e10cSrcweir     void MarkListLevel( const String& sListId,
2039cdf0e10cSrcweir                         const int nListLevel,
2040cdf0e10cSrcweir                         const sal_Bool bValue );
2041cdf0e10cSrcweir 
2042cdf0e10cSrcweir     /** Marks/Unmarks a list level of a certain list
2043cdf0e10cSrcweir 
2044cdf0e10cSrcweir         OD 2008-04-02 #refactorlists#
2045cdf0e10cSrcweir         levels of a certain lists are marked now
2046cdf0e10cSrcweir 
2047cdf0e10cSrcweir         @param rList      list whose level has to be marked/unmarked
2048cdf0e10cSrcweir         @param nListLevel level to mark
2049cdf0e10cSrcweir         @param bValue     - sal_True  mark the level
2050cdf0e10cSrcweir                           - sal_False unmark the level
2051cdf0e10cSrcweir      */
2052cdf0e10cSrcweir     void MarkListLevel( SwList& rList,
2053cdf0e10cSrcweir                         const int nListLevel,
2054cdf0e10cSrcweir                         const sal_Bool bValue );
2055cdf0e10cSrcweir     // <- #i27615#
2056cdf0e10cSrcweir 
2057cdf0e10cSrcweir     // Change a format undoable.
2058cdf0e10cSrcweir     void ChgFmt(SwFmt & rFmt, const SfxItemSet & rSet);
2059cdf0e10cSrcweir 
2060cdf0e10cSrcweir     void RenameFmt(SwFmt & rFmt, const String & sNewName,
2061cdf0e10cSrcweir                    sal_Bool bBroadcast = sal_False);
2062cdf0e10cSrcweir 
2063cdf0e10cSrcweir     // Change a TOX undoable.
2064cdf0e10cSrcweir     void ChgTOX(SwTOXBase & rTOX, const SwTOXBase & rNew);
2065cdf0e10cSrcweir 
2066cdf0e10cSrcweir     // #111827#
2067cdf0e10cSrcweir     /**
2068cdf0e10cSrcweir        Returns a textual description of a PaM.
2069cdf0e10cSrcweir 
2070cdf0e10cSrcweir        @param rPaM     the PaM to describe
2071cdf0e10cSrcweir 
2072cdf0e10cSrcweir        If rPaM only spans one paragraph the result is:
2073cdf0e10cSrcweir 
2074cdf0e10cSrcweir             '<text in the PaM>'
2075cdf0e10cSrcweir 
2076cdf0e10cSrcweir        <text in the PaM> is shortened to nUndoStringLength characters.
2077cdf0e10cSrcweir 
2078cdf0e10cSrcweir        If rPaM spans more than one paragraph the result is:
2079cdf0e10cSrcweir 
2080cdf0e10cSrcweir             paragraphs                               (STR_PARAGRAPHS)
2081cdf0e10cSrcweir 
2082cdf0e10cSrcweir        @return the textual description of rPaM
2083cdf0e10cSrcweir      */
2084cdf0e10cSrcweir     String GetPaMDescr(const SwPaM & rPaM) const;
2085cdf0e10cSrcweir 
2086cdf0e10cSrcweir     // -> #i23726#
2087cdf0e10cSrcweir     sal_Bool IsFirstOfNumRule(SwPosition & rPos);
2088cdf0e10cSrcweir     // <- #i23726#
2089cdf0e10cSrcweir 
2090cdf0e10cSrcweir     // --> #i31958# access methods for XForms model(s)
2091cdf0e10cSrcweir 
2092cdf0e10cSrcweir     /// access container for XForms model; will be NULL if !isXForms()
2093cdf0e10cSrcweir 	com::sun::star::uno::Reference<com::sun::star::container::XNameContainer>
2094cdf0e10cSrcweir         getXForms() const;
2095cdf0e10cSrcweir 
2096cdf0e10cSrcweir     com::sun::star::uno::Reference< com::sun::star::linguistic2::XProofreadingIterator > GetGCIterator() const;
2097cdf0e10cSrcweir 
2098cdf0e10cSrcweir     /// is this an XForms document?
2099cdf0e10cSrcweir     bool isXForms() const;
2100cdf0e10cSrcweir 
2101cdf0e10cSrcweir     /// initialize XForms models; turn this into an XForms document
2102cdf0e10cSrcweir     void initXForms( bool bCreateDefaultModel );
2103cdf0e10cSrcweir     // <-- #i31958# access methods for XForms model(s)
2104cdf0e10cSrcweir 
21051c582a35SJian Fang Zhang     void disposeXForms( );  // #i113606#, for disposing XForms
21061c582a35SJian Fang Zhang 
2107cdf0e10cSrcweir     // --> OD 2006-03-21 #b6375613#
2108cdf0e10cSrcweir     inline bool ApplyWorkaroundForB6375613() const
2109cdf0e10cSrcweir     {
2110cdf0e10cSrcweir         return mbApplyWorkaroundForB6375613;
2111cdf0e10cSrcweir     }
2112cdf0e10cSrcweir     void SetApplyWorkaroundForB6375613( bool p_bApplyWorkaroundForB6375613 );
2113cdf0e10cSrcweir     // <--
2114cdf0e10cSrcweir 
2115cdf0e10cSrcweir     //Update all the page masters
2116cdf0e10cSrcweir     void SetDefaultPageMode(bool bSquaredPageMode);
2117cdf0e10cSrcweir     sal_Bool IsSquaredPageMode() const;
2118cdf0e10cSrcweir 
2119cdf0e10cSrcweir 	// i#78591#
2120cdf0e10cSrcweir 	void Setn32DummyCompatabilityOptions1( sal_uInt32 CompatabilityOptions1 )
2121cdf0e10cSrcweir 	{
2122cdf0e10cSrcweir 		n32DummyCompatabilityOptions1 = CompatabilityOptions1;
2123cdf0e10cSrcweir 	}
2124cdf0e10cSrcweir 	sal_uInt32 Getn32DummyCompatabilityOptions1( )
2125cdf0e10cSrcweir 	{
2126cdf0e10cSrcweir 		return n32DummyCompatabilityOptions1;
2127cdf0e10cSrcweir 	}
2128cdf0e10cSrcweir 	void Setn32DummyCompatabilityOptions2( sal_uInt32 CompatabilityOptions2 )
2129cdf0e10cSrcweir 	{
2130cdf0e10cSrcweir 		n32DummyCompatabilityOptions2 = CompatabilityOptions2;
2131cdf0e10cSrcweir 	}
2132cdf0e10cSrcweir 	sal_uInt32 Getn32DummyCompatabilityOptions2( )
2133cdf0e10cSrcweir 	{
2134cdf0e10cSrcweir 		return n32DummyCompatabilityOptions2;
2135cdf0e10cSrcweir 	}
2136cdf0e10cSrcweir #ifdef FUTURE_VBA
2137cdf0e10cSrcweir     com::sun::star::uno::Reference< com::sun::star::script::vba::XVBAEventProcessor > GetVbaEventProcessor();
2138cdf0e10cSrcweir #endif
2139cdf0e10cSrcweir     ::sfx2::IXmlIdRegistry& GetXmlIdRegistry();
2140cdf0e10cSrcweir     ::sw::MetaFieldManager & GetMetaFieldManager();
2141cdf0e10cSrcweir     ::sw::UndoManager      & GetUndoManager();
2142cdf0e10cSrcweir     ::sw::UndoManager const& GetUndoManager() const;
2143cdf0e10cSrcweir     SfxObjectShell* CreateCopy(bool bCallInitNew) const;
2144cdf0e10cSrcweir };
2145cdf0e10cSrcweir 
2146cdf0e10cSrcweir 
2147cdf0e10cSrcweir // Diese Methode wird im Dtor vom SwDoc gerufen und loescht den Cache
2148cdf0e10cSrcweir // der Konturobjekte
2149cdf0e10cSrcweir void ClrContourCache();
2150cdf0e10cSrcweir 
2151cdf0e10cSrcweir 
2152cdf0e10cSrcweir //------------------ inline impl. ---------------------------------
2153cdf0e10cSrcweir 
2154cdf0e10cSrcweir inline const SwTableNode* SwDoc::IsIdxInTbl( const SwNodeIndex& rIdx ) const
2155cdf0e10cSrcweir {
2156cdf0e10cSrcweir 	return ((SwDoc*)this)->IsIdxInTbl( rIdx );
2157cdf0e10cSrcweir }
2158cdf0e10cSrcweir 
2159cdf0e10cSrcweir inline SvNumberFormatter* SwDoc::GetNumberFormatter( sal_Bool bCreate )
2160cdf0e10cSrcweir {
2161cdf0e10cSrcweir 	if( bCreate && !pNumberFormatter )
2162cdf0e10cSrcweir 		_CreateNumberFormatter();
2163cdf0e10cSrcweir 	return pNumberFormatter;
2164cdf0e10cSrcweir }
2165cdf0e10cSrcweir 
2166cdf0e10cSrcweir inline const SvNumberFormatter* SwDoc::GetNumberFormatter( sal_Bool bCreate ) const
2167cdf0e10cSrcweir {
2168cdf0e10cSrcweir 	return ((SwDoc*)this)->GetNumberFormatter( bCreate );
2169cdf0e10cSrcweir }
2170cdf0e10cSrcweir 
2171cdf0e10cSrcweir inline void SwDoc::SetOLEPrtNotifyPending( bool bSet )
2172cdf0e10cSrcweir {
2173cdf0e10cSrcweir 	mbOLEPrtNotifyPending = bSet;
2174cdf0e10cSrcweir 	if( !bSet )
2175cdf0e10cSrcweir 		mbAllOLENotify = sal_False;
2176cdf0e10cSrcweir }
2177cdf0e10cSrcweir 
2178cdf0e10cSrcweir // --> OD 2006-03-14 #i62875#
2179cdf0e10cSrcweir // namespace <docfunc> for functions and procedures working on a Writer document.
2180cdf0e10cSrcweir namespace docfunc
2181cdf0e10cSrcweir {
2182cdf0e10cSrcweir     /** method to check, if given Writer document contains at least one drawing object
2183cdf0e10cSrcweir 
2184cdf0e10cSrcweir         OD 2006-03-17 #i62875#
2185cdf0e10cSrcweir 
2186cdf0e10cSrcweir         @author OD
2187cdf0e10cSrcweir 
2188cdf0e10cSrcweir         @param p_rDoc
2189cdf0e10cSrcweir         input parameter - reference to the Writer document, which is investigated.
2190cdf0e10cSrcweir     */
2191cdf0e10cSrcweir     bool ExistsDrawObjs( SwDoc& p_rDoc );
2192cdf0e10cSrcweir 
2193cdf0e10cSrcweir     /** method to check, if given Writer document contains only drawing objects,
2194cdf0e10cSrcweir         which are completely on its page.
2195cdf0e10cSrcweir 
2196cdf0e10cSrcweir         OD 2006-03-17 #i62875#
2197cdf0e10cSrcweir 
2198cdf0e10cSrcweir         @author OD
2199cdf0e10cSrcweir 
2200cdf0e10cSrcweir         @param p_rDoc
2201cdf0e10cSrcweir         input parameter - reference to the Writer document, which is investigated.
2202cdf0e10cSrcweir     */
2203cdf0e10cSrcweir     bool AllDrawObjsOnPage( SwDoc& p_rDoc );
2204cdf0e10cSrcweir 
2205cdf0e10cSrcweir     /** method to check, if the outline style has to written as a normal list style
2206cdf0e10cSrcweir 
2207cdf0e10cSrcweir         OD 2006-09-27 #i69627#
2208cdf0e10cSrcweir         The outline style has to written as a normal list style, if a parent
2209cdf0e10cSrcweir         paragraph style of one of the paragraph styles, which are assigned to
2210cdf0e10cSrcweir         the list levels of the outline style, has a list style set or inherits
2211cdf0e10cSrcweir         a list style from its parent paragraphs style.
2212cdf0e10cSrcweir         This information is needed for the OpenDocument file format export.
2213cdf0e10cSrcweir 
2214cdf0e10cSrcweir         @author OD
2215cdf0e10cSrcweir 
2216cdf0e10cSrcweir         @param rDoc
2217cdf0e10cSrcweir         input parameter - reference to the text document, which is investigated.
2218cdf0e10cSrcweir 
2219cdf0e10cSrcweir         @return boolean
2220cdf0e10cSrcweir         indicating, if the outline style has to written as a normal list style
2221cdf0e10cSrcweir     */
2222cdf0e10cSrcweir     bool HasOutlineStyleToBeWrittenAsNormalListStyle( SwDoc& rDoc );
2223cdf0e10cSrcweir }
2224cdf0e10cSrcweir // <--
2225cdf0e10cSrcweir #endif	//_DOC_HXX
2226