LCOV - code coverage report
Current view: top level - sd/inc - drawdoc.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 21 26 80.8 %
Date: 2014-04-11 Functions: 21 27 77.8 %
Legend: Lines: hit not hit

          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 INCLUDED_SD_INC_DRAWDOC_HXX
      21             : #define INCLUDED_SD_INC_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             : #include <com/sun/star/xml/dom/XNode.hpp>
      34             : 
      35             : #include <svx/svdundo.hxx>
      36             : 
      37             : #include <vector>
      38             : #include <memory>
      39             : 
      40             : #include "sddllapi.h"
      41             : #include "sdpage.hxx"
      42             : 
      43             : namespace com
      44             : {
      45             :     namespace sun
      46             :     {
      47             :         namespace star
      48             :         {
      49             :             namespace presentation
      50             :             {
      51             :                 class XPresentation2;
      52             :             }
      53             :         }
      54             :     }
      55             : }
      56             : 
      57             : namespace sd
      58             : {
      59             :     class FrameView;
      60             :     class Outliner;
      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             : class DrawDocShell;
      85             : #ifndef SV_DECL_DRAW_DOC_SHELL_DEFINED
      86             : #define SV_DECL_DRAW_DOC_SHELL_DEFINED
      87             : typedef ::tools::SvRef<DrawDocShell> DrawDocShellRef;
      88             : #endif
      89             : class UndoManager;
      90             : class ShapeList;
      91             : class FrameView;
      92             : }
      93             : 
      94             : class ImpDrawPageListWatcher;
      95             : class ImpMasterPageListWatcher;
      96             : 
      97        2666 : struct StyleReplaceData
      98             : {
      99             :     SfxStyleFamily  nFamily;
     100             :     SfxStyleFamily  nNewFamily;
     101             :     OUString        aName;
     102             :     OUString        aNewName;
     103             : };
     104             : 
     105             : enum DocCreationMode
     106             : {
     107             :     NEW_DOC,
     108             :     DOC_LOADED
     109             : };
     110             : 
     111             : namespace sd
     112             : {
     113         111 :     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             : // SdDrawDocument
     136             : class SdDrawDocument : public FmFormModel
     137             : {
     138             : private:
     139             :     OUString msDocAccTitle;
     140             : public:
     141          20 :     virtual void setDocAccTitle( const OUString& rTitle ) { msDocAccTitle = rTitle; }
     142          14 :     virtual const OUString getDocAccTitle() const { return msDocAccTitle; }
     143             : private:
     144             :     sal_Bool bReadOnly;
     145             : public:
     146           0 :     virtual void setDocReadOnly( sal_Bool b){ bReadOnly = b; }
     147          14 :     virtual sal_Bool getDocReadOnly() const { return bReadOnly; }
     148             : private:
     149             :     ::sd::Outliner*     mpOutliner;          ///< local outliner for outline mode
     150             :     ::sd::Outliner*     mpInternalOutliner;  ///< internal outliner for creation of text objects
     151             :     Timer*              mpWorkStartupTimer;
     152             :     Timer*              mpOnlineSpellingTimer;
     153             :     sd::ShapeList*      mpOnlineSpellingList;
     154             :     SvxSearchItem*      mpOnlineSearchItem;
     155             :     std::vector<sd::FrameView*> maFrameViewList;
     156             :     SdCustomShowList*   mpCustomShowList;
     157             :     ::sd::DrawDocShell* mpDocSh;
     158             :     SdTransferable *    mpCreatingTransferable;
     159             :     bool                mbHasOnlineSpellErrors;
     160             :     bool                mbInitialOnlineSpellingEnabled;
     161             :     OUString            maBookmarkFile;
     162             :     ::sd::DrawDocShellRef   mxBookmarkDocShRef;
     163             : 
     164             :     sd::PresentationSettings maPresentationSettings;
     165             : 
     166             :     ::com::sun::star::uno::Reference< ::com::sun::star::presentation::XPresentation2 > mxPresentation;
     167             : 
     168             :     bool                mbNewOrLoadCompleted;
     169             : 
     170             :     sal_Bool                mbOnlineSpell;
     171             :     sal_Bool                mbSummationOfParagraphs;
     172             :     bool                mbStartWithPresentation;        ///< is set to true when starting with command line parameter -start
     173             :     bool                mbExitAfterPresenting;         ///< true if mbStartWithPresentation AND Presentation was shown fully
     174             :     LanguageType        meLanguage;
     175             :     LanguageType        meLanguageCJK;
     176             :     LanguageType        meLanguageCTL;
     177             :     SvxNumType          mePageNumType;
     178             :     ::sd::DrawDocShellRef   mxAllocedDocShRef;   // => AllocModel()
     179             :     bool                mbAllocDocSh;       // => AllocModel()
     180             :     DocumentType        meDocType;
     181             :     CharClass*          mpCharClass;
     182             :     ::com::sun::star::lang::Locale* mpLocale;
     183             : 
     184             :     ::std::auto_ptr<ImpDrawPageListWatcher> mpDrawPageListWatcher;
     185             :     ::std::auto_ptr<ImpMasterPageListWatcher> mpMasterPageListWatcher;
     186             : 
     187             :     void                UpdatePageObjectsInNotes(sal_uInt16 nStartPos);
     188             :     void                UpdatePageRelativeURLs(SdPage* pPage, sal_uInt16 nPos, sal_Int32 nIncrement);
     189             :     void                FillOnlineSpellingList(SdPage* pPage);
     190             :     void                SpellObject(SdrTextObj* pObj);
     191             : 
     192             :                         DECL_LINK(WorkStartupHdl, void *);
     193             :                         DECL_LINK(OnlineSpellingHdl, void *);
     194             :                         DECL_LINK(OnlineSpellEventHdl, EditStatus*);
     195             : 
     196             :     std::vector< OUString > maAnnotationAuthors;
     197             :     std::vector<com::sun::star::uno::Reference<
     198             :         com::sun::star::xml::dom::XNode> > maLayoutInfo;
     199             : 
     200             :     std::vector<com::sun::star::uno::Reference<
     201             :         com::sun::star::xml::dom::XNode> > maPresObjectInfo;
     202             : 
     203             :     bool                mbUseEmbedFonts;
     204             : 
     205             : protected:
     206             : 
     207             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoModel() SAL_OVERRIDE;
     208             : 
     209             : public:
     210             : 
     211             :                         TYPEINFO_OVERRIDE();
     212             : 
     213             :                         SdDrawDocument(DocumentType eType, SfxObjectShell* pDocSh);
     214             :                         virtual ~SdDrawDocument();
     215             : 
     216             :     virtual SdrModel*   AllocModel() const SAL_OVERRIDE;
     217             :     virtual SdrPage*    AllocPage(bool bMasterPage) SAL_OVERRIDE;
     218             :     virtual bool        IsReadOnly() const SAL_OVERRIDE;
     219             :     virtual void        SetChanged(bool bFlag = true) SAL_OVERRIDE;
     220             : 
     221        4080 :     SfxItemPool&        GetPool() { return( *pItemPool ); }
     222             : 
     223             :     ::sd::Outliner* GetOutliner(sal_Bool bCreateOutliner=sal_True);
     224             :     SD_DLLPUBLIC ::sd::Outliner* GetInternalOutliner(sal_Bool bCreateOutliner=sal_True);
     225             : 
     226        6985 :     ::sd::DrawDocShell*     GetDocSh() const { return mpDocSh; }
     227             : 
     228             :     LanguageType        GetLanguage( const sal_uInt16 nId ) const;
     229             :     void                SetLanguage( const LanguageType eLang, const sal_uInt16 nId );
     230             : 
     231             :     SvxNumType          GetPageNumType() const SAL_OVERRIDE;
     232          14 :     void                SetPageNumType(SvxNumType eType) { mePageNumType = eType; }
     233             :     SD_DLLPUBLIC OUString CreatePageNumValue(sal_uInt16 nNum) const;
     234             : 
     235        4147 :     DocumentType        GetDocumentType() const { return meDocType; }
     236             : 
     237             :     void                SetAllocDocSh(bool bAlloc);
     238             : 
     239           0 :     void                CreatingDataObj( SdTransferable* pTransferable ) { mpCreatingTransferable = pTransferable; }
     240             : 
     241             :     /** if the document does not contain at least one handout, one slide and one notes page with
     242             :         at least one master each this methods creates them.
     243             :         If a reference document is given, the sizes and border settings of that document are used
     244             :         for newly created slides.
     245             :     */
     246             :     SD_DLLPUBLIC void   CreateFirstPages( SdDrawDocument* pRefDocument = 0 );
     247             :     SD_DLLPUBLIC sal_Bool                CreateMissingNotesAndHandoutPages();
     248             : 
     249             :     void                MovePage(sal_uInt16 nPgNum, sal_uInt16 nNewPos) SAL_OVERRIDE;
     250             :     void                InsertPage(SdrPage* pPage, sal_uInt16 nPos=0xFFFF) SAL_OVERRIDE;
     251             :     void                DeletePage(sal_uInt16 nPgNum) SAL_OVERRIDE;
     252             :     SdrPage*            RemovePage(sal_uInt16 nPgNum) SAL_OVERRIDE;
     253             : 
     254             :     virtual void     InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos=0xFFFF) SAL_OVERRIDE;
     255             :     virtual SdrPage* RemoveMasterPage(sal_uInt16 nPgNum) SAL_OVERRIDE;
     256             : 
     257             :     void                RemoveUnnecessaryMasterPages( SdPage* pMaster=NULL, sal_Bool bOnlyDuplicatePages=sal_False, sal_Bool bUndo=sal_True );
     258             :     SD_DLLPUBLIC void   SetMasterPage(sal_uInt16 nSdPageNum, const OUString& rLayoutName,
     259             :                                       SdDrawDocument* pSourceDoc, sal_Bool bMaster, sal_Bool bCheckMasters);
     260             : 
     261             :     SD_DLLPUBLIC SdDrawDocument* OpenBookmarkDoc(const OUString& rBookmarkFile);
     262             :     SdDrawDocument*     OpenBookmarkDoc(SfxMedium& rMedium);
     263             : 
     264             :     sal_Bool InsertBookmark(const std::vector<OUString> &rBookmarkList,
     265             :                             std::vector<OUString> &rExchangeList, sal_Bool bLink,
     266             :                             sal_Bool bReplace, sal_uInt16 nPgPos, sal_Bool bNoDialogs,
     267             :                             ::sd::DrawDocShell* pBookmarkDocSh, sal_Bool bCopy,
     268             :                             Point* pObjPos);
     269             : 
     270             :     bool IsStartWithPresentation() const;
     271             :     void SetStartWithPresentation( bool bStartWithPresentation );
     272             : 
     273             :     bool IsExitAfterPresenting() const;
     274             :     void SetExitAfterPresenting( bool bExitAfterPresenting );
     275             : 
     276             :     /// load xml-based impress layout definitions into document
     277             :     void InitLayoutVector();
     278             :     /// return reference to vector of Impress layout definitions
     279             :     const std::vector<com::sun::star::uno::Reference<
     280         400 :         com::sun::star::xml::dom::XNode> >& GetLayoutVector() const
     281         400 :     { return maLayoutInfo; }
     282             : 
     283             :    /// load xml-based impress master presentation object definitions into document
     284             :     void InitObjectVector();
     285             :     /// return reference to vector of master presentation object definitions
     286        1316 :     const std::vector<com::sun::star::uno::Reference<com::sun::star::xml::dom::XNode> >& GetObjectVector() const { return maPresObjectInfo; }
     287             :     /** Insert pages into this document
     288             : 
     289             :         This method inserts whole pages into this document, either
     290             :         selected ones (specified via pBookmarkList/pExchangeList), or
     291             :         all from the source document.
     292             : 
     293             :         @attention Beware! This method in its current state does not
     294             :         handle all combinations of their input parameters
     295             :         correctly. For example, for pBookmarkList=NULL, bReplace=sal_True
     296             :         is ignored (no replace happens).
     297             : 
     298             :         @param pBookmarkList
     299             :         A list of strings, denoting the names of the pages to be copied
     300             : 
     301             :         @param pExchangeList
     302             :         A list of strings, denoting the names of the pages to be renamed
     303             : 
     304             :         @param bLink
     305             :         Whether the inserted pages should be links to the bookmark document
     306             : 
     307             :         @param bReplace
     308             :         Whether the pages should not be inserted, but replace the pages in
     309             :         the destination document
     310             : 
     311             :         @param nPgPos
     312             :         Insertion point/start of replacement
     313             : 
     314             :         @param bNoDialogs
     315             :         Whether query dialogs are allowed (e.g. for page scaling)
     316             : 
     317             :         @param pBookmarkDocSh
     318             :         DocShell of the source document (used e.g. to extract the filename
     319             :         for linked pages)
     320             : 
     321             :         @param bCopy
     322             :         Whether the source document should be treated as immutable (i.e.
     323             :         inserted pages are not removed from it, but cloned)
     324             : 
     325             :         @param bMergeMasterPages
     326             :         Whether the source document's master pages should be copied, too.
     327             : 
     328             :         @param bPreservePageNames
     329             :         Whether the replace operation should take the name from the new
     330             :         page, or preserve the old name
     331             :      */
     332             : 
     333             :     sal_Bool InsertBookmarkAsPage(const std::vector<OUString> &rBookmarkList,
     334             :                                   std::vector<OUString> *pExchangeList,
     335             :                               sal_Bool bLink, sal_Bool bReplace, sal_uInt16 nPgPos,
     336             :                               sal_Bool bNoDialogs, ::sd::DrawDocShell* pBookmarkDocSh,
     337             :                               sal_Bool bCopy, sal_Bool bMergeMasterPages,
     338             :                               sal_Bool bPreservePageNames);
     339             : 
     340             :     sal_Bool InsertBookmarkAsObject(const std::vector<OUString> &rBookmarkList,
     341             :                                     const std::vector<OUString> &rExchangeList,
     342             :                                     sal_Bool bLink, ::sd::DrawDocShell* pBookmarkDocSh,
     343             :                                     Point* pObjPos, bool bCalcObjCount = false);
     344             : 
     345             :     SD_DLLPUBLIC void   CloseBookmarkDoc();
     346             : 
     347             :     SdrObject*          GetObj(const OUString& rObjName) const;
     348             : 
     349             :     /** Return the first page that has the given name.  Regular pages and
     350             :         notes pages are searched first.  When not found then the master
     351             :         pages are searched.
     352             :         @param rPgName
     353             :             Name of the page to return.
     354             :         @param rbIsMasterPage
     355             :             Is set by the method to indicate whether the returned index
     356             :             belongs to a master page (<TRUE/>) or a regular or notes page
     357             :             (<FALSE/>). The given value is ignored.
     358             :         @return
     359             :             Returns the index of the page with the given name or
     360             :             SDRPAGE_NOTFOUND (=0xffff) when such a page does not exist.
     361             :     */
     362             :     sal_uInt16 GetPageByName(const OUString& rPgName, sal_Bool& rbIsMasterPage ) const;
     363             :     SD_DLLPUBLIC SdPage*GetSdPage(sal_uInt16 nPgNum, PageKind ePgKind) const;
     364             :     SD_DLLPUBLIC sal_uInt16 GetSdPageCount(PageKind ePgKind) const;
     365             : 
     366             :     void                SetSelected(SdPage* pPage, sal_Bool bSelect);
     367             :     sal_Bool                MovePages(sal_uInt16 nTargetPage);
     368             : 
     369             :     SD_DLLPUBLIC SdPage*GetMasterSdPage(sal_uInt16 nPgNum, PageKind ePgKind);
     370             :     SD_DLLPUBLIC sal_uInt16 GetMasterSdPageCount(PageKind ePgKind) const;
     371             : 
     372             :     SD_DLLPUBLIC sal_uInt16 GetActiveSdPageCount() const;
     373             : 
     374             :     sal_uInt16              GetMasterPageUserCount(SdrPage* pMaster) const;
     375             : 
     376           0 :     const sd::PresentationSettings& getPresentationSettings() const { return maPresentationSettings; }
     377          66 :     sd::PresentationSettings& getPresentationSettings() { return maPresentationSettings; }
     378             : 
     379             :     const ::com::sun::star::uno::Reference< ::com::sun::star::presentation::XPresentation2 >& getPresentation() const;
     380             : 
     381         178 :        void                SetSummationOfParagraphs( sal_Bool bOn = sal_True ) { mbSummationOfParagraphs = bOn; }
     382          22 :     sal_Bool            IsSummationOfParagraphs() const { return mbSummationOfParagraphs; }
     383             : 
     384             :     /** Set the mode that controls whether (and later how) the formatting of the document
     385             :         depends on the current printer metrics.
     386             :         @param nMode
     387             :             Use <const
     388             :             scope="com::sun::star::document::PrinterIndependentLayout">ENABLED</const>
     389             :             to make formatting printer-independent and <const
     390             :             scope="com::sun::star::document::PrinterIndependentLayout">DISABLED</const>
     391             :             to make formatting depend on the current printer metrics.
     392             :     */
     393             :     void SetPrinterIndependentLayout (sal_Int32 nMode);
     394             : 
     395             :     /** Get the flag that controls whether the formatting of the document
     396             :         depends on the current printer metrics.
     397             :         @return
     398             :             Use <const
     399             :             scope="com::sun::star::document::PrinterIndependentLayout">ENABLED</const>
     400             :             when formatting is printer-independent and <const
     401             :             scope="com::sun::star::document::PrinterIndependentLayout">DISABLED</const>
     402             :             when formatting depends on the current printer metrics.
     403             :     */
     404             :     sal_Int32 GetPrinterIndependentLayout (void);
     405             : 
     406             :     void                SetOnlineSpell( sal_Bool bIn );
     407        2922 :     sal_Bool                GetOnlineSpell() const { return mbOnlineSpell; }
     408             :     void                StopOnlineSpelling();
     409             :     void                StartOnlineSpelling(sal_Bool bForceSpelling=sal_True);
     410             : 
     411             :     void                ImpOnlineSpellCallback(SpellCallbackInfo* pInfo, SdrObject* pObj, SdrOutliner* pOutl);
     412             : 
     413             :     void                InsertObject(SdrObject* pObj, SdPage* pPage);
     414             :     void                RemoveObject(SdrObject* pObj, SdPage* pPage);
     415             : 
     416             :     sal_uLong               GetLinkCount();
     417             : 
     418         348 :     std::vector<sd::FrameView*>& GetFrameViewList() { return maFrameViewList; }
     419             :     SD_DLLPUBLIC SdCustomShowList* GetCustomShowList(sal_Bool bCreate = sal_False);
     420             : 
     421             :     void                NbcSetChanged(sal_Bool bFlag = sal_True);
     422             : 
     423             :     void                SetTextDefaults() const;
     424             : 
     425             :     void                CreateLayoutTemplates();
     426             :     void                RenameLayoutTemplate(const OUString& rOldLayoutName, const OUString& rNewName);
     427             : 
     428             :     void                CreateDefaultCellStyles();
     429             : 
     430             :     SD_DLLPUBLIC void   StopWorkStartupDelay();
     431             : 
     432             :     void                NewOrLoadCompleted(DocCreationMode eMode);
     433             :     void                NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool );
     434           0 :     bool                IsNewOrLoadCompleted() const {return mbNewOrLoadCompleted; }
     435             : 
     436         164 :     ::sd::FrameView* GetFrameView(sal_uLong nPos) {
     437         164 :         return nPos < maFrameViewList.size() ? maFrameViewList[nPos] : NULL; }
     438             : 
     439             :     /** deprecated*/
     440             :     SdAnimationInfo*    GetAnimationInfo(SdrObject* pObject) const;
     441             : 
     442             :     SD_DLLPUBLIC static     SdAnimationInfo* GetShapeUserData(SdrObject& rObject, bool bCreate = false );
     443             : 
     444             :     SdIMapInfo*         GetIMapInfo( SdrObject* pObject ) const;
     445             :     IMapObject*         GetHitIMapObject( SdrObject* pObject, const Point& rWinPoint, const ::Window& rCmpWnd );
     446             : 
     447           0 :     CharClass*          GetCharClass() const { return mpCharClass; }
     448             : 
     449             :     void                RestoreLayerNames();
     450             : 
     451             :     void                UpdateAllLinks();
     452             : 
     453             :     void                CheckMasterPages();
     454             : 
     455             :     void                Merge(SdrModel& rSourceModel,
     456             :                                 sal_uInt16 nFirstPageNum=0, sal_uInt16 nLastPageNum=0xFFFF,
     457             :                                 sal_uInt16 nDestPos=0xFFFF,
     458             :                                 bool bMergeMasterPages = false, bool bAllMasterPages = false,
     459             :                                 bool bUndo = true, bool bTreadSourceAsConst = false) SAL_OVERRIDE;
     460             : 
     461             :     SD_DLLPUBLIC ::com::sun::star::text::WritingMode GetDefaultWritingMode() const;
     462             :     void SetDefaultWritingMode( ::com::sun::star::text::WritingMode eMode );
     463             : 
     464             :     /** replacespOldPage from all custom shows with pNewPage or removes pOldPage from
     465             :         all custom shows if pNewPage is 0.
     466             :     */
     467             :     void ReplacePageInCustomShows( const SdPage* pOldPage, const SdPage* pNewPage );
     468             : 
     469             : public:
     470             : 
     471             :     static SdDrawDocument* pDocLockedInsertingLinks;  // static to prevent recursions while resolving links
     472             : 
     473             :     /** Create and insert a set of two new pages: a standard (draw) page and
     474             :         the associated notes page.  The new pages are inserted direclty
     475             :         after the specified page set.
     476             :         @param pCurrentPage
     477             :             This page is used to retrieve the layout for the page to
     478             :             create.
     479             :         @param ePageKind
     480             :             This specifies whether <argument>pCurrentPage</argument> is a
     481             :             standard (draw) page or a notes page.
     482             :         @param sStandardPageName
     483             :             Name of the standard page.  An empty string leads to using an
     484             :             automatically created name.
     485             :         @param sNotesPageName
     486             :             Name of the standard page.  An empty string leads to using an
     487             :             automatically created name.
     488             :         @param eStandardLayout
     489             :             Layout to use for the new standard page.  Note that this layout
     490             :             is not used when the given <argument>pCurrentPage</argument> is
     491             :             not a standard page.  In this case the layout is taken from the
     492             :             standard page associated with <argument>pCurrentPage</argument>.
     493             :         @param eNotesLayout
     494             :             Layout to use for the new notes page.  Note that this layout
     495             :             is not used when the given <argument>pCurrentPage</argument> is
     496             :             not a notes page.  In this case the layout is taken from the
     497             :             notes page associated with <argument>pCurrentPage</argument>.
     498             :         @param bIsPageBack
     499             :             This flag indicates whether to show the background shape.
     500             :         @param bIsPageObj
     501             :             This flag indicates whether to show the shapes on the master page.
     502             :         @param nInsertPosition
     503             :             Position where to insert the standard page.  When -1 then the
     504             :             new page set is inserted after the current page.
     505             : 
     506             :         @return
     507             :             Returns an index of the inserted pages that can be used with the
     508             :             <member>GetSdPage()</member> method.
     509             :     */
     510             :     sal_uInt16 CreatePage (
     511             :         SdPage* pCurrentPage,
     512             :         PageKind ePageKind,
     513             :         const OUString& sStandardPageName,
     514             :         const OUString& sNotesPageName,
     515             :         AutoLayout eStandardLayout,
     516             :         AutoLayout eNotesLayout,
     517             :         sal_Bool bIsPageBack,
     518             :         sal_Bool bIsPageObj,
     519             :         const sal_Int32 nInsertPosition = -1);
     520             : 
     521             :     /** This method acts as a simplified front end for the more complex
     522             :         <member>DuplicatePage()</member> method.
     523             :         @param nPageNum
     524             :             The page number as passed to the <member>GetSdPage()</member>
     525             :             method for which the standard page and the notes page are to be
     526             :             copied.
     527             :         @return
     528             :             Returns an index of the inserted pages that can be used with the
     529             :             <member>GetSdPage()</member> method.
     530             :     */
     531             :     sal_uInt16 DuplicatePage (sal_uInt16 nPageNum);
     532             : 
     533             :     /** Create and insert a set of two new pages that are copies of the
     534             :         given <argument>pCurrentPage</argument> and its associated notes
     535             :         resp. standard page.  The copies are inserted directly after the
     536             :         specified page set.
     537             :         @param pCurrentPage
     538             :             This page and its associated notes/standard page is copied.
     539             :         @param ePageKind
     540             :             This specifies whether <argument>pCurrentPage</argument> is a
     541             :             standard (draw) page or a notes page.
     542             :         @param sStandardPageName
     543             :             Name of the standard page.  An empty string leads to using an
     544             :             automatically created name.
     545             :         @param sNotesPageName
     546             :             Name of the standard page.  An empty string leads to using an
     547             :             automatically created name.
     548             :         @param bIsPageBack
     549             :             This flag indicates whether to show the background shape.
     550             :         @param bIsPageObj
     551             :             This flag indicates whether to show the shapes on the master page.
     552             :         @param nInsertPosition
     553             :             Position where to insert the standard page.  When -1 then the
     554             :             new page set is inserted after the current page.
     555             : 
     556             :         @return
     557             :             Returns an index of the inserted pages that can be used with the
     558             :             <member>GetSdPage()</member> method.
     559             :     */
     560             :     sal_uInt16 DuplicatePage (
     561             :         SdPage* pCurrentPage,
     562             :         PageKind ePageKind,
     563             :         const OUString& sStandardPageName,
     564             :         const OUString& sNotesPageName,
     565             :         sal_Bool bIsPageBack,
     566             :         sal_Bool bIsPageObj,
     567             :         const sal_Int32 nInsertPosition = -1);
     568             : 
     569             :     /** return the document fonts for latin, cjk and ctl according to the current
     570             :         languages set at this document */
     571             :     void getDefaultFonts( Font& rLatinFont, Font& rCJKFont, Font& rCTLFont );
     572             : 
     573             :     sd::UndoManager* GetUndoManager() const;
     574             : 
     575             :     /** converts the given western font height to a corresponding ctl font height, deppending on the system language */
     576             :     static sal_uInt32 convertFontHeightToCTL( sal_uInt32 nWesternFontHeight );
     577             : 
     578             :     /** Get the style sheet pool if it was a SdStyleSheetPool.
     579             :      */
     580             :     SD_DLLPUBLIC SdStyleSheetPool* GetSdStyleSheetPool() const;
     581             : 
     582             :        void UpdatePageRelativeURLs(const OUString& rOldName, const OUString& rNewName);
     583             : 
     584             :     void SetCalcFieldValueHdl( ::Outliner* pOutliner);
     585             : 
     586             :     sal_uInt16 GetAnnotationAuthorIndex( const OUString& rAuthor );
     587             : 
     588          54 :     bool IsUsingEmbededFonts() { return mbUseEmbedFonts; }
     589          11 :     void SetIsUsingEmbededFonts( bool bUse ) { mbUseEmbedFonts = bUse; }
     590             : 
     591             : private:
     592             :     /** This member stores the printer independent layout mode.  Please
     593             :         refer to <member>SetPrinterIndependentLayout()</member> for its
     594             :         values.
     595             :     */
     596             :     sal_Int32 mnPrinterIndependentLayout;
     597             : 
     598             :     /** Insert a given set of standard and notes page after the given <argument>pCurrentPage</argument>.
     599             :         @param pCurrentPage
     600             :             This page and its associated notes/standard page is copied.
     601             :         @param ePageKind
     602             :             This specifies whether <argument>pCurrentPage</argument> is a
     603             :             standard (draw) page or a notes page.
     604             :         @param sStandardPageName
     605             :             Name of the standard page.  An empty string leads to using an
     606             :             automatically created name.
     607             :         @param sNotesPageName
     608             :             Name of the standard page.  An empty string leads to using an
     609             :             automatically created name.
     610             :         @param bIsPageBack
     611             :             This flag indicates whether to show the background shape.
     612             :         @param bIsPageObj
     613             :             This flag indicates whether to show the shapes on the master page.
     614             :         @param pStandardPage
     615             :             The standard page to insert.
     616             :         @param pNotesPage
     617             :             The notes page to insert.
     618             :         @param nInsertPosition
     619             :             Position where to insert the standard page.  When -1 then the
     620             :             new page set is inserted after the current page.
     621             : 
     622             :         @return
     623             :             Returns an index of the inserted pages that can be used with the
     624             :             <member>GetSdPage()</member> method.
     625             :     */
     626             :     sal_uInt16 InsertPageSet (
     627             :         SdPage* pCurrentPage,
     628             :         PageKind ePageKind,
     629             :         const OUString& sStandardPageName,
     630             :         const OUString& sNotesPageName,
     631             :         sal_Bool bIsPageBack,
     632             :         sal_Bool bIsPageObj,
     633             :         SdPage* pStandardPage,
     634             :         SdPage* pNotesPage,
     635             :         sal_Int32 nInsertPosition = -1);
     636             : 
     637             :     /** Set up a newly created page and insert it into the list of pages.
     638             :         @param pPreviousPage
     639             :             A page to take the size and border geometry from.
     640             :         @param pPage
     641             :             This is the page to set up and insert.
     642             :         @param sPageName
     643             :             The name of the new page.
     644             :         @param nInsertionPoint
     645             :             Index of the page before which the new page will be inserted.
     646             :         @param bIsPageBack
     647             :             This flag indicates whether to show the background shape.
     648             :         @param bIsPageObj
     649             :             This flag indicates whether to show the shapes on the master
     650             :             page.
     651             :     */
     652             :     void SetupNewPage (
     653             :         SdPage* pPreviousPage,
     654             :         SdPage* pPage,
     655             :         const OUString& sPageName,
     656             :         sal_uInt16 nInsertionPoint,
     657             :         sal_Bool bIsPageBack,
     658             :         sal_Bool bIsPageObj);
     659             : 
     660             :     virtual void PageListChanged() SAL_OVERRIDE;
     661             :     virtual void MasterPageListChanged() SAL_OVERRIDE;
     662             :     virtual ImageMap* GetImageMapForObject(SdrObject* pObj) SAL_OVERRIDE;
     663             : };
     664             : 
     665             : namespace sd
     666             : {
     667             : 
     668             : /**an instance of this guard disables modification of a document
     669             :  during its lifetime*/
     670             : class ModifyGuard
     671             : {
     672             : public:
     673             :     ModifyGuard( SdDrawDocument* pDoc );
     674             :     ~ModifyGuard();
     675             : 
     676             : private:
     677             :     void init();
     678             : 
     679             :     DrawDocShell* mpDocShell;
     680             :     SdDrawDocument* mpDoc;
     681             :     sal_Bool mbIsEnableSetModified;
     682             :     bool mbIsDocumentChanged;
     683             : };
     684             : 
     685             : }
     686             : 
     687             : #endif // INCLUDED_SD_INC_DRAWDOC_HXX
     688             : 
     689             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10