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

Generated by: LCOV version 1.11