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::sun::star::xml::dom
{ class XNode
; }
36 namespace com::sun::star::uno
{ class XInterface
; }
37 namespace vcl
{ class Font
; }
38 namespace com::sun::star::presentation
{ class XPresentation2
; }
43 class SdAnimationInfo
;
44 class SdStyleSheetPool
;
50 struct SpellCallbackInfo
;
51 class SdCustomShowList
;
68 #ifndef SV_DECL_DRAW_DOC_SHELL_DEFINED
69 #define SV_DECL_DRAW_DOC_SHELL_DEFINED
70 typedef ::tools::SvRef
<DrawDocShell
> DrawDocShellRef
;
77 class ImpDrawPageListWatcher
;
78 class ImpMasterPageListWatcher
;
80 struct StyleReplaceData
82 SfxStyleFamily nFamily
;
83 SfxStyleFamily nNewFamily
;
88 enum class DocCreationMode
96 struct PresentationSettings
108 bool mbAnimationAllowed
;
109 sal_Int32 mnPauseTimeout
;
110 bool mbShowPauseLogo
;
112 PresentationSettings();
117 class SD_DLLPUBLIC SdDrawDocument final
: public FmFormModel
120 SAL_DLLPRIVATE
void setDocAccTitle( const OUString
& rTitle
) { msDocAccTitle
= rTitle
; }
121 SAL_DLLPRIVATE
const OUString
& getDocAccTitle() const { return msDocAccTitle
; }
122 SAL_DLLPRIVATE
bool getDocReadOnly() const { return m_bReadOnly
; }
124 OUString msDocAccTitle
;
125 std::unique_ptr
<SdOutliner
>
126 mpOutliner
; ///< local outliner for outline mode
127 std::unique_ptr
<SdOutliner
>
128 mpInternalOutliner
; ///< internal outliner for creation of text objects
129 std::unique_ptr
<Timer
> mpWorkStartupTimer
;
130 std::unique_ptr
<Idle
>
131 mpOnlineSpellingIdle
;
132 std::unique_ptr
<sd::ShapeList
>
133 mpOnlineSpellingList
;
134 std::unique_ptr
<SvxSearchItem
>
136 std::vector
<std::unique_ptr
<sd::FrameView
>>
138 std::unique_ptr
<SdCustomShowList
> mpCustomShowList
;
139 ::sd::DrawDocShell
* mpDocSh
;
140 SdTransferable
* mpCreatingTransferable
;
141 bool mbHasOnlineSpellErrors
;
142 bool mbInitialOnlineSpellingEnabled
;
143 OUString maBookmarkFile
;
144 ::sd::DrawDocShellRef mxBookmarkDocShRef
;
146 sd::PresentationSettings maPresentationSettings
;
148 css::uno::Reference
< css::presentation::XPresentation2
> mxPresentation
;
150 bool mbNewOrLoadCompleted
;
153 bool mbSummationOfParagraphs
;
154 bool mbStartWithPresentation
; ///< is set to true when starting with command line parameter -start
155 bool mbExitAfterPresenting
; ///< true if mbStartWithPresentation AND Presentation was shown fully
156 LanguageType meLanguage
;
157 LanguageType meLanguageCJK
;
158 LanguageType meLanguageCTL
;
159 SvxNumType mePageNumType
;
160 ::sd::DrawDocShellRef mxAllocedDocShRef
; // => AllocModel()
161 bool mbAllocDocSh
; // => AllocModel()
162 DocumentType meDocType
;
163 std::unique_ptr
<CharClass
>
166 ::std::unique_ptr
<ImpDrawPageListWatcher
> mpDrawPageListWatcher
;
167 ::std::unique_ptr
<ImpMasterPageListWatcher
> mpMasterPageListWatcher
;
169 SAL_DLLPRIVATE
void UpdatePageObjectsInNotes(sal_uInt16 nStartPos
);
170 SAL_DLLPRIVATE
void UpdatePageRelativeURLs(SdPage
const * pPage
, sal_uInt16 nPos
, sal_Int32 nIncrement
);
171 SAL_DLLPRIVATE
void FillOnlineSpellingList(SdPage
const * pPage
);
172 SAL_DLLPRIVATE
void SpellObject(SdrTextObj
* pObj
);
174 DECL_DLLPRIVATE_LINK(WorkStartupHdl
, Timer
*, void);
175 DECL_DLLPRIVATE_LINK(OnlineSpellingHdl
, Timer
*, void);
176 DECL_DLLPRIVATE_LINK(OnlineSpellEventHdl
, EditStatus
&, void);
178 std::vector
< OUString
> maAnnotationAuthors
;
179 std::vector
<css::uno::Reference
< css::xml::dom::XNode
> > maLayoutInfo
;
181 std::vector
<css::uno::Reference
< css::xml::dom::XNode
> > maPresObjectInfo
;
183 bool mbEmbedFonts
: 1;
184 bool mbEmbedUsedFontsOnly
: 1;
185 bool mbEmbedFontScriptLatin
: 1;
186 bool mbEmbedFontScriptAsian
: 1;
187 bool mbEmbedFontScriptComplex
: 1;
189 SAL_DLLPRIVATE
virtual css::uno::Reference
< css::uno::XInterface
> createUnoModel() override
;
194 SAL_DLLPRIVATE
SdDrawDocument(DocumentType eType
, SfxObjectShell
* pDocSh
);
195 SAL_DLLPRIVATE
virtual ~SdDrawDocument() override
;
197 // Adapt to given Size and Borders scaling all contained data, maybe
198 // including PresObj's in higher derivations
199 virtual void adaptSizeAndBorderForAllPages(
200 const Size
& rNewSize
,
201 tools::Long nLeft
= 0,
202 tools::Long nRight
= 0,
203 tools::Long nUpper
= 0,
204 tools::Long nLower
= 0) override
;
206 // Adapt PageSize for all Pages of PageKind ePageKind. Also
207 // set Borders to left/right/upper/lower, ScaleAll, Orientation,
208 // PaperBin and BackgroundFullSize. Create Undo-Actions when
209 // a SdUndoGroup is given (then used from the View probably)
210 void AdaptPageSizeForAllPages(
211 const Size
& rNewSize
,
213 SdUndoGroup
* pUndoGroup
= nullptr,
214 tools::Long nLeft
= 0,
215 tools::Long nRight
= 0,
216 tools::Long nUpper
= 0,
217 tools::Long nLower
= 0,
218 bool bScaleAll
= false,
219 Orientation eOrientation
= Orientation::Landscape
,
220 sal_uInt16 nPaperBin
= 0,
221 bool bBackgroundFullSize
= false);
223 SAL_DLLPRIVATE SdDrawDocument
* AllocSdDrawDocument() const;
224 SAL_DLLPRIVATE
virtual SdrModel
* AllocModel() const override
; //forwards to AllocSdDrawDocument
226 SAL_DLLPRIVATE SdPage
* AllocSdPage(bool bMasterPage
);
227 SAL_DLLPRIVATE
virtual SdrPage
* AllocPage(bool bMasterPage
) override
; //forwards to AllocSdPage
229 SAL_DLLPRIVATE
virtual bool IsReadOnly() const override
;
230 SAL_DLLPRIVATE
virtual void SetChanged(bool bFlag
= true) override
;
232 SAL_DLLPRIVATE SfxItemPool
& GetPool() { return( *m_pItemPool
); }
234 SAL_DLLPRIVATE SdOutliner
* GetOutliner(bool bCreateOutliner
=true);
235 SdOutliner
* GetInternalOutliner(bool bCreateOutliner
=true);
237 SAL_DLLPRIVATE ::sd::DrawDocShell
* GetDocSh() const { return mpDocSh
; }
239 SAL_DLLPRIVATE LanguageType
GetLanguage( const sal_uInt16 nId
) const;
240 SAL_DLLPRIVATE
void SetLanguage( const LanguageType eLang
, const sal_uInt16 nId
);
242 SAL_DLLPRIVATE SvxNumType
GetPageNumType() const override
;
243 SAL_DLLPRIVATE
void SetPageNumType(SvxNumType eType
) { mePageNumType
= eType
; }
244 OUString
CreatePageNumValue(sal_uInt16 nNum
) const;
246 SAL_DLLPRIVATE DocumentType
GetDocumentType() const { return meDocType
; }
248 SAL_DLLPRIVATE
void SetAllocDocSh(bool bAlloc
);
250 SAL_DLLPRIVATE
void CreatingDataObj( SdTransferable
* pTransferable
) { mpCreatingTransferable
= pTransferable
; }
251 SAL_DLLPRIVATE
virtual bool IsCreatingDataObj() const override
{ return mpCreatingTransferable
!= nullptr; }
253 /** if the document does not contain at least one handout, one slide and one notes page with
254 at least one master each this methods creates them.
255 If a reference document is given, the sizes and border settings of that document are used
256 for newly created slides.
258 void CreateFirstPages( SdDrawDocument
const * pRefDocument
= nullptr );
259 bool CreateMissingNotesAndHandoutPages();
261 SAL_DLLPRIVATE
void MovePage(sal_uInt16 nPgNum
, sal_uInt16 nNewPos
) override
;
262 SAL_DLLPRIVATE
void InsertPage(SdrPage
* pPage
, sal_uInt16 nPos
=0xFFFF) override
;
263 SAL_DLLPRIVATE
void DeletePage(sal_uInt16 nPgNum
) override
;
264 SAL_DLLPRIVATE SdrPage
* RemovePage(sal_uInt16 nPgNum
) override
;
266 SAL_DLLPRIVATE
virtual void InsertMasterPage(SdrPage
* pPage
, sal_uInt16 nPos
=0xFFFF) override
;
267 SAL_DLLPRIVATE
virtual SdrPage
* RemoveMasterPage(sal_uInt16 nPgNum
) override
;
269 SAL_DLLPRIVATE
void RemoveUnnecessaryMasterPages( SdPage
* pMaster
=nullptr, bool bOnlyDuplicatePages
=false, bool bUndo
=true );
270 void SetMasterPage(sal_uInt16 nSdPageNum
, const OUString
& rLayoutName
,
271 SdDrawDocument
* pSourceDoc
, bool bMaster
, bool bCheckMasters
);
273 SdDrawDocument
* OpenBookmarkDoc(const OUString
& rBookmarkFile
);
274 SAL_DLLPRIVATE SdDrawDocument
* OpenBookmarkDoc(SfxMedium
* pMedium
);
276 SAL_DLLPRIVATE
void InsertBookmark(const std::vector
<OUString
> &rBookmarkList
,
277 std::vector
<OUString
> &rExchangeList
, bool bLink
,
279 ::sd::DrawDocShell
* pBookmarkDocSh
,
280 Point
const * pObjPos
);
282 SAL_DLLPRIVATE
bool IsStartWithPresentation() const { return mbStartWithPresentation
;}
283 SAL_DLLPRIVATE
void SetStartWithPresentation( bool bStartWithPresentation
);
285 SAL_DLLPRIVATE
bool IsExitAfterPresenting() const { return mbExitAfterPresenting
;}
286 SAL_DLLPRIVATE
void SetExitAfterPresenting( bool bExitAfterPresenting
);
288 /// load xml-based impress layout definitions into document
289 SAL_DLLPRIVATE
void InitLayoutVector();
290 /// return reference to vector of Impress layout definitions
291 SAL_DLLPRIVATE
const std::vector
<css::uno::Reference
< css::xml::dom::XNode
> >& GetLayoutVector() const
292 { return maLayoutInfo
; }
294 /// load xml-based impress master presentation object definitions into document
295 SAL_DLLPRIVATE
void InitObjectVector();
296 /// return reference to vector of master presentation object definitions
297 SAL_DLLPRIVATE
const std::vector
<css::uno::Reference
<css::xml::dom::XNode
> >& GetObjectVector() const { return maPresObjectInfo
; }
298 /** Insert pages into this document
300 This method inserts whole pages into this document, either
301 selected ones (specified via pBookmarkList/pExchangeList), or
302 all from the source document.
304 @attention Beware! This method in its current state does not
305 handle all combinations of their input parameters
306 correctly. For example, for pBookmarkList=NULL, bReplace=true
307 is ignored (no replace happens).
310 A list of strings, denoting the names of the pages to be copied
313 A list of strings, denoting the names of the pages to be renamed
316 Whether the inserted pages should be linked to the bookmark document
319 Whether the pages should not be inserted, but replace the pages in
320 the destination document
323 Insertion point/start of replacement
326 Whether query dialogs are allowed (e.g. for page scaling)
328 @param pBookmarkDocSh
329 DocShell of the source document (used e.g. to extract the filename
333 Whether the source document should be treated as immutable (i.e.
334 inserted pages are not removed from it, but cloned)
336 @param bMergeMasterPages
337 Whether the source document's master pages should be copied, too.
339 @param bPreservePageNames
340 Whether the replace operation should take the name from the new
341 page, or preserve the old name
344 SAL_DLLPRIVATE
bool InsertBookmarkAsPage(const std::vector
<OUString
> &rBookmarkList
,
345 std::vector
<OUString
> *pExchangeList
,
346 bool bLink
, bool bReplace
, sal_uInt16 nPgPos
,
347 bool bNoDialogs
, ::sd::DrawDocShell
* pBookmarkDocSh
,
348 bool bCopy
, bool bMergeMasterPages
,
349 bool bPreservePageNames
);
351 SAL_DLLPRIVATE
bool InsertBookmarkAsObject(const std::vector
<OUString
> &rBookmarkList
,
352 const std::vector
<OUString
> &rExchangeList
,
353 ::sd::DrawDocShell
* pBookmarkDocSh
,
354 Point
const * pObjPos
, bool bCalcObjCount
);
356 void CloseBookmarkDoc();
358 SAL_DLLPRIVATE SdrObject
* GetObj(const OUString
& rObjName
) const;
360 /** Return the first page that has the given name. Regular pages and
361 notes pages are searched first. When not found then the master
364 Name of the page to return.
365 @param rbIsMasterPage
366 Is set by the method to indicate whether the returned index
367 belongs to a master page (<TRUE/>) or a regular or notes page
368 (<FALSE/>). The given value is ignored.
370 Returns the index of the page with the given name or
371 SDRPAGE_NOTFOUND (=0xffff) when such a page does not exist.
373 SAL_DLLPRIVATE sal_uInt16
GetPageByName(const OUString
& rPgName
, bool& rbIsMasterPage
) const;
374 /** checks, if the given name is a *unique* name for an *existing* slide
376 @param rPageName the name of an existing slide
378 @return true, if the name is unique and the slide exists
380 bool IsPageNameUnique( const OUString
& rPageName
) const;
381 SdPage
*GetSdPage(sal_uInt16 nPgNum
, PageKind ePgKind
) const;
382 sal_uInt16
GetSdPageCount(PageKind ePgKind
) const;
384 SAL_DLLPRIVATE
void SetSelected(SdPage
* pPage
, bool bSelect
);
385 SAL_DLLPRIVATE
void UnselectAllPages();
386 SAL_DLLPRIVATE
bool MovePages(sal_uInt16 nTargetPage
);
388 SdPage
*GetMasterSdPage(sal_uInt16 nPgNum
, PageKind ePgKind
);
389 sal_uInt16
GetMasterSdPageCount(PageKind ePgKind
) const;
391 sal_uInt16
GetActiveSdPageCount() const;
393 SAL_DLLPRIVATE sal_uInt16
GetMasterPageUserCount(SdrPage
const * pMaster
) const;
395 SAL_DLLPRIVATE
const sd::PresentationSettings
& getPresentationSettings() const { return maPresentationSettings
; }
396 SAL_DLLPRIVATE
sd::PresentationSettings
& getPresentationSettings() { return maPresentationSettings
; }
398 SAL_DLLPRIVATE
const css::uno::Reference
< css::presentation::XPresentation2
>& getPresentation() const;
400 SAL_DLLPRIVATE
void SetSummationOfParagraphs( bool bOn
= true ) { mbSummationOfParagraphs
= bOn
; }
401 SAL_DLLPRIVATE
bool IsSummationOfParagraphs() const { return mbSummationOfParagraphs
; }
403 /** Set the mode that controls whether (and later how) the formatting of the document
404 depends on the current printer metrics.
407 scope="css::document::PrinterIndependentLayout">ENABLED</const>
408 to make formatting printer-independent and <const
409 scope="css::document::PrinterIndependentLayout">DISABLED</const>
410 to make formatting depend on the current printer metrics.
412 SAL_DLLPRIVATE
void SetPrinterIndependentLayout (sal_Int32 nMode
);
414 /** Get the flag that controls whether the formatting of the document
415 depends on the current printer metrics.
418 scope="css::document::PrinterIndependentLayout">ENABLED</const>
419 when formatting is printer-independent and <const
420 scope="css::document::PrinterIndependentLayout">DISABLED</const>
421 when formatting depends on the current printer metrics.
423 SAL_DLLPRIVATE sal_Int32
GetPrinterIndependentLayout() const { return mnPrinterIndependentLayout
;}
425 SAL_DLLPRIVATE
void SetOnlineSpell( bool bIn
);
426 SAL_DLLPRIVATE
bool GetOnlineSpell() const { return mbOnlineSpell
; }
427 SAL_DLLPRIVATE
void StopOnlineSpelling();
428 SAL_DLLPRIVATE
void StartOnlineSpelling(bool bForceSpelling
=true);
430 SAL_DLLPRIVATE
void ImpOnlineSpellCallback(SpellCallbackInfo
const * pInfo
, SdrObject
* pObj
, SdrOutliner
const * pOutl
);
432 SAL_DLLPRIVATE
void InsertObject(SdrObject
* pObj
);
433 SAL_DLLPRIVATE
void RemoveObject(SdrObject
* pObj
);
435 SAL_DLLPRIVATE sal_uLong
GetLinkCount() const;
437 SAL_DLLPRIVATE
std::vector
<std::unique_ptr
<sd::FrameView
>>& GetFrameViewList() { return maFrameViewList
; }
438 SdCustomShowList
* GetCustomShowList(bool bCreate
= false);
440 SAL_DLLPRIVATE
void NbcSetChanged(bool bFlag
);
442 SAL_DLLPRIVATE
void SetTextDefaults() const;
444 SAL_DLLPRIVATE
void CreateLayoutTemplates();
445 SAL_DLLPRIVATE
void RenameLayoutTemplate(const OUString
& rOldLayoutName
, const OUString
& rNewName
);
447 SAL_DLLPRIVATE
void CreateDefaultCellStyles();
449 void StopWorkStartupDelay();
451 SAL_DLLPRIVATE
void NewOrLoadCompleted(DocCreationMode eMode
);
452 SAL_DLLPRIVATE
void NewOrLoadCompleted( SdPage
* pPage
, SdStyleSheetPool
* pSPool
);
453 SAL_DLLPRIVATE
bool IsNewOrLoadCompleted() const {return mbNewOrLoadCompleted
; }
455 SAL_DLLPRIVATE ::sd::FrameView
* GetFrameView(sal_uLong nPos
) {
456 return nPos
< maFrameViewList
.size() ? maFrameViewList
[nPos
].get() : nullptr; }
459 SAL_DLLPRIVATE
static SdAnimationInfo
* GetAnimationInfo(SdrObject
* pObject
);
461 static SdAnimationInfo
* GetShapeUserData(SdrObject
& rObject
, bool bCreate
= false );
463 SAL_DLLPRIVATE CharClass
* GetCharClass() const { return mpCharClass
.get(); }
465 SAL_DLLPRIVATE
void UpdateAllLinks();
467 SAL_DLLPRIVATE
void CheckMasterPages();
469 SAL_DLLPRIVATE
void Merge(SdrModel
& rSourceModel
,
470 sal_uInt16 nFirstPageNum
, sal_uInt16 nLastPageNum
,
472 bool bMergeMasterPages
, bool bAllMasterPages
,
473 bool bUndo
= true, bool bTreadSourceAsConst
= false) override
;
475 css::text::WritingMode
GetDefaultWritingMode() const;
476 SAL_DLLPRIVATE
void SetDefaultWritingMode( css::text::WritingMode eMode
);
478 /** replacespOldPage from all custom shows with pNewPage or removes pOldPage from
479 all custom shows if pNewPage is 0.
481 SAL_DLLPRIVATE
void ReplacePageInCustomShows( const SdPage
* pOldPage
, const SdPage
* pNewPage
);
485 /// static to prevent recursions while resolving links
486 SAL_DLLPRIVATE
static SdDrawDocument
* s_pDocLockedInsertingLinks
;
488 /** Create and insert a set of two new pages: a standard (draw) page and
489 the associated notes page. The new pages are inserted directly
490 after the specified page set.
492 This page is used to retrieve the layout for the page to
495 This specifies whether <argument>pCurrentPage</argument> is a
496 standard (draw) page or a notes page.
497 @param sStandardPageName
498 Name of the standard page. An empty string leads to using an
499 automatically created name.
500 @param sNotesPageName
501 Name of the standard page. An empty string leads to using an
502 automatically created name.
503 @param eStandardLayout
504 Layout to use for the new standard page. Note that this layout
505 is not used when the given <argument>pCurrentPage</argument> is
506 not a standard page. In this case the layout is taken from the
507 standard page associated with <argument>pCurrentPage</argument>.
509 Layout to use for the new notes page. Note that this layout
510 is not used when the given <argument>pCurrentPage</argument> is
511 not a notes page. In this case the layout is taken from the
512 notes page associated with <argument>pCurrentPage</argument>.
514 This flag indicates whether to show the background shape.
516 This flag indicates whether to show the shapes on the master page.
517 @param nInsertPosition
518 Position where to insert the standard page. When -1 then the
519 new page set is inserted after the current page.
522 Returns an index of the inserted pages that can be used with the
523 <member>GetSdPage()</member> method.
525 SAL_DLLPRIVATE sal_uInt16
CreatePage (
526 SdPage
* pCurrentPage
,
528 const OUString
& sStandardPageName
,
529 const OUString
& sNotesPageName
,
530 AutoLayout eStandardLayout
,
531 AutoLayout eNotesLayout
,
534 const sal_Int32 nInsertPosition
);
536 /** This method acts as a simplified front end for the more complex
537 <member>DuplicatePage()</member> method.
539 The page number as passed to the <member>GetSdPage()</member>
540 method for which the standard page and the notes page are to be
543 Returns an index of the inserted pages that can be used with the
544 <member>GetSdPage()</member> method.
546 SAL_DLLPRIVATE sal_uInt16
DuplicatePage (sal_uInt16 nPageNum
);
548 /** Create and insert a set of two new pages that are copies of the
549 given <argument>pCurrentPage</argument> and its associated notes
550 resp. standard page. The copies are inserted directly after the
553 This page and its associated notes/standard page is copied.
555 This specifies whether <argument>pCurrentPage</argument> is a
556 standard (draw) page or a notes page.
557 @param sStandardPageName
558 Name of the standard page. An empty string leads to using an
559 automatically created name.
560 @param sNotesPageName
561 Name of the standard page. An empty string leads to using an
562 automatically created name.
564 This flag indicates whether to show the background shape.
566 This flag indicates whether to show the shapes on the master page.
567 @param nInsertPosition
568 Position where to insert the standard page. When -1 then the
569 new page set is inserted after the current page.
572 Returns an index of the inserted pages that can be used with the
573 <member>GetSdPage()</member> method.
575 SAL_DLLPRIVATE sal_uInt16
DuplicatePage (
576 SdPage
* pCurrentPage
,
578 const OUString
& sStandardPageName
,
579 const OUString
& sNotesPageName
,
582 const sal_Int32 nInsertPosition
);
584 /** return the document fonts for latin, cjk and ctl according to the current
585 languages set at this document */
586 SAL_DLLPRIVATE
void getDefaultFonts( vcl::Font
& rLatinFont
, vcl::Font
& rCJKFont
, vcl::Font
& rCTLFont
);
588 sd::UndoManager
* GetUndoManager() const;
590 /** converts the given western font height to a corresponding ctl font height, depending on the system language */
591 SAL_DLLPRIVATE
static sal_uInt32
convertFontHeightToCTL( sal_uInt32 nWesternFontHeight
);
593 /** Get the style sheet pool if it was a SdStyleSheetPool.
595 SdStyleSheetPool
* GetSdStyleSheetPool() const;
597 SAL_DLLPRIVATE
void UpdatePageRelativeURLs(const OUString
& rOldName
, const OUString
& rNewName
);
599 SAL_DLLPRIVATE
static void SetCalcFieldValueHdl( ::Outliner
* pOutliner
);
601 SAL_DLLPRIVATE sal_uInt16
GetAnnotationAuthorIndex( const OUString
& rAuthor
);
603 SAL_DLLPRIVATE
bool IsEmbedFonts() const { return mbEmbedFonts
; }
604 SAL_DLLPRIVATE
bool IsEmbedUsedFontsOnly() const { return mbEmbedUsedFontsOnly
; }
605 SAL_DLLPRIVATE
bool IsEmbedFontScriptLatin() const { return mbEmbedFontScriptLatin
; }
606 SAL_DLLPRIVATE
bool IsEmbedFontScriptAsian() const { return mbEmbedFontScriptAsian
; }
607 SAL_DLLPRIVATE
bool IsEmbedFontScriptComplex() const { return mbEmbedFontScriptComplex
; }
609 SAL_DLLPRIVATE
void SetEmbedFonts(bool bUse
) { mbEmbedFonts
= bUse
; }
610 SAL_DLLPRIVATE
void SetEmbedUsedFontsOnly(bool bUse
) { mbEmbedUsedFontsOnly
= bUse
; }
611 SAL_DLLPRIVATE
void SetEmbedFontScriptLatin(bool bUse
) { mbEmbedFontScriptLatin
= bUse
; }
612 SAL_DLLPRIVATE
void SetEmbedFontScriptAsian(bool bUse
) { mbEmbedFontScriptAsian
= bUse
; }
613 SAL_DLLPRIVATE
void SetEmbedFontScriptComplex(bool bUse
) { mbEmbedFontScriptComplex
= bUse
; }
615 void dumpAsXml(xmlTextWriterPtr pWriter
) const override
;
618 /** This member stores the printer independent layout mode. Please
619 refer to <member>SetPrinterIndependentLayout()</member> for its
622 sal_Int32 mnPrinterIndependentLayout
;
624 /** Insert a given set of standard and notes page after the given <argument>pCurrentPage</argument>.
626 This page and its associated notes/standard page is copied.
628 This specifies whether <argument>pCurrentPage</argument> is a
629 standard (draw) page or a notes page.
630 @param sStandardPageName
631 Name of the standard page. An empty string leads to using an
632 automatically created name.
633 @param sNotesPageName
634 Name of the standard page. An empty string leads to using an
635 automatically created name.
637 This flag indicates whether to show the background shape.
639 This flag indicates whether to show the shapes on the master page.
641 The standard page to insert.
643 The notes page to insert.
644 @param nInsertPosition
645 Position where to insert the standard page. When -1 then the
646 new page set is inserted after the current page.
649 Returns an index of the inserted pages that can be used with the
650 <member>GetSdPage()</member> method.
652 SAL_DLLPRIVATE sal_uInt16
InsertPageSet (
653 SdPage
* pCurrentPage
,
655 const OUString
& sStandardPageName
,
656 const OUString
& sNotesPageName
,
659 SdPage
* pStandardPage
,
661 sal_Int32 nInsertPosition
);
663 /** Set up a newly created page and insert it into the list of pages.
665 A page to take the size and border geometry from.
667 This is the page to set up and insert.
669 The name of the new page.
670 @param nInsertionPoint
671 Index of the page before which the new page will be inserted.
673 This flag indicates whether to show the background shape.
675 This flag indicates whether to show the shapes on the master
678 SAL_DLLPRIVATE
void SetupNewPage (
679 SdPage
const * pPreviousPage
,
681 const OUString
& sPageName
,
682 sal_uInt16 nInsertionPoint
,
686 SAL_DLLPRIVATE
virtual void PageListChanged() override
;
687 SAL_DLLPRIVATE
virtual void MasterPageListChanged() override
;
693 /**an instance of this guard disables modification of a document
694 during its lifetime*/
698 ModifyGuard( SdDrawDocument
* pDoc
);
704 DrawDocShell
* mpDocShell
;
705 SdDrawDocument
* mpDoc
;
706 bool mbIsEnableSetModified
;
707 bool mbIsDocumentChanged
;
712 #endif // INCLUDED_SD_INC_DRAWDOC_HXX
714 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */