xref: /aoo42x/main/sd/inc/drawdoc.hxx (revision cdf0e10c)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir #ifndef _DRAWDOC_HXX
29*cdf0e10cSrcweir #define _DRAWDOC_HXX
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir #include <com/sun/star/lang/Locale.hpp>
32*cdf0e10cSrcweir #include <com/sun/star/text/WritingMode.hpp>
33*cdf0e10cSrcweir #include <com/sun/star/frame/XModel.hdl>
34*cdf0e10cSrcweir #include <vcl/print.hxx>
35*cdf0e10cSrcweir #include <svx/fmmodel.hxx>
36*cdf0e10cSrcweir #include "pres.hxx"
37*cdf0e10cSrcweir #include <svx/pageitem.hxx>
38*cdf0e10cSrcweir #include <unotools/charclass.hxx>
39*cdf0e10cSrcweir #include <sot/storage.hxx>
40*cdf0e10cSrcweir #include <rsc/rscsfx.hxx>
41*cdf0e10cSrcweir #include <com/sun/star/lang/Locale.hpp>
42*cdf0e10cSrcweir #include <com/sun/star/text/WritingMode.hpp>
43*cdf0e10cSrcweir 
44*cdf0e10cSrcweir // #107844#
45*cdf0e10cSrcweir #include <svx/svdundo.hxx>
46*cdf0e10cSrcweir 
47*cdf0e10cSrcweir #include <vector>
48*cdf0e10cSrcweir 
49*cdf0e10cSrcweir #ifndef INCLUDED_MEMORY
50*cdf0e10cSrcweir #include <memory>
51*cdf0e10cSrcweir #define INCLUDED_MEMORY
52*cdf0e10cSrcweir #endif
53*cdf0e10cSrcweir #include "sddllapi.h"
54*cdf0e10cSrcweir #include "sdpage.hxx"
55*cdf0e10cSrcweir 
56*cdf0e10cSrcweir namespace com
57*cdf0e10cSrcweir {
58*cdf0e10cSrcweir     namespace sun
59*cdf0e10cSrcweir     {
60*cdf0e10cSrcweir         namespace star
61*cdf0e10cSrcweir         {
62*cdf0e10cSrcweir             namespace embed
63*cdf0e10cSrcweir             {
64*cdf0e10cSrcweir                 class XStorage;
65*cdf0e10cSrcweir             }
66*cdf0e10cSrcweir             namespace io
67*cdf0e10cSrcweir             {
68*cdf0e10cSrcweir                 class XStream;
69*cdf0e10cSrcweir             }
70*cdf0e10cSrcweir 			namespace presentation
71*cdf0e10cSrcweir 			{
72*cdf0e10cSrcweir 				class XPresentation2;
73*cdf0e10cSrcweir 			}
74*cdf0e10cSrcweir         }
75*cdf0e10cSrcweir     }
76*cdf0e10cSrcweir }
77*cdf0e10cSrcweir 
78*cdf0e10cSrcweir namespace sd
79*cdf0e10cSrcweir {
80*cdf0e10cSrcweir 	class FrameView;
81*cdf0e10cSrcweir 	class Outliner;
82*cdf0e10cSrcweir }
83*cdf0e10cSrcweir 
84*cdf0e10cSrcweir 
85*cdf0e10cSrcweir class Timer;
86*cdf0e10cSrcweir class SfxObjectShell;
87*cdf0e10cSrcweir class SdDrawDocShell;
88*cdf0e10cSrcweir class SdPage;
89*cdf0e10cSrcweir class SdAnimationInfo;
90*cdf0e10cSrcweir class SdIMapInfo;
91*cdf0e10cSrcweir class IMapObject;
92*cdf0e10cSrcweir class SdStyleSheetPool;
93*cdf0e10cSrcweir class SfxMedium;
94*cdf0e10cSrcweir class SvxSearchItem;
95*cdf0e10cSrcweir class SdrOle2Obj;
96*cdf0e10cSrcweir class EditStatus;
97*cdf0e10cSrcweir class Graphic;
98*cdf0e10cSrcweir class Point;
99*cdf0e10cSrcweir class Window;
100*cdf0e10cSrcweir class SdTransferable;
101*cdf0e10cSrcweir struct SpellCallbackInfo;
102*cdf0e10cSrcweir struct StyleRequestData;
103*cdf0e10cSrcweir class SdDrawDocument;
104*cdf0e10cSrcweir 
105*cdf0e10cSrcweir namespace sd
106*cdf0e10cSrcweir {
107*cdf0e10cSrcweir #ifndef SV_DECL_DRAW_DOC_SHELL_DEFINED
108*cdf0e10cSrcweir #define SV_DECL_DRAW_DOC_SHELL_DEFINED
109*cdf0e10cSrcweir SV_DECL_REF(DrawDocShell)
110*cdf0e10cSrcweir #endif
111*cdf0e10cSrcweir class DrawDocShell;
112*cdf0e10cSrcweir class UndoManager;
113*cdf0e10cSrcweir class ShapeList;
114*cdf0e10cSrcweir }
115*cdf0e10cSrcweir 
116*cdf0e10cSrcweir class ImpDrawPageListWatcher;
117*cdf0e10cSrcweir class ImpMasterPageListWatcher;
118*cdf0e10cSrcweir 
119*cdf0e10cSrcweir struct StyleReplaceData
120*cdf0e10cSrcweir {
121*cdf0e10cSrcweir 	SfxStyleFamily  nFamily;
122*cdf0e10cSrcweir 	SfxStyleFamily  nNewFamily;
123*cdf0e10cSrcweir 	String          aName;
124*cdf0e10cSrcweir 	String          aNewName;
125*cdf0e10cSrcweir };
126*cdf0e10cSrcweir 
127*cdf0e10cSrcweir enum DocCreationMode
128*cdf0e10cSrcweir {
129*cdf0e10cSrcweir 	NEW_DOC,
130*cdf0e10cSrcweir 	DOC_LOADED
131*cdf0e10cSrcweir };
132*cdf0e10cSrcweir 
133*cdf0e10cSrcweir namespace sd
134*cdf0e10cSrcweir {
135*cdf0e10cSrcweir 	struct PresentationSettings
136*cdf0e10cSrcweir 	{
137*cdf0e10cSrcweir 		rtl::OUString maPresPage;
138*cdf0e10cSrcweir 		sal_Bool mbAll;
139*cdf0e10cSrcweir 		sal_Bool mbEndless;
140*cdf0e10cSrcweir 		sal_Bool mbCustomShow;
141*cdf0e10cSrcweir 		sal_Bool mbManual;
142*cdf0e10cSrcweir 		sal_Bool mbMouseVisible;
143*cdf0e10cSrcweir 		sal_Bool mbMouseAsPen;
144*cdf0e10cSrcweir 		sal_Bool mbLockedPages;
145*cdf0e10cSrcweir 		sal_Bool mbAlwaysOnTop;
146*cdf0e10cSrcweir 		sal_Bool mbFullScreen;
147*cdf0e10cSrcweir 		sal_Bool mbAnimationAllowed;
148*cdf0e10cSrcweir 		sal_Int32 mnPauseTimeout;
149*cdf0e10cSrcweir 		sal_Bool mbShowPauseLogo;
150*cdf0e10cSrcweir 		sal_Bool mbStartWithNavigator;
151*cdf0e10cSrcweir 
152*cdf0e10cSrcweir 		PresentationSettings();
153*cdf0e10cSrcweir 		PresentationSettings( const PresentationSettings& r );
154*cdf0e10cSrcweir 	};
155*cdf0e10cSrcweir }
156*cdf0e10cSrcweir 
157*cdf0e10cSrcweir // ------------------
158*cdf0e10cSrcweir // - SdDrawDocument -
159*cdf0e10cSrcweir // ------------------
160*cdf0e10cSrcweir 
161*cdf0e10cSrcweir class SdDrawDocument : public FmFormModel
162*cdf0e10cSrcweir {
163*cdf0e10cSrcweir private:
164*cdf0e10cSrcweir 	::sd::Outliner*		mpOutliner;		    // local outliner for outline mode
165*cdf0e10cSrcweir 	::sd::Outliner*		mpInternalOutliner;  // internal outliner for creation of text objects
166*cdf0e10cSrcweir 	Timer*			    mpWorkStartupTimer;
167*cdf0e10cSrcweir 	Timer*              mpOnlineSpellingTimer;
168*cdf0e10cSrcweir 	sd::ShapeList*		mpOnlineSpellingList;
169*cdf0e10cSrcweir 	SvxSearchItem*      mpOnlineSearchItem;
170*cdf0e10cSrcweir 	List*               mpFrameViewList;
171*cdf0e10cSrcweir 	List*               mpCustomShowList;
172*cdf0e10cSrcweir 	::sd::DrawDocShell* mpDocSh;
173*cdf0e10cSrcweir     SdTransferable *    mpCreatingTransferable;
174*cdf0e10cSrcweir 	sal_Bool                mbHasOnlineSpellErrors;
175*cdf0e10cSrcweir 	sal_Bool                mbInitialOnlineSpellingEnabled;
176*cdf0e10cSrcweir 	String              maBookmarkFile;
177*cdf0e10cSrcweir 	::sd::DrawDocShellRef   mxBookmarkDocShRef;
178*cdf0e10cSrcweir 
179*cdf0e10cSrcweir 	sd::PresentationSettings maPresentationSettings;
180*cdf0e10cSrcweir 
181*cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::presentation::XPresentation2 > mxPresentation;
182*cdf0e10cSrcweir 
183*cdf0e10cSrcweir 	sal_Bool			    mbNewOrLoadCompleted;
184*cdf0e10cSrcweir 
185*cdf0e10cSrcweir 	sal_Bool			    mbOnlineSpell;
186*cdf0e10cSrcweir     sal_Bool                mbSummationOfParagraphs;
187*cdf0e10cSrcweir 	bool				mbStartWithPresentation;		// is set to true when starting with command line parameter -start
188*cdf0e10cSrcweir 	LanguageType	    meLanguage;
189*cdf0e10cSrcweir 	LanguageType	    meLanguageCJK;
190*cdf0e10cSrcweir 	LanguageType	    meLanguageCTL;
191*cdf0e10cSrcweir 	SvxNumType		    mePageNumType;
192*cdf0e10cSrcweir 	::sd::DrawDocShellRef   mxAllocedDocShRef;   // => AllocModel()
193*cdf0e10cSrcweir 	sal_Bool			    mbAllocDocSh;		// => AllocModel()
194*cdf0e10cSrcweir 	DocumentType        meDocType;
195*cdf0e10cSrcweir 	CharClass*		    mpCharClass;
196*cdf0e10cSrcweir 	::com::sun::star::lang::Locale* mpLocale;
197*cdf0e10cSrcweir 
198*cdf0e10cSrcweir 	// #109538#
199*cdf0e10cSrcweir 	::std::auto_ptr<ImpDrawPageListWatcher> mpDrawPageListWatcher;
200*cdf0e10cSrcweir 	::std::auto_ptr<ImpMasterPageListWatcher> mpMasterPageListWatcher;
201*cdf0e10cSrcweir 
202*cdf0e10cSrcweir 	void                UpdatePageObjectsInNotes(sal_uInt16 nStartPos);
203*cdf0e10cSrcweir     void                UpdatePageRelativeURLs(SdPage* pPage, sal_uInt16 nPos, sal_Int32 nIncrement);
204*cdf0e10cSrcweir 	void                FillOnlineSpellingList(SdPage* pPage);
205*cdf0e10cSrcweir 	void                SpellObject(SdrTextObj* pObj);
206*cdf0e10cSrcweir 
207*cdf0e10cSrcweir 	                    DECL_LINK(WorkStartupHdl, Timer*);
208*cdf0e10cSrcweir 	                    DECL_LINK(OnlineSpellingHdl, Timer*);
209*cdf0e10cSrcweir 	                    DECL_LINK(OnlineSpellEventHdl, EditStatus*);
210*cdf0e10cSrcweir 
211*cdf0e10cSrcweir     std::vector< rtl::OUString > maAnnotationAuthors;
212*cdf0e10cSrcweir 
213*cdf0e10cSrcweir protected:
214*cdf0e10cSrcweir 
215*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoModel();
216*cdf0e10cSrcweir 
217*cdf0e10cSrcweir public:
218*cdf0e10cSrcweir 
219*cdf0e10cSrcweir     class InsertBookmarkAsPage_PageFunctorBase;
220*cdf0e10cSrcweir 
221*cdf0e10cSrcweir                 	    TYPEINFO();
222*cdf0e10cSrcweir 
223*cdf0e10cSrcweir 	                    SdDrawDocument(DocumentType eType, SfxObjectShell* pDocSh);
224*cdf0e10cSrcweir 	                    ~SdDrawDocument();
225*cdf0e10cSrcweir 
226*cdf0e10cSrcweir 	virtual SdrModel*   AllocModel() const;
227*cdf0e10cSrcweir 	virtual SdrPage*    AllocPage(FASTBOOL bMasterPage);
228*cdf0e10cSrcweir 	virtual const SdrModel* LoadModel(const String& rFileName);
229*cdf0e10cSrcweir 	virtual void        DisposeLoadedModels();
230*cdf0e10cSrcweir 	virtual FASTBOOL    IsReadOnly() const;
231*cdf0e10cSrcweir 	virtual void        SetChanged(sal_Bool bFlag = sal_True);
232*cdf0e10cSrcweir 	virtual SvStream*   GetDocumentStream(SdrDocumentStreamInfo& rStreamInfo) const;
233*cdf0e10cSrcweir 
234*cdf0e10cSrcweir 	SfxItemPool&	    GetPool() { return( *pItemPool ); }
235*cdf0e10cSrcweir 
236*cdf0e10cSrcweir 	::sd::Outliner* GetOutliner(sal_Bool bCreateOutliner=sal_True);
237*cdf0e10cSrcweir 	SD_DLLPUBLIC ::sd::Outliner* GetInternalOutliner(sal_Bool bCreateOutliner=sal_True);
238*cdf0e10cSrcweir 
239*cdf0e10cSrcweir 	::sd::DrawDocShell*     GetDocSh() const { return mpDocSh; }
240*cdf0e10cSrcweir 
241*cdf0e10cSrcweir 	LanguageType	    GetLanguage( const sal_uInt16 nId ) const;
242*cdf0e10cSrcweir 	void			    SetLanguage( const LanguageType eLang, const sal_uInt16 nId );
243*cdf0e10cSrcweir 
244*cdf0e10cSrcweir 	SvxNumType          GetPageNumType() const;
245*cdf0e10cSrcweir 	void			    SetPageNumType(SvxNumType eType) { mePageNumType = eType; }
246*cdf0e10cSrcweir 	SD_DLLPUBLIC String              CreatePageNumValue(sal_uInt16 nNum) const;
247*cdf0e10cSrcweir 
248*cdf0e10cSrcweir 	DocumentType        GetDocumentType() const { return meDocType; }
249*cdf0e10cSrcweir 
250*cdf0e10cSrcweir 	void			    SetAllocDocSh(sal_Bool bAlloc);
251*cdf0e10cSrcweir 
252*cdf0e10cSrcweir 	void	            CreatingDataObj( SdTransferable* pTransferable ) { mpCreatingTransferable = pTransferable; }
253*cdf0e10cSrcweir 
254*cdf0e10cSrcweir 	/** if the document does not contain at least one handout, one slide and one notes page with
255*cdf0e10cSrcweir 		at least one master each this methods creates them.
256*cdf0e10cSrcweir 		If a reference document is given, the sizes and border settings of that document are used
257*cdf0e10cSrcweir 		for newly created slides.
258*cdf0e10cSrcweir 	*/
259*cdf0e10cSrcweir 	SD_DLLPUBLIC void	CreateFirstPages( SdDrawDocument* pRefDocument = 0 );
260*cdf0e10cSrcweir 	SD_DLLPUBLIC sal_Bool                CreateMissingNotesAndHandoutPages();
261*cdf0e10cSrcweir 
262*cdf0e10cSrcweir 	void	            MovePage(sal_uInt16 nPgNum, sal_uInt16 nNewPos);
263*cdf0e10cSrcweir 	void	            InsertPage(SdrPage* pPage, sal_uInt16 nPos=0xFFFF);
264*cdf0e10cSrcweir 	void	            DeletePage(sal_uInt16 nPgNum);
265*cdf0e10cSrcweir 	SdrPage*            RemovePage(sal_uInt16 nPgNum);
266*cdf0e10cSrcweir 
267*cdf0e10cSrcweir     virtual void     InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos=0xFFFF);
268*cdf0e10cSrcweir 	virtual SdrPage* RemoveMasterPage(sal_uInt16 nPgNum);
269*cdf0e10cSrcweir 
270*cdf0e10cSrcweir 	void	            RemoveUnnecessaryMasterPages( SdPage* pMaster=NULL, sal_Bool bOnlyDuplicatePages=sal_False, sal_Bool bUndo=sal_True );
271*cdf0e10cSrcweir 	SD_DLLPUBLIC void 	SetMasterPage(sal_uInt16 nSdPageNum, const String& rLayoutName,
272*cdf0e10cSrcweir 					    	          SdDrawDocument* pSourceDoc, sal_Bool bMaster, sal_Bool bCheckMasters);
273*cdf0e10cSrcweir 
274*cdf0e10cSrcweir 	SD_DLLPUBLIC SdDrawDocument* OpenBookmarkDoc(const String& rBookmarkFile);
275*cdf0e10cSrcweir 	SdDrawDocument*     OpenBookmarkDoc(SfxMedium& rMedium);
276*cdf0e10cSrcweir 	sal_Bool                InsertBookmark(List* pBookmarkList, List* pExchangeList, sal_Bool bLink,
277*cdf0e10cSrcweir 			            				sal_Bool bReplace, sal_uInt16 nPgPos, sal_Bool bNoDialogs,
278*cdf0e10cSrcweir 			            				::sd::DrawDocShell* pBookmarkDocSh, sal_Bool bCopy,
279*cdf0e10cSrcweir 			            				Point* pObjPos);
280*cdf0e10cSrcweir 
281*cdf0e10cSrcweir 	bool IsStartWithPresentation() const;
282*cdf0e10cSrcweir 	void SetStartWithPresentation( bool bStartWithPresentation );
283*cdf0e10cSrcweir 
284*cdf0e10cSrcweir 	/** Insert pages into this document
285*cdf0e10cSrcweir 
286*cdf0e10cSrcweir     	This method inserts whole pages into this document, either
287*cdf0e10cSrcweir     	selected ones (specified via pBookmarkList/pExchangeList), or
288*cdf0e10cSrcweir     	all from the source document.
289*cdf0e10cSrcweir 
290*cdf0e10cSrcweir         @attention Beware! This method in it's current state does not
291*cdf0e10cSrcweir         handle all combinations of their input parameters
292*cdf0e10cSrcweir         correctly. For example, for pBookmarkList=NULL, bReplace=sal_True
293*cdf0e10cSrcweir         is ignored (no replace happens).
294*cdf0e10cSrcweir 
295*cdf0e10cSrcweir         @param pBookmarkList
296*cdf0e10cSrcweir         A list of strings, denoting the names of the pages to be copied
297*cdf0e10cSrcweir 
298*cdf0e10cSrcweir         @param pExchangeList
299*cdf0e10cSrcweir         A list of strings, denoting the names of the pages to be renamed
300*cdf0e10cSrcweir 
301*cdf0e10cSrcweir         @param bLink
302*cdf0e10cSrcweir         Whether the inserted pages should be links to the bookmark document
303*cdf0e10cSrcweir 
304*cdf0e10cSrcweir         @param bReplace
305*cdf0e10cSrcweir         Whether the pages should not be inserted, but replace the pages in
306*cdf0e10cSrcweir         the destination document
307*cdf0e10cSrcweir 
308*cdf0e10cSrcweir         @param nPgPos
309*cdf0e10cSrcweir         Insertion point/start of replacement
310*cdf0e10cSrcweir 
311*cdf0e10cSrcweir         @param bNoDialogs
312*cdf0e10cSrcweir         Whether query dialogs are allowed (e.g. for page scaling)
313*cdf0e10cSrcweir 
314*cdf0e10cSrcweir         @param pBookmarkDocSh
315*cdf0e10cSrcweir         DocShell of the source document (used e.g. to extract the filename
316*cdf0e10cSrcweir         for linked pages)
317*cdf0e10cSrcweir 
318*cdf0e10cSrcweir         @param bCopy
319*cdf0e10cSrcweir         Whether the source document should be treated as immutable (i.e.
320*cdf0e10cSrcweir         inserted pages are not removed from it, but cloned)
321*cdf0e10cSrcweir 
322*cdf0e10cSrcweir         @param bMergeMasterPages
323*cdf0e10cSrcweir         Whether the source document's master pages should be copied, too.
324*cdf0e10cSrcweir 
325*cdf0e10cSrcweir         @param bPreservePageNames
326*cdf0e10cSrcweir         Whether the replace operation should take the name from the new
327*cdf0e10cSrcweir         page, or preserve the old name
328*cdf0e10cSrcweir      */
329*cdf0e10cSrcweir 	sal_Bool                InsertBookmarkAsPage(List* pBookmarkList, List* pExchangeList,
330*cdf0e10cSrcweir 			            					  sal_Bool bLink, sal_Bool bReplace, sal_uInt16 nPgPos,
331*cdf0e10cSrcweir 			            					  sal_Bool bNoDialogs, ::sd::DrawDocShell* pBookmarkDocSh,
332*cdf0e10cSrcweir 			            					  sal_Bool bCopy, sal_Bool bMergeMasterPages,
333*cdf0e10cSrcweir                                               sal_Bool bPreservePageNames);
334*cdf0e10cSrcweir 	sal_Bool                InsertBookmarkAsObject(List* pBookmarkList, List* pExchangeListL,
335*cdf0e10cSrcweir 			            						sal_Bool bLink, ::sd::DrawDocShell* pBookmarkDocSh,
336*cdf0e10cSrcweir 			            						Point* pObjPos);
337*cdf0e10cSrcweir     void 				IterateBookmarkPages( SdDrawDocument* pBookmarkDoc, List* pBookmarkList,
338*cdf0e10cSrcweir                                               sal_uInt16 nBMSdPageCount,
339*cdf0e10cSrcweir                                               InsertBookmarkAsPage_PageFunctorBase& rPageIterator );
340*cdf0e10cSrcweir 	SD_DLLPUBLIC void	CloseBookmarkDoc();
341*cdf0e10cSrcweir 
342*cdf0e10cSrcweir 	SdrObject*          GetObj(const String& rObjName) const;
343*cdf0e10cSrcweir 
344*cdf0e10cSrcweir     /** Return the first page that has the given name.  Regular pages and
345*cdf0e10cSrcweir         notes pages are searched first.  When not found then the master
346*cdf0e10cSrcweir         pages are searched.
347*cdf0e10cSrcweir         @param rPgName
348*cdf0e10cSrcweir             Name of the page to return.
349*cdf0e10cSrcweir         @param rbIsMasterPage
350*cdf0e10cSrcweir             Is set by the method to indicate whether the returned index
351*cdf0e10cSrcweir             belongs to a master page (<TRUE/>) or a regular or notes page
352*cdf0e10cSrcweir             (<FALSE/>). The given value is ignored.
353*cdf0e10cSrcweir         @return
354*cdf0e10cSrcweir             Returns the index of the page with the given name or
355*cdf0e10cSrcweir             SDRPAGE_NOTFOUND (=0xffff) when such a page does not exist.
356*cdf0e10cSrcweir     */
357*cdf0e10cSrcweir 	sal_uInt16 GetPageByName(const String& rPgName, sal_Bool& rbIsMasterPage ) const;
358*cdf0e10cSrcweir 	SD_DLLPUBLIC SdPage*GetSdPage(sal_uInt16 nPgNum, PageKind ePgKind) const;
359*cdf0e10cSrcweir 	SD_DLLPUBLIC sal_uInt16	GetSdPageCount(PageKind ePgKind) const;
360*cdf0e10cSrcweir 
361*cdf0e10cSrcweir 	void	            SetSelected(SdPage* pPage, sal_Bool bSelect);
362*cdf0e10cSrcweir 	sal_Bool	            MovePages(sal_uInt16 nTargetPage);
363*cdf0e10cSrcweir 
364*cdf0e10cSrcweir 	SD_DLLPUBLIC SdPage*GetMasterSdPage(sal_uInt16 nPgNum, PageKind ePgKind);
365*cdf0e10cSrcweir 	SD_DLLPUBLIC sal_uInt16	GetMasterSdPageCount(PageKind ePgKind) const;
366*cdf0e10cSrcweir 
367*cdf0e10cSrcweir 	sal_uInt16	            GetMasterPageUserCount(SdrPage* pMaster) const;
368*cdf0e10cSrcweir 
369*cdf0e10cSrcweir 	const sd::PresentationSettings& getPresentationSettings() const { return maPresentationSettings; }
370*cdf0e10cSrcweir 	sd::PresentationSettings& getPresentationSettings() { return maPresentationSettings; }
371*cdf0e10cSrcweir 
372*cdf0e10cSrcweir 	const ::com::sun::star::uno::Reference< ::com::sun::star::presentation::XPresentation2 >& getPresentation() const;
373*cdf0e10cSrcweir 
374*cdf0e10cSrcweir    	void                SetSummationOfParagraphs( sal_Bool bOn = sal_True ) { mbSummationOfParagraphs = bOn; }
375*cdf0e10cSrcweir 	sal_Bool	        IsSummationOfParagraphs() const { return mbSummationOfParagraphs; }
376*cdf0e10cSrcweir 
377*cdf0e10cSrcweir     /** Set the mode that controls whether (and later how) the formatting of the document
378*cdf0e10cSrcweir         depends on the current printer metrics.
379*cdf0e10cSrcweir         @param nMode
380*cdf0e10cSrcweir             Use <const
381*cdf0e10cSrcweir             scope="com::sun::star::document::PrinterIndependentLayout">ENABLED</const>
382*cdf0e10cSrcweir             to make formatting printer-independent and <const
383*cdf0e10cSrcweir             scope="com::sun::star::document::PrinterIndependentLayout">DISABLED</const>
384*cdf0e10cSrcweir             to make formatting depend on the current printer metrics.
385*cdf0e10cSrcweir     */
386*cdf0e10cSrcweir     void SetPrinterIndependentLayout (sal_Int32 nMode);
387*cdf0e10cSrcweir 
388*cdf0e10cSrcweir     /** Get the flag that controls whether the formatting of the document
389*cdf0e10cSrcweir         depends on the current printer metrics.
390*cdf0e10cSrcweir         @return
391*cdf0e10cSrcweir             Use <const
392*cdf0e10cSrcweir             scope="com::sun::star::document::PrinterIndependentLayout">ENABLED</const>
393*cdf0e10cSrcweir             when formatting is printer-independent and <const
394*cdf0e10cSrcweir             scope="com::sun::star::document::PrinterIndependentLayout">DISABLED</const>
395*cdf0e10cSrcweir             when formatting depends on the current printer metrics.
396*cdf0e10cSrcweir     */
397*cdf0e10cSrcweir     sal_Int32 GetPrinterIndependentLayout (void);
398*cdf0e10cSrcweir 
399*cdf0e10cSrcweir 	void                SetOnlineSpell( sal_Bool bIn );
400*cdf0e10cSrcweir 	sal_Bool                GetOnlineSpell() const { return mbOnlineSpell; }
401*cdf0e10cSrcweir 	void                StopOnlineSpelling();
402*cdf0e10cSrcweir 	void                StartOnlineSpelling(sal_Bool bForceSpelling=sal_True);
403*cdf0e10cSrcweir 
404*cdf0e10cSrcweir 	void                ImpOnlineSpellCallback(SpellCallbackInfo* pInfo, SdrObject* pObj, SdrOutliner* pOutl);
405*cdf0e10cSrcweir 
406*cdf0e10cSrcweir 	void                InsertObject(SdrObject* pObj, SdPage* pPage);
407*cdf0e10cSrcweir 	void                RemoveObject(SdrObject* pObj, SdPage* pPage);
408*cdf0e10cSrcweir 
409*cdf0e10cSrcweir 	sal_uLong               GetLinkCount();
410*cdf0e10cSrcweir 
411*cdf0e10cSrcweir 	List*               GetFrameViewList() const { return mpFrameViewList; }
412*cdf0e10cSrcweir 	SD_DLLPUBLIC List*  GetCustomShowList(sal_Bool bCreate = sal_False);
413*cdf0e10cSrcweir 
414*cdf0e10cSrcweir 	void                NbcSetChanged(sal_Bool bFlag = sal_True);
415*cdf0e10cSrcweir 
416*cdf0e10cSrcweir 	void                SetTextDefaults() const;
417*cdf0e10cSrcweir 
418*cdf0e10cSrcweir 	void                CreateLayoutTemplates();
419*cdf0e10cSrcweir 	void                RenameLayoutTemplate(const String& rOldLayoutName, const String& rNewName);
420*cdf0e10cSrcweir 
421*cdf0e10cSrcweir 	void				CreateDefaultCellStyles();
422*cdf0e10cSrcweir 
423*cdf0e10cSrcweir 	SD_DLLPUBLIC void   StopWorkStartupDelay();
424*cdf0e10cSrcweir 
425*cdf0e10cSrcweir 	void                NewOrLoadCompleted(DocCreationMode eMode);
426*cdf0e10cSrcweir 	void				NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool );
427*cdf0e10cSrcweir 	sal_Bool                IsNewOrLoadCompleted() const {return mbNewOrLoadCompleted; }
428*cdf0e10cSrcweir 
429*cdf0e10cSrcweir 	::sd::FrameView* GetFrameView(sal_uLong nPos) {
430*cdf0e10cSrcweir         return static_cast< ::sd::FrameView*>(
431*cdf0e10cSrcweir             mpFrameViewList->GetObject(nPos));}
432*cdf0e10cSrcweir 
433*cdf0e10cSrcweir 	/** deprecated*/
434*cdf0e10cSrcweir 	SdAnimationInfo*    GetAnimationInfo(SdrObject* pObject) const;
435*cdf0e10cSrcweir 
436*cdf0e10cSrcweir 	SD_DLLPUBLIC static 	SdAnimationInfo* GetShapeUserData(SdrObject& rObject, bool bCreate = false );
437*cdf0e10cSrcweir 
438*cdf0e10cSrcweir 	SdIMapInfo*         GetIMapInfo( SdrObject* pObject ) const;
439*cdf0e10cSrcweir 	IMapObject*         GetHitIMapObject( SdrObject* pObject, const Point& rWinPoint, const ::Window& rCmpWnd );
440*cdf0e10cSrcweir 
441*cdf0e10cSrcweir 	CharClass*	        GetCharClass() const { return mpCharClass; }
442*cdf0e10cSrcweir 
443*cdf0e10cSrcweir 	void                RestoreLayerNames();
444*cdf0e10cSrcweir 
445*cdf0e10cSrcweir 	void	            UpdateAllLinks();
446*cdf0e10cSrcweir 
447*cdf0e10cSrcweir 	void                CheckMasterPages();
448*cdf0e10cSrcweir 
449*cdf0e10cSrcweir 	void                Merge(SdrModel& rSourceModel,
450*cdf0e10cSrcweir 			                    sal_uInt16 nFirstPageNum=0, sal_uInt16 nLastPageNum=0xFFFF,
451*cdf0e10cSrcweir 			                    sal_uInt16 nDestPos=0xFFFF,
452*cdf0e10cSrcweir 			                    FASTBOOL bMergeMasterPages=sal_False, FASTBOOL bAllMasterPages=sal_False,
453*cdf0e10cSrcweir 			                    FASTBOOL bUndo=sal_True, FASTBOOL bTreadSourceAsConst=sal_False);
454*cdf0e10cSrcweir 
455*cdf0e10cSrcweir     SD_DLLPUBLIC ::com::sun::star::text::WritingMode GetDefaultWritingMode() const;
456*cdf0e10cSrcweir     void SetDefaultWritingMode( ::com::sun::star::text::WritingMode eMode );
457*cdf0e10cSrcweir 
458*cdf0e10cSrcweir 	/** replacespOldPage from all custom shows with pNewPage or removes pOldPage from
459*cdf0e10cSrcweir 		all custom shows if pNewPage is 0.
460*cdf0e10cSrcweir 	*/
461*cdf0e10cSrcweir 	void ReplacePageInCustomShows( const SdPage* pOldPage, const SdPage* pNewPage );
462*cdf0e10cSrcweir 
463*cdf0e10cSrcweir public:
464*cdf0e10cSrcweir 
465*cdf0e10cSrcweir     static SdDrawDocument* pDocLockedInsertingLinks;  // static to prevent recursions while resolving links
466*cdf0e10cSrcweir 
467*cdf0e10cSrcweir     /** Create and insert a set of two new pages: a standard (draw) page and
468*cdf0e10cSrcweir         the associated notes page.  The new pages are inserted direclty
469*cdf0e10cSrcweir         after the specified page set.
470*cdf0e10cSrcweir         @param pCurrentPage
471*cdf0e10cSrcweir             This page is used to retrieve the layout for the page to
472*cdf0e10cSrcweir             create.
473*cdf0e10cSrcweir         @param ePageKind
474*cdf0e10cSrcweir             This specifies whether <argument>pCurrentPage</argument> is a
475*cdf0e10cSrcweir             standard (draw) page or a notes page.
476*cdf0e10cSrcweir         @param sStandardPageName
477*cdf0e10cSrcweir             Name of the standard page.  An empty string leads to using an
478*cdf0e10cSrcweir             automatically created name.
479*cdf0e10cSrcweir         @param sNotesPageName
480*cdf0e10cSrcweir             Name of the standard page.  An empty string leads to using an
481*cdf0e10cSrcweir             automatically created name.
482*cdf0e10cSrcweir         @param eStandardLayout
483*cdf0e10cSrcweir             Layout to use for the new standard page.  Note that this layout
484*cdf0e10cSrcweir             is not used when the given <argument>pCurrentPage</argument> is
485*cdf0e10cSrcweir             not a standard page.  In this case the layout is taken from the
486*cdf0e10cSrcweir             standard page associated with <argument>pCurrentPage</argument>.
487*cdf0e10cSrcweir         @param eNotesLayout
488*cdf0e10cSrcweir             Layout to use for the new notes page.  Note that this layout
489*cdf0e10cSrcweir             is not used when the given <argument>pCurrentPage</argument> is
490*cdf0e10cSrcweir             not a notes page.  In this case the layout is taken from the
491*cdf0e10cSrcweir             notes page associated with <argument>pCurrentPage</argument>.
492*cdf0e10cSrcweir         @param bIsPageBack
493*cdf0e10cSrcweir             This flag indicates whether to show the background shape.
494*cdf0e10cSrcweir         @param bIsPageObj
495*cdf0e10cSrcweir             This flag indicates whether to show the shapes on the master page.
496*cdf0e10cSrcweir         @param nInsertPosition
497*cdf0e10cSrcweir             Position where to insert the standard page.  When -1 then the
498*cdf0e10cSrcweir             new page set is inserted after the current page.
499*cdf0e10cSrcweir 
500*cdf0e10cSrcweir         @return
501*cdf0e10cSrcweir             Returns an index of the inserted pages that can be used with the
502*cdf0e10cSrcweir             <member>GetSdPage()</member> method.
503*cdf0e10cSrcweir     */
504*cdf0e10cSrcweir     sal_uInt16 CreatePage (
505*cdf0e10cSrcweir         SdPage* pCurrentPage,
506*cdf0e10cSrcweir         PageKind ePageKind,
507*cdf0e10cSrcweir         const String& sStandardPageName,
508*cdf0e10cSrcweir         const String& sNotesPageName,
509*cdf0e10cSrcweir         AutoLayout eStandardLayout,
510*cdf0e10cSrcweir         AutoLayout eNotesLayout,
511*cdf0e10cSrcweir         sal_Bool bIsPageBack,
512*cdf0e10cSrcweir         sal_Bool bIsPageObj,
513*cdf0e10cSrcweir         const sal_Int32 nInsertPosition = -1);
514*cdf0e10cSrcweir 
515*cdf0e10cSrcweir     /** This method acts as a simplified front end for the more complex
516*cdf0e10cSrcweir         <member>DuplicatePage()</member> method.
517*cdf0e10cSrcweir         @param nPageNum
518*cdf0e10cSrcweir             The page number as passed to the <member>GetSdPage()</member>
519*cdf0e10cSrcweir             method for which the standard page and the notes page are to be
520*cdf0e10cSrcweir             copied.
521*cdf0e10cSrcweir         @return
522*cdf0e10cSrcweir             Returns an index of the inserted pages that can be used with the
523*cdf0e10cSrcweir             <member>GetSdPage()</member> method.
524*cdf0e10cSrcweir     */
525*cdf0e10cSrcweir     sal_uInt16 DuplicatePage (sal_uInt16 nPageNum);
526*cdf0e10cSrcweir 
527*cdf0e10cSrcweir     /** Create and insert a set of two new pages that are copies of the
528*cdf0e10cSrcweir         given <argument>pCurrentPage</argument> and its associated notes
529*cdf0e10cSrcweir         resp. standard page.  The copies are inserted directly after the
530*cdf0e10cSrcweir         specified page set.
531*cdf0e10cSrcweir         @param pCurrentPage
532*cdf0e10cSrcweir             This page and its associated notes/standard page is copied.
533*cdf0e10cSrcweir         @param ePageKind
534*cdf0e10cSrcweir             This specifies whether <argument>pCurrentPage</argument> is a
535*cdf0e10cSrcweir             standard (draw) page or a notes page.
536*cdf0e10cSrcweir         @param sStandardPageName
537*cdf0e10cSrcweir             Name of the standard page.  An empty string leads to using an
538*cdf0e10cSrcweir             automatically created name.
539*cdf0e10cSrcweir         @param sNotesPageName
540*cdf0e10cSrcweir             Name of the standard page.  An empty string leads to using an
541*cdf0e10cSrcweir             automatically created name.
542*cdf0e10cSrcweir         @param eStandardLayout
543*cdf0e10cSrcweir             Layout to use for the new standard page.  Note that this layout
544*cdf0e10cSrcweir             is not used when the given <argument>pCurrentPage</argument> is
545*cdf0e10cSrcweir             not a standard page.  In this case the layout is taken from the
546*cdf0e10cSrcweir             standard page associated with <argument>pCurrentPage</argument>.
547*cdf0e10cSrcweir         @param eNotesLayout
548*cdf0e10cSrcweir             Layout to use for the new notes page.  Note that this layout
549*cdf0e10cSrcweir             is not used when the given <argument>pCurrentPage</argument> is
550*cdf0e10cSrcweir             not a notes page.  In this case the layout is taken from the
551*cdf0e10cSrcweir             notes page associated with <argument>pCurrentPage</argument>.
552*cdf0e10cSrcweir         @param bIsPageBack
553*cdf0e10cSrcweir             This flag indicates whether to show the background shape.
554*cdf0e10cSrcweir         @param bIsPageObj
555*cdf0e10cSrcweir             This flag indicates whether to show the shapes on the master page.
556*cdf0e10cSrcweir         @param nInsertPosition
557*cdf0e10cSrcweir             Position where to insert the standard page.  When -1 then the
558*cdf0e10cSrcweir             new page set is inserted after the current page.
559*cdf0e10cSrcweir 
560*cdf0e10cSrcweir         @return
561*cdf0e10cSrcweir             Returns an index of the inserted pages that can be used with the
562*cdf0e10cSrcweir             <member>GetSdPage()</member> method.
563*cdf0e10cSrcweir     */
564*cdf0e10cSrcweir     sal_uInt16 DuplicatePage (
565*cdf0e10cSrcweir         SdPage* pCurrentPage,
566*cdf0e10cSrcweir         PageKind ePageKind,
567*cdf0e10cSrcweir         const String& sStandardPageName,
568*cdf0e10cSrcweir         const String& sNotesPageName,
569*cdf0e10cSrcweir         AutoLayout eStandardLayout,
570*cdf0e10cSrcweir         AutoLayout eNotesLayout,
571*cdf0e10cSrcweir         sal_Bool bIsPageBack,
572*cdf0e10cSrcweir         sal_Bool bIsPageObj,
573*cdf0e10cSrcweir         const sal_Int32 nInsertPosition = -1);
574*cdf0e10cSrcweir 
575*cdf0e10cSrcweir 	/** return the document fonts for latin, cjk and ctl according to the current
576*cdf0e10cSrcweir 		languages set at this document */
577*cdf0e10cSrcweir 	void getDefaultFonts( Font& rLatinFont, Font& rCJKFont, Font& rCTLFont );
578*cdf0e10cSrcweir 
579*cdf0e10cSrcweir 	sd::UndoManager* GetUndoManager() const;
580*cdf0e10cSrcweir 
581*cdf0e10cSrcweir 	/* converts the given western font height to a corresponding ctl font height, deppending on the system language */
582*cdf0e10cSrcweir 	static sal_uInt32 convertFontHeightToCTL( sal_uInt32 nWesternFontHeight );
583*cdf0e10cSrcweir 
584*cdf0e10cSrcweir 	/** Get the style sheet pool if it was a SdStyleSheetPool.
585*cdf0e10cSrcweir 	 */
586*cdf0e10cSrcweir 	SD_DLLPUBLIC SdStyleSheetPool* GetSdStyleSheetPool() const;
587*cdf0e10cSrcweir 
588*cdf0e10cSrcweir    	void UpdatePageRelativeURLs(const String& rOldName, const String& rNewName);
589*cdf0e10cSrcweir 
590*cdf0e10cSrcweir 	void SetCalcFieldValueHdl( ::Outliner* pOutliner);
591*cdf0e10cSrcweir 
592*cdf0e10cSrcweir     sal_uInt16 GetAnnotationAuthorIndex( const rtl::OUString& rAuthor );
593*cdf0e10cSrcweir 
594*cdf0e10cSrcweir private:
595*cdf0e10cSrcweir     /** This member stores the printer independent layout mode.  Please
596*cdf0e10cSrcweir         refer to <member>SetPrinterIndependentLayout()</member> for its
597*cdf0e10cSrcweir         values.
598*cdf0e10cSrcweir     */
599*cdf0e10cSrcweir     sal_Int32 mnPrinterIndependentLayout;
600*cdf0e10cSrcweir 
601*cdf0e10cSrcweir     /** Insert a given set of standard and notes page after the given <argument>pCurrentPage</argument>.
602*cdf0e10cSrcweir         @param pCurrentPage
603*cdf0e10cSrcweir             This page and its associated notes/standard page is copied.
604*cdf0e10cSrcweir         @param ePageKind
605*cdf0e10cSrcweir             This specifies whether <argument>pCurrentPage</argument> is a
606*cdf0e10cSrcweir             standard (draw) page or a notes page.
607*cdf0e10cSrcweir         @param sStandardPageName
608*cdf0e10cSrcweir             Name of the standard page.  An empty string leads to using an
609*cdf0e10cSrcweir             automatically created name.
610*cdf0e10cSrcweir         @param sNotesPageName
611*cdf0e10cSrcweir             Name of the standard page.  An empty string leads to using an
612*cdf0e10cSrcweir             automatically created name.
613*cdf0e10cSrcweir         @param eStandardLayout
614*cdf0e10cSrcweir             Layout to use for the new standard page.  Note that this layout
615*cdf0e10cSrcweir             is not used when the given <argument>pCurrentPage</argument> is
616*cdf0e10cSrcweir             not a standard page.  In this case the layout is taken from the
617*cdf0e10cSrcweir             standard page associated with <argument>pCurrentPage</argument>.
618*cdf0e10cSrcweir         @param eNotesLayout
619*cdf0e10cSrcweir             Layout to use for the new notes page.  Note that this layout
620*cdf0e10cSrcweir             is not used when the given <argument>pCurrentPage</argument> is
621*cdf0e10cSrcweir             not a notes page.  In this case the layout is taken from the
622*cdf0e10cSrcweir             notes page associated with <argument>pCurrentPage</argument>.
623*cdf0e10cSrcweir         @param bIsPageBack
624*cdf0e10cSrcweir             This flag indicates whether to show the background shape.
625*cdf0e10cSrcweir         @param bIsPageObj
626*cdf0e10cSrcweir             This flag indicates whether to show the shapes on the master page.
627*cdf0e10cSrcweir         @param pStandardPage
628*cdf0e10cSrcweir             The standard page to insert.
629*cdf0e10cSrcweir         @param pNotesPage
630*cdf0e10cSrcweir             The notes page to insert.
631*cdf0e10cSrcweir         @param nInsertPosition
632*cdf0e10cSrcweir             Position where to insert the standard page.  When -1 then the
633*cdf0e10cSrcweir             new page set is inserted after the current page.
634*cdf0e10cSrcweir 
635*cdf0e10cSrcweir         @return
636*cdf0e10cSrcweir             Returns an index of the inserted pages that can be used with the
637*cdf0e10cSrcweir             <member>GetSdPage()</member> method.
638*cdf0e10cSrcweir     */
639*cdf0e10cSrcweir     sal_uInt16 InsertPageSet (
640*cdf0e10cSrcweir         SdPage* pCurrentPage,
641*cdf0e10cSrcweir         PageKind ePageKind,
642*cdf0e10cSrcweir         const String& sStandardPageName,
643*cdf0e10cSrcweir         const String& sNotesPageName,
644*cdf0e10cSrcweir         AutoLayout eStandardLayout,
645*cdf0e10cSrcweir         AutoLayout eNotesLayout,
646*cdf0e10cSrcweir         sal_Bool bIsPageBack,
647*cdf0e10cSrcweir         sal_Bool bIsPageObj,
648*cdf0e10cSrcweir         SdPage* pStandardPage,
649*cdf0e10cSrcweir         SdPage* pNotesPage,
650*cdf0e10cSrcweir         sal_Int32 nInsertPosition = -1);
651*cdf0e10cSrcweir 
652*cdf0e10cSrcweir     /** Set up a newly created page and insert it into the list of pages.
653*cdf0e10cSrcweir         @param pPreviousPage
654*cdf0e10cSrcweir             A page to take the size and border geometry from.
655*cdf0e10cSrcweir         @param pPage
656*cdf0e10cSrcweir             This is the page to set up and insert.
657*cdf0e10cSrcweir         @param sPageName
658*cdf0e10cSrcweir             The name of the new page.
659*cdf0e10cSrcweir         @param nInsertionPoint
660*cdf0e10cSrcweir             Index of the page before which the new page will be inserted.
661*cdf0e10cSrcweir         @param bIsPageBack
662*cdf0e10cSrcweir             This flag indicates whether to show the background shape.
663*cdf0e10cSrcweir         @param bIsPageObj
664*cdf0e10cSrcweir             This flag indicates whether to show the shapes on the master
665*cdf0e10cSrcweir             page.
666*cdf0e10cSrcweir     */
667*cdf0e10cSrcweir     void SetupNewPage (
668*cdf0e10cSrcweir         SdPage* pPreviousPage,
669*cdf0e10cSrcweir         SdPage* pPage,
670*cdf0e10cSrcweir         const String& sPageName,
671*cdf0e10cSrcweir         sal_uInt16 nInsertionPoint,
672*cdf0e10cSrcweir         sal_Bool bIsPageBack,
673*cdf0e10cSrcweir         sal_Bool bIsPageObj);
674*cdf0e10cSrcweir 
675*cdf0e10cSrcweir 	// #109538#
676*cdf0e10cSrcweir 	virtual void PageListChanged();
677*cdf0e10cSrcweir 	virtual void MasterPageListChanged();
678*cdf0e10cSrcweir };
679*cdf0e10cSrcweir 
680*cdf0e10cSrcweir namespace sd
681*cdf0e10cSrcweir {
682*cdf0e10cSrcweir 
683*cdf0e10cSrcweir // an instance of this guard disables modification of a document
684*cdf0e10cSrcweir // during its lifetime
685*cdf0e10cSrcweir class ModifyGuard
686*cdf0e10cSrcweir {
687*cdf0e10cSrcweir public:
688*cdf0e10cSrcweir 	ModifyGuard( SdDrawDocument* pDoc );
689*cdf0e10cSrcweir 	~ModifyGuard();
690*cdf0e10cSrcweir 
691*cdf0e10cSrcweir private:
692*cdf0e10cSrcweir 	void init();
693*cdf0e10cSrcweir 
694*cdf0e10cSrcweir 	DrawDocShell* mpDocShell;
695*cdf0e10cSrcweir 	SdDrawDocument* mpDoc;
696*cdf0e10cSrcweir 	sal_Bool mbIsEnableSetModified;
697*cdf0e10cSrcweir 	sal_Bool mbIsDocumentChanged;
698*cdf0e10cSrcweir };
699*cdf0e10cSrcweir 
700*cdf0e10cSrcweir }
701*cdf0e10cSrcweir 
702*cdf0e10cSrcweir #endif // _DRAWDOC_HXX
703