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