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 424 : 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 946 : 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 88 : struct PresentationSettings
114 : {
115 : 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< OUString > maAnnotationAuthors;
190 :
191 : bool mbUseEmbedFonts;
192 :
193 : protected:
194 :
195 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoModel();
196 :
197 : public:
198 :
199 : TYPEINFO();
200 :
201 : SdDrawDocument(DocumentType eType, SfxObjectShell* pDocSh);
202 : ~SdDrawDocument();
203 :
204 : virtual SdrModel* AllocModel() const;
205 : virtual SdrPage* AllocPage(bool bMasterPage);
206 : virtual bool IsReadOnly() const;
207 : virtual void SetChanged(sal_Bool bFlag = sal_True);
208 :
209 2311 : 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 4266 : ::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 7 : void SetPageNumType(SvxNumType eType) { mePageNumType = eType; }
221 : SD_DLLPUBLIC String CreatePageNumValue(sal_uInt16 nNum) const;
222 :
223 2788 : 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<OUString> &rBookmarkList,
253 : std::vector<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<OUString> &rBookmarkList,
308 : std::vector<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<OUString> &rBookmarkList,
315 : const std::vector<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 : SD_DLLPUBLIC sal_uInt16 GetActiveSdPageCount() const;
347 :
348 : sal_uInt16 GetMasterPageUserCount(SdrPage* pMaster) const;
349 :
350 0 : const sd::PresentationSettings& getPresentationSettings() const { return maPresentationSettings; }
351 37 : sd::PresentationSettings& getPresentationSettings() { return maPresentationSettings; }
352 :
353 : const ::com::sun::star::uno::Reference< ::com::sun::star::presentation::XPresentation2 >& getPresentation() const;
354 :
355 103 : void SetSummationOfParagraphs( sal_Bool bOn = sal_True ) { mbSummationOfParagraphs = bOn; }
356 6 : sal_Bool IsSummationOfParagraphs() const { return mbSummationOfParagraphs; }
357 :
358 : /** Set the mode that controls whether (and later how) the formatting of the document
359 : depends on the current printer metrics.
360 : @param nMode
361 : Use <const
362 : scope="com::sun::star::document::PrinterIndependentLayout">ENABLED</const>
363 : to make formatting printer-independent and <const
364 : scope="com::sun::star::document::PrinterIndependentLayout">DISABLED</const>
365 : to make formatting depend on the current printer metrics.
366 : */
367 : void SetPrinterIndependentLayout (sal_Int32 nMode);
368 :
369 : /** Get the flag that controls whether the formatting of the document
370 : depends on the current printer metrics.
371 : @return
372 : Use <const
373 : scope="com::sun::star::document::PrinterIndependentLayout">ENABLED</const>
374 : when formatting is printer-independent and <const
375 : scope="com::sun::star::document::PrinterIndependentLayout">DISABLED</const>
376 : when formatting depends on the current printer metrics.
377 : */
378 : sal_Int32 GetPrinterIndependentLayout (void);
379 :
380 : void SetOnlineSpell( sal_Bool bIn );
381 3362 : sal_Bool GetOnlineSpell() const { return mbOnlineSpell; }
382 : void StopOnlineSpelling();
383 : void StartOnlineSpelling(sal_Bool bForceSpelling=sal_True);
384 :
385 : void ImpOnlineSpellCallback(SpellCallbackInfo* pInfo, SdrObject* pObj, SdrOutliner* pOutl);
386 :
387 : void InsertObject(SdrObject* pObj, SdPage* pPage);
388 : void RemoveObject(SdrObject* pObj, SdPage* pPage);
389 :
390 : sal_uLong GetLinkCount();
391 :
392 86 : std::vector<sd::FrameView*>& GetFrameViewList() { return maFrameViewList; }
393 : SD_DLLPUBLIC SdCustomShowList* GetCustomShowList(sal_Bool bCreate = sal_False);
394 :
395 : void NbcSetChanged(sal_Bool bFlag = sal_True);
396 :
397 : void SetTextDefaults() const;
398 :
399 : void CreateLayoutTemplates();
400 : void RenameLayoutTemplate(const String& rOldLayoutName, const String& rNewName);
401 :
402 : void CreateDefaultCellStyles();
403 :
404 : SD_DLLPUBLIC void StopWorkStartupDelay();
405 :
406 : void NewOrLoadCompleted(DocCreationMode eMode);
407 : void NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool );
408 0 : sal_Bool IsNewOrLoadCompleted() const {return mbNewOrLoadCompleted; }
409 :
410 160 : ::sd::FrameView* GetFrameView(sal_uLong nPos) {
411 160 : return nPos < maFrameViewList.size() ? maFrameViewList[nPos] : NULL; }
412 :
413 : /** deprecated*/
414 : SdAnimationInfo* GetAnimationInfo(SdrObject* pObject) const;
415 :
416 : SD_DLLPUBLIC static SdAnimationInfo* GetShapeUserData(SdrObject& rObject, bool bCreate = false );
417 :
418 : SdIMapInfo* GetIMapInfo( SdrObject* pObject ) const;
419 : IMapObject* GetHitIMapObject( SdrObject* pObject, const Point& rWinPoint, const ::Window& rCmpWnd );
420 :
421 0 : CharClass* GetCharClass() const { return mpCharClass; }
422 :
423 : void RestoreLayerNames();
424 :
425 : void UpdateAllLinks();
426 :
427 : void CheckMasterPages();
428 :
429 : void Merge(SdrModel& rSourceModel,
430 : sal_uInt16 nFirstPageNum=0, sal_uInt16 nLastPageNum=0xFFFF,
431 : sal_uInt16 nDestPos=0xFFFF,
432 : bool bMergeMasterPages = false, bool bAllMasterPages = false,
433 : bool bUndo = true, bool bTreadSourceAsConst = false);
434 :
435 : SD_DLLPUBLIC ::com::sun::star::text::WritingMode GetDefaultWritingMode() const;
436 : void SetDefaultWritingMode( ::com::sun::star::text::WritingMode eMode );
437 :
438 : /** replacespOldPage from all custom shows with pNewPage or removes pOldPage from
439 : all custom shows if pNewPage is 0.
440 : */
441 : void ReplacePageInCustomShows( const SdPage* pOldPage, const SdPage* pNewPage );
442 :
443 : public:
444 :
445 : static SdDrawDocument* pDocLockedInsertingLinks; // static to prevent recursions while resolving links
446 :
447 : /** Create and insert a set of two new pages: a standard (draw) page and
448 : the associated notes page. The new pages are inserted direclty
449 : after the specified page set.
450 : @param pCurrentPage
451 : This page is used to retrieve the layout for the page to
452 : create.
453 : @param ePageKind
454 : This specifies whether <argument>pCurrentPage</argument> is a
455 : standard (draw) page or a notes page.
456 : @param sStandardPageName
457 : Name of the standard page. An empty string leads to using an
458 : automatically created name.
459 : @param sNotesPageName
460 : Name of the standard page. An empty string leads to using an
461 : automatically created name.
462 : @param eStandardLayout
463 : Layout to use for the new standard page. Note that this layout
464 : is not used when the given <argument>pCurrentPage</argument> is
465 : not a standard page. In this case the layout is taken from the
466 : standard page associated with <argument>pCurrentPage</argument>.
467 : @param eNotesLayout
468 : Layout to use for the new notes page. Note that this layout
469 : is not used when the given <argument>pCurrentPage</argument> is
470 : not a notes page. In this case the layout is taken from the
471 : notes page associated with <argument>pCurrentPage</argument>.
472 : @param bIsPageBack
473 : This flag indicates whether to show the background shape.
474 : @param bIsPageObj
475 : This flag indicates whether to show the shapes on the master page.
476 : @param nInsertPosition
477 : Position where to insert the standard page. When -1 then the
478 : new page set is inserted after the current page.
479 :
480 : @return
481 : Returns an index of the inserted pages that can be used with the
482 : <member>GetSdPage()</member> method.
483 : */
484 : sal_uInt16 CreatePage (
485 : SdPage* pCurrentPage,
486 : PageKind ePageKind,
487 : const String& sStandardPageName,
488 : const String& sNotesPageName,
489 : AutoLayout eStandardLayout,
490 : AutoLayout eNotesLayout,
491 : sal_Bool bIsPageBack,
492 : sal_Bool bIsPageObj,
493 : const sal_Int32 nInsertPosition = -1);
494 :
495 : /** This method acts as a simplified front end for the more complex
496 : <member>DuplicatePage()</member> method.
497 : @param nPageNum
498 : The page number as passed to the <member>GetSdPage()</member>
499 : method for which the standard page and the notes page are to be
500 : copied.
501 : @return
502 : Returns an index of the inserted pages that can be used with the
503 : <member>GetSdPage()</member> method.
504 : */
505 : sal_uInt16 DuplicatePage (sal_uInt16 nPageNum);
506 :
507 : /** Create and insert a set of two new pages that are copies of the
508 : given <argument>pCurrentPage</argument> and its associated notes
509 : resp. standard page. The copies are inserted directly after the
510 : specified page set.
511 : @param pCurrentPage
512 : This page and its associated notes/standard page is copied.
513 : @param ePageKind
514 : This specifies whether <argument>pCurrentPage</argument> is a
515 : standard (draw) page or a notes page.
516 : @param sStandardPageName
517 : Name of the standard page. An empty string leads to using an
518 : automatically created name.
519 : @param sNotesPageName
520 : Name of the standard page. An empty string leads to using an
521 : automatically created name.
522 : @param bIsPageBack
523 : This flag indicates whether to show the background shape.
524 : @param bIsPageObj
525 : This flag indicates whether to show the shapes on the master page.
526 : @param nInsertPosition
527 : Position where to insert the standard page. When -1 then the
528 : new page set is inserted after the current page.
529 :
530 : @return
531 : Returns an index of the inserted pages that can be used with the
532 : <member>GetSdPage()</member> method.
533 : */
534 : sal_uInt16 DuplicatePage (
535 : SdPage* pCurrentPage,
536 : PageKind ePageKind,
537 : const String& sStandardPageName,
538 : const String& sNotesPageName,
539 : sal_Bool bIsPageBack,
540 : sal_Bool bIsPageObj,
541 : const sal_Int32 nInsertPosition = -1);
542 :
543 : /** return the document fonts for latin, cjk and ctl according to the current
544 : languages set at this document */
545 : void getDefaultFonts( Font& rLatinFont, Font& rCJKFont, Font& rCTLFont );
546 :
547 : sd::UndoManager* GetUndoManager() const;
548 :
549 : /** converts the given western font height to a corresponding ctl font height, deppending on the system language */
550 : static sal_uInt32 convertFontHeightToCTL( sal_uInt32 nWesternFontHeight );
551 :
552 : /** Get the style sheet pool if it was a SdStyleSheetPool.
553 : */
554 : SD_DLLPUBLIC SdStyleSheetPool* GetSdStyleSheetPool() const;
555 :
556 : void UpdatePageRelativeURLs(const String& rOldName, const String& rNewName);
557 :
558 : void SetCalcFieldValueHdl( ::Outliner* pOutliner);
559 :
560 : sal_uInt16 GetAnnotationAuthorIndex( const OUString& rAuthor );
561 :
562 16 : bool IsUsingEmbededFonts() { return mbUseEmbedFonts; }
563 5 : void SetIsUsingEmbededFonts( bool bUse ) { mbUseEmbedFonts = bUse; }
564 :
565 : private:
566 : /** This member stores the printer independent layout mode. Please
567 : refer to <member>SetPrinterIndependentLayout()</member> for its
568 : values.
569 : */
570 : sal_Int32 mnPrinterIndependentLayout;
571 :
572 : /** Insert a given set of standard and notes page after the given <argument>pCurrentPage</argument>.
573 : @param pCurrentPage
574 : This page and its associated notes/standard page is copied.
575 : @param ePageKind
576 : This specifies whether <argument>pCurrentPage</argument> is a
577 : standard (draw) page or a notes page.
578 : @param sStandardPageName
579 : Name of the standard page. An empty string leads to using an
580 : automatically created name.
581 : @param sNotesPageName
582 : Name of the standard page. An empty string leads to using an
583 : automatically created name.
584 : @param bIsPageBack
585 : This flag indicates whether to show the background shape.
586 : @param bIsPageObj
587 : This flag indicates whether to show the shapes on the master page.
588 : @param pStandardPage
589 : The standard page to insert.
590 : @param pNotesPage
591 : The notes page to insert.
592 : @param nInsertPosition
593 : Position where to insert the standard page. When -1 then the
594 : new page set is inserted after the current page.
595 :
596 : @return
597 : Returns an index of the inserted pages that can be used with the
598 : <member>GetSdPage()</member> method.
599 : */
600 : sal_uInt16 InsertPageSet (
601 : SdPage* pCurrentPage,
602 : PageKind ePageKind,
603 : const String& sStandardPageName,
604 : const String& sNotesPageName,
605 : sal_Bool bIsPageBack,
606 : sal_Bool bIsPageObj,
607 : SdPage* pStandardPage,
608 : SdPage* pNotesPage,
609 : sal_Int32 nInsertPosition = -1);
610 :
611 : /** Set up a newly created page and insert it into the list of pages.
612 : @param pPreviousPage
613 : A page to take the size and border geometry from.
614 : @param pPage
615 : This is the page to set up and insert.
616 : @param sPageName
617 : The name of the new page.
618 : @param nInsertionPoint
619 : Index of the page before which the new page will be inserted.
620 : @param bIsPageBack
621 : This flag indicates whether to show the background shape.
622 : @param bIsPageObj
623 : This flag indicates whether to show the shapes on the master
624 : page.
625 : */
626 : void SetupNewPage (
627 : SdPage* pPreviousPage,
628 : SdPage* pPage,
629 : const String& sPageName,
630 : sal_uInt16 nInsertionPoint,
631 : sal_Bool bIsPageBack,
632 : sal_Bool bIsPageObj);
633 :
634 : virtual void PageListChanged();
635 : virtual void MasterPageListChanged();
636 : };
637 :
638 : namespace sd
639 : {
640 :
641 : /**an instance of this guard disables modification of a document
642 : during its lifetime*/
643 : class ModifyGuard
644 : {
645 : public:
646 : ModifyGuard( SdDrawDocument* pDoc );
647 : ~ModifyGuard();
648 :
649 : private:
650 : void init();
651 :
652 : DrawDocShell* mpDocShell;
653 : SdDrawDocument* mpDoc;
654 : sal_Bool mbIsEnableSetModified;
655 : sal_Bool mbIsDocumentChanged;
656 : };
657 :
658 : }
659 :
660 : #endif // _DRAWDOC_HXX
661 :
662 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|