summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-01-06 21:34:53 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-01-06 21:34:53 +0100
commit77bc1109eee784c6338145506bdf7455c4385e9d (patch)
tree0f18d9d405aa65eb6488a6e890c52f6ab23a53ca /basctl
parent20ceeaeb55b2a306b83bc02fa1842146ea4b0666 (diff)
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.
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/basdoc.cxx5
-rw-r--r--basctl/source/basicide/basdoc.hxx2
2 files changed, 4 insertions, 3 deletions
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 <sfx2/docfac.hxx>
+#include <sfx2/sfxmodelfactory.hxx>
#include <vcl/status.hxx>
#include <svx/xmlsecctrl.hxx>
@@ -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 );