diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-01-06 21:34:53 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-01-06 21:34:53 +0100 |
commit | d1233ab8290a14cea18cf78f6712767a02291456 (patch) | |
tree | def8c9309261ee7aea4a289e59fbb1d025e9c858 /sw/source/ui/app/docshini.cxx | |
parent | 1ab97e6cbe7357c51c485be667aa23c191ccda47 (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 'sw/source/ui/app/docshini.cxx')
-rw-r--r-- | sw/source/ui/app/docshini.cxx | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/sw/source/ui/app/docshini.cxx b/sw/source/ui/app/docshini.cxx index 630d836c785b..9ec18607a71e 100644 --- a/sw/source/ui/app/docshini.cxx +++ b/sw/source/ui/app/docshini.cxx @@ -44,6 +44,7 @@ #include <svtools/ctrltool.hxx> #include <svtools/lingucfg.hxx> #include <sfx2/docfile.hxx> +#include <sfx2/sfxmodelfactory.hxx> #ifndef _OFA_MISCCFG_HXX //autogen #include <svtools/misccfg.hxx> #endif @@ -400,7 +401,7 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) --------------------------------------------------------------------*/ -SwDocShell::SwDocShell( SfxObjectCreateMode eMode, sal_Bool _bScriptingSupport ) : +SwDocShell::SwDocShell( SfxObjectCreateMode eMode ) : SfxObjectShell ( eMode ), pDoc(0), pFontList(0), @@ -411,8 +412,25 @@ SwDocShell::SwDocShell( SfxObjectCreateMode eMode, sal_Bool _bScriptingSupport ) bInUpdateFontList(false) { RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::SwDocShell" ); - if ( !_bScriptingSupport ) - SetHasNoBasic(); + Init_Impl(); +} + +/*-------------------------------------------------------------------- + Beschreibung: Ctor / Dtor + --------------------------------------------------------------------*/ + + +SwDocShell::SwDocShell( const sal_uInt64 i_nSfxCreationFlags ) : + SfxObjectShell ( i_nSfxCreationFlags ), + pDoc(0), + pFontList(0), + pView( 0 ), + pWrtShell( 0 ), + pOLEChildList( 0 ), + nUpdateDocMode(document::UpdateDocMode::ACCORDING_TO_CONFIG), + bInUpdateFontList(false) +{ + RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::SwDocShell" ); Init_Impl(); } |