From 77bc1109eee784c6338145506bdf7455c4385e9d Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 6 Jan 2010 21:34:53 +0100 Subject: autorecovery: allow creating SFX-based documents which do not support the XDocumentRecovery interface For this purpose, the SFX document factory methods got an additional parameter respectively flag ("DocumentRecoverySupport" resp. SFXMODEL_DISABLE_DOCUMENT_RECOVERY). This flag is used by database documents to remove the interface from sub documents (aka forms/reports). In this course, some of the functionality around those SFXMODELL_* flags, previously duplicated in all applications, has been consolidated into a new SfxObjectShell constructor. --- basctl/source/basicide/basdoc.cxx | 5 +++-- basctl/source/basicide/basdoc.hxx | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'basctl') diff --git a/basctl/source/basicide/basdoc.cxx b/basctl/source/basicide/basdoc.cxx index 4dd0dbd2aeca..ac7af7de25a4 100644 --- a/basctl/source/basicide/basdoc.cxx +++ b/basctl/source/basicide/basdoc.cxx @@ -38,6 +38,7 @@ #define GLOBALOVERFLOW2 #include +#include #include #include @@ -60,11 +61,11 @@ SFX_IMPL_INTERFACE( BasicDocShell, SfxObjectShell, IDEResId( 0 ) ) SFX_STATUSBAR_REGISTRATION( IDEResId( SID_BASICIDE_STATUSBAR ) ); } -BasicDocShell::BasicDocShell( SfxObjectCreateMode eMode ) : SfxObjectShell( eMode ) +BasicDocShell::BasicDocShell() + :SfxObjectShell( SFXMODEL_DISABLE_EMBEDDED_SCRIPTS | SFXMODEL_DISABLE_DOCUMENT_RECOVERY ) { pPrinter = 0; SetPool( &SFX_APP()->GetPool() ); - SetHasNoBasic(); SetModel( new SIDEModel(this) ); } diff --git a/basctl/source/basicide/basdoc.hxx b/basctl/source/basicide/basdoc.hxx index a589ef700b33..120c083cfb46 100644 --- a/basctl/source/basicide/basdoc.hxx +++ b/basctl/source/basicide/basdoc.hxx @@ -59,7 +59,7 @@ public: using SotObject::GetInterface; SFX_DECL_OBJECTFACTORY(); SFX_DECL_INTERFACE( SVX_INTERFACE_BASIDE_DOCSH ) - BasicDocShell( SfxObjectCreateMode eMode = SFX_CREATE_MODE_STANDARD ); + BasicDocShell(); ~BasicDocShell(); SfxPrinter* GetPrinter( BOOL bCreate ); -- cgit v1.2.3