diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-09 16:35:22 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-04-10 09:48:07 +0200 |
commit | afc728fe76fbf1afea725afd6ff5e9af92e10b08 (patch) | |
tree | 6c691ba617ed7d025abd17d71745d0623cdc5d53 /sfx2/source/doc | |
parent | 89dd3f80685c66883b6ed4efbf369f5aa2dc292e (diff) |
convert SFXMODEL_ to scoped enum
and fix up some confusion in SC and STARMATH about which constants to
use
Change-Id: Ib75bc78a24bd2fad6ec6d7c94c4c1ad7dc222c1a
Diffstat (limited to 'sfx2/source/doc')
-rw-r--r-- | sfx2/source/doc/objxtor.cxx | 10 | ||||
-rw-r--r-- | sfx2/source/doc/sfxmodelfactory.cxx | 12 |
2 files changed, 11 insertions, 11 deletions
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index 67405aca5d93..2cc18f17f0cc 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -280,7 +280,7 @@ SfxObjectShell_Impl::~SfxObjectShell_Impl() -SfxObjectShell::SfxObjectShell( const sal_uInt64 i_nCreationFlags ) +SfxObjectShell::SfxObjectShell( const SfxModelFlags i_nCreationFlags ) : pImp( new SfxObjectShell_Impl( *this ) ) , pMedium(0) , pStyleSheetPool(0) @@ -288,16 +288,16 @@ SfxObjectShell::SfxObjectShell( const sal_uInt64 i_nCreationFlags ) , bHasName( false ) , bIsInGenerateThumbnail ( false ) { - if (i_nCreationFlags & SFXMODEL_EMBEDDED_OBJECT) + if (i_nCreationFlags & SfxModelFlags::EMBEDDED_OBJECT) eCreateMode = SfxObjectCreateMode::EMBEDDED; - else if (i_nCreationFlags & SFXMODEL_EXTERNAL_LINK) + else if (i_nCreationFlags & SfxModelFlags::EXTERNAL_LINK) eCreateMode = SfxObjectCreateMode::INTERNAL; - const bool bScriptSupport = ( i_nCreationFlags & SFXMODEL_DISABLE_EMBEDDED_SCRIPTS ) == 0; + const bool bScriptSupport = ( i_nCreationFlags & SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS ) == SfxModelFlags::NONE; if ( !bScriptSupport ) SetHasNoBasic(); - const bool bDocRecovery = ( i_nCreationFlags & SFXMODEL_DISABLE_DOCUMENT_RECOVERY ) == 0; + const bool bDocRecovery = ( i_nCreationFlags & SfxModelFlags::DISABLE_DOCUMENT_RECOVERY ) == SfxModelFlags::NONE; if ( !bDocRecovery ) pImp->m_bDocRecoverySupport = false; } diff --git a/sfx2/source/doc/sfxmodelfactory.cxx b/sfx2/source/doc/sfxmodelfactory.cxx index 0fb5ed8a8af6..c1844560e0ef 100644 --- a/sfx2/source/doc/sfxmodelfactory.cxx +++ b/sfx2/source/doc/sfxmodelfactory.cxx @@ -90,7 +90,7 @@ namespace sfx2 virtual ~SfxModelFactory(); private: - Reference< XInterface > impl_createInstance( const sal_uInt64 _nCreationFlags ) const; + Reference< XInterface > impl_createInstance( const SfxModelFlags _nCreationFlags ) const; private: const Reference< XMultiServiceFactory > m_xServiceFactory; @@ -119,7 +119,7 @@ namespace sfx2 } - Reference< XInterface > SfxModelFactory::impl_createInstance( const sal_uInt64 _nCreationFlags ) const + Reference< XInterface > SfxModelFactory::impl_createInstance( const SfxModelFlags _nCreationFlags ) const { return (*m_pComponentFactoryFunc)( m_xServiceFactory, _nCreationFlags ); } @@ -161,10 +161,10 @@ namespace sfx2 const bool bScriptSupport = aArgs.getOrDefault( "EmbeddedScriptSupport", sal_True ); const bool bDocRecoverySupport = aArgs.getOrDefault( "DocumentRecoverySupport", sal_True ); - sal_uInt64 nCreationFlags = - ( bEmbeddedObject ? SFXMODEL_EMBEDDED_OBJECT : 0 ) - | ( bScriptSupport ? 0 : SFXMODEL_DISABLE_EMBEDDED_SCRIPTS ) - | ( bDocRecoverySupport ? 0 : SFXMODEL_DISABLE_DOCUMENT_RECOVERY ); + SfxModelFlags nCreationFlags = + ( bEmbeddedObject ? SfxModelFlags::EMBEDDED_OBJECT : SfxModelFlags::NONE ) + | ( bScriptSupport ? SfxModelFlags::NONE : SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS ) + | ( bDocRecoverySupport ? SfxModelFlags::NONE : SfxModelFlags::DISABLE_DOCUMENT_RECOVERY ); Reference< XInterface > xInstance( impl_createInstance( nCreationFlags ) ); |