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

Generated by: LCOV version 1.10