summaryrefslogtreecommitdiff
path: root/sc
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 /sc
parent89dd3f80685c66883b6ed4efbf369f5aa2dc292e (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 'sc')
-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
12 files changed, 23 insertions, 22 deletions
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();