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 /starmath | |
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 'starmath')
-rw-r--r-- | starmath/inc/document.hxx | 2 | ||||
-rw-r--r-- | starmath/source/document.cxx | 7 | ||||
-rw-r--r-- | starmath/source/unodoc.cxx | 5 |
3 files changed, 4 insertions, 10 deletions
diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx index fac4f1b0faa4..c842a78c6a1a 100644 --- a/starmath/inc/document.hxx +++ b/starmath/inc/document.hxx @@ -170,7 +170,7 @@ public: using SotObject::GetInterface; SFX_DECL_OBJECTFACTORY(); - SmDocShell(SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED, const sal_Bool _bScriptSupport = sal_True); + SmDocShell( const sal_uInt64 i_nSfxCreationFlags ); virtual ~SmDocShell(); void LoadSymbols(); diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index 03beb26f7bb2..1cf65eab1678 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -684,8 +684,8 @@ void SmDocShell::Repaint() } -SmDocShell::SmDocShell(SfxObjectCreateMode eMode,const sal_Bool _bScriptSupport) : - SfxObjectShell(eMode), +SmDocShell::SmDocShell( const sal_uInt64 i_nSfxCreationFlags ) : + SfxObjectShell( i_nSfxCreationFlags ), pTree ( 0 ), pEditEngineItemPool ( 0 ), pEditEngine ( 0 ), @@ -704,9 +704,6 @@ SmDocShell::SmDocShell(SfxObjectCreateMode eMode,const sal_Bool _bScriptSupport) StartListening(aFormat); StartListening(*pp->GetConfig()); - if ( !_bScriptSupport ) - SetHasNoBasic(); - SetModel( new SmModel(this) ); //! das hier mit new erzeugte Model brauch //! im Destruktor nicht explizit geloescht werden. //! Dies erledigt das Sfx. diff --git a/starmath/source/unodoc.cxx b/starmath/source/unodoc.cxx index 3f213c0ee256..e2ca1a655e9d 100644 --- a/starmath/source/unodoc.cxx +++ b/starmath/source/unodoc.cxx @@ -64,10 +64,7 @@ uno::Reference< uno::XInterface > SAL_CALL SmDocument_createInstance( if ( !SM_MOD() ) SmDLL::Init(); - const SfxObjectCreateMode eCreateMode = ( _nCreationFlags & SFXMODEL_EMBEDDED_OBJECT ) ? SFX_CREATE_MODE_EMBEDDED : SFX_CREATE_MODE_STANDARD; - const bool bScriptSupport = ( _nCreationFlags & SFXMODEL_DISABLE_EMBEDDED_SCRIPTS ) == 0; - - SfxObjectShell* pShell = new SmDocShell( eCreateMode, bScriptSupport ); + SfxObjectShell* pShell = new SmDocShell( _nCreationFlags ); if( pShell ) return uno::Reference< uno::XInterface >( pShell->GetModel() ); |