office-gobmx/sd/inc/drawdoc.hxx

715 lines
26 KiB
C++
Raw Normal View History

2000-09-18 11:07:07 -05:00
/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
2000-09-18 11:07:07 -05:00
*
* $RCSfile: drawdoc.hxx,v $
2000-09-18 11:07:07 -05:00
*
* $Revision: 1.45 $
2000-09-18 11:07:07 -05:00
*
* last change: $Author: kz $ $Date: 2006-12-12 16:23:02 $
2000-09-18 11:07:07 -05:00
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
2000-09-18 11:07:07 -05:00
*
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2005 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
2000-09-18 11:07:07 -05:00
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
2000-09-18 11:07:07 -05:00
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
2000-09-18 11:07:07 -05:00
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
2000-09-18 11:07:07 -05:00
*
************************************************************************/
#ifndef _DRAWDOC_HXX
#define _DRAWDOC_HXX
#ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_
#include <com/sun/star/lang/Locale.hpp>
#endif
#ifndef _COM_SUN_STAR_TEXT_WRITINGMODE_HPP_
#include <com/sun/star/text/WritingMode.hpp>
#endif
2001-03-19 02:53:25 -06:00
#ifndef _COM_SUN_STAR_FRAME_XMODEL_HDL_
#include <com/sun/star/frame/XModel.hdl>
#endif
2000-09-18 11:07:07 -05:00
#ifndef _SV_PRINT_HXX
#include <vcl/print.hxx>
#endif
#ifndef _FM_FMMODEL_HXX
#include <svx/fmmodel.hxx>
#endif
#ifndef _PRESENTATION_HXX
#include "pres.hxx"
#endif
#ifndef _SVX_PAGEITEM_HXX //autogen
#include <svx/pageitem.hxx>
#endif
#ifndef _UNOTOOLS_CHARCLASS_HXX
#include <unotools/charclass.hxx>
#endif
#ifndef _SOT_STORAGE_HXX
#include <sot/storage.hxx>
#endif
2000-09-18 11:07:07 -05:00
#ifndef _RSCSFX_HXX
#include <rsc/rscsfx.hxx>
#endif
2002-08-01 05:30:12 -05:00
#ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_
#include <com/sun/star/lang/Locale.hpp>
#endif
#ifndef _COM_SUN_STAR_TEXT_WRITINGMODE_HPP_
#include <com/sun/star/text/WritingMode.hpp>
#endif
2000-09-18 11:07:07 -05:00
// #107844#
#ifndef _SVDUNDO_HXX
#include <svx/svdundo.hxx>
#endif
#ifndef INCLUDED_MEMORY
#include <memory>
#define INCLUDED_MEMORY
#endif
#ifndef INCLUDED_SDDLLAPI_H
#include "sddllapi.h"
#endif
#ifndef _SDPAGE_HXX
#include "sdpage.hxx"
#endif
namespace com
{
namespace sun
{
namespace star
{
namespace embed
{
class XStorage;
}
namespace io
{
class XStream;
}
}
}
}
namespace sd
{
class FrameView;
class Outliner;
}
2000-09-18 11:07:07 -05:00
class Timer;
class SfxObjectShell;
class SdDrawDocShell;
2000-09-18 11:07:07 -05:00
class SdPage;
class SdAnimationInfo;
class SdIMapInfo;
class IMapObject;
class SdStyleSheetPool;
class SfxMedium;
class SvxSearchItem;
class SdrOle2Obj;
class EditStatus;
class Graphic;
class Point;
class Window;
class SdTransferable;
2000-09-18 11:07:07 -05:00
struct SpellCallbackInfo;
struct StyleRequestData;
class SdDrawDocument;
2000-09-18 11:07:07 -05:00
namespace sd
{
#ifndef SV_DECL_DRAW_DOC_SHELL_DEFINED
#define SV_DECL_DRAW_DOC_SHELL_DEFINED
SV_DECL_REF(DrawDocShell)
2000-09-18 11:07:07 -05:00
#endif
class DrawDocShell;
class UndoManager;
class ShapeList;
}
class ImpDrawPageListWatcher;
class ImpMasterPageListWatcher;
2000-09-18 11:07:07 -05:00
struct StyleReplaceData
{
SfxStyleFamily nFamily;
SfxStyleFamily nNewFamily;
String aName;
String aNewName;
};
enum DocCreationMode
{
NEW_DOC,
DOC_LOADED
};
namespace sd
{
struct PresentationSettings
{
rtl::OUString maPresPage;
sal_Bool mbAll;
sal_Bool mbEndless;
sal_Bool mbCustomShow;
sal_Bool mbManual;
sal_Bool mbMouseVisible;
sal_Bool mbMouseAsPen;
sal_Bool mbLockedPages;
sal_Bool mbAlwaysOnTop;
sal_Bool mbFullScreen;
sal_Bool mbAnimationAllowed;
sal_Int32 mnPauseTimeout;
sal_Bool mbShowPauseLogo;
sal_Bool mbStartWithNavigator;
PresentationSettings();
PresentationSettings( const PresentationSettings& r );
};
}
2002-08-01 05:30:12 -05:00
// ------------------
// - SdDrawDocument -
// ------------------
2000-09-18 11:07:07 -05:00
class SdDrawDocument
: public FmFormModel
2000-09-18 11:07:07 -05:00
{
2002-08-01 05:30:12 -05:00
private:
::sd::Outliner* mpOutliner; // local outliner for outline mode
::sd::Outliner* mpInternalOutliner; // internal outliner for creation of text objects
Timer* mpWorkStartupTimer;
Timer* mpOnlineSpellingTimer;
sd::ShapeList* mpOnlineSpellingList;
SvxSearchItem* mpOnlineSearchItem;
List* mpFrameViewList;
List* mpCustomShowList;
::sd::DrawDocShell* mpDocSh;
SdTransferable * mpCreatingTransferable;
BOOL mbHasOnlineSpellErrors;
BOOL mbInitialOnlineSpellingEnabled;
String maBookmarkFile;
::sd::DrawDocShellRef mxBookmarkDocShRef;
sd::PresentationSettings maPresentationSettings;
BOOL mbNewOrLoadCompleted;
BOOL mbOnlineSpell;
BOOL mbHideSpell;
BOOL mbSummationOfParagraphs;
bool mbStartWithPresentation; // is set to true when starting with command line parameter -start
LanguageType meLanguage;
LanguageType meLanguageCJK;
LanguageType meLanguageCTL;
SvxNumType mePageNumType;
::sd::DrawDocShellRef mxAllocedDocShRef; // => AllocModel()
BOOL mbAllocDocSh; // => AllocModel()
DocumentType meDocType;
2002-08-01 05:30:12 -05:00
CharClass* mpCharClass;
::com::sun::star::lang::Locale* mpLocale;
// #109538#
::std::auto_ptr<ImpDrawPageListWatcher> mpDrawPageListWatcher;
::std::auto_ptr<ImpMasterPageListWatcher> mpMasterPageListWatcher;
2002-08-01 05:30:12 -05:00
void UpdatePageObjectsInNotes(USHORT nStartPos);
void FillOnlineSpellingList(SdPage* pPage);
void SpellObject(SdrTextObj* pObj);
DECL_LINK(WorkStartupHdl, Timer*);
DECL_LINK(OnlineSpellingHdl, Timer*);
DECL_LINK(OnlineSpellEventHdl, EditStatus*);
protected:
2002-08-01 05:30:12 -05:00
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoModel();
2000-09-18 11:07:07 -05:00
public:
class InsertBookmarkAsPage_PageFunctorBase;
2002-08-01 05:30:12 -05:00
TYPEINFO();
2000-09-18 11:07:07 -05:00
2002-08-01 05:30:12 -05:00
SdDrawDocument(DocumentType eType, SfxObjectShell* pDocSh);
~SdDrawDocument();
2000-09-18 11:07:07 -05:00
2002-08-01 05:30:12 -05:00
virtual SdrModel* AllocModel() const;
virtual SdrPage* AllocPage(FASTBOOL bMasterPage);
2000-09-18 11:07:07 -05:00
virtual const SdrModel* LoadModel(const String& rFileName);
2002-08-01 05:30:12 -05:00
virtual void DisposeLoadedModels();
virtual FASTBOOL IsReadOnly() const;
virtual void SetChanged(sal_Bool bFlag = sal_True);
2002-08-01 05:30:12 -05:00
virtual SvStream* GetDocumentStream(SdrDocumentStreamInfo& rStreamInfo) const;
2000-09-18 11:07:07 -05:00
2002-08-01 05:30:12 -05:00
SfxItemPool& GetPool() { return( *pItemPool ); }
2000-09-18 11:07:07 -05:00
::sd::Outliner* GetOutliner(BOOL bCreateOutliner=TRUE);
SD_DLLPUBLIC ::sd::Outliner* GetInternalOutliner(BOOL bCreateOutliner=TRUE);
2000-09-18 11:07:07 -05:00
::sd::DrawDocShell* GetDocSh() const { return mpDocSh; }
2000-09-18 11:07:07 -05:00
2002-08-01 05:30:12 -05:00
LanguageType GetLanguage( const USHORT nId ) const;
void SetLanguage( const LanguageType eLang, const USHORT nId );
2000-09-18 11:07:07 -05:00
SvxNumType GetPageNumType() const;
void SetPageNumType(SvxNumType eType) { mePageNumType = eType; }
2002-08-01 05:30:12 -05:00
String CreatePageNumValue(USHORT nNum) const;
2000-09-18 11:07:07 -05:00
DocumentType GetDocumentType() const { return meDocType; }
2000-09-18 11:07:07 -05:00
2002-08-01 05:30:12 -05:00
void SetAllocDocSh(BOOL bAlloc);
2000-09-18 11:07:07 -05:00
void CreatingDataObj( SdTransferable* pTransferable ) { mpCreatingTransferable = pTransferable; }
2000-09-18 11:07:07 -05:00
/** if the document does not contain at least one handout, one slide and one notes page with
at least one master each this methods creates them.
If a reference document is given, the sizes and border settings of that document are used
for newly created slides.
*/
SD_DLLPUBLIC void CreateFirstPages( SdDrawDocument* pRefDocument = 0 );
2002-08-01 05:30:12 -05:00
BOOL CreateMissingNotesAndHandoutPages();
2000-09-18 11:07:07 -05:00
2002-08-01 05:30:12 -05:00
void MovePage(USHORT nPgNum, USHORT nNewPos);
void InsertPage(SdrPage* pPage, USHORT nPos=0xFFFF);
void DeletePage(USHORT nPgNum);
SdrPage* RemovePage(USHORT nPgNum);
void RemoveUnnessesaryMasterPages( SdPage* pMaster=NULL, BOOL bOnlyDuplicatePages=FALSE, BOOL bUndo=TRUE );
SD_DLLPUBLIC void SetMasterPage(USHORT nSdPageNum, const String& rLayoutName,
2002-08-01 05:30:12 -05:00
SdDrawDocument* pSourceDoc, BOOL bMaster, BOOL bCheckMasters);
2000-09-18 11:07:07 -05:00
SD_DLLPUBLIC SdDrawDocument* OpenBookmarkDoc(const String& rBookmarkFile);
2002-08-01 05:30:12 -05:00
SdDrawDocument* OpenBookmarkDoc(SfxMedium& rMedium);
BOOL InsertBookmark(List* pBookmarkList, List* pExchangeList, BOOL bLink,
BOOL bReplace, USHORT nPgPos, BOOL bNoDialogs,
::sd::DrawDocShell* pBookmarkDocSh, BOOL bCopy,
2002-08-01 05:30:12 -05:00
Point* pObjPos);
bool IsStartWithPresentation() const;
void SetStartWithPresentation( bool bStartWithPresentation );
/** Insert pages into this document
This method inserts whole pages into this document, either
selected ones (specified via pBookmarkList/pExchangeList), or
all from the source document.
@attention Beware! This method in it's current state does not
handle all combinations of their input parameters
correctly. For example, for pBookmarkList=NULL, bReplace=TRUE
is ignored (no replace happens).
@param pBookmarkList
A list of strings, denoting the names of the pages to be copied
@param pExchangeList
A list of strings, denoting the names of the pages to be renamed
@param bLink
Whether the inserted pages should be links to the bookmark document
@param bReplace
Whether the pages should not be inserted, but replace the pages in
the destination document
@param nPgPos
Insertion point/start of replacement
@param bNoDialogs
Whether query dialogs are allowed (e.g. for page scaling)
@param pBookmarkDocSh
DocShell of the source document (used e.g. to extract the filename
for linked pages)
@param bCopy
Whether the source document should be treated as immutable (i.e.
inserted pages are not removed from it, but cloned)
@param bMergeMasterPages
Whether the source document's master pages should be copied, too.
@param bPreservePageNames
Whether the replace operation should take the name from the new
page, or preserve the old name
*/
2002-08-01 05:30:12 -05:00
BOOL InsertBookmarkAsPage(List* pBookmarkList, List* pExchangeList,
BOOL bLink, BOOL bReplace, USHORT nPgPos,
BOOL bNoDialogs, ::sd::DrawDocShell* pBookmarkDocSh,
BOOL bCopy, BOOL bMergeMasterPages,
BOOL bPreservePageNames);
2002-08-01 05:30:12 -05:00
BOOL InsertBookmarkAsObject(List* pBookmarkList, List* pExchangeListL,
BOOL bLink, ::sd::DrawDocShell* pBookmarkDocSh,
2002-08-01 05:30:12 -05:00
Point* pObjPos);
void IterateBookmarkPages( SdDrawDocument* pBookmarkDoc, List* pBookmarkList,
USHORT nBMSdPageCount,
InsertBookmarkAsPage_PageFunctorBase& rPageIterator );
SD_DLLPUBLIC void CloseBookmarkDoc();
2000-09-18 11:07:07 -05:00
2002-08-01 05:30:12 -05:00
SdrObject* GetObj(const String& rObjName) const;
2000-09-18 11:07:07 -05:00
/** Return the first page that has the given name. Regular pages and
notes pages are searched first. When not found then the master
pages are searched.
@param rPgName
Name of the page to return.
@param rbIsMasterPage
Is set by the method to indicate whether the returned index
belongs to a master page (<TRUE/>) or a regular or notes page
(<FALSE/>). The given value is ignored.
@return
Returns the index of the page with the given name or
SDRPAGE_NOTFOUND (=0xffff) when such a page does not exist.
*/
USHORT GetPageByName(const String& rPgName, BOOL& rbIsMasterPage ) const;
SD_DLLPUBLIC SdPage*GetSdPage(USHORT nPgNum, PageKind ePgKind) const;
SD_DLLPUBLIC USHORT GetSdPageCount(PageKind ePgKind) const;
2002-08-01 05:30:12 -05:00
void SetSelected(SdPage* pPage, BOOL bSelect);
BOOL MovePages(USHORT nTargetPage);
2000-09-18 11:07:07 -05:00
SD_DLLPUBLIC SdPage*GetMasterSdPage(USHORT nPgNum, PageKind ePgKind);
SD_DLLPUBLIC USHORT GetMasterSdPageCount(PageKind ePgKind) const;
2000-09-18 11:07:07 -05:00
2002-08-01 05:30:12 -05:00
USHORT GetMasterPageUserCount(SdrPage* pMaster) const;
2000-09-18 11:07:07 -05:00
const sd::PresentationSettings& getPresentationSettings() const { return maPresentationSettings; }
sd::PresentationSettings& getPresentationSettings() { return maPresentationSettings; }
2000-09-18 11:07:07 -05:00
void SetSummationOfParagraphs( BOOL bOn = TRUE ) { mbSummationOfParagraphs = bOn; }
const BOOL IsSummationOfParagraphs() const { return mbSummationOfParagraphs; }
/** Set the mode that controls whether (and later how) the formatting of the document
depends on the current printer metrics.
@param nMode
Use <const
scope="com::sun::star::document::PrinterIndependentLayout">ENABLED</const>
to make formatting printer-independent and <const
scope="com::sun::star::document::PrinterIndependentLayout">DISABLED</const>
to make formatting depend on the current printer metrics.
*/
void SetPrinterIndependentLayout (sal_Int32 nMode);
/** Get the flag that controls whether the formatting of the document
depends on the current printer metrics.
@return
Use <const
scope="com::sun::star::document::PrinterIndependentLayout">ENABLED</const>
when formatting is printer-independent and <const
scope="com::sun::star::document::PrinterIndependentLayout">DISABLED</const>
when formatting depends on the current printer metrics.
*/
sal_Int32 GetPrinterIndependentLayout (void);
2002-08-01 05:30:12 -05:00
void SetOnlineSpell( BOOL bIn );
BOOL GetOnlineSpell() const { return mbOnlineSpell; }
2002-08-01 05:30:12 -05:00
void StopOnlineSpelling();
void StartOnlineSpelling(BOOL bForceSpelling=TRUE);
2002-08-01 05:30:12 -05:00
void ImpOnlineSpellCallback(SpellCallbackInfo* pInfo, SdrObject* pObj, SdrOutliner* pOutl);
2002-08-01 05:30:12 -05:00
void InsertObject(SdrObject* pObj, SdPage* pPage);
void RemoveObject(SdrObject* pObj, SdPage* pPage);
2000-09-18 11:07:07 -05:00
2002-08-01 05:30:12 -05:00
void SetHideSpell( BOOL bIn );
BOOL GetHideSpell() const { return mbHideSpell; }
2000-09-18 11:07:07 -05:00
2002-08-01 05:30:12 -05:00
ULONG GetLinkCount();
2000-09-18 11:07:07 -05:00
List* GetFrameViewList() const { return mpFrameViewList; }
SD_DLLPUBLIC List* GetCustomShowList(BOOL bCreate = FALSE);
2000-09-18 11:07:07 -05:00
void NbcSetChanged(sal_Bool bFlag = sal_True);
2000-09-18 11:07:07 -05:00
2002-08-01 05:30:12 -05:00
void SetTextDefaults() const;
2000-09-18 11:07:07 -05:00
2002-08-01 05:30:12 -05:00
void CreateLayoutTemplates();
void RenameLayoutTemplate(const String& rOldLayoutName, const String& rNewName);
2000-09-18 11:07:07 -05:00
SD_DLLPUBLIC void StopWorkStartupDelay();
2000-09-18 11:07:07 -05:00
2002-08-01 05:30:12 -05:00
void NewOrLoadCompleted(DocCreationMode eMode);
void NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool );
BOOL IsNewOrLoadCompleted() const {return mbNewOrLoadCompleted; }
2000-09-18 11:07:07 -05:00
::sd::FrameView* GetFrameView(ULONG nPos) {
return static_cast< ::sd::FrameView*>(
mpFrameViewList->GetObject(nPos));}
2000-09-18 11:07:07 -05:00
/** deprecated*/
2002-08-01 05:30:12 -05:00
SdAnimationInfo* GetAnimationInfo(SdrObject* pObject) const;
2000-09-18 11:07:07 -05:00
static SdAnimationInfo* GetShapeUserData(SdrObject& rObject, bool bCreate = false );
2002-08-01 05:30:12 -05:00
SdIMapInfo* GetIMapInfo( SdrObject* pObject ) const;
IMapObject* GetHitIMapObject( SdrObject* pObject, const Point& rWinPoint, const ::Window& rCmpWnd );
2000-09-18 11:07:07 -05:00
2002-08-01 05:30:12 -05:00
CharClass* GetCharClass() const { return mpCharClass; }
2000-09-18 11:07:07 -05:00
2002-08-01 05:30:12 -05:00
void RestoreLayerNames();
void MakeUniqueLayerNames();
2000-09-18 11:07:07 -05:00
2002-08-01 05:30:12 -05:00
void UpdateAllLinks();
2000-09-18 11:07:07 -05:00
2002-08-01 05:30:12 -05:00
void CheckMasterPages();
2001-12-18 08:03:13 -06:00
2002-08-01 05:30:12 -05:00
void Merge(SdrModel& rSourceModel,
USHORT nFirstPageNum=0, USHORT nLastPageNum=0xFFFF,
USHORT nDestPos=0xFFFF,
FASTBOOL bMergeMasterPages=FALSE, FASTBOOL bAllMasterPages=FALSE,
FASTBOOL bUndo=TRUE, FASTBOOL bTreadSourceAsConst=FALSE);
2002-01-18 08:36:06 -06:00
SD_DLLPUBLIC ::com::sun::star::text::WritingMode GetDefaultWritingMode() const;
2002-09-12 09:28:56 -05:00
void SetDefaultWritingMode( ::com::sun::star::text::WritingMode eMode );
2002-08-01 05:30:12 -05:00
public:
2000-09-18 11:07:07 -05:00
2002-08-01 05:30:12 -05:00
static SdDrawDocument* pDocLockedInsertingLinks; // static to prevent recursions while resolving links
2000-09-18 11:07:07 -05:00
/** This method acts as a simplified front end for the more complex
<member>CreatePage()</member> method.
@param nPageNum
The page number as passed to the <member>GetSdPage()</member>
method from which to use certain properties for the new pages.
These include the auto layout.
@return
Returns an index of the inserted pages that can be used with the
<member>GetSdPage()</member> method.
*/
USHORT CreatePage (USHORT nPageNum);
/** Create and insert a set of two new pages: a standard (draw) page and
the associated notes page. The new pages are inserted direclty
after the specified page set.
@param pCurrentPage
This page is used to retrieve the layout for the page to
create.
@param ePageKind
This specifies whether <argument>pCurrentPage</argument> is a
standard (draw) page or a notes page.
@param sStandardPageName
Name of the standard page. An empty string leads to using an
automatically created name.
@param sNotesPageName
Name of the standard page. An empty string leads to using an
automatically created name.
@param eStandardLayout
Layout to use for the new standard page. Note that this layout
is not used when the given <argument>pCurrentPage</argument> is
not a standard page. In this case the layout is taken from the
standard page associated with <argument>pCurrentPage</argument>.
@param eNotesLayout
Layout to use for the new notes page. Note that this layout
is not used when the given <argument>pCurrentPage</argument> is
not a notes page. In this case the layout is taken from the
notes page associated with <argument>pCurrentPage</argument>.
@param bIsPageBack
This flag indicates whether to show the background shape.
@param bIsPageObj
This flag indicates whether to show the shapes on the master page.
@return
Returns an index of the inserted pages that can be used with the
<member>GetSdPage()</member> method.
*/
USHORT CreatePage (
SdPage* pCurrentPage,
PageKind ePageKind,
const String& sStandardPageName,
const String& sNotesPageName,
AutoLayout eStandardLayout,
AutoLayout eNotesLayout,
BOOL bIsPageBack,
BOOL bIsPageObj);
/** This method acts as a simplified front end for the more complex
<member>DuplicatePage()</member> method.
@param nPageNum
The page number as passed to the <member>GetSdPage()</member>
method for which the standard page and the notes page are to be
copied.
@return
Returns an index of the inserted pages that can be used with the
<member>GetSdPage()</member> method.
*/
USHORT DuplicatePage (USHORT nPageNum);
/** Create and insert a set of two new pages that are copies of the
given <argument>pCurrentPage</argument> and its associated notes
resp. standard page. The copies are inserted directly after the
specified page set.
@param pCurrentPage
This page and its associated notes/standard page is copied.
@param ePageKind
This specifies whether <argument>pCurrentPage</argument> is a
standard (draw) page or a notes page.
@param sStandardPageName
Name of the standard page. An empty string leads to using an
automatically created name.
@param sNotesPageName
Name of the standard page. An empty string leads to using an
automatically created name.
@param eStandardLayout
Layout to use for the new standard page. Note that this layout
is not used when the given <argument>pCurrentPage</argument> is
not a standard page. In this case the layout is taken from the
standard page associated with <argument>pCurrentPage</argument>.
@param eNotesLayout
Layout to use for the new notes page. Note that this layout
is not used when the given <argument>pCurrentPage</argument> is
not a notes page. In this case the layout is taken from the
notes page associated with <argument>pCurrentPage</argument>.
@param bIsPageBack
This flag indicates whether to show the background shape.
@param bIsPageObj
This flag indicates whether to show the shapes on the master page.
@return
Returns an index of the inserted pages that can be used with the
<member>GetSdPage()</member> method.
*/
USHORT DuplicatePage (
SdPage* pCurrentPage,
PageKind ePageKind,
const String& sStandardPageName,
const String& sNotesPageName,
AutoLayout eStandardLayout,
AutoLayout eNotesLayout,
BOOL bIsPageBack,
BOOL bIsPageObj);
/** return the document fonts for latin, cjk and ctl according to the current
languages set at this document */
void getDefaultFonts( Font& rLatinFont, Font& rCJKFont, Font& rCTLFont );
sd::UndoManager* GetUndoManager() const;
/* converts the given western font height to a corresponding ctl font height, deppending on the system language */
static sal_uInt32 convertFontHeightToCTL( sal_uInt32 nWesternFontHeight );
private:
/** This member stores the printer independent layout mode. Please
refer to <member>SetPrinterIndependentLayout()</member> for its
values.
*/
sal_Int32 mnPrinterIndependentLayout;
/** Insert a given set of standard and notes page after the given <argument>pCurrentPage</argument>.
@param pCurrentPage
This page and its associated notes/standard page is copied.
@param ePageKind
This specifies whether <argument>pCurrentPage</argument> is a
standard (draw) page or a notes page.
@param sStandardPageName
Name of the standard page. An empty string leads to using an
automatically created name.
@param sNotesPageName
Name of the standard page. An empty string leads to using an
automatically created name.
@param eStandardLayout
Layout to use for the new standard page. Note that this layout
is not used when the given <argument>pCurrentPage</argument> is
not a standard page. In this case the layout is taken from the
standard page associated with <argument>pCurrentPage</argument>.
@param eNotesLayout
Layout to use for the new notes page. Note that this layout
is not used when the given <argument>pCurrentPage</argument> is
not a notes page. In this case the layout is taken from the
notes page associated with <argument>pCurrentPage</argument>.
@param bIsPageBack
This flag indicates whether to show the background shape.
@param bIsPageObj
This flag indicates whether to show the shapes on the master page.
@param pStandardPage
The standard page to insert.
@param pNotesPage
The notes page to insert.
@return
Returns an index of the inserted pages that can be used with the
<member>GetSdPage()</member> method.
*/
USHORT InsertPageSet (
SdPage* pCurrentPage,
PageKind ePageKind,
const String& sStandardPageName,
const String& sNotesPageName,
AutoLayout eStandardLayout,
AutoLayout eNotesLayout,
BOOL bIsPageBack,
BOOL bIsPageObj,
SdPage* pStandardPage,
SdPage* pNotesPage);
/** Set up a newly created page and insert it into the list of pages.
@param pPreviousPage
A page to take the size and border geometry from.
@param pPage
This is the page to set up and insert.
@param sPageName
The name of the new page.
@param nInsertionPoint
Index of the page before which the new page will be inserted.
@param bIsPageBack
This flag indicates whether to show the background shape.
@param bIsPageObj
This flag indicates whether to show the shapes on the master
page.
*/
void SetupNewPage (
SdPage* pPreviousPage,
SdPage* pPage,
const String& sPageName,
USHORT nInsertionPoint,
BOOL bIsPageBack,
BOOL bIsPageObj);
// #109538#
virtual void PageListChanged();
virtual void MasterPageListChanged();
2002-08-01 05:30:12 -05:00
};
2000-09-18 11:07:07 -05:00
namespace sd
{
// an instance of this guard disables modification of a document
// during its lifetime
class ModifyGuard
{
public:
ModifyGuard( DrawDocShell* pDocShell );
ModifyGuard( SdDrawDocument* pDoc );
~ModifyGuard();
private:
void init();
DrawDocShell* mpDocShell;
SdDrawDocument* mpDoc;
BOOL mbIsEnableSetModified;
BOOL mbIsDocumentChanged;
};
}
2000-09-18 11:07:07 -05:00
#endif // _DRAWDOC_HXX