22#include <com/sun/star/text/WritingMode.hpp>
69#ifndef SV_DECL_DRAW_DOC_SHELL_DEFINED
70#define SV_DECL_DRAW_DOC_SHELL_DEFINED
123 SAL_DLLPRIVATE
void setDocAccTitle(
const OUString& rTitle ) { msDocAccTitle = rTitle; }
128 std::unique_ptr<SdOutliner>
130 std::unique_ptr<SdOutliner>
133 std::unique_ptr<Idle>
135 std::unique_ptr<sd::ShapeList>
137 std::unique_ptr<SvxSearchItem>
139 std::vector<std::unique_ptr<sd::FrameView>>
166 std::optional<CharClass>
172 SAL_DLLPRIVATE
void UpdatePageObjectsInNotes(sal_uInt16 nStartPos);
173 SAL_DLLPRIVATE
void UpdatePageRelativeURLs(
SdPage const * pPage, sal_uInt16 nPos, sal_Int32 nIncrement);
174 SAL_DLLPRIVATE
void FillOnlineSpellingList(
SdPage const * pPage);
175 SAL_DLLPRIVATE
void SpellObject(
SdrTextObj* pObj);
194 SAL_DLLPRIVATE
virtual css::uno::Reference< css::uno::XInterface >
createUnoModel()
override;
205 const Size& rNewSize,
215 void AdaptPageSizeForAllPages(
216 const Size& rNewSize,
223 bool bScaleAll =
false,
225 sal_uInt16 nPaperBin = 0,
226 bool bBackgroundFullSize =
false);
234 SAL_DLLPRIVATE
virtual bool IsReadOnly()
const override;
235 SAL_DLLPRIVATE
virtual void SetChanged(
bool bFlag =
true)
override;
239 SAL_DLLPRIVATE
SdOutliner* GetOutliner(
bool bCreateOutliner=
true);
240 SdOutliner* GetInternalOutliner(
bool bCreateOutliner=
true);
242 SAL_DLLPRIVATE ::sd::DrawDocShell*
GetDocSh()
const {
return mpDocSh; }
249 OUString CreatePageNumValue(sal_uInt16 nNum)
const;
253 SAL_DLLPRIVATE
void SetAllocDocSh(
bool bAlloc);
256 SAL_DLLPRIVATE
virtual bool IsCreatingDataObj()
const override {
return mpCreatingTransferable !=
nullptr; }
263 void CreateFirstPages(
SdDrawDocument const * pRefDocument =
nullptr );
264 bool CreateMissingNotesAndHandoutPages();
266 SAL_DLLPRIVATE
void MovePage(sal_uInt16 nPgNum, sal_uInt16 nNewPos)
override;
268 SAL_DLLPRIVATE
void DeletePage(sal_uInt16 nPgNum)
override;
274 SAL_DLLPRIVATE
void RemoveUnnecessaryMasterPages(
SdPage* pMaster=
nullptr,
bool bOnlyDuplicatePages=
false,
bool bUndo=
true );
275 void SetMasterPage(sal_uInt16 nSdPageNum, std::u16string_view rLayoutName,
281 SAL_DLLPRIVATE
void InsertBookmark(
const std::vector<OUString> &rBookmarkList,
282 std::vector<OUString> &rExchangeList,
bool bLink,
285 Point const * pObjPos);
288 SAL_DLLPRIVATE
void SetStartWithPresentation(
bool bStartWithPresentation );
291 SAL_DLLPRIVATE
void SetExitAfterPresenting(
bool bExitAfterPresenting );
294 SAL_DLLPRIVATE
void InitLayoutVector();
296 SAL_DLLPRIVATE
const std::vector<css::uno::Reference< css::xml::dom::XNode> >&
GetLayoutVector()
const
297 {
return maLayoutInfo; }
300 SAL_DLLPRIVATE
void InitObjectVector();
302 SAL_DLLPRIVATE
const std::vector<css::uno::Reference<css::xml::dom::XNode> >&
GetObjectVector()
const {
return maPresObjectInfo; }
349 SAL_DLLPRIVATE
bool InsertBookmarkAsPage(
const std::vector<OUString> &rBookmarkList,
350 std::vector<OUString> *pExchangeList,
351 bool bLink,
bool bReplace, sal_uInt16 nPgPos,
353 bool bCopy,
bool bMergeMasterPages,
354 bool bPreservePageNames);
356 SAL_DLLPRIVATE
bool InsertBookmarkAsObject(
const std::vector<OUString> &rBookmarkList,
357 const std::vector<OUString> &rExchangeList,
359 Point const * pObjPos,
bool bCalcObjCount);
361 void CloseBookmarkDoc();
363 SAL_DLLPRIVATE
SdrObject* GetObj(std::u16string_view rObjName)
const;
378 SAL_DLLPRIVATE sal_uInt16 GetPageByName(std::u16string_view rPgName,
bool& rbIsMasterPage )
const;
385 bool IsPageNameUnique( std::u16string_view rPageName )
const;
387 sal_uInt16 GetSdPageCount(
PageKind ePgKind)
const;
389 SAL_DLLPRIVATE
void SetSelected(
SdPage* pPage,
bool bSelect);
390 SAL_DLLPRIVATE
void UnselectAllPages();
391 SAL_DLLPRIVATE
bool MovePages(sal_uInt16 nTargetPage);
394 sal_uInt16 GetMasterSdPageCount(
PageKind ePgKind)
const;
396 sal_uInt16 GetActiveSdPageCount()
const;
398 SAL_DLLPRIVATE sal_uInt16 GetMasterPageUserCount(
SdrPage const * pMaster)
const;
403 SAL_DLLPRIVATE
const css::uno::Reference< css::presentation::XPresentation2 >& getPresentation()
const;
417 SAL_DLLPRIVATE
void SetPrinterIndependentLayout (sal_Int32 nMode);
430 SAL_DLLPRIVATE
void SetOnlineSpell(
bool bIn );
432 SAL_DLLPRIVATE
void StopOnlineSpelling();
433 SAL_DLLPRIVATE
void StartOnlineSpelling(
bool bForceSpelling=
true);
437 SAL_DLLPRIVATE
void InsertObject(
SdrObject* pObj);
438 SAL_DLLPRIVATE
void RemoveObject(
SdrObject* pObj);
440 SAL_DLLPRIVATE
sal_uLong GetLinkCount()
const;
442 SAL_DLLPRIVATE std::vector<std::unique_ptr<sd::FrameView>>&
GetFrameViewList() {
return maFrameViewList; }
445 SAL_DLLPRIVATE
void NbcSetChanged(
bool bFlag);
449 SAL_DLLPRIVATE
void CreateLayoutTemplates();
450 SAL_DLLPRIVATE
void RenameLayoutTemplate(
const OUString& rOldLayoutName,
const OUString& rNewName);
452 SAL_DLLPRIVATE
void CreateDefaultCellStyles();
454 void StopWorkStartupDelay();
461 return nPos < maFrameViewList.size() ? maFrameViewList[
nPos].get() :
nullptr; }
468 SAL_DLLPRIVATE
const std::optional<CharClass>&
GetCharClass()
const {
return moCharClass; }
470 SAL_DLLPRIVATE
void UpdateAllLinks();
472 SAL_DLLPRIVATE
void CheckMasterPages();
475 sal_uInt16 nFirstPageNum, sal_uInt16 nLastPageNum,
477 bool bMergeMasterPages,
bool bAllMasterPages,
478 bool bUndo =
true,
bool bTreadSourceAsConst =
false)
override;
480 css::text::WritingMode GetDefaultWritingMode()
const;
481 SAL_DLLPRIVATE
void SetDefaultWritingMode( css::text::WritingMode eMode );
486 SAL_DLLPRIVATE
void ReplacePageInCustomShows(
const SdPage* pOldPage,
const SdPage* pNewPage );
533 const OUString& sStandardPageName,
534 const OUString& sNotesPageName,
539 const sal_Int32 nInsertPosition);
551 SAL_DLLPRIVATE sal_uInt16 DuplicatePage (sal_uInt16 nPageNum);
580 SAL_DLLPRIVATE sal_uInt16 DuplicatePage (
583 const OUString& sStandardPageName,
584 const OUString& sNotesPageName,
587 const sal_Int32 nInsertPosition);
596 SAL_DLLPRIVATE
static sal_uInt32 convertFontHeightToCTL( sal_uInt32 nWesternFontHeight );
602 SAL_DLLPRIVATE
void UpdatePageRelativeURLs(
603 std::u16string_view aOldName, std::u16string_view aNewName);
605 SAL_DLLPRIVATE
static void SetCalcFieldValueHdl(
::Outliner* pOutliner);
607 SAL_DLLPRIVATE sal_uInt16 GetAnnotationAuthorIndex(
const OUString& rAuthor );
661 SAL_DLLPRIVATE sal_uInt16 InsertPageSet (
664 const OUString& sStandardPageName,
665 const OUString& sNotesPageName,
670 sal_Int32 nInsertPosition);
687 SAL_DLLPRIVATE
void SetupNewPage (
688 SdPage const * pPreviousPage,
690 const OUString& sPageName,
691 sal_uInt16 nInsertionPoint,
std::unique_ptr< SdOutliner > mpInternalOutliner
internal outliner for creation of text objects
bool mbEmbedFontScriptComplex
SAL_DLLPRIVATE bool IsEmbedFonts() const
bool mbEmbedFontScriptAsian
SAL_DLLPRIVATE void SetEmbedFontScriptComplex(bool bUse)
bool mbExitAfterPresenting
true if mbStartWithPresentation AND Presentation was shown fully
SdTransferable * mpCreatingTransferable
std::unique_ptr< SdCustomShowList > mpCustomShowList
SAL_DLLPRIVATE void SetEmbedFontScriptLatin(bool bUse)
SAL_DLLPRIVATE bool IsNewOrLoadCompleted() const
SAL_DLLPRIVATE void SetEmbedFonts(bool bUse)
sal_Int32 mnPrinterIndependentLayout
This member stores the printer independent layout mode.
SAL_DLLPRIVATE std::vector< std::unique_ptr< sd::FrameView > > & GetFrameViewList()
SAL_DLLPRIVATE const sd::PresentationSettings & getPresentationSettings() const
sal_Int32 mnImagePreferredDPI
bool mbEmbedUsedFontsOnly
std::unique_ptr< SvxSearchItem > mpOnlineSearchItem
css::uno::Reference< css::presentation::XPresentation2 > mxPresentation
SAL_DLLPRIVATE void setDocAccTitle(const OUString &rTitle)
SAL_DLLPRIVATE SfxItemPool & GetPool()
SAL_DLLPRIVATE bool GetOnlineSpell() const
SAL_DLLPRIVATE bool getDocReadOnly() const
LanguageType meLanguageCTL
SAL_DLLPRIVATE void SetSummationOfParagraphs(bool bOn=true)
std::vector< css::uno::Reference< css::xml::dom::XNode > > maLayoutInfo
bool mbNewOrLoadCompleted
SAL_DLLPRIVATE void SetPageNumType(SvxNumType eType)
SAL_DLLPRIVATE bool IsSummationOfParagraphs() const
DECL_DLLPRIVATE_LINK(OnlineSpellEventHdl, EditStatus &, void)
std::unique_ptr< Timer > mpWorkStartupTimer
::sd::DrawDocShell * mpDocSh
sd::PresentationSettings maPresentationSettings
SAL_DLLPRIVATE bool IsExitAfterPresenting() const
bool mbHasOnlineSpellErrors
std::unique_ptr< Idle > mpOnlineSpellingIdle
SAL_DLLPRIVATE bool IsEmbedFontScriptLatin() const
SAL_DLLPRIVATE const std::vector< css::uno::Reference< css::xml::dom::XNode > > & GetLayoutVector() const
return reference to vector of Impress layout definitions
SAL_DLLPRIVATE void CreatingDataObj(SdTransferable *pTransferable)
SAL_DLLPRIVATE void SetEmbedUsedFontsOnly(bool bUse)
void setImagePreferredDPI(sal_Int32 nValue)
::std::unique_ptr< ImpMasterPageListWatcher > mpMasterPageListWatcher
bool mbStartWithPresentation
is set to true when starting with command line parameter -start
::sd::DrawDocShellRef mxBookmarkDocShRef
std::vector< std::unique_ptr< sd::FrameView > > maFrameViewList
std::vector< css::uno::Reference< css::xml::dom::XNode > > maPresObjectInfo
DECL_DLLPRIVATE_LINK(OnlineSpellingHdl, Timer *, void)
SAL_DLLPRIVATE const OUString & getDocAccTitle() const
std::unique_ptr< sd::ShapeList > mpOnlineSpellingList
bool mbSummationOfParagraphs
static SAL_DLLPRIVATE SdDrawDocument * s_pDocLockedInsertingLinks
static to prevent recursions while resolving links
::std::unique_ptr< ImpDrawPageListWatcher > mpDrawPageListWatcher
::sd::DrawDocShellRef mxAllocedDocShRef
virtual SAL_DLLPRIVATE bool IsCreatingDataObj() const override
SAL_DLLPRIVATE const std::optional< CharClass > & GetCharClass() const
SAL_DLLPRIVATE bool IsEmbedFontScriptComplex() const
SAL_DLLPRIVATE bool IsEmbedUsedFontsOnly() const
std::optional< CharClass > moCharClass
LanguageType meLanguageCJK
bool mbInitialOnlineSpellingEnabled
SAL_DLLPRIVATE::sd::FrameView * GetFrameView(sal_uLong nPos)
DECL_DLLPRIVATE_LINK(WorkStartupHdl, Timer *, void)
SAL_DLLPRIVATE sal_Int32 GetPrinterIndependentLayout() const
Get the flag that controls whether the formatting of the document depends on the current printer metr...
SAL_DLLPRIVATE bool IsEmbedFontScriptAsian() const
std::vector< OUString > maAnnotationAuthors
SAL_DLLPRIVATE::sd::DrawDocShell * GetDocSh() const
SAL_DLLPRIVATE bool IsStartWithPresentation() const
SAL_DLLPRIVATE const std::vector< css::uno::Reference< css::xml::dom::XNode > > & GetObjectVector() const
return reference to vector of master presentation object definitions
bool mbEmbedFontScriptLatin
SAL_DLLPRIVATE void SetEmbedFontScriptAsian(bool bUse)
sal_Int32 getImagePreferredDPI() const override
std::unique_ptr< SdOutliner > mpOutliner
local outliner for outline mode
SAL_DLLPRIVATE sd::PresentationSettings & getPresentationSettings()
SAL_DLLPRIVATE DocumentType GetDocumentType() const
The main purpose of this class is searching and replacing as well as spelling of impress documents.
virtual SvxNumType GetPageNumType() const
virtual void adaptSizeAndBorderForAllPages(const Size &rNewSize, tools::Long nLeft=0, tools::Long nRight=0, tools::Long nUpper=0, tools::Long nLower=0)
virtual void SetChanged(bool bFlg=true)
virtual void Merge(SdrModel &rSourceModel, sal_uInt16 nFirstPageNum, sal_uInt16 nLastPageNum, sal_uInt16 nDestPos, bool bMergeMasterPages, bool bAllMasterPages, bool bUndo=true, bool bTreadSourceAsConst=false)
virtual void MasterPageListChanged()
virtual void MovePage(sal_uInt16 nPgNum, sal_uInt16 nNewPos)
virtual css::uno::Reference< css::uno::XInterface > createUnoModel()
virtual bool IsReadOnly() const
void SetTextDefaults() const
virtual void DeletePage(sal_uInt16 nPgNum)
virtual void PageListChanged()
virtual SdrModel * AllocModel() const
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const
an instance of this guard disables modification of a document during its lifetime
bool mbIsEnableSetModified
ModifyGuard(SdDrawDocument *pDoc)
DrawDocShell * mpDocShell
struct _xmlTextWriter * xmlTextWriterPtr
std::unique_ptr< IconChoicePage >(* CreatePage)(weld::Container *pParent, SvxHpLinkDlg *pDlg, const SfxItemSet *pAttrSet)
void SetLanguage(SwWrtShell &rWrtSh, std::u16string_view rLangText, bool bIsForSelection, SfxItemSet &rCoreSet)
LanguageType GetLanguage(SfxItemSet const &aSet, sal_uInt16 nLangWhichId)
::tools::SvRef< DrawDocShell > DrawDocShellRef
SfxStyleFamily nNewFamily