summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-09 16:35:22 +0200
committerNoel Grandin <noel@peralex.com>2015-04-10 09:48:07 +0200
commitafc728fe76fbf1afea725afd6ff5e9af92e10b08 (patch)
tree6c691ba617ed7d025abd17d71745d0623cdc5d53
parent89dd3f80685c66883b6ed4efbf369f5aa2dc292e (diff)
convert SFXMODEL_ to scoped enum
and fix up some confusion in SC and STARMATH about which constants to use Change-Id: Ib75bc78a24bd2fad6ec6d7c94c4c1ad7dc222c1a
-rw-r--r--basctl/source/basicide/basdoc.cxx2
-rw-r--r--include/sfx2/objsh.hxx3
-rw-r--r--include/sfx2/sfxmodelfactory.hxx20
-rw-r--r--sc/inc/appluno.hxx3
-rw-r--r--sc/qa/unit/rangelst_test.cxx6
-rw-r--r--sc/qa/unit/subsequent_export-test.cxx12
-rw-r--r--sc/qa/unit/ucalc.cxx6
-rw-r--r--sc/source/ui/app/transobj.cxx2
-rw-r--r--sc/source/ui/docshell/arealink.cxx2
-rw-r--r--sc/source/ui/docshell/docsh.cxx2
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx2
-rw-r--r--sc/source/ui/docshell/tablink.cxx4
-rw-r--r--sc/source/ui/inc/docsh.hxx2
-rw-r--r--sc/source/ui/unoobj/unodoc.cxx2
-rw-r--r--sc/source/ui/view/viewfun5.cxx2
-rw-r--r--sd/source/ui/docshell/docshell.cxx2
-rw-r--r--sd/source/ui/docshell/grdocsh.cxx2
-rw-r--r--sd/source/ui/inc/DrawDocShell.hxx2
-rw-r--r--sd/source/ui/inc/GraphicDocShell.hxx2
-rw-r--r--sd/source/ui/inc/facreg.hxx5
-rw-r--r--sd/source/ui/unoidl/unodoc.cxx4
-rw-r--r--sfx2/source/doc/objxtor.cxx10
-rw-r--r--sfx2/source/doc/sfxmodelfactory.cxx12
-rw-r--r--starmath/inc/document.hxx2
-rw-r--r--starmath/qa/cppunit/test_nodetotextvisitors.cxx3
-rw-r--r--starmath/qa/cppunit/test_starmath.cxx6
-rw-r--r--starmath/qa/extras/mmlimport-test.cxx6
-rw-r--r--starmath/source/ElementsDockingWindow.cxx3
-rw-r--r--starmath/source/document.cxx2
-rw-r--r--starmath/source/register.hxx3
-rw-r--r--starmath/source/unodoc.cxx2
-rw-r--r--sw/inc/docsh.hxx2
-rw-r--r--sw/source/core/inc/unofreg.hxx3
-rw-r--r--sw/source/uibase/app/docshini.cxx2
-rw-r--r--sw/source/uibase/uno/unodoc.cxx2
35 files changed, 80 insertions, 65 deletions
diff --git a/basctl/source/basicide/basdoc.cxx b/basctl/source/basicide/basdoc.cxx
index bb58c0943230..0a3e172e5f46 100644
--- a/basctl/source/basicide/basdoc.cxx
+++ b/basctl/source/basicide/basdoc.cxx
@@ -44,7 +44,7 @@ void basctl_DocShell::InitInterface_Impl()
}
DocShell::DocShell()
- :SfxObjectShell( SFXMODEL_DISABLE_EMBEDDED_SCRIPTS | SFXMODEL_DISABLE_DOCUMENT_RECOVERY )
+ :SfxObjectShell( SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS | SfxModelFlags::DISABLE_DOCUMENT_RECOVERY )
{
SetPool( &SfxGetpApp()->GetPool() );
SetBaseModel( new SIDEModel(this) );
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 32aabff6fcef..0bf721e88e30 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -74,6 +74,7 @@ class IndexBitSet;
class JobSetup;
class Size;
class Point;
+enum class SfxModelFlags;
// These values presumably must match exactly the corresponding
// css::embed::Aspects ones (in offapi/com/sun/star/embed/Aspects.idl)
@@ -189,7 +190,7 @@ private:
protected:
SfxObjectShell(SfxObjectCreateMode);
- SfxObjectShell( const sal_uInt64 i_nCreationFlags ); // see sfxmodelfactory.hxx
+ SfxObjectShell(SfxModelFlags); // see sfxmodelfactory.hxx
virtual ~SfxObjectShell();
void ModifyChanged();
diff --git a/include/sfx2/sfxmodelfactory.hxx b/include/sfx2/sfxmodelfactory.hxx
index 2067fbf8fac2..43e0c6d67ef6 100644
--- a/include/sfx2/sfxmodelfactory.hxx
+++ b/include/sfx2/sfxmodelfactory.hxx
@@ -24,18 +24,26 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#include <o3tl/typed_flags_set.hxx>
-#define SFXMODEL_STANDARD (sal_uInt64)(0x0000)
-#define SFXMODEL_EMBEDDED_OBJECT (sal_uInt64)(0x0001)
-#define SFXMODEL_EXTERNAL_LINK (sal_uInt64)(0x0002)
-#define SFXMODEL_DISABLE_EMBEDDED_SCRIPTS (sal_uInt64)(0x0004)
-#define SFXMODEL_DISABLE_DOCUMENT_RECOVERY (sal_uInt64)(0x0008)
+enum class SfxModelFlags
+{
+ NONE = 0x00,
+ EMBEDDED_OBJECT = 0x01,
+ EXTERNAL_LINK = 0x02,
+ DISABLE_EMBEDDED_SCRIPTS = 0x04,
+ DISABLE_DOCUMENT_RECOVERY = 0x08,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<SfxModelFlags> : is_typed_flags<SfxModelFlags, 0x0f> {};
+}
namespace sfx2
{
typedef ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > ( SAL_CALL * SfxModelFactoryFunc ) (
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory,
- const sal_uInt64 _nCreationFlags
+ SfxModelFlags _nCreationFlags
);
diff --git a/sc/inc/appluno.hxx b/sc/inc/appluno.hxx
index 75df17de0a36..662b028ebf92 100644
--- a/sc/inc/appluno.hxx
+++ b/sc/inc/appluno.hxx
@@ -33,6 +33,7 @@
#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/implbase4.hxx>
#include <rtl/ustring.hxx>
+#include <sfx2/sfxmodelfactory.hxx>
com::sun::star::uno::Reference<com::sun::star::uno::XInterface> SAL_CALL
ScSpreadsheetSettings_CreateInstance(
@@ -51,7 +52,7 @@ com::sun::star::uno::Reference<com::sun::star::uno::XInterface> SAL_CALL
css::uno::Sequence< OUString > SAL_CALL ScDocument_getSupportedServiceNames() throw();
OUString SAL_CALL ScDocument_getImplementationName() throw();
css::uno::Reference< css::uno::XInterface > SAL_CALL ScDocument_createInstance(
- const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr, const sal_uInt64 _nCreationFlags ) throw( css::uno::Exception, std::exception );
+ const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr, SfxModelFlags _nCreationFlags ) throw( css::uno::Exception, std::exception );
// Calc XML import
css::uno::Sequence< OUString > SAL_CALL ScXMLImport_getSupportedServiceNames() throw();
diff --git a/sc/qa/unit/rangelst_test.cxx b/sc/qa/unit/rangelst_test.cxx
index 943ac2084b9d..6430fef64865 100644
--- a/sc/qa/unit/rangelst_test.cxx
+++ b/sc/qa/unit/rangelst_test.cxx
@@ -89,9 +89,9 @@ void Test::setUp()
ScDLL::Init();
m_xDocShRef = new ScDocShell(
- SFXMODEL_STANDARD |
- SFXMODEL_DISABLE_EMBEDDED_SCRIPTS |
- SFXMODEL_DISABLE_DOCUMENT_RECOVERY);
+ SfxModelFlags::EMBEDDED_OBJECT |
+ SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS |
+ SfxModelFlags::DISABLE_DOCUMENT_RECOVERY);
m_pDoc = &m_xDocShRef->GetDocument();
}
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index b9be5419d618..f8b5344cdc03 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -259,9 +259,9 @@ ScDocShellRef ScExportTest::saveAndReloadPassword(ScDocShell* pShell, const OUSt
void ScExportTest::test()
{
ScDocShell* pShell = new ScDocShell(
- SFXMODEL_STANDARD |
- SFXMODEL_DISABLE_EMBEDDED_SCRIPTS |
- SFXMODEL_DISABLE_DOCUMENT_RECOVERY);
+ SfxModelFlags::EMBEDDED_OBJECT |
+ SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS |
+ SfxModelFlags::DISABLE_DOCUMENT_RECOVERY);
pShell->DoInitNew();
ScDocument& rDoc = pShell->GetDocument();
@@ -281,9 +281,9 @@ void ScExportTest::test()
void ScExportTest::testPasswordExport()
{
ScDocShell* pShell = new ScDocShell(
- SFXMODEL_STANDARD |
- SFXMODEL_DISABLE_EMBEDDED_SCRIPTS |
- SFXMODEL_DISABLE_DOCUMENT_RECOVERY);
+ SfxModelFlags::EMBEDDED_OBJECT |
+ SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS |
+ SfxModelFlags::DISABLE_DOCUMENT_RECOVERY);
pShell->DoInitNew();
ScDocument& rDoc = pShell->GetDocument();
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index a80eaca5a212..3525179f94ab 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -158,9 +158,9 @@ void Test::setUp()
ScDLL::Init();
m_pImpl->m_xDocShell = new ScDocShell(
- SFXMODEL_STANDARD |
- SFXMODEL_DISABLE_EMBEDDED_SCRIPTS |
- SFXMODEL_DISABLE_DOCUMENT_RECOVERY);
+ SfxModelFlags::EMBEDDED_OBJECT |
+ SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS |
+ SfxModelFlags::DISABLE_DOCUMENT_RECOVERY);
m_pImpl->m_xDocShell->DoInitUnitTest();
m_pDoc = &m_pImpl->m_xDocShell->GetDocument();
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index c8d3de3c6b14..759b737918c7 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -736,7 +736,7 @@ SfxObjectShell* ScTransferObj::SetDrawClipDoc( bool bAnyOle )
if (bAnyOle)
{
ScGlobal::pDrawClipDocShellRef =
- new ScDocShellRef(new ScDocShell(SFXMODEL_EMBEDDED_OBJECT | SFXMODEL_DISABLE_EMBEDDED_SCRIPTS)); // there must be a ref
+ new ScDocShellRef(new ScDocShell(SfxModelFlags::EMBEDDED_OBJECT | SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS)); // there must be a ref
(*ScGlobal::pDrawClipDocShellRef)->DoInitNew(NULL);
return *ScGlobal::pDrawClipDocShellRef;
}
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx
index c98146080c2f..ee36eeb7d9fd 100644
--- a/sc/source/ui/docshell/arealink.cxx
+++ b/sc/source/ui/docshell/arealink.cxx
@@ -254,7 +254,7 @@ bool ScAreaLink::Refresh( const OUString& rNewFile, const OUString& rNewFilter,
SfxMedium* pMed = ScDocumentLoader::CreateMedium( aNewUrl, pFilter, aOptions);
// aRef->DoClose() will be closed explicitly, but it is still more safe to use SfxObjectShellLock here
- ScDocShell* pSrcShell = new ScDocShell(SFXMODEL_EMBEDDED_OBJECT | SFXMODEL_DISABLE_EMBEDDED_SCRIPTS);
+ ScDocShell* pSrcShell = new ScDocShell(SfxModelFlags::EMBEDDED_OBJECT | SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS);
SfxObjectShellLock aRef = pSrcShell;
pSrcShell->DoLoad(pMed);
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index ce2e040869b7..bbed5ae8e479 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -2671,7 +2671,7 @@ ScDocShell::ScDocShell( const ScDocShell& rShell ) :
// InitItems and CalcOutputFactor are called now in Load/ConvertFrom/InitNew
}
-ScDocShell::ScDocShell( const sal_uInt64 i_nSfxCreationFlags ) :
+ScDocShell::ScDocShell( const SfxModelFlags i_nSfxCreationFlags ) :
SfxObjectShell( i_nSfxCreationFlags ),
aDocument ( SCDOCMODE_DOCUMENT, this ),
aDdeTextFmt(OUString("TEXT")),
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index ff22d8d44b12..5aa46e5c6f78 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -2366,7 +2366,7 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, OUSt
// To load encrypted documents with password, user interaction needs to be enabled.
pMedium->UseInteractionHandler(mbUserInteractionEnabled);
- ScDocShell* pNewShell = new ScDocShell(SFXMODEL_EXTERNAL_LINK);
+ ScDocShell* pNewShell = new ScDocShell(SfxModelFlags::EXTERNAL_LINK);
SfxObjectShellRef aRef = pNewShell;
// increment the recursive link count of the source document.
diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx
index b744295fa13a..3a7cc5951aff 100644
--- a/sc/source/ui/docshell/tablink.cxx
+++ b/sc/source/ui/docshell/tablink.cxx
@@ -200,7 +200,7 @@ bool ScTableLink::Refresh(const OUString& rNewFile, const OUString& rNewFilter,
pMed->UseInteractionHandler(true); // enable the filter options dialog
// aRef->DoClose() will be called explicitly, but it is still more safe to use SfxObjectShellLock here
- ScDocShell* pSrcShell = new ScDocShell(SFXMODEL_EMBEDDED_OBJECT | SFXMODEL_DISABLE_EMBEDDED_SCRIPTS);
+ ScDocShell* pSrcShell = new ScDocShell(SfxModelFlags::EMBEDDED_OBJECT | SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS);
SfxObjectShellLock aRef = pSrcShell;
pSrcShell->DoLoad(pMed);
@@ -532,7 +532,7 @@ ScDocumentLoader::ScDocumentLoader( const OUString& rFileName,
if ( bWithInteraction )
pMedium->UseInteractionHandler( true ); // to enable the filter options dialog
- pDocShell = new ScDocShell( SFXMODEL_EMBEDDED_OBJECT | SFXMODEL_DISABLE_EMBEDDED_SCRIPTS );
+ pDocShell = new ScDocShell( SfxModelFlags::EMBEDDED_OBJECT | SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS );
aRef = pDocShell;
ScDocument& rDoc = pDocShell->GetDocument();
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 990ecce1790e..e0576a598669 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -173,7 +173,7 @@ private:
public:
ScDocShell( const ScDocShell& rDocShell );
- ScDocShell( const sal_uInt64 i_nSfxCreationFlags = SFXMODEL_EMBEDDED_OBJECT );
+ ScDocShell( const SfxModelFlags i_nSfxCreationFlags = SfxModelFlags::EMBEDDED_OBJECT );
virtual ~ScDocShell();
#if ENABLE_TELEPATHY
diff --git a/sc/source/ui/unoobj/unodoc.cxx b/sc/source/ui/unoobj/unodoc.cxx
index d200661ea6b3..a5f99b2af757 100644
--- a/sc/source/ui/unoobj/unodoc.cxx
+++ b/sc/source/ui/unoobj/unodoc.cxx
@@ -44,7 +44,7 @@ uno::Sequence< OUString > SAL_CALL ScDocument_getSupportedServiceNames() throw()
}
uno::Reference< uno::XInterface > SAL_CALL ScDocument_createInstance(
- const uno::Reference< lang::XMultiServiceFactory > & /* rSMgr */, const sal_uInt64 _nCreationFlags ) throw( uno::Exception, std::exception )
+ const uno::Reference< lang::XMultiServiceFactory > & /* rSMgr */, SfxModelFlags _nCreationFlags ) throw( uno::Exception, std::exception )
{
SolarMutexGuard aGuard;
ScDLL::Init();
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index 626c4ff3bbfb..5a94790542f7 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -129,7 +129,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
SfxMedium* pMedium = new SfxMedium( xStore, OUString() );
// TODO/LATER: is it a problem that we don't support binary formats here?
- ScDocShellRef xDocShRef = new ScDocShell(SFXMODEL_STANDARD);
+ ScDocShellRef xDocShRef = new ScDocShell(SfxModelFlags::EMBEDDED_OBJECT);
if (xDocShRef->DoLoad(pMedium))
{
ScDocument& rSrcDoc = xDocShRef->GetDocument();
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index 8ad53d52e0a0..db475df23123 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -132,7 +132,7 @@ DrawDocShell::DrawDocShell(SfxObjectCreateMode eMode,
Construct( eMode == SfxObjectCreateMode::INTERNAL );
}
-DrawDocShell::DrawDocShell( const sal_uInt64 nModelCreationFlags, bool bDataObject, DocumentType eDocumentType ) :
+DrawDocShell::DrawDocShell( SfxModelFlags nModelCreationFlags, bool bDataObject, DocumentType eDocumentType ) :
SfxObjectShell( nModelCreationFlags ),
mpDoc(NULL),
mpUndoManager(NULL),
diff --git a/sd/source/ui/docshell/grdocsh.cxx b/sd/source/ui/docshell/grdocsh.cxx
index a2fb7cf9d650..ac885351d93c 100644
--- a/sd/source/ui/docshell/grdocsh.cxx
+++ b/sd/source/ui/docshell/grdocsh.cxx
@@ -60,7 +60,7 @@ GraphicDocShell::GraphicDocShell(SfxObjectCreateMode eMode,
SetStyleFamily( SD_STYLE_FAMILY_GRAPHICS );
}
-GraphicDocShell::GraphicDocShell(const sal_uInt64 nModelCreationFlags,
+GraphicDocShell::GraphicDocShell(SfxModelFlags nModelCreationFlags,
bool bDataObject,
DocumentType eDocType) :
DrawDocShell(nModelCreationFlags, bDataObject, eDocType)
diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx
index 791c6083d612..bd7fec402ab5 100644
--- a/sd/source/ui/inc/DrawDocShell.hxx
+++ b/sd/source/ui/inc/DrawDocShell.hxx
@@ -64,7 +64,7 @@ public:
DocumentType=DOCUMENT_TYPE_IMPRESS);
DrawDocShell (
- const sal_uInt64 nModelCreationFlags,
+ SfxModelFlags nModelCreationFlags,
bool bSdDataObj=false,
DocumentType=DOCUMENT_TYPE_IMPRESS);
diff --git a/sd/source/ui/inc/GraphicDocShell.hxx b/sd/source/ui/inc/GraphicDocShell.hxx
index 987e1e99356f..7734f9089b83 100644
--- a/sd/source/ui/inc/GraphicDocShell.hxx
+++ b/sd/source/ui/inc/GraphicDocShell.hxx
@@ -52,7 +52,7 @@ public:
DocumentType=DOCUMENT_TYPE_DRAW);
GraphicDocShell (
- const sal_uInt64 nModelCreationFlags,
+ SfxModelFlags nModelCreationFlags,
bool bSdDataObj=false,
DocumentType=DOCUMENT_TYPE_DRAW);
diff --git a/sd/source/ui/inc/facreg.hxx b/sd/source/ui/inc/facreg.hxx
index e69f15b403ef..23ab042b29db 100644
--- a/sd/source/ui/inc/facreg.hxx
+++ b/sd/source/ui/inc/facreg.hxx
@@ -21,17 +21,18 @@
#define INCLUDED_SD_SOURCE_UI_INC_FACREG_HXX
#include <sal/config.h>
+#include <sfx2/sfxmodelfactory.hxx>
namespace com { namespace sun { namespace star {
namespace lang { class XMultiServiceFactory; }
namespace uno { class XComponentContext; }
} } }
-css::uno::Reference< css::uno::XInterface > SAL_CALL SdDrawingDocument_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory > & _rxFactory, const sal_uInt64 _nCreationFlags );
+css::uno::Reference< css::uno::XInterface > SAL_CALL SdDrawingDocument_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory > & _rxFactory, SfxModelFlags _nCreationFlags );
OUString SdDrawingDocument_getImplementationName() throw( css::uno::RuntimeException );
css::uno::Sequence< OUString > SAL_CALL SdDrawingDocument_getSupportedServiceNames() throw( css::uno::RuntimeException );
-css::uno::Reference< css::uno::XInterface > SAL_CALL SdPresentationDocument_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory > & _rxFactory, const sal_uInt64 _nCreationFlags );
+css::uno::Reference< css::uno::XInterface > SAL_CALL SdPresentationDocument_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory > & _rxFactory, SfxModelFlags _nCreationFlags );
OUString SdPresentationDocument_getImplementationName() throw( css::uno::RuntimeException );
css::uno::Sequence< OUString > SAL_CALL SdPresentationDocument_getSupportedServiceNames() throw( css::uno::RuntimeException );
diff --git a/sd/source/ui/unoidl/unodoc.cxx b/sd/source/ui/unoidl/unodoc.cxx
index 1869fcde444d..87375a3f4683 100644
--- a/sd/source/ui/unoidl/unodoc.cxx
+++ b/sd/source/ui/unoidl/unodoc.cxx
@@ -48,7 +48,7 @@ uno::Sequence< OUString > SAL_CALL SdDrawingDocument_getSupportedServiceNames()
}
uno::Reference< uno::XInterface > SAL_CALL SdDrawingDocument_createInstance(
- const uno::Reference< lang::XMultiServiceFactory > &, const sal_uInt64 _nCreationFlags )
+ const uno::Reference< lang::XMultiServiceFactory > &, SfxModelFlags _nCreationFlags )
{
SolarMutexGuard aGuard;
@@ -77,7 +77,7 @@ uno::Sequence< OUString > SAL_CALL SdPresentationDocument_getSupportedServiceNam
}
uno::Reference< uno::XInterface > SAL_CALL SdPresentationDocument_createInstance(
- const uno::Reference< lang::XMultiServiceFactory > &, const sal_uInt64 _nCreationFlags )
+ const uno::Reference< lang::XMultiServiceFactory > &, SfxModelFlags _nCreationFlags )
{
SolarMutexGuard aGuard;
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 ) );
diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx
index e437dd1ccee1..f439b135c26c 100644
--- a/starmath/inc/document.hxx
+++ b/starmath/inc/document.hxx
@@ -162,7 +162,7 @@ private:
static void InitInterface_Impl();
public:
- SmDocShell( const sal_uInt64 i_nSfxCreationFlags );
+ SmDocShell( SfxModelFlags i_nSfxCreationFlags );
virtual ~SmDocShell();
void LoadSymbols();
diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
index 4e4de168d476..7736d2f0b8ff 100644
--- a/starmath/qa/cppunit/test_nodetotextvisitors.cxx
+++ b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
@@ -11,6 +11,7 @@
#include <test/bootstrapfixture.hxx>
#include <vcl/svapp.hxx>
+#include <sfx2/sfxmodelfactory.hxx>
#include <smdll.hxx>
#include <document.hxx>
@@ -87,7 +88,7 @@ void Test::setUp()
SmGlobals::ensure();
- xDocShRef = new SmDocShell(SFXOBJECTSHELL_STD_NORMAL);
+ xDocShRef = new SmDocShell(SfxModelFlags::EMBEDDED_OBJECT);
}
void Test::tearDown()
diff --git a/starmath/qa/cppunit/test_starmath.cxx b/starmath/qa/cppunit/test_starmath.cxx
index 054af675bfd1..5184b38529ae 100644
--- a/starmath/qa/cppunit/test_starmath.cxx
+++ b/starmath/qa/cppunit/test_starmath.cxx
@@ -73,9 +73,9 @@ void Test::setUp()
SmGlobals::ensure();
m_xDocShRef = new SmDocShell(
- SFXMODEL_STANDARD |
- SFXMODEL_DISABLE_EMBEDDED_SCRIPTS |
- SFXMODEL_DISABLE_DOCUMENT_RECOVERY);
+ SfxModelFlags::EMBEDDED_OBJECT |
+ SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS |
+ SfxModelFlags::DISABLE_DOCUMENT_RECOVERY);
m_xDocShRef->DoInitNew(0);
SfxViewFrame *pViewFrame = SfxViewFrame::LoadHiddenDocument(*m_xDocShRef, 0);
diff --git a/starmath/qa/extras/mmlimport-test.cxx b/starmath/qa/extras/mmlimport-test.cxx
index e52ebf308daa..3effb31a2823 100644
--- a/starmath/qa/extras/mmlimport-test.cxx
+++ b/starmath/qa/extras/mmlimport-test.cxx
@@ -55,9 +55,9 @@ private:
"private:factory/smath*");
pFilter->SetVersion(SOFFICE_FILEFORMAT_60);
- mxDocShell = new SmDocShell(SFXMODEL_STANDARD |
- SFXMODEL_DISABLE_EMBEDDED_SCRIPTS |
- SFXMODEL_DISABLE_DOCUMENT_RECOVERY);
+ mxDocShell = new SmDocShell(SfxModelFlags::EMBEDDED_OBJECT |
+ SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS |
+ SfxModelFlags::DISABLE_DOCUMENT_RECOVERY);
SfxMedium* pSrcMed = new SfxMedium(rURL, STREAM_STD_READ);
pSrcMed->SetFilter(pFilter);
diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index 907d1480b020..12eb670136a1 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -27,6 +27,7 @@
#include <svl/stritem.hxx>
#include <sfx2/dispatch.hxx>
+#include <sfx2/sfxmodelfactory.hxx>
#include <vcl/settings.hxx>
typedef tools::SvRef<SmDocShell> SmDocShellRef;
@@ -219,7 +220,7 @@ const sal_uInt16 SmElementsControl::aOthers[][2] =
SmElementsControl::SmElementsControl(vcl::Window *pParent)
: Control(pParent, WB_TABSTOP)
- , mpDocShell(new SmDocShell(SFXOBJECTSHELL_STD_NORMAL))
+ , mpDocShell(new SmDocShell(SfxModelFlags::EMBEDDED_OBJECT))
, maCurrentSetId(0)
, mpCurrentElement(NULL)
, mbVerticalMode(true)
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 2f1c91b384c7..b6d37ac4d197 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -653,7 +653,7 @@ void SmDocShell::Repaint()
}
-SmDocShell::SmDocShell( const sal_uInt64 i_nSfxCreationFlags ) :
+SmDocShell::SmDocShell( SfxModelFlags i_nSfxCreationFlags ) :
SfxObjectShell( i_nSfxCreationFlags ),
pTree ( 0 ),
pEditEngineItemPool ( 0 ),
diff --git a/starmath/source/register.hxx b/starmath/source/register.hxx
index 5aac343b9a42..97b4692eb319 100644
--- a/starmath/source/register.hxx
+++ b/starmath/source/register.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_STARMATH_SOURCE_REGISTER_HXX
#include <sal/config.h>
+#include <sfx2/sfxmodelfactory.hxx>
//Math document
css::uno::Sequence< OUString > SAL_CALL
@@ -28,7 +29,7 @@ css::uno::Sequence< OUString > SAL_CALL
OUString SAL_CALL
SmDocument_getImplementationName() throw();
css::uno::Reference< css::uno::XInterface >SAL_CALL
- SmDocument_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr, const sal_uInt64 _nCreationFlags) throw( css::uno::Exception );
+ SmDocument_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > & rSMgr, SfxModelFlags _nCreationFlags) throw( css::uno::Exception );
//MathML import
css::uno::Sequence< OUString > SAL_CALL
diff --git a/starmath/source/unodoc.cxx b/starmath/source/unodoc.cxx
index 1d89f4a0ab77..df5a5974f4f1 100644
--- a/starmath/source/unodoc.cxx
+++ b/starmath/source/unodoc.cxx
@@ -40,7 +40,7 @@ uno::Sequence< OUString > SAL_CALL SmDocument_getSupportedServiceNames() throw()
}
uno::Reference< uno::XInterface > SAL_CALL SmDocument_createInstance(
- const uno::Reference< lang::XMultiServiceFactory > & /*rSMgr*/, const sal_uInt64 _nCreationFlags ) throw( uno::Exception )
+ const uno::Reference< lang::XMultiServiceFactory > & /*rSMgr*/, SfxModelFlags _nCreationFlags ) throw( uno::Exception )
{
SolarMutexGuard aGuard;
SmGlobals::ensure();
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index deea28ed1ab6..9fbb8741ed32 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -168,7 +168,7 @@ public:
/// Doc is required for SO data exchange!
SwDocShell( SfxObjectCreateMode eMode = SfxObjectCreateMode::EMBEDDED );
- SwDocShell( const sal_uInt64 i_nSfxCreationFlags );
+ SwDocShell( SfxModelFlags i_nSfxCreationFlags );
SwDocShell( SwDoc *pDoc, SfxObjectCreateMode eMode = SfxObjectCreateMode::STANDARD );
virtual ~SwDocShell();
diff --git a/sw/source/core/inc/unofreg.hxx b/sw/source/core/inc/unofreg.hxx
index 962baac7debc..b7c2aeb20fbc 100644
--- a/sw/source/core/inc/unofreg.hxx
+++ b/sw/source/core/inc/unofreg.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_SW_SOURCE_CORE_INC_UNOFREG_HXX
#include <sal/config.h>
+#include <sfx2/sfxmodelfactory.hxx>
#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/uno/Sequence.hxx>
@@ -37,7 +38,7 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL SwUnoModule_createInstance(
// writer documents
css::uno::Sequence< OUString > SAL_CALL SwTextDocument_getSupportedServiceNames() throw();
OUString SAL_CALL SwTextDocument_getImplementationName() throw();
-css::uno::Reference< css::uno::XInterface > SAL_CALL SwTextDocument_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory > &rSMgr, const sal_uInt64 _nCreationFlags ) throw( css::uno::Exception );
+css::uno::Reference< css::uno::XInterface > SAL_CALL SwTextDocument_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory > &rSMgr, SfxModelFlags _nCreationFlags ) throw( css::uno::Exception );
#endif
diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx
index a02f78742856..8a752cae5c1b 100644
--- a/sw/source/uibase/app/docshini.cxx
+++ b/sw/source/uibase/app/docshini.cxx
@@ -337,7 +337,7 @@ SwDocShell::SwDocShell( SfxObjectCreateMode const eMode )
}
// Ctor / Dtor
-SwDocShell::SwDocShell( const sal_uInt64 i_nSfxCreationFlags )
+SwDocShell::SwDocShell( const SfxModelFlags i_nSfxCreationFlags )
: SfxObjectShell ( i_nSfxCreationFlags )
, m_pDoc(nullptr)
, m_pFontList(nullptr)
diff --git a/sw/source/uibase/uno/unodoc.cxx b/sw/source/uibase/uno/unodoc.cxx
index c2782f62db81..bfa5ce5b4c6e 100644
--- a/sw/source/uibase/uno/unodoc.cxx
+++ b/sw/source/uibase/uno/unodoc.cxx
@@ -48,7 +48,7 @@ OUString SAL_CALL SwTextDocument_getImplementationName() throw()
}
uno::Reference< uno::XInterface > SAL_CALL SwTextDocument_createInstance(
- const uno::Reference< lang::XMultiServiceFactory >&, const sal_uInt64 _nCreationFlags )
+ const uno::Reference< lang::XMultiServiceFactory >&, SfxModelFlags _nCreationFlags )
throw( uno::Exception )
{
SolarMutexGuard aGuard;