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