1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SD_INC_DRAWDOC_HXX
21 #define INCLUDED_SD_INC_DRAWDOC_HXX
23 #include <com/sun/star/text/WritingMode.hpp>
24 #include <svl/style.hxx>
25 #include <svx/fmmodel.hxx>
26 #include <vcl/prntypes.hxx>
27 #include <xmloff/autolayout.hxx>
35 namespace com
{ namespace sun
{ namespace star
{ namespace xml
{ namespace dom
{ class XNode
; } } } } }
36 namespace com
{ namespace sun
{ namespace star
{ namespace uno
{ class XInterface
; } } } }
37 namespace vcl
{ class Font
; }
45 namespace presentation
57 class SdAnimationInfo
;
60 class SdStyleSheetPool
;
66 struct SpellCallbackInfo
;
67 class SdCustomShowList
;
84 #ifndef SV_DECL_DRAW_DOC_SHELL_DEFINED
85 #define SV_DECL_DRAW_DOC_SHELL_DEFINED
86 typedef ::tools::SvRef
<DrawDocShell
> DrawDocShellRef
;
93 class ImpDrawPageListWatcher
;
94 class ImpMasterPageListWatcher
;
96 struct StyleReplaceData
98 SfxStyleFamily nFamily
;
99 SfxStyleFamily nNewFamily
;
112 struct PresentationSettings
124 bool mbAnimationAllowed
;
125 sal_Int32 mnPauseTimeout
;
126 bool mbShowPauseLogo
;
128 PresentationSettings();
133 class SD_DLLPUBLIC SdDrawDocument
: public FmFormModel
136 SAL_DLLPRIVATE
void setDocAccTitle( const OUString
& rTitle
) { msDocAccTitle
= rTitle
; }
137 SAL_DLLPRIVATE
const OUString
& getDocAccTitle() const { return msDocAccTitle
; }
138 SAL_DLLPRIVATE
bool getDocReadOnly() const { return bReadOnly
; }
140 OUString msDocAccTitle
;
141 std::unique_ptr
<SdOutliner
>
142 mpOutliner
; ///< local outliner for outline mode
143 std::unique_ptr
<SdOutliner
>
144 mpInternalOutliner
; ///< internal outliner for creation of text objects
145 std::unique_ptr
<Timer
> mpWorkStartupTimer
;
146 std::unique_ptr
<Idle
>
147 mpOnlineSpellingIdle
;
148 std::unique_ptr
<sd::ShapeList
>
149 mpOnlineSpellingList
;
150 std::unique_ptr
<SvxSearchItem
>
152 std::vector
<std::unique_ptr
<sd::FrameView
>>
154 std::unique_ptr
<SdCustomShowList
> mpCustomShowList
;
155 ::sd::DrawDocShell
* mpDocSh
;
156 SdTransferable
* mpCreatingTransferable
;
157 bool mbHasOnlineSpellErrors
;
158 bool mbInitialOnlineSpellingEnabled
;
159 OUString maBookmarkFile
;
160 ::sd::DrawDocShellRef mxBookmarkDocShRef
;
162 sd::PresentationSettings maPresentationSettings
;
164 css::uno::Reference
< css::presentation::XPresentation2
> mxPresentation
;
166 bool mbNewOrLoadCompleted
;
169 bool mbSummationOfParagraphs
;
170 bool mbStartWithPresentation
; ///< is set to true when starting with command line parameter -start
171 bool mbExitAfterPresenting
; ///< true if mbStartWithPresentation AND Presentation was shown fully
172 LanguageType meLanguage
;
173 LanguageType meLanguageCJK
;
174 LanguageType meLanguageCTL
;
175 SvxNumType mePageNumType
;
176 ::sd::DrawDocShellRef mxAllocedDocShRef
; // => AllocModel()
177 bool mbAllocDocSh
; // => AllocModel()
178 DocumentType
const meDocType
;
179 std::unique_ptr
<CharClass
>
182 ::std::unique_ptr
<ImpDrawPageListWatcher
> mpDrawPageListWatcher
;
183 ::std::unique_ptr
<ImpMasterPageListWatcher
> mpMasterPageListWatcher
;
185 SAL_DLLPRIVATE
void UpdatePageObjectsInNotes(sal_uInt16 nStartPos
);
186 SAL_DLLPRIVATE
void UpdatePageRelativeURLs(SdPage
const * pPage
, sal_uInt16 nPos
, sal_Int32 nIncrement
);
187 SAL_DLLPRIVATE
void FillOnlineSpellingList(SdPage
const * pPage
);
188 SAL_DLLPRIVATE
void SpellObject(SdrTextObj
* pObj
);
190 DECL_DLLPRIVATE_LINK(WorkStartupHdl
, Timer
*, void);
191 DECL_DLLPRIVATE_LINK(OnlineSpellingHdl
, Timer
*, void);
192 DECL_DLLPRIVATE_LINK(OnlineSpellEventHdl
, EditStatus
&, void);
194 std::vector
< OUString
> maAnnotationAuthors
;
195 std::vector
<css::uno::Reference
< css::xml::dom::XNode
> > maLayoutInfo
;
197 std::vector
<css::uno::Reference
< css::xml::dom::XNode
> > maPresObjectInfo
;
199 bool mbEmbedFonts
: 1;
200 bool mbEmbedUsedFontsOnly
: 1;
201 bool mbEmbedFontScriptLatin
: 1;
202 bool mbEmbedFontScriptAsian
: 1;
203 bool mbEmbedFontScriptComplex
: 1;
207 SAL_DLLPRIVATE
virtual css::uno::Reference
< css::uno::XInterface
> createUnoModel() override
;
212 SAL_DLLPRIVATE
SdDrawDocument(DocumentType eType
, SfxObjectShell
* pDocSh
);
213 SAL_DLLPRIVATE
virtual ~SdDrawDocument() override
;
215 // Adapt to given Size and Borders scaling all contained data, maybe
216 // including PresObj's in higher derivations
217 virtual void adaptSizeAndBorderForAllPages(
218 const Size
& rNewSize
,
222 long nLower
= 0) override
;
224 // Adapt PageSize for all Pages of PageKind ePageKind. Also
225 // set Borders to left/right/upper/lower, ScaleAll, Orientation,
226 // PaperBin and BackgroundFullSize. Create Undo-Actions when
227 // a SdUndoGroup is given (then used from the View probably)
228 void AdaptPageSizeForAllPages(
229 const Size
& rNewSize
,
231 SdUndoGroup
* pUndoGroup
= nullptr,
236 bool bScaleAll
= false,
237 Orientation eOrientation
= Orientation::Landscape
,
238 sal_uInt16 nPaperBin
= 0,
239 bool bBackgroundFullSize
= false);
241 SAL_DLLPRIVATE SdDrawDocument
* AllocSdDrawDocument() const;
242 SAL_DLLPRIVATE
virtual SdrModel
* AllocModel() const override
; //forwards to AllocSdDrawDocument
244 SAL_DLLPRIVATE SdPage
* AllocSdPage(bool bMasterPage
);
245 SAL_DLLPRIVATE
virtual SdrPage
* AllocPage(bool bMasterPage
) override
; //forwards to AllocSdPage
247 SAL_DLLPRIVATE
virtual bool IsReadOnly() const override
;
248 SAL_DLLPRIVATE
virtual void SetChanged(bool bFlag
= true) override
;
250 SAL_DLLPRIVATE SfxItemPool
& GetPool() { return( *pItemPool
); }
252 SAL_DLLPRIVATE SdOutliner
* GetOutliner(bool bCreateOutliner
=true);
253 SdOutliner
* GetInternalOutliner(bool bCreateOutliner
=true);
255 SAL_DLLPRIVATE ::sd::DrawDocShell
* GetDocSh() const { return mpDocSh
; }
257 SAL_DLLPRIVATE LanguageType
GetLanguage( const sal_uInt16 nId
) const;
258 SAL_DLLPRIVATE
void SetLanguage( const LanguageType eLang
, const sal_uInt16 nId
);
260 SAL_DLLPRIVATE SvxNumType
GetPageNumType() const override
;
261 SAL_DLLPRIVATE
void SetPageNumType(SvxNumType eType
) { mePageNumType
= eType
; }
262 OUString
CreatePageNumValue(sal_uInt16 nNum
) const;
264 SAL_DLLPRIVATE DocumentType
GetDocumentType() const { return meDocType
; }
266 SAL_DLLPRIVATE
void SetAllocDocSh(bool bAlloc
);
268 SAL_DLLPRIVATE
void CreatingDataObj( SdTransferable
* pTransferable
) { mpCreatingTransferable
= pTransferable
; }
269 SAL_DLLPRIVATE
virtual bool IsCreatingDataObj() const override
{ return mpCreatingTransferable
!= nullptr; }
271 /** if the document does not contain at least one handout, one slide and one notes page with
272 at least one master each this methods creates them.
273 If a reference document is given, the sizes and border settings of that document are used
274 for newly created slides.
276 void CreateFirstPages( SdDrawDocument
const * pRefDocument
= nullptr );
277 bool CreateMissingNotesAndHandoutPages();
279 SAL_DLLPRIVATE
void MovePage(sal_uInt16 nPgNum
, sal_uInt16 nNewPos
) override
;
280 SAL_DLLPRIVATE
void InsertPage(SdrPage
* pPage
, sal_uInt16 nPos
=0xFFFF) override
;
281 SAL_DLLPRIVATE
void DeletePage(sal_uInt16 nPgNum
) override
;
282 SAL_DLLPRIVATE SdrPage
* RemovePage(sal_uInt16 nPgNum
) override
;
284 SAL_DLLPRIVATE
virtual void InsertMasterPage(SdrPage
* pPage
, sal_uInt16 nPos
=0xFFFF) override
;
285 SAL_DLLPRIVATE
virtual SdrPage
* RemoveMasterPage(sal_uInt16 nPgNum
) override
;
287 SAL_DLLPRIVATE
void RemoveUnnecessaryMasterPages( SdPage
* pMaster
=nullptr, bool bOnlyDuplicatePages
=false, bool bUndo
=true );
288 void SetMasterPage(sal_uInt16 nSdPageNum
, const OUString
& rLayoutName
,
289 SdDrawDocument
* pSourceDoc
, bool bMaster
, bool bCheckMasters
);
291 SdDrawDocument
* OpenBookmarkDoc(const OUString
& rBookmarkFile
);
292 SAL_DLLPRIVATE SdDrawDocument
* OpenBookmarkDoc(SfxMedium
* pMedium
);
294 SAL_DLLPRIVATE
void InsertBookmark(const std::vector
<OUString
> &rBookmarkList
,
295 std::vector
<OUString
> &rExchangeList
, bool bLink
,
297 ::sd::DrawDocShell
* pBookmarkDocSh
,
298 Point
const * pObjPos
);
300 SAL_DLLPRIVATE
bool IsStartWithPresentation() const { return mbStartWithPresentation
;}
301 SAL_DLLPRIVATE
void SetStartWithPresentation( bool bStartWithPresentation
);
303 SAL_DLLPRIVATE
bool IsExitAfterPresenting() const { return mbExitAfterPresenting
;}
304 SAL_DLLPRIVATE
void SetExitAfterPresenting( bool bExitAfterPresenting
);
306 /// load xml-based impress layout definitions into document
307 SAL_DLLPRIVATE
void InitLayoutVector();
308 /// return reference to vector of Impress layout definitions
309 SAL_DLLPRIVATE
const std::vector
<css::uno::Reference
< css::xml::dom::XNode
> >& GetLayoutVector() const
310 { return maLayoutInfo
; }
312 /// load xml-based impress master presentation object definitions into document
313 SAL_DLLPRIVATE
void InitObjectVector();
314 /// return reference to vector of master presentation object definitions
315 SAL_DLLPRIVATE
const std::vector
<css::uno::Reference
<css::xml::dom::XNode
> >& GetObjectVector() const { return maPresObjectInfo
; }
316 /** Insert pages into this document
318 This method inserts whole pages into this document, either
319 selected ones (specified via pBookmarkList/pExchangeList), or
320 all from the source document.
322 @attention Beware! This method in its current state does not
323 handle all combinations of their input parameters
324 correctly. For example, for pBookmarkList=NULL, bReplace=true
325 is ignored (no replace happens).
328 A list of strings, denoting the names of the pages to be copied
331 A list of strings, denoting the names of the pages to be renamed
334 Whether the inserted pages should be links to the bookmark document
337 Whether the pages should not be inserted, but replace the pages in
338 the destination document
341 Insertion point/start of replacement
344 Whether query dialogs are allowed (e.g. for page scaling)
346 @param pBookmarkDocSh
347 DocShell of the source document (used e.g. to extract the filename
351 Whether the source document should be treated as immutable (i.e.
352 inserted pages are not removed from it, but cloned)
354 @param bMergeMasterPages
355 Whether the source document's master pages should be copied, too.
357 @param bPreservePageNames
358 Whether the replace operation should take the name from the new
359 page, or preserve the old name
362 SAL_DLLPRIVATE
bool InsertBookmarkAsPage(const std::vector
<OUString
> &rBookmarkList
,
363 std::vector
<OUString
> *pExchangeList
,
364 bool bLink
, bool bReplace
, sal_uInt16 nPgPos
,
365 bool bNoDialogs
, ::sd::DrawDocShell
* pBookmarkDocSh
,
366 bool bCopy
, bool bMergeMasterPages
,
367 bool bPreservePageNames
);
369 SAL_DLLPRIVATE
bool InsertBookmarkAsObject(const std::vector
<OUString
> &rBookmarkList
,
370 const std::vector
<OUString
> &rExchangeList
,
371 ::sd::DrawDocShell
* pBookmarkDocSh
,
372 Point
const * pObjPos
, bool bCalcObjCount
);
374 void CloseBookmarkDoc();
376 SAL_DLLPRIVATE SdrObject
* GetObj(const OUString
& rObjName
) const;
378 /** Return the first page that has the given name. Regular pages and
379 notes pages are searched first. When not found then the master
382 Name of the page to return.
383 @param rbIsMasterPage
384 Is set by the method to indicate whether the returned index
385 belongs to a master page (<TRUE/>) or a regular or notes page
386 (<FALSE/>). The given value is ignored.
388 Returns the index of the page with the given name or
389 SDRPAGE_NOTFOUND (=0xffff) when such a page does not exist.
391 SAL_DLLPRIVATE sal_uInt16
GetPageByName(const OUString
& rPgName
, bool& rbIsMasterPage
) const;
392 /** checks, if the given name is a *unique* name for an *existing* slide
394 @param rPageName the name of an existing slide
396 @return true, if the name is unique and the slide exists
398 bool IsPageNameUnique( const OUString
& rPageName
) const;
399 SdPage
*GetSdPage(sal_uInt16 nPgNum
, PageKind ePgKind
) const;
400 sal_uInt16
GetSdPageCount(PageKind ePgKind
) const;
402 SAL_DLLPRIVATE
void SetSelected(SdPage
* pPage
, bool bSelect
);
403 SAL_DLLPRIVATE
void UnselectAllPages();
404 SAL_DLLPRIVATE
bool MovePages(sal_uInt16 nTargetPage
);
406 SdPage
*GetMasterSdPage(sal_uInt16 nPgNum
, PageKind ePgKind
);
407 sal_uInt16
GetMasterSdPageCount(PageKind ePgKind
) const;
409 sal_uInt16
GetActiveSdPageCount() const;
411 SAL_DLLPRIVATE sal_uInt16
GetMasterPageUserCount(SdrPage
const * pMaster
) const;
413 SAL_DLLPRIVATE
const sd::PresentationSettings
& getPresentationSettings() const { return maPresentationSettings
; }
414 SAL_DLLPRIVATE
sd::PresentationSettings
& getPresentationSettings() { return maPresentationSettings
; }
416 SAL_DLLPRIVATE
const css::uno::Reference
< css::presentation::XPresentation2
>& getPresentation() const;
418 SAL_DLLPRIVATE
void SetSummationOfParagraphs( bool bOn
= true ) { mbSummationOfParagraphs
= bOn
; }
419 SAL_DLLPRIVATE
bool IsSummationOfParagraphs() const { return mbSummationOfParagraphs
; }
421 /** Set the mode that controls whether (and later how) the formatting of the document
422 depends on the current printer metrics.
425 scope="css::document::PrinterIndependentLayout">ENABLED</const>
426 to make formatting printer-independent and <const
427 scope="css::document::PrinterIndependentLayout">DISABLED</const>
428 to make formatting depend on the current printer metrics.
430 SAL_DLLPRIVATE
void SetPrinterIndependentLayout (sal_Int32 nMode
);
432 /** Get the flag that controls whether the formatting of the document
433 depends on the current printer metrics.
436 scope="css::document::PrinterIndependentLayout">ENABLED</const>
437 when formatting is printer-independent and <const
438 scope="css::document::PrinterIndependentLayout">DISABLED</const>
439 when formatting depends on the current printer metrics.
441 SAL_DLLPRIVATE sal_Int32
GetPrinterIndependentLayout() { return mnPrinterIndependentLayout
;}
443 SAL_DLLPRIVATE
void SetOnlineSpell( bool bIn
);
444 SAL_DLLPRIVATE
bool GetOnlineSpell() const { return mbOnlineSpell
; }
445 SAL_DLLPRIVATE
void StopOnlineSpelling();
446 SAL_DLLPRIVATE
void StartOnlineSpelling(bool bForceSpelling
=true);
448 SAL_DLLPRIVATE
void ImpOnlineSpellCallback(SpellCallbackInfo
const * pInfo
, SdrObject
* pObj
, SdrOutliner
const * pOutl
);
450 SAL_DLLPRIVATE
void InsertObject(SdrObject
* pObj
);
451 SAL_DLLPRIVATE
void RemoveObject(SdrObject
* pObj
);
453 SAL_DLLPRIVATE sal_uLong
GetLinkCount();
455 SAL_DLLPRIVATE
std::vector
<std::unique_ptr
<sd::FrameView
>>& GetFrameViewList() { return maFrameViewList
; }
456 SdCustomShowList
* GetCustomShowList(bool bCreate
= false);
458 SAL_DLLPRIVATE
void NbcSetChanged(bool bFlag
);
460 SAL_DLLPRIVATE
void SetTextDefaults() const;
462 SAL_DLLPRIVATE
void CreateLayoutTemplates();
463 SAL_DLLPRIVATE
void RenameLayoutTemplate(const OUString
& rOldLayoutName
, const OUString
& rNewName
);
465 SAL_DLLPRIVATE
void CreateDefaultCellStyles();
467 void StopWorkStartupDelay();
469 SAL_DLLPRIVATE
void NewOrLoadCompleted(DocCreationMode eMode
);
470 SAL_DLLPRIVATE
void NewOrLoadCompleted( SdPage
* pPage
, SdStyleSheetPool
* pSPool
);
471 SAL_DLLPRIVATE
bool IsNewOrLoadCompleted() const {return mbNewOrLoadCompleted
; }
473 SAL_DLLPRIVATE ::sd::FrameView
* GetFrameView(sal_uLong nPos
) {
474 return nPos
< maFrameViewList
.size() ? maFrameViewList
[nPos
].get() : nullptr; }
477 SAL_DLLPRIVATE
static SdAnimationInfo
* GetAnimationInfo(SdrObject
* pObject
);
479 static SdAnimationInfo
* GetShapeUserData(SdrObject
& rObject
, bool bCreate
= false );
481 SAL_DLLPRIVATE
static SdIMapInfo
* GetIMapInfo( SdrObject
const * pObject
);
482 SAL_DLLPRIVATE
static IMapObject
* GetHitIMapObject( SdrObject
const * pObject
, const Point
& rWinPoint
);
484 SAL_DLLPRIVATE CharClass
* GetCharClass() const { return mpCharClass
.get(); }
486 SAL_DLLPRIVATE
void UpdateAllLinks();
488 SAL_DLLPRIVATE
void CheckMasterPages();
490 SAL_DLLPRIVATE
void Merge(SdrModel
& rSourceModel
,
491 sal_uInt16 nFirstPageNum
, sal_uInt16 nLastPageNum
,
493 bool bMergeMasterPages
, bool bAllMasterPages
,
494 bool bUndo
= true, bool bTreadSourceAsConst
= false) override
;
496 css::text::WritingMode
GetDefaultWritingMode() const;
497 SAL_DLLPRIVATE
void SetDefaultWritingMode( css::text::WritingMode eMode
);
499 /** replacespOldPage from all custom shows with pNewPage or removes pOldPage from
500 all custom shows if pNewPage is 0.
502 SAL_DLLPRIVATE
void ReplacePageInCustomShows( const SdPage
* pOldPage
, const SdPage
* pNewPage
);
506 /// static to prevent recursions while resolving links
507 SAL_DLLPRIVATE
static SdDrawDocument
* s_pDocLockedInsertingLinks
;
509 /** Create and insert a set of two new pages: a standard (draw) page and
510 the associated notes page. The new pages are inserted directly
511 after the specified page set.
513 This page is used to retrieve the layout for the page to
516 This specifies whether <argument>pCurrentPage</argument> is a
517 standard (draw) page or a notes page.
518 @param sStandardPageName
519 Name of the standard page. An empty string leads to using an
520 automatically created name.
521 @param sNotesPageName
522 Name of the standard page. An empty string leads to using an
523 automatically created name.
524 @param eStandardLayout
525 Layout to use for the new standard page. Note that this layout
526 is not used when the given <argument>pCurrentPage</argument> is
527 not a standard page. In this case the layout is taken from the
528 standard page associated with <argument>pCurrentPage</argument>.
530 Layout to use for the new notes page. Note that this layout
531 is not used when the given <argument>pCurrentPage</argument> is
532 not a notes page. In this case the layout is taken from the
533 notes page associated with <argument>pCurrentPage</argument>.
535 This flag indicates whether to show the background shape.
537 This flag indicates whether to show the shapes on the master page.
538 @param nInsertPosition
539 Position where to insert the standard page. When -1 then the
540 new page set is inserted after the current page.
543 Returns an index of the inserted pages that can be used with the
544 <member>GetSdPage()</member> method.
546 SAL_DLLPRIVATE sal_uInt16
CreatePage (
547 SdPage
* pCurrentPage
,
549 const OUString
& sStandardPageName
,
550 const OUString
& sNotesPageName
,
551 AutoLayout eStandardLayout
,
552 AutoLayout eNotesLayout
,
555 const sal_Int32 nInsertPosition
);
557 /** This method acts as a simplified front end for the more complex
558 <member>DuplicatePage()</member> method.
560 The page number as passed to the <member>GetSdPage()</member>
561 method for which the standard page and the notes page are to be
564 Returns an index of the inserted pages that can be used with the
565 <member>GetSdPage()</member> method.
567 SAL_DLLPRIVATE sal_uInt16
DuplicatePage (sal_uInt16 nPageNum
);
569 /** Create and insert a set of two new pages that are copies of the
570 given <argument>pCurrentPage</argument> and its associated notes
571 resp. standard page. The copies are inserted directly after the
574 This page and its associated notes/standard page is copied.
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.
585 This flag indicates whether to show the background shape.
587 This flag indicates whether to show the shapes on the master page.
588 @param nInsertPosition
589 Position where to insert the standard page. When -1 then the
590 new page set is inserted after the current page.
593 Returns an index of the inserted pages that can be used with the
594 <member>GetSdPage()</member> method.
596 SAL_DLLPRIVATE sal_uInt16
DuplicatePage (
597 SdPage
* pCurrentPage
,
599 const OUString
& sStandardPageName
,
600 const OUString
& sNotesPageName
,
603 const sal_Int32 nInsertPosition
);
605 /** return the document fonts for latin, cjk and ctl according to the current
606 languages set at this document */
607 SAL_DLLPRIVATE
void getDefaultFonts( vcl::Font
& rLatinFont
, vcl::Font
& rCJKFont
, vcl::Font
& rCTLFont
);
609 sd::UndoManager
* GetUndoManager() const;
611 /** converts the given western font height to a corresponding ctl font height, depending on the system language */
612 SAL_DLLPRIVATE
static sal_uInt32
convertFontHeightToCTL( sal_uInt32 nWesternFontHeight
);
614 /** Get the style sheet pool if it was a SdStyleSheetPool.
616 SdStyleSheetPool
* GetSdStyleSheetPool() const;
618 SAL_DLLPRIVATE
void UpdatePageRelativeURLs(const OUString
& rOldName
, const OUString
& rNewName
);
620 SAL_DLLPRIVATE
static void SetCalcFieldValueHdl( ::Outliner
* pOutliner
);
622 SAL_DLLPRIVATE sal_uInt16
GetAnnotationAuthorIndex( const OUString
& rAuthor
);
624 SAL_DLLPRIVATE
bool IsEmbedFonts() { return mbEmbedFonts
; }
625 SAL_DLLPRIVATE
bool IsEmbedUsedFontsOnly() { return mbEmbedUsedFontsOnly
; }
626 SAL_DLLPRIVATE
bool IsEmbedFontScriptLatin() { return mbEmbedFontScriptLatin
; }
627 SAL_DLLPRIVATE
bool IsEmbedFontScriptAsian() { return mbEmbedFontScriptAsian
; }
628 SAL_DLLPRIVATE
bool IsEmbedFontScriptComplex() { return mbEmbedFontScriptComplex
; }
630 SAL_DLLPRIVATE
void SetEmbedFonts(bool bUse
) { mbEmbedFonts
= bUse
; }
631 SAL_DLLPRIVATE
void SetEmbedUsedFontsOnly(bool bUse
) { mbEmbedUsedFontsOnly
= bUse
; }
632 SAL_DLLPRIVATE
void SetEmbedFontScriptLatin(bool bUse
) { mbEmbedFontScriptLatin
= bUse
; }
633 SAL_DLLPRIVATE
void SetEmbedFontScriptAsian(bool bUse
) { mbEmbedFontScriptAsian
= bUse
; }
634 SAL_DLLPRIVATE
void SetEmbedFontScriptComplex(bool bUse
) { mbEmbedFontScriptComplex
= bUse
; }
636 void dumpAsXml(xmlTextWriterPtr pWriter
) const override
;
639 /** This member stores the printer independent layout mode. Please
640 refer to <member>SetPrinterIndependentLayout()</member> for its
643 sal_Int32 mnPrinterIndependentLayout
;
645 /** Insert a given set of standard and notes page after the given <argument>pCurrentPage</argument>.
647 This page and its associated notes/standard page is copied.
649 This specifies whether <argument>pCurrentPage</argument> is a
650 standard (draw) page or a notes page.
651 @param sStandardPageName
652 Name of the standard page. An empty string leads to using an
653 automatically created name.
654 @param sNotesPageName
655 Name of the standard page. An empty string leads to using an
656 automatically created name.
658 This flag indicates whether to show the background shape.
660 This flag indicates whether to show the shapes on the master page.
662 The standard page to insert.
664 The notes page to insert.
665 @param nInsertPosition
666 Position where to insert the standard page. When -1 then the
667 new page set is inserted after the current page.
670 Returns an index of the inserted pages that can be used with the
671 <member>GetSdPage()</member> method.
673 SAL_DLLPRIVATE sal_uInt16
InsertPageSet (
674 SdPage
* pCurrentPage
,
676 const OUString
& sStandardPageName
,
677 const OUString
& sNotesPageName
,
680 SdPage
* pStandardPage
,
682 sal_Int32 nInsertPosition
);
684 /** Set up a newly created page and insert it into the list of pages.
686 A page to take the size and border geometry from.
688 This is the page to set up and insert.
690 The name of the new page.
691 @param nInsertionPoint
692 Index of the page before which the new page will be inserted.
694 This flag indicates whether to show the background shape.
696 This flag indicates whether to show the shapes on the master
699 SAL_DLLPRIVATE
void SetupNewPage (
700 SdPage
const * pPreviousPage
,
702 const OUString
& sPageName
,
703 sal_uInt16 nInsertionPoint
,
707 SAL_DLLPRIVATE
virtual void PageListChanged() override
;
708 SAL_DLLPRIVATE
virtual void MasterPageListChanged() override
;
709 SAL_DLLPRIVATE
virtual ImageMap
* GetImageMapForObject(SdrObject
* pObj
) override
;
715 /**an instance of this guard disables modification of a document
716 during its lifetime*/
720 ModifyGuard( SdDrawDocument
* pDoc
);
726 DrawDocShell
* mpDocShell
;
727 SdDrawDocument
* mpDoc
;
728 bool mbIsEnableSetModified
;
729 bool mbIsDocumentChanged
;
734 #endif // INCLUDED_SD_INC_DRAWDOC_HXX
736 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */