summaryrefslogtreecommitdiff
path: root/starmath/source
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
commitd1233ab8290a14cea18cf78f6712767a02291456 (patch)
treedef8c9309261ee7aea4a289e59fbb1d025e9c858 /starmath/source
parent1ab97e6cbe7357c51c485be667aa23c191ccda47 (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/source')
-rw-r--r--starmath/source/document.cxx7
-rw-r--r--starmath/source/unodoc.cxx5
2 files changed, 3 insertions, 9 deletions
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() );