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 .
22 #include <com/sun/star/text/WritingMode.hpp>
23 #include <svl/style.hxx>
24 #include <svx/fmmodel.hxx>
25 #include <vcl/prntypes.hxx>
26 #include <xmloff/autolayout.hxx>
30 #include <string_view>
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
;
111 bool mbStartCustomShow
;
113 PresentationSettings();
118 class SD_DLLPUBLIC SdDrawDocument final
: public FmFormModel
121 SAL_DLLPRIVATE
void setDocAccTitle( const OUString
& rTitle
) { msDocAccTitle
= rTitle
; }
122 SAL_DLLPRIVATE
const OUString
& getDocAccTitle() const { return msDocAccTitle
; }
123 SAL_DLLPRIVATE
bool getDocReadOnly() const { return m_bReadOnly
; }
125 OUString msDocAccTitle
;
126 std::unique_ptr
<SdOutliner
>
127 mpOutliner
; ///< local outliner for outline mode
128 std::unique_ptr
<SdOutliner
>
129 mpInternalOutliner
; ///< internal outliner for creation of text objects
130 std::unique_ptr
<Timer
> mpWorkStartupTimer
;
131 std::unique_ptr
<Idle
>
132 mpOnlineSpellingIdle
;
133 std::unique_ptr
<sd::ShapeList
>
134 mpOnlineSpellingList
;
135 std::unique_ptr
<SvxSearchItem
>
137 std::vector
<std::unique_ptr
<sd::FrameView
>>
139 std::unique_ptr
<SdCustomShowList
> mpCustomShowList
;
140 ::sd::DrawDocShell
* mpDocSh
;
141 SdTransferable
* mpCreatingTransferable
;
142 bool mbHasOnlineSpellErrors
;
143 bool mbInitialOnlineSpellingEnabled
;
144 OUString maBookmarkFile
;
145 ::sd::DrawDocShellRef mxBookmarkDocShRef
;
147 sd::PresentationSettings maPresentationSettings
;
149 css::uno::Reference
< css::presentation::XPresentation2
> mxPresentation
;
151 bool mbNewOrLoadCompleted
;
154 bool mbSummationOfParagraphs
;
155 bool mbStartWithPresentation
; ///< is set to true when starting with command line parameter -start
156 bool mbExitAfterPresenting
; ///< true if mbStartWithPresentation AND Presentation was shown fully
157 LanguageType meLanguage
;
158 LanguageType meLanguageCJK
;
159 LanguageType meLanguageCTL
;
160 SvxNumType mePageNumType
;
161 ::sd::DrawDocShellRef mxAllocedDocShRef
; // => AllocModel()
162 bool mbAllocDocSh
; // => AllocModel()
163 DocumentType meDocType
;
164 std::unique_ptr
<CharClass
>
167 ::std::unique_ptr
<ImpDrawPageListWatcher
> mpDrawPageListWatcher
;
168 ::std::unique_ptr
<ImpMasterPageListWatcher
> mpMasterPageListWatcher
;
170 SAL_DLLPRIVATE
void UpdatePageObjectsInNotes(sal_uInt16 nStartPos
);
171 SAL_DLLPRIVATE
void UpdatePageRelativeURLs(SdPage
const * pPage
, sal_uInt16 nPos
, sal_Int32 nIncrement
);
172 SAL_DLLPRIVATE
void FillOnlineSpellingList(SdPage
const * pPage
);
173 SAL_DLLPRIVATE
void SpellObject(SdrTextObj
* pObj
);
175 DECL_DLLPRIVATE_LINK(WorkStartupHdl
, Timer
*, void);
176 DECL_DLLPRIVATE_LINK(OnlineSpellingHdl
, Timer
*, void);
177 DECL_DLLPRIVATE_LINK(OnlineSpellEventHdl
, EditStatus
&, void);
179 std::vector
< OUString
> maAnnotationAuthors
;
180 std::vector
<css::uno::Reference
< css::xml::dom::XNode
> > maLayoutInfo
;
182 std::vector
<css::uno::Reference
< css::xml::dom::XNode
> > maPresObjectInfo
;
184 bool mbEmbedFonts
: 1;
185 bool mbEmbedUsedFontsOnly
: 1;
186 bool mbEmbedFontScriptLatin
: 1;
187 bool mbEmbedFontScriptAsian
: 1;
188 bool mbEmbedFontScriptComplex
: 1;
190 SAL_DLLPRIVATE
virtual css::uno::Reference
< css::uno::XInterface
> createUnoModel() override
;
195 SAL_DLLPRIVATE
SdDrawDocument(DocumentType eType
, SfxObjectShell
* pDocSh
);
196 SAL_DLLPRIVATE
virtual ~SdDrawDocument() override
;
198 // Adapt to given Size and Borders scaling all contained data, maybe
199 // including PresObj's in higher derivations
200 virtual void adaptSizeAndBorderForAllPages(
201 const Size
& rNewSize
,
202 tools::Long nLeft
= 0,
203 tools::Long nRight
= 0,
204 tools::Long nUpper
= 0,
205 tools::Long nLower
= 0) override
;
207 // Adapt PageSize for all Pages of PageKind ePageKind. Also
208 // set Borders to left/right/upper/lower, ScaleAll, Orientation,
209 // PaperBin and BackgroundFullSize. Create Undo-Actions when
210 // a SdUndoGroup is given (then used from the View probably)
211 void AdaptPageSizeForAllPages(
212 const Size
& rNewSize
,
214 SdUndoGroup
* pUndoGroup
= nullptr,
215 tools::Long nLeft
= 0,
216 tools::Long nRight
= 0,
217 tools::Long nUpper
= 0,
218 tools::Long nLower
= 0,
219 bool bScaleAll
= false,
220 Orientation eOrientation
= Orientation::Landscape
,
221 sal_uInt16 nPaperBin
= 0,
222 bool bBackgroundFullSize
= false);
224 SAL_DLLPRIVATE SdDrawDocument
* AllocSdDrawDocument() const;
225 SAL_DLLPRIVATE
virtual SdrModel
* AllocModel() const override
; //forwards to AllocSdDrawDocument
227 SAL_DLLPRIVATE
rtl::Reference
<SdPage
> AllocSdPage(bool bMasterPage
);
228 SAL_DLLPRIVATE
virtual rtl::Reference
<SdrPage
> AllocPage(bool bMasterPage
) override
; //forwards to AllocSdPage
230 SAL_DLLPRIVATE
virtual bool IsReadOnly() const override
;
231 SAL_DLLPRIVATE
virtual void SetChanged(bool bFlag
= true) override
;
233 SAL_DLLPRIVATE SfxItemPool
& GetPool() { return( *m_pItemPool
); }
235 SAL_DLLPRIVATE SdOutliner
* GetOutliner(bool bCreateOutliner
=true);
236 SdOutliner
* GetInternalOutliner(bool bCreateOutliner
=true);
238 SAL_DLLPRIVATE ::sd::DrawDocShell
* GetDocSh() const { return mpDocSh
; }
240 SAL_DLLPRIVATE LanguageType
GetLanguage( const sal_uInt16 nId
) const;
241 SAL_DLLPRIVATE
void SetLanguage( const LanguageType eLang
, const sal_uInt16 nId
);
243 SAL_DLLPRIVATE SvxNumType
GetPageNumType() const override
;
244 SAL_DLLPRIVATE
void SetPageNumType(SvxNumType eType
) { mePageNumType
= eType
; }
245 OUString
CreatePageNumValue(sal_uInt16 nNum
) const;
247 SAL_DLLPRIVATE DocumentType
GetDocumentType() const { return meDocType
; }
249 SAL_DLLPRIVATE
void SetAllocDocSh(bool bAlloc
);
251 SAL_DLLPRIVATE
void CreatingDataObj( SdTransferable
* pTransferable
) { mpCreatingTransferable
= pTransferable
; }
252 SAL_DLLPRIVATE
virtual bool IsCreatingDataObj() const override
{ return mpCreatingTransferable
!= nullptr; }
254 /** if the document does not contain at least one handout, one slide and one notes page with
255 at least one master each this methods creates them.
256 If a reference document is given, the sizes and border settings of that document are used
257 for newly created slides.
259 void CreateFirstPages( SdDrawDocument
const * pRefDocument
= nullptr );
260 bool CreateMissingNotesAndHandoutPages();
262 SAL_DLLPRIVATE
void MovePage(sal_uInt16 nPgNum
, sal_uInt16 nNewPos
) override
;
263 SAL_DLLPRIVATE
void InsertPage(SdrPage
* pPage
, sal_uInt16 nPos
=0xFFFF) override
;
264 SAL_DLLPRIVATE
void DeletePage(sal_uInt16 nPgNum
) override
;
265 SAL_DLLPRIVATE
rtl::Reference
<SdrPage
> RemovePage(sal_uInt16 nPgNum
) override
;
267 SAL_DLLPRIVATE
virtual void InsertMasterPage(SdrPage
* pPage
, sal_uInt16 nPos
=0xFFFF) override
;
268 SAL_DLLPRIVATE
virtual rtl::Reference
<SdrPage
> RemoveMasterPage(sal_uInt16 nPgNum
) override
;
270 SAL_DLLPRIVATE
void RemoveUnnecessaryMasterPages( SdPage
* pMaster
=nullptr, bool bOnlyDuplicatePages
=false, bool bUndo
=true );
271 void SetMasterPage(sal_uInt16 nSdPageNum
, std::u16string_view rLayoutName
,
272 SdDrawDocument
* pSourceDoc
, bool bMaster
, bool bCheckMasters
);
274 SdDrawDocument
* OpenBookmarkDoc(const OUString
& rBookmarkFile
);
275 SAL_DLLPRIVATE SdDrawDocument
* OpenBookmarkDoc(SfxMedium
* pMedium
);
277 SAL_DLLPRIVATE
void InsertBookmark(const std::vector
<OUString
> &rBookmarkList
,
278 std::vector
<OUString
> &rExchangeList
, bool bLink
,
280 ::sd::DrawDocShell
* pBookmarkDocSh
,
281 Point
const * pObjPos
);
283 SAL_DLLPRIVATE
bool IsStartWithPresentation() const { return mbStartWithPresentation
;}
284 SAL_DLLPRIVATE
void SetStartWithPresentation( bool bStartWithPresentation
);
286 SAL_DLLPRIVATE
bool IsExitAfterPresenting() const { return mbExitAfterPresenting
;}
287 SAL_DLLPRIVATE
void SetExitAfterPresenting( bool bExitAfterPresenting
);
289 /// load xml-based impress layout definitions into document
290 SAL_DLLPRIVATE
void InitLayoutVector();
291 /// return reference to vector of Impress layout definitions
292 SAL_DLLPRIVATE
const std::vector
<css::uno::Reference
< css::xml::dom::XNode
> >& GetLayoutVector() const
293 { return maLayoutInfo
; }
295 /// load xml-based impress master presentation object definitions into document
296 SAL_DLLPRIVATE
void InitObjectVector();
297 /// return reference to vector of master presentation object definitions
298 SAL_DLLPRIVATE
const std::vector
<css::uno::Reference
<css::xml::dom::XNode
> >& GetObjectVector() const { return maPresObjectInfo
; }
299 /** Insert pages into this document
301 This method inserts whole pages into this document, either
302 selected ones (specified via pBookmarkList/pExchangeList), or
303 all from the source document.
305 @attention Beware! This method in its current state does not
306 handle all combinations of their input parameters
307 correctly. For example, for pBookmarkList=NULL, bReplace=true
308 is ignored (no replace happens).
311 A list of strings, denoting the names of the pages to be copied
314 A list of strings, denoting the names of the pages to be renamed
317 Whether the inserted pages should be linked to the bookmark document
320 Whether the pages should not be inserted, but replace the pages in
321 the destination document
324 Insertion point/start of replacement
327 Whether query dialogs are allowed (e.g. for page scaling)
329 @param pBookmarkDocSh
330 DocShell of the source document (used e.g. to extract the filename
334 Whether the source document should be treated as immutable (i.e.
335 inserted pages are not removed from it, but cloned)
337 @param bMergeMasterPages
338 Whether the source document's master pages should be copied, too.
340 @param bPreservePageNames
341 Whether the replace operation should take the name from the new
342 page, or preserve the old name
345 SAL_DLLPRIVATE
bool InsertBookmarkAsPage(const std::vector
<OUString
> &rBookmarkList
,
346 std::vector
<OUString
> *pExchangeList
,
347 bool bLink
, bool bReplace
, sal_uInt16 nPgPos
,
348 bool bNoDialogs
, ::sd::DrawDocShell
* pBookmarkDocSh
,
349 bool bCopy
, bool bMergeMasterPages
,
350 bool bPreservePageNames
);
352 SAL_DLLPRIVATE
bool InsertBookmarkAsObject(const std::vector
<OUString
> &rBookmarkList
,
353 const std::vector
<OUString
> &rExchangeList
,
354 ::sd::DrawDocShell
* pBookmarkDocSh
,
355 Point
const * pObjPos
, bool bCalcObjCount
);
357 void CloseBookmarkDoc();
359 SAL_DLLPRIVATE SdrObject
* GetObj(std::u16string_view rObjName
) const;
361 /** Return the first page that has the given name. Regular pages and
362 notes pages are searched first. When not found then the master
365 Name of the page to return.
366 @param rbIsMasterPage
367 Is set by the method to indicate whether the returned index
368 belongs to a master page (<TRUE/>) or a regular or notes page
369 (<FALSE/>). The given value is ignored.
371 Returns the index of the page with the given name or
372 SDRPAGE_NOTFOUND (=0xffff) when such a page does not exist.
374 SAL_DLLPRIVATE sal_uInt16
GetPageByName(std::u16string_view rPgName
, bool& rbIsMasterPage
) const;
375 /** checks, if the given name is a *unique* name for an *existing* slide
377 @param rPageName the name of an existing slide
379 @return true, if the name is unique and the slide exists
381 bool IsPageNameUnique( std::u16string_view rPageName
) const;
382 SdPage
*GetSdPage(sal_uInt16 nPgNum
, PageKind ePgKind
) const;
383 sal_uInt16
GetSdPageCount(PageKind ePgKind
) const;
385 SAL_DLLPRIVATE
void SetSelected(SdPage
* pPage
, bool bSelect
);
386 SAL_DLLPRIVATE
void UnselectAllPages();
387 SAL_DLLPRIVATE
bool MovePages(sal_uInt16 nTargetPage
);
389 SdPage
*GetMasterSdPage(sal_uInt16 nPgNum
, PageKind ePgKind
);
390 sal_uInt16
GetMasterSdPageCount(PageKind ePgKind
) const;
392 sal_uInt16
GetActiveSdPageCount() const;
394 SAL_DLLPRIVATE sal_uInt16
GetMasterPageUserCount(SdrPage
const * pMaster
) const;
396 SAL_DLLPRIVATE
const sd::PresentationSettings
& getPresentationSettings() const { return maPresentationSettings
; }
397 SAL_DLLPRIVATE
sd::PresentationSettings
& getPresentationSettings() { return maPresentationSettings
; }
399 SAL_DLLPRIVATE
const css::uno::Reference
< css::presentation::XPresentation2
>& getPresentation() const;
401 SAL_DLLPRIVATE
void SetSummationOfParagraphs( bool bOn
= true ) { mbSummationOfParagraphs
= bOn
; }
402 SAL_DLLPRIVATE
bool IsSummationOfParagraphs() const { return mbSummationOfParagraphs
; }
404 /** Set the mode that controls whether (and later how) the formatting of the document
405 depends on the current printer metrics.
408 scope="css::document::PrinterIndependentLayout">ENABLED</const>
409 to make formatting printer-independent and <const
410 scope="css::document::PrinterIndependentLayout">DISABLED</const>
411 to make formatting depend on the current printer metrics.
413 SAL_DLLPRIVATE
void SetPrinterIndependentLayout (sal_Int32 nMode
);
415 /** Get the flag that controls whether the formatting of the document
416 depends on the current printer metrics.
419 scope="css::document::PrinterIndependentLayout">ENABLED</const>
420 when formatting is printer-independent and <const
421 scope="css::document::PrinterIndependentLayout">DISABLED</const>
422 when formatting depends on the current printer metrics.
424 SAL_DLLPRIVATE sal_Int32
GetPrinterIndependentLayout() const { return mnPrinterIndependentLayout
;}
426 SAL_DLLPRIVATE
void SetOnlineSpell( bool bIn
);
427 SAL_DLLPRIVATE
bool GetOnlineSpell() const { return mbOnlineSpell
; }
428 SAL_DLLPRIVATE
void StopOnlineSpelling();
429 SAL_DLLPRIVATE
void StartOnlineSpelling(bool bForceSpelling
=true);
431 SAL_DLLPRIVATE
void ImpOnlineSpellCallback(SpellCallbackInfo
const * pInfo
, SdrObject
* pObj
, SdrOutliner
const * pOutl
);
433 SAL_DLLPRIVATE
void InsertObject(SdrObject
* pObj
);
434 SAL_DLLPRIVATE
void RemoveObject(SdrObject
* pObj
);
436 SAL_DLLPRIVATE sal_uLong
GetLinkCount() const;
438 SAL_DLLPRIVATE
std::vector
<std::unique_ptr
<sd::FrameView
>>& GetFrameViewList() { return maFrameViewList
; }
439 SdCustomShowList
* GetCustomShowList(bool bCreate
= false);
441 SAL_DLLPRIVATE
void NbcSetChanged(bool bFlag
);
443 SAL_DLLPRIVATE
void SetTextDefaults() const;
445 SAL_DLLPRIVATE
void CreateLayoutTemplates();
446 SAL_DLLPRIVATE
void RenameLayoutTemplate(const OUString
& rOldLayoutName
, const OUString
& rNewName
);
448 SAL_DLLPRIVATE
void CreateDefaultCellStyles();
450 void StopWorkStartupDelay();
452 SAL_DLLPRIVATE
void NewOrLoadCompleted(DocCreationMode eMode
);
453 SAL_DLLPRIVATE
void NewOrLoadCompleted( SdPage
* pPage
, SdStyleSheetPool
* pSPool
);
454 SAL_DLLPRIVATE
bool IsNewOrLoadCompleted() const {return mbNewOrLoadCompleted
; }
456 SAL_DLLPRIVATE ::sd::FrameView
* GetFrameView(sal_uLong nPos
) {
457 return nPos
< maFrameViewList
.size() ? maFrameViewList
[nPos
].get() : nullptr; }
460 SAL_DLLPRIVATE
static SdAnimationInfo
* GetAnimationInfo(SdrObject
* pObject
);
462 static SdAnimationInfo
* GetShapeUserData(SdrObject
& rObject
, bool bCreate
= false );
464 SAL_DLLPRIVATE CharClass
* GetCharClass() const { return mpCharClass
.get(); }
466 SAL_DLLPRIVATE
void UpdateAllLinks();
468 SAL_DLLPRIVATE
void CheckMasterPages();
470 SAL_DLLPRIVATE
void Merge(SdrModel
& rSourceModel
,
471 sal_uInt16 nFirstPageNum
, sal_uInt16 nLastPageNum
,
473 bool bMergeMasterPages
, bool bAllMasterPages
,
474 bool bUndo
= true, bool bTreadSourceAsConst
= false) override
;
476 css::text::WritingMode
GetDefaultWritingMode() const;
477 SAL_DLLPRIVATE
void SetDefaultWritingMode( css::text::WritingMode eMode
);
479 /** replacespOldPage from all custom shows with pNewPage or removes pOldPage from
480 all custom shows if pNewPage is 0.
482 SAL_DLLPRIVATE
void ReplacePageInCustomShows( const SdPage
* pOldPage
, const SdPage
* pNewPage
);
486 /// static to prevent recursions while resolving links
487 SAL_DLLPRIVATE
static SdDrawDocument
* s_pDocLockedInsertingLinks
;
489 /** Create and insert a set of two new pages: a standard (draw) page and
490 the associated notes page. The new pages are inserted directly
491 after the specified page set.
493 This page is used to retrieve the layout for the page to
496 This specifies whether <argument>pCurrentPage</argument> is a
497 standard (draw) page or a notes page.
498 @param sStandardPageName
499 Name of the standard page. An empty string leads to using an
500 automatically created name.
501 @param sNotesPageName
502 Name of the standard page. An empty string leads to using an
503 automatically created name.
504 @param eStandardLayout
505 Layout to use for the new standard page. Note that this layout
506 is not used when the given <argument>pCurrentPage</argument> is
507 not a standard page. In this case the layout is taken from the
508 standard page associated with <argument>pCurrentPage</argument>.
510 Layout to use for the new notes page. Note that this layout
511 is not used when the given <argument>pCurrentPage</argument> is
512 not a notes page. In this case the layout is taken from the
513 notes page associated with <argument>pCurrentPage</argument>.
515 This flag indicates whether to show the background shape.
517 This flag indicates whether to show the shapes on the master page.
518 @param nInsertPosition
519 Position where to insert the standard page. When -1 then the
520 new page set is inserted after the current page.
523 Returns an index of the inserted pages that can be used with the
524 <member>GetSdPage()</member> method.
526 SAL_DLLPRIVATE sal_uInt16
CreatePage (
527 SdPage
* pCurrentPage
,
529 const OUString
& sStandardPageName
,
530 const OUString
& sNotesPageName
,
531 AutoLayout eStandardLayout
,
532 AutoLayout eNotesLayout
,
535 const sal_Int32 nInsertPosition
);
537 /** This method acts as a simplified front end for the more complex
538 <member>DuplicatePage()</member> method.
540 The page number as passed to the <member>GetSdPage()</member>
541 method for which the standard page and the notes page are to be
544 Returns an index of the inserted pages that can be used with the
545 <member>GetSdPage()</member> method.
547 SAL_DLLPRIVATE sal_uInt16
DuplicatePage (sal_uInt16 nPageNum
);
549 /** Create and insert a set of two new pages that are copies of the
550 given <argument>pCurrentPage</argument> and its associated notes
551 resp. standard page. The copies are inserted directly after the
554 This page and its associated notes/standard page is copied.
556 This specifies whether <argument>pCurrentPage</argument> is a
557 standard (draw) page or a notes page.
558 @param sStandardPageName
559 Name of the standard page. An empty string leads to using an
560 automatically created name.
561 @param sNotesPageName
562 Name of the standard page. An empty string leads to using an
563 automatically created name.
565 This flag indicates whether to show the background shape.
567 This flag indicates whether to show the shapes on the master page.
568 @param nInsertPosition
569 Position where to insert the standard page. When -1 then the
570 new page set is inserted after the current page.
573 Returns an index of the inserted pages that can be used with the
574 <member>GetSdPage()</member> method.
576 SAL_DLLPRIVATE sal_uInt16
DuplicatePage (
577 SdPage
* pCurrentPage
,
579 const OUString
& sStandardPageName
,
580 const OUString
& sNotesPageName
,
583 const sal_Int32 nInsertPosition
);
585 /** return the document fonts for latin, cjk and ctl according to the current
586 languages set at this document */
587 SAL_DLLPRIVATE
void getDefaultFonts( vcl::Font
& rLatinFont
, vcl::Font
& rCJKFont
, vcl::Font
& rCTLFont
);
589 sd::UndoManager
* GetUndoManager() const;
591 /** converts the given western font height to a corresponding ctl font height, depending on the system language */
592 SAL_DLLPRIVATE
static sal_uInt32
convertFontHeightToCTL( sal_uInt32 nWesternFontHeight
);
594 /** Get the style sheet pool if it was a SdStyleSheetPool.
596 SdStyleSheetPool
* GetSdStyleSheetPool() const;
598 SAL_DLLPRIVATE
void UpdatePageRelativeURLs(
599 const OUString
& rOldName
, std::u16string_view rNewName
);
601 SAL_DLLPRIVATE
static void SetCalcFieldValueHdl( ::Outliner
* pOutliner
);
603 SAL_DLLPRIVATE sal_uInt16
GetAnnotationAuthorIndex( const OUString
& rAuthor
);
605 SAL_DLLPRIVATE
bool IsEmbedFonts() const { return mbEmbedFonts
; }
606 SAL_DLLPRIVATE
bool IsEmbedUsedFontsOnly() const { return mbEmbedUsedFontsOnly
; }
607 SAL_DLLPRIVATE
bool IsEmbedFontScriptLatin() const { return mbEmbedFontScriptLatin
; }
608 SAL_DLLPRIVATE
bool IsEmbedFontScriptAsian() const { return mbEmbedFontScriptAsian
; }
609 SAL_DLLPRIVATE
bool IsEmbedFontScriptComplex() const { return mbEmbedFontScriptComplex
; }
611 SAL_DLLPRIVATE
void SetEmbedFonts(bool bUse
) { mbEmbedFonts
= bUse
; }
612 SAL_DLLPRIVATE
void SetEmbedUsedFontsOnly(bool bUse
) { mbEmbedUsedFontsOnly
= bUse
; }
613 SAL_DLLPRIVATE
void SetEmbedFontScriptLatin(bool bUse
) { mbEmbedFontScriptLatin
= bUse
; }
614 SAL_DLLPRIVATE
void SetEmbedFontScriptAsian(bool bUse
) { mbEmbedFontScriptAsian
= bUse
; }
615 SAL_DLLPRIVATE
void SetEmbedFontScriptComplex(bool bUse
) { mbEmbedFontScriptComplex
= bUse
; }
617 void dumpAsXml(xmlTextWriterPtr pWriter
) const override
;
620 /** This member stores the printer independent layout mode. Please
621 refer to <member>SetPrinterIndependentLayout()</member> for its
624 sal_Int32 mnPrinterIndependentLayout
;
626 /** Insert a given set of standard and notes page after the given <argument>pCurrentPage</argument>.
628 This page and its associated notes/standard page is copied.
630 This specifies whether <argument>pCurrentPage</argument> is a
631 standard (draw) page or a notes page.
632 @param sStandardPageName
633 Name of the standard page. An empty string leads to using an
634 automatically created name.
635 @param sNotesPageName
636 Name of the standard page. An empty string leads to using an
637 automatically created name.
639 This flag indicates whether to show the background shape.
641 This flag indicates whether to show the shapes on the master page.
643 The standard page to insert.
645 The notes page to insert.
646 @param nInsertPosition
647 Position where to insert the standard page. When -1 then the
648 new page set is inserted after the current page.
651 Returns an index of the inserted pages that can be used with the
652 <member>GetSdPage()</member> method.
654 SAL_DLLPRIVATE sal_uInt16
InsertPageSet (
655 SdPage
* pCurrentPage
,
657 const OUString
& sStandardPageName
,
658 const OUString
& sNotesPageName
,
661 SdPage
* pStandardPage
,
663 sal_Int32 nInsertPosition
);
665 /** Set up a newly created page and insert it into the list of pages.
667 A page to take the size and border geometry from.
669 This is the page to set up and insert.
671 The name of the new page.
672 @param nInsertionPoint
673 Index of the page before which the new page will be inserted.
675 This flag indicates whether to show the background shape.
677 This flag indicates whether to show the shapes on the master
680 SAL_DLLPRIVATE
void SetupNewPage (
681 SdPage
const * pPreviousPage
,
683 const OUString
& sPageName
,
684 sal_uInt16 nInsertionPoint
,
688 SAL_DLLPRIVATE
virtual void PageListChanged() override
;
689 SAL_DLLPRIVATE
virtual void MasterPageListChanged() override
;
695 /**an instance of this guard disables modification of a document
696 during its lifetime*/
700 ModifyGuard( SdDrawDocument
* pDoc
);
706 DrawDocShell
* mpDocShell
;
707 SdDrawDocument
* mpDoc
;
708 bool mbIsEnableSetModified
;
709 bool mbIsDocumentChanged
;
714 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */