summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/sfx2/objsh.hxx18
-rw-r--r--sc/source/core/tool/progress.cxx2
-rw-r--r--sc/source/filter/xml/xmlwrap.cxx10
-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.cxx12
-rw-r--r--sc/source/ui/docshell/docsh4.cxx4
-rw-r--r--sc/source/ui/docshell/docsh6.cxx4
-rw-r--r--sc/source/ui/docshell/tablink.cxx4
-rw-r--r--sc/source/ui/unoobj/confuno.cxx2
-rw-r--r--sc/source/ui/unoobj/docuno.cxx6
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx8
-rw-r--r--sc/source/ui/view/viewfun5.cxx2
-rw-r--r--sd/source/core/drawdoc.cxx6
-rw-r--r--sd/source/core/drawdoc3.cxx4
-rw-r--r--sd/source/filter/xml/sdxmlwrp.cxx6
-rw-r--r--sd/source/ui/app/sdmod1.cxx4
-rw-r--r--sd/source/ui/app/sdxfer.cxx2
-rw-r--r--sd/source/ui/dlg/dlgass.cxx2
-rw-r--r--sd/source/ui/dlg/navigatr.cxx2
-rw-r--r--sd/source/ui/dlg/sdtreelb.cxx2
-rw-r--r--sd/source/ui/docshell/docshel4.cxx6
-rw-r--r--sd/source/ui/docshell/docshell.cxx8
-rw-r--r--sd/source/ui/inc/DrawDocShell.hxx4
-rw-r--r--sd/source/ui/inc/GraphicDocShell.hxx2
-rw-r--r--sd/source/ui/unoidl/UnoDocumentSettings.cxx2
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx2
-rw-r--r--sd/source/ui/view/drviews3.cxx2
-rw-r--r--sd/source/ui/view/drviews5.cxx4
-rw-r--r--sd/source/ui/view/drviews7.cxx2
-rw-r--r--sd/source/ui/view/drviewsa.cxx6
-rw-r--r--sd/source/ui/view/frmview.cxx10
-rw-r--r--sd/source/ui/view/presvish.cxx4
-rw-r--r--sd/source/ui/view/sdview3.cxx4
-rw-r--r--sd/source/ui/view/viewshe2.cxx2
-rw-r--r--sfx2/source/appl/sfxpicklist.cxx2
-rw-r--r--sfx2/source/doc/objcont.cxx2
-rw-r--r--sfx2/source/doc/objembed.cxx2
-rw-r--r--sfx2/source/doc/objmisc.cxx4
-rw-r--r--sfx2/source/doc/objstor.cxx16
-rw-r--r--sfx2/source/doc/objxtor.cxx16
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx14
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx2
-rw-r--r--sfx2/source/view/viewfrm.cxx10
-rw-r--r--sfx2/source/view/viewfrm2.cxx2
-rw-r--r--starmath/source/cursor.cxx4
-rw-r--r--starmath/source/document.cxx18
-rw-r--r--starmath/source/mathmlexport.cxx2
-rw-r--r--starmath/source/mathmlimport.cxx2
-rw-r--r--starmath/source/unomodel.cxx2
-rw-r--r--sw/inc/docsh.hxx4
-rw-r--r--sw/inc/globdoc.hxx2
-rw-r--r--sw/inc/wdocsh.hxx2
-rw-r--r--sw/qa/core/macros-test.cxx2
-rw-r--r--sw/qa/core/uwriter.cxx2
-rw-r--r--sw/source/core/doc/DocumentLinksAdministrationManager.cxx6
-rw-r--r--sw/source/core/doc/docglbl.cxx2
-rw-r--r--sw/source/core/doc/docnew.cxx2
-rw-r--r--sw/source/core/layout/paintfrm.cxx2
-rw-r--r--sw/source/core/ole/ndole.cxx6
-rw-r--r--sw/source/core/swg/SwXMLTextBlocks.cxx4
-rw-r--r--sw/source/core/unocore/unocoll.cxx2
-rw-r--r--sw/source/filter/basflt/shellio.cxx2
-rw-r--r--sw/source/filter/html/swhtml.cxx2
-rw-r--r--sw/source/filter/ww8/ww8glsy.cxx2
-rw-r--r--sw/source/filter/xml/swxml.cxx2
-rw-r--r--sw/source/filter/xml/wrtxml.cxx4
-rw-r--r--sw/source/ui/dbui/mmoutputpage.cxx4
-rw-r--r--sw/source/uibase/app/appenv.cxx2
-rw-r--r--sw/source/uibase/app/apphdl.cxx4
-rw-r--r--sw/source/uibase/app/applab.cxx2
-rw-r--r--sw/source/uibase/app/docsh.cxx20
-rw-r--r--sw/source/uibase/app/docsh2.cxx4
-rw-r--r--sw/source/uibase/app/docshini.cxx22
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx4
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx6
-rw-r--r--sw/source/uibase/misc/glshell.cxx4
-rw-r--r--sw/source/uibase/shells/textsh.cxx8
-rw-r--r--sw/source/uibase/uiview/view.cxx4
-rw-r--r--sw/source/uibase/uiview/view2.cxx12
-rw-r--r--sw/source/uibase/uiview/viewport.cxx6
-rw-r--r--sw/source/uibase/uno/SwXDocumentSettings.cxx2
-rw-r--r--sw/source/uibase/uno/unodoc.cxx4
-rw-r--r--sw/source/uibase/uno/unomailmerge.cxx2
-rw-r--r--sw/source/uibase/uno/unotxvw.cxx2
85 files changed, 210 insertions, 210 deletions
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 423e0fb4b39b..32aabff6fcef 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -143,14 +143,14 @@ enum HiddenWarningFact
WhenCreatingPDF
};
-enum SfxObjectCreateMode
+enum class SfxObjectCreateMode
{
- SFX_CREATE_MODE_EMBEDDED,
- SFX_CREATE_MODE_STANDARD,
- SFX_CREATE_MODE_PREVIEW,
- SFX_CREATE_MODE_ORGANIZER,
- SFX_CREATE_MODE_PLUGIN,
- SFX_CREATE_MODE_INTERNAL
+ EMBEDDED,
+ STANDARD,
+ PREVIEW,
+ ORGANIZER,
+ PLUGIN,
+ INTERNAL
};
/*
@@ -506,8 +506,8 @@ public:
virtual ::com::sun::star::uno::Sequence< OUString > GetEventNames();
vcl::Window* GetDialogParent( SfxMedium* pMedium=0 );
- static SfxObjectShell* CreateObject( const OUString& rServiceName, SfxObjectCreateMode = SFX_CREATE_MODE_STANDARD );
- static SfxObjectShell* CreateObjectByFactoryName( const OUString& rURL, SfxObjectCreateMode = SFX_CREATE_MODE_STANDARD );
+ static SfxObjectShell* CreateObject( const OUString& rServiceName, SfxObjectCreateMode = SfxObjectCreateMode::STANDARD );
+ static SfxObjectShell* CreateObjectByFactoryName( const OUString& rURL, SfxObjectCreateMode = SfxObjectCreateMode::STANDARD );
static ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >
CreateAndLoadComponent( const SfxItemSet& rSet, SfxFrame* pFrame = NULL );
static SfxObjectShell* GetShellFromComponent( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xComp );
diff --git a/sc/source/core/tool/progress.cxx b/sc/source/core/tool/progress.cxx
index c428447b4163..ed5dcdcc2ccd 100644
--- a/sc/source/core/tool/progress.cxx
+++ b/sc/source/core/tool/progress.cxx
@@ -95,7 +95,7 @@ ScProgress::ScProgress( SfxObjectShell* pObjSh, const OUString& rText,
pProgress = NULL;
}
- else if ( pObjSh && ( pObjSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ||
+ else if ( pObjSh && ( pObjSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED ||
pObjSh->GetProgress() ||
lcl_HasControllersLocked(*pObjSh) ) )
{
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index dee1722a6cd3..b2ee358a1fec 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -385,7 +385,7 @@ bool ScXMLImportWrapper::Import( sal_uInt8 nMode, ErrCode& rError )
// TODO/LATER: do not do it for embedded links
OUString aName;
- if (SFX_CREATE_MODE_EMBEDDED == mrDocShell.GetCreateMode())
+ if (SfxObjectCreateMode::EMBEDDED == mrDocShell.GetCreateMode())
{
if ( pMedium && pMedium->GetItemSet() )
{
@@ -404,7 +404,7 @@ bool ScXMLImportWrapper::Import( sal_uInt8 nMode, ErrCode& rError )
}
}
- if (mrDocShell.GetCreateMode() == SFX_CREATE_MODE_ORGANIZER)
+ if (mrDocShell.GetCreateMode() == SfxObjectCreateMode::ORGANIZER)
xInfoSet->setPropertyValue("OrganizerMode", uno::makeAny(true));
xInfoSet->setPropertyValue( "SourceStorage", uno::Any( xStorage ) );
@@ -520,7 +520,7 @@ bool ScXMLImportWrapper::Import( sal_uInt8 nMode, ErrCode& rError )
sal_uInt32 nDocRetval(0);
if ((nMode & CONTENT) == CONTENT)
{
- if (mrDocShell.GetCreateMode() == SFX_CREATE_MODE_INTERNAL)
+ if (mrDocShell.GetCreateMode() == SfxObjectCreateMode::INTERNAL)
// We only need to import content for external link cache document.
xInfoSet->setPropertyValue(SC_UNO_ODS_IMPORT_STYLES, uno::makeAny(false));
@@ -807,7 +807,7 @@ bool ScXMLImportWrapper::Export(bool bStylesOnly)
xInfoSet->setPropertyValue( sPropName, uno::makeAny( aBaseURL ) );
// TODO/LATER: do not do it for embedded links
- if( SFX_CREATE_MODE_EMBEDDED == pObjSh->GetCreateMode() )
+ if( SfxObjectCreateMode::EMBEDDED == pObjSh->GetCreateMode() )
{
OUString aName("dummyObjectName");
if ( pMedium && pMedium->GetItemSet() )
@@ -825,7 +825,7 @@ bool ScXMLImportWrapper::Export(bool bStylesOnly)
}
}
- bool bMetaRet(pObjSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED);
+ bool bMetaRet(pObjSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED);
bool bStylesRet (false);
bool bDocRet(false);
bool bSettingsRet(false);
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index df4435a3014e..c8d3de3c6b14 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(SFX_CREATE_MODE_INTERNAL)); // there must be a ref
+ new ScDocShellRef(new ScDocShell(SFXMODEL_EMBEDDED_OBJECT | SFXMODEL_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 d1d550078b8e..c98146080c2f 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(SFX_CREATE_MODE_INTERNAL);
+ ScDocShell* pSrcShell = new ScDocShell(SFXMODEL_EMBEDDED_OBJECT | SFXMODEL_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 959837b6dc76..ce2e040869b7 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -274,7 +274,7 @@ void ScDocShell::BeforeXMLLoading()
void ScDocShell::AfterXMLLoading(bool bRet)
{
- if (GetCreateMode() != SFX_CREATE_MODE_ORGANIZER)
+ if (GetCreateMode() != SfxObjectCreateMode::ORGANIZER)
{
UpdateLinks();
// don't prevent establishing of listeners anymore
@@ -444,7 +444,7 @@ bool ScDocShell::LoadXML( SfxMedium* pLoadMedium, const ::com::sun::star::uno::R
bool bRet = false;
ErrCode nError = ERRCODE_NONE;
aDocument.EnableAdjustHeight(false);
- if (GetCreateMode() == SFX_CREATE_MODE_ORGANIZER)
+ if (GetCreateMode() == SfxObjectCreateMode::ORGANIZER)
bRet = aImport.Import(ScXMLImportWrapper::STYLES, nError);
else
bRet = aImport.Import(ScXMLImportWrapper::ALL, nError);
@@ -517,7 +517,7 @@ bool ScDocShell::SaveXML( SfxMedium* pSaveMedium, const ::com::sun::star::uno::R
ScXMLImportWrapper aImport(*this, pSaveMedium, xStor);
bool bRet(false);
- if (GetCreateMode() != SFX_CREATE_MODE_ORGANIZER)
+ if (GetCreateMode() != SfxObjectCreateMode::ORGANIZER)
bRet = aImport.Export(false);
else
bRet = aImport.Export(true);
@@ -1575,7 +1575,7 @@ ScDocShell::PrepareSaveGuard::PrepareSaveGuard( ScDocShell& rDocShell )
mrDocShell.aDocument.MarkUsedExternalReferences(); // Mark tables of external references to be written.
}
}
- if (mrDocShell.GetCreateMode()== SFX_CREATE_MODE_STANDARD)
+ if (mrDocShell.GetCreateMode()== SfxObjectCreateMode::STANDARD)
mrDocShell.SfxObjectShell::SetVisArea( Rectangle() ); // "Normally" worked on => no VisArea.
}
@@ -2192,7 +2192,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
if (pAutoStyleList)
pAutoStyleList->ExecuteAllNow(); // Execute template timeouts now
- if (GetCreateMode()== SFX_CREATE_MODE_STANDARD)
+ if (GetCreateMode()== SfxObjectCreateMode::STANDARD)
SfxObjectShell::SetVisArea( Rectangle() ); // Edited normally -> no VisArea
OSL_ENSURE( rMed.GetFilter(), "Filter == 0" );
@@ -2698,7 +2698,7 @@ ScDocShell::ScDocShell( const sal_uInt64 i_nSfxCreationFlags ) :
{
SetPool( &SC_MOD()->GetPool() );
- bIsInplace = (GetCreateMode() == SFX_CREATE_MODE_EMBEDDED);
+ bIsInplace = (GetCreateMode() == SfxObjectCreateMode::EMBEDDED);
// Will be reset if not in place
pDocFunc = CreateDocFunc();
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index c2077f7eb6d1..d9b73555cf3e 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1888,7 +1888,7 @@ void ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, sal_uI
Rectangle ScDocShell::GetVisArea( sal_uInt16 nAspect ) const
{
SfxObjectCreateMode eShellMode = GetCreateMode();
- if ( eShellMode == SFX_CREATE_MODE_ORGANIZER )
+ if ( eShellMode == SfxObjectCreateMode::ORGANIZER )
{
// ohne Inhalte wissen wir auch nicht, wie gross die Inhalte sind
// leeres Rechteck zurueckgeben, das wird dann nach dem Laden berechnet
@@ -1913,7 +1913,7 @@ Rectangle ScDocShell::GetVisArea( sal_uInt16 nAspect ) const
SnapVisArea( aArea );
return aArea;
}
- else if( nAspect == ASPECT_CONTENT && eShellMode != SFX_CREATE_MODE_EMBEDDED )
+ else if( nAspect == ASPECT_CONTENT && eShellMode != SfxObjectCreateMode::EMBEDDED )
{
// Visarea holen wie nach Load
diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx
index 92b6e2a5dc8e..3918dbc929df 100644
--- a/sc/source/ui/docshell/docsh6.cxx
+++ b/sc/source/ui/docshell/docsh6.cxx
@@ -171,7 +171,7 @@ void ScDocShell::SetVisAreaOrSize( const Rectangle& rVisArea, bool bModifyStart
bool ScDocShell::IsOle()
{
- return (GetCreateMode() == SFX_CREATE_MODE_EMBEDDED);
+ return (GetCreateMode() == SfxObjectCreateMode::EMBEDDED);
}
void ScDocShell::UpdateOle( const ScViewData* pViewData, bool bSnapSize )
@@ -179,7 +179,7 @@ void ScDocShell::UpdateOle( const ScViewData* pViewData, bool bSnapSize )
// wenn's gar nicht Ole ist, kann man sich die Berechnungen sparen
// (VisArea wird dann beim Save wieder zurueckgesetzt)
- if (GetCreateMode() == SFX_CREATE_MODE_STANDARD)
+ if (GetCreateMode() == SfxObjectCreateMode::STANDARD)
return;
OSL_ENSURE(pViewData,"pViewData==0 bei ScDocShell::UpdateOle");
diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx
index c669e6b69829..b744295fa13a 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(SFX_CREATE_MODE_INTERNAL);
+ ScDocShell* pSrcShell = new ScDocShell(SFXMODEL_EMBEDDED_OBJECT | SFXMODEL_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( SFX_CREATE_MODE_INTERNAL );
+ pDocShell = new ScDocShell( SFXMODEL_EMBEDDED_OBJECT | SFXMODEL_DISABLE_EMBEDDED_SCRIPTS );
aRef = pDocShell;
ScDocument& rDoc = pDocShell->GetDocument();
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index 6d0ceb731c8a..c7f19d4f4b93 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -184,7 +184,7 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
if ( aValue >>= sPrinterName )
{
// #i75610# if the name is empty, do nothing (don't create any printer)
- if ( !sPrinterName.isEmpty() && pDocShell->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
+ if ( !sPrinterName.isEmpty() && pDocShell->GetCreateMode() != SfxObjectCreateMode::EMBEDDED )
{
SfxPrinter* pPrinter = pDocShell->GetPrinter();
if (pPrinter)
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index f2d62cfbe539..20ffa3309d3b 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1854,7 +1854,7 @@ uno::Reference< container::XIndexAccess > SAL_CALL ScModelObj::getViewData( )
if( !xRet.is() )
{
SolarMutexGuard aGuard;
- if (pDocShell && pDocShell->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED)
+ if (pDocShell && pDocShell->GetCreateMode() == SfxObjectCreateMode::EMBEDDED)
{
uno::Reference < container::XIndexContainer > xCont = document::IndexedPropertyValues::create( ::comphelper::getProcessComponentContext() );
xRet.set( xCont, uno::UNO_QUERY_THROW );
@@ -2209,7 +2209,7 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const OUString& aPropertyName )
}
else if ( aString == "InternalDocument" )
{
- ScUnoHelpFunctions::SetBoolInAny( aRet, (pDocShell->GetCreateMode() == SFX_CREATE_MODE_INTERNAL) );
+ ScUnoHelpFunctions::SetBoolInAny( aRet, (pDocShell->GetCreateMode() == SfxObjectCreateMode::INTERNAL) );
}
else if ( aString == SC_UNO_INTEROPGRABBAG )
{
@@ -2251,7 +2251,7 @@ css::uno::Reference<css::uno::XInterface> ScModelObj::create(
// there should be no data provider, so that own data is used
bool bCreate =
! ( nType == SC_SERVICE_CHDATAPROV &&
- ( pDocShell->GetCreateMode() == SFX_CREATE_MODE_INTERNAL ));
+ ( pDocShell->GetCreateMode() == SfxObjectCreateMode::INTERNAL ));
// this should never happen, i.e. the temporary document should never be
// loaded, because this unlinks the data
OSL_ASSERT( bCreate );
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index a90605d795a8..b62648ec3840 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -323,7 +323,7 @@ bool ScTabViewShell::PrepareClose(bool bUI)
void ScTabViewShell::UpdateOleZoom()
{
ScDocShell* pDocSh = GetViewData().GetDocShell();
- if ( pDocSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ if ( pDocSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
{
//TODO/LATER: is there a difference between the two GetVisArea methods?
Size aObjSize = ((const SfxObjectShell*)pDocSh)->GetVisArea().GetSize();
@@ -1473,7 +1473,7 @@ void ScTabViewShell::Construct( sal_uInt8 nForceDesignMode )
bool bFirstView = !pFirst
|| (pFirst == GetViewFrame() && !SfxViewFrame::GetNext(*pFirst,pDocSh));
- if ( pDocSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ if ( pDocSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
{
//TODO/LATER: is there a difference between the two GetVisArea methods?
Rectangle aVisArea = ((const SfxObjectShell*)pDocSh)->GetVisArea();
@@ -1552,7 +1552,7 @@ void ScTabViewShell::Construct( sal_uInt8 nForceDesignMode )
rDoc.SetLayoutRTL( 0, ScGlobal::IsSystemRTL() );
// append additional sheets (not for OLE object)
- if ( pDocSh->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
+ if ( pDocSh->GetCreateMode() != SfxObjectCreateMode::EMBEDDED )
{
// Get the customized initial tab count
const ScDefaultsOptions& rOpt = SC_MOD()->GetDefaultsOptions();
@@ -1568,7 +1568,7 @@ void ScTabViewShell::Construct( sal_uInt8 nForceDesignMode )
// ReadExtOptions is now in Activate
// Link-Update nicht verschachteln
- if ( pDocSh->GetCreateMode() != SFX_CREATE_MODE_INTERNAL &&
+ if ( pDocSh->GetCreateMode() != SfxObjectCreateMode::INTERNAL &&
pDocSh->IsUpdateEnabled() ) // #105575#; update only in the first creation of the ViewShell
{
// Check if there are any external data.
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index ef3b99c30ee8..626c4ff3bbfb 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(SFX_CREATE_MODE_EMBEDDED);
+ ScDocShellRef xDocShRef = new ScDocShell(SFXMODEL_STANDARD);
if (xDocShRef->DoLoad(pMedium))
{
ScDocument& rSrcDoc = xDocShRef->GetDocument();
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 877eeb89e9c7..f3034577b876 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -452,10 +452,10 @@ SdDrawDocument* SdDrawDocument::AllocSdDrawDocument() const
if( meDocType == DOCUMENT_TYPE_IMPRESS )
mpCreatingTransferable->SetDocShell( new ::sd::DrawDocShell(
- SFX_CREATE_MODE_EMBEDDED, true, meDocType ) );
+ SfxObjectCreateMode::EMBEDDED, true, meDocType ) );
else
mpCreatingTransferable->SetDocShell( new ::sd::GraphicDocShell(
- SFX_CREATE_MODE_EMBEDDED, true, meDocType ) );
+ SfxObjectCreateMode::EMBEDDED, true, meDocType ) );
pNewDocSh = static_cast< ::sd::DrawDocShell*>( pObj = mpCreatingTransferable->GetDocShell() );
pNewDocSh->DoInitNew( NULL );
@@ -487,7 +487,7 @@ SdDrawDocument* SdDrawDocument::AllocSdDrawDocument() const
SdDrawDocument* pDoc = const_cast<SdDrawDocument*>(this);
pDoc->SetAllocDocSh(false);
pDoc->mxAllocedDocShRef = new ::sd::DrawDocShell(
- SFX_CREATE_MODE_EMBEDDED, true, meDocType);
+ SfxObjectCreateMode::EMBEDDED, true, meDocType);
pDoc->mxAllocedDocShRef->DoInitNew(NULL);
pNewModel = pDoc->mxAllocedDocShRef->GetDoc();
}
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index ee8739610b64..ec5416cc1f58 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -224,10 +224,10 @@ SdDrawDocument* SdDrawDocument::OpenBookmarkDoc(SfxMedium& rMedium)
// If that wasn't the case, we could load the model directly.
if ( bCreateGraphicShell )
// Draw
- mxBookmarkDocShRef = new ::sd::GraphicDocShell(SFX_CREATE_MODE_STANDARD, true);
+ mxBookmarkDocShRef = new ::sd::GraphicDocShell(SfxObjectCreateMode::STANDARD, true);
else
// Impress
- mxBookmarkDocShRef = new ::sd::DrawDocShell(SFX_CREATE_MODE_STANDARD, true);
+ mxBookmarkDocShRef = new ::sd::DrawDocShell(SfxObjectCreateMode::STANDARD, true);
bOK = mxBookmarkDocShRef->DoLoad(&rMedium);
if( bOK )
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx
index b10a3beb8f9a..bb7dd9671561 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -612,7 +612,7 @@ bool SdXMLFilter::Import( ErrCode& nError )
// Set base URI
xInfoSet->setPropertyValue( "BaseURI" , makeAny( mrMedium.GetBaseURL() ) );
- if( 0 == nRet && SFX_CREATE_MODE_EMBEDDED == mrDocShell.GetCreateMode() )
+ if( 0 == nRet && SfxObjectCreateMode::EMBEDDED == mrDocShell.GetCreateMode() )
{
OUString aName;
if ( mrMedium.GetItemSet() )
@@ -904,7 +904,7 @@ bool SdXMLFilter::Export()
OUString sTargetStorage( "TargetStorage" );
xInfoSet->setPropertyValue( sTargetStorage, Any( xStorage ) );
- if( SFX_CREATE_MODE_EMBEDDED == mrDocShell.GetCreateMode() )
+ if( SfxObjectCreateMode::EMBEDDED == mrDocShell.GetCreateMode() )
{
OUString aName;
if ( mrMedium.GetItemSet() )
@@ -979,7 +979,7 @@ bool SdXMLFilter::Export()
aServices[i ].mpService = pServiceNames->mpSettings;
aServices[i++].mpStream = sXML_settingsStreamName;
- if( mrDocShell.GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
+ if( mrDocShell.GetCreateMode() != SfxObjectCreateMode::EMBEDDED )
{
aServices[i ].mpService = pServiceNames->mpMeta;
aServices[i++].mpStream = sXML_metaStreamName;
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index a0e2880b7004..65108f1bffee 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -265,7 +265,7 @@ bool SdModule::OutlineToImpress(SfxRequest& rRequest)
SfxObjectShellLock xDocShell;
::sd::DrawDocShell* pDocSh;
xDocShell = pDocSh = new ::sd::DrawDocShell(
- SFX_CREATE_MODE_STANDARD, false);
+ SfxObjectCreateMode::STANDARD, false);
pDocSh->DoInitNew(NULL);
SdDrawDocument* pDoc = pDocSh->GetDoc();
@@ -721,7 +721,7 @@ SfxFrame* SdModule::CreateEmptyDocument( DocumentType eDocType, const Reference<
SfxObjectShellLock xDocShell;
::sd::DrawDocShell* pNewDocSh;
- xDocShell = pNewDocSh = new ::sd::DrawDocShell(SFX_CREATE_MODE_STANDARD,false,eDocType);
+ xDocShell = pNewDocSh = new ::sd::DrawDocShell(SfxObjectCreateMode::STANDARD,false,eDocType);
pNewDocSh->DoInitNew(NULL);
SdDrawDocument* pDoc = pNewDocSh->GetDoc();
if (pDoc)
diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index 32b0278d8686..0bd42e937b44 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -555,7 +555,7 @@ bool SdTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo
{
maDocShellRef = new ::sd::DrawDocShell(
mpSdDrawDocumentIntern,
- SFX_CREATE_MODE_EMBEDDED,
+ SfxObjectCreateMode::EMBEDDED,
true,
mpSdDrawDocumentIntern->GetDocumentType());
mbOwnDocument = false;
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx
index 8ed91666fbd3..9a41a1235d2c 100644
--- a/sd/source/ui/dlg/dlgass.cxx
+++ b/sd/source/ui/dlg/dlgass.cxx
@@ -1418,7 +1418,7 @@ void AssistentDlgImpl::UpdatePreview( bool bDocPreview )
CloseDocShell();
DrawDocShell* pNewDocSh;
- xDocShell = pNewDocSh = new DrawDocShell(SFX_CREATE_MODE_STANDARD, false);
+ xDocShell = pNewDocSh = new DrawDocShell(SfxObjectCreateMode::STANDARD, false);
pNewDocSh->DoInitNew(NULL);
SdDrawDocument* pDoc = pNewDocSh->GetDoc();
pDoc->CreateFirstPages();
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index f7b479162026..21fa0d9998d6 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -691,7 +691,7 @@ void SdNavigatorWin::RefreshDocumentLB( const OUString* pDocName )
while( pSfxDocShell )
{
::sd::DrawDocShell* pDocShell = PTR_CAST(::sd::DrawDocShell, pSfxDocShell );
- if( pDocShell && !pDocShell->IsInDestruction() && ( pDocShell->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) )
+ if( pDocShell && !pDocShell->IsInDestruction() && ( pDocShell->GetCreateMode() != SfxObjectCreateMode::EMBEDDED ) )
{
NavDocInfo aInfo ;
aInfo.mpDocShell = pDocShell;
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 12c2bcb08ebc..a0358f4c379f 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -990,7 +990,7 @@ SdDrawDocument* SdPageObjsTLB::GetBookmarkDoc(SfxMedium* pMed)
if( pMed )
{
// in this mode the document is also owned and controlled by this instance
- mxBookmarkDocShRef = new ::sd::DrawDocShell(SFX_CREATE_MODE_STANDARD, true);
+ mxBookmarkDocShRef = new ::sd::DrawDocShell(SfxObjectCreateMode::STANDARD, true);
if (mxBookmarkDocShRef->DoLoad(pMed))
mpBookmarkDoc = mxBookmarkDocShRef->GetDoc();
else
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 3eb55845f39e..f6531891be76 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -301,7 +301,7 @@ bool DrawDocShell::Load( SfxMedium& rMedium )
// space. Had to remove the check for empty VisArea below,
// since XML load always sets a VisArea before.
//TODO/LATER: looks a little bit strange!
- if( ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ) && SfxObjectShell::GetVisArea( ASPECT_CONTENT ).IsEmpty() )
+ if( ( GetCreateMode() == SfxObjectCreateMode::EMBEDDED ) && SfxObjectShell::GetVisArea( ASPECT_CONTENT ).IsEmpty() )
{
SdPage* pPage = mpDoc->GetSdPage( 0, PK_STANDARD );
@@ -517,7 +517,7 @@ bool DrawDocShell::Save()
mpDoc->StopWorkStartupDelay();
//TODO/LATER: why this?!
- if( GetCreateMode() == SFX_CREATE_MODE_STANDARD )
+ if( GetCreateMode() == SfxObjectCreateMode::STANDARD )
SfxObjectShell::SetVisArea( Rectangle() );
bool bRet = SfxObjectShell::Save();
@@ -550,7 +550,7 @@ bool DrawDocShell::SaveAs( SfxMedium& rMedium )
mpDoc->StopWorkStartupDelay();
//TODO/LATER: why this?!
- if( GetCreateMode() == SFX_CREATE_MODE_STANDARD )
+ if( GetCreateMode() == SfxObjectCreateMode::STANDARD )
SfxObjectShell::SetVisArea( Rectangle() );
sal_uInt32 nVBWarning = ERRCODE_NONE;
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index 5cdda0ff9bc5..8ad53d52e0a0 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -117,7 +117,7 @@ void DrawDocShell::Construct( bool bClipboard )
DrawDocShell::DrawDocShell(SfxObjectCreateMode eMode,
bool bDataObject,
DocumentType eDocumentType) :
- SfxObjectShell( eMode == SFX_CREATE_MODE_INTERNAL ? SFX_CREATE_MODE_EMBEDDED : eMode),
+ SfxObjectShell( eMode == SfxObjectCreateMode::INTERNAL ? SfxObjectCreateMode::EMBEDDED : eMode),
mpDoc(NULL),
mpUndoManager(NULL),
mpPrinter(NULL),
@@ -129,7 +129,7 @@ DrawDocShell::DrawDocShell(SfxObjectCreateMode eMode,
mbOwnPrinter(false),
mbNewDocument( true )
{
- Construct( eMode == SFX_CREATE_MODE_INTERNAL );
+ Construct( eMode == SfxObjectCreateMode::INTERNAL );
}
DrawDocShell::DrawDocShell( const sal_uInt64 nModelCreationFlags, bool bDataObject, DocumentType eDocumentType ) :
@@ -151,7 +151,7 @@ DrawDocShell::DrawDocShell( const sal_uInt64 nModelCreationFlags, bool bDataObje
DrawDocShell::DrawDocShell(SdDrawDocument* pDoc, SfxObjectCreateMode eMode,
bool bDataObject,
DocumentType eDocumentType) :
- SfxObjectShell(eMode == SFX_CREATE_MODE_INTERNAL ? SFX_CREATE_MODE_EMBEDDED : eMode),
+ SfxObjectShell(eMode == SfxObjectCreateMode::INTERNAL ? SfxObjectCreateMode::EMBEDDED : eMode),
mpDoc(pDoc),
mpUndoManager(NULL),
mpPrinter(NULL),
@@ -163,7 +163,7 @@ DrawDocShell::DrawDocShell(SdDrawDocument* pDoc, SfxObjectCreateMode eMode,
mbOwnPrinter(false),
mbNewDocument( true )
{
- Construct( eMode == SFX_CREATE_MODE_INTERNAL );
+ Construct( eMode == SfxObjectCreateMode::INTERNAL );
}
DrawDocShell::~DrawDocShell()
diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx
index dc2d510ecb43..791c6083d612 100644
--- a/sd/source/ui/inc/DrawDocShell.hxx
+++ b/sd/source/ui/inc/DrawDocShell.hxx
@@ -59,7 +59,7 @@ private:
public:
DrawDocShell (
- SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED,
+ SfxObjectCreateMode eMode = SfxObjectCreateMode::EMBEDDED,
bool bSdDataObj=false,
DocumentType=DOCUMENT_TYPE_IMPRESS);
@@ -70,7 +70,7 @@ public:
DrawDocShell (
SdDrawDocument* pDoc,
- SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED,
+ SfxObjectCreateMode eMode = SfxObjectCreateMode::EMBEDDED,
bool bSdDataObj=false,
DocumentType=DOCUMENT_TYPE_IMPRESS);
virtual ~DrawDocShell();
diff --git a/sd/source/ui/inc/GraphicDocShell.hxx b/sd/source/ui/inc/GraphicDocShell.hxx
index 3e418c5e257b..987e1e99356f 100644
--- a/sd/source/ui/inc/GraphicDocShell.hxx
+++ b/sd/source/ui/inc/GraphicDocShell.hxx
@@ -47,7 +47,7 @@ public:
SFX_DECL_OBJECTFACTORY();
GraphicDocShell (
- SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED,
+ SfxObjectCreateMode eMode = SfxObjectCreateMode::EMBEDDED,
bool bSdDataObj=false,
DocumentType=DOCUMENT_TYPE_DRAW);
diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
index 2be0f0975f40..7498fca7ff3f 100644
--- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx
+++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
@@ -725,7 +725,7 @@ throw (UnknownPropertyException, PropertyVetoException,
if( *pValues >>= aPrinterName )
{
bOk = true;
- if( !aPrinterName.isEmpty() && pDocSh->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
+ if( !aPrinterName.isEmpty() && pDocSh->GetCreateMode() != SfxObjectCreateMode::EMBEDDED )
{
SfxPrinter *pTempPrinter = pDocSh->GetPrinter( true );
if (pTempPrinter)
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index e2ab4f8bde16..bdf49e90d458 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -651,7 +651,7 @@ void SAL_CALL SdXImpressDocument::setViewData( const uno::Reference < container:
throw lang::DisposedException();
SfxBaseModel::setViewData( xData );
- if( mpDocShell && (mpDocShell->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED) && xData.is() )
+ if( mpDocShell && (mpDocShell->GetCreateMode() == SfxObjectCreateMode::EMBEDDED) && xData.is() )
{
const sal_Int32 nCount = xData->getCount();
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index 56b6cadd4560..0b82950cfb3d 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -183,7 +183,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
break;
}
- if( GetDocSh() && (GetDocSh()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED))
+ if( GetDocSh() && (GetDocSh()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED))
GetDocSh()->SetModified();
SwitchPage(nSelectedPage);
diff --git a/sd/source/ui/view/drviews5.cxx b/sd/source/ui/view/drviews5.cxx
index 8d9b045e55ca..e3e184be7b29 100644
--- a/sd/source/ui/view/drviews5.cxx
+++ b/sd/source/ui/view/drviews5.cxx
@@ -89,7 +89,7 @@ void DrawViewShell::Resize (void)
{
ViewShell::Resize();
- if ( GetDocSh()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ if ( GetDocSh()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
{
SetZoomRect( GetDocSh()->GetVisArea(ASPECT_CONTENT) );
}
@@ -508,7 +508,7 @@ void DrawViewShell::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence
{
const Rectangle aVisArea( mpFrameView->GetVisArea() );
- if ( GetDocSh()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ if ( GetDocSh()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
{
GetDocSh()->SetVisArea(aVisArea);
}
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index 055dcd865ddb..27a6176313f8 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -1722,7 +1722,7 @@ void DrawViewShell::GetModeSwitchingMenuState (SfxItemSet &rSet)
rSet.DisableItem( SID_DIAMODE );
}
- if (GetDocSh()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED)
+ if (GetDocSh()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED)
{
// Outplace-Edit: do not allow switch
rSet.ClearItem( SID_OUTLINEMODE );
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index d3421cbd4157..87464ebd77b2 100644
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -277,7 +277,7 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind)
Point aVisAreaPos;
- if ( pDocSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ if ( pDocSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
{
aVisAreaPos = pDocSh->GetVisArea(ASPECT_CONTENT).TopLeft();
}
@@ -343,7 +343,7 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind)
FuPermanent(aReq);
mpDrawView->SetFrameDragSingles(true);
- if (pDocSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED)
+ if (pDocSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED)
{
mbZoomOnPage = false;
}
@@ -549,7 +549,7 @@ void DrawViewShell::SetupPage (Size &rSize,
Point aVisAreaPos;
- if ( GetDocSh()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ if ( GetDocSh()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
{
aVisAreaPos = GetDocSh()->GetVisArea(ASPECT_CONTENT).TopLeft();
}
diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx
index fd009b74814d..44338eb2763d 100644
--- a/sd/source/ui/view/frmview.cxx
+++ b/sd/source/ui/view/frmview.cxx
@@ -610,7 +610,7 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < :
if( pValue->Value >>= nInt16 )
{
SdDrawDocument* pDoc = dynamic_cast< SdDrawDocument* >( GetModel() );
- if( pDoc && pDoc->GetDocSh() && ( SFX_CREATE_MODE_EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) )
+ if( pDoc && pDoc->GetDocSh() && ( SfxObjectCreateMode::EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) )
SetPageKind( (PageKind)nInt16 );
SetPageKindOnLoad( (PageKind)nInt16 );
@@ -621,7 +621,7 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < :
if( pValue->Value >>= nInt16 )
{
SdDrawDocument* pDoc = dynamic_cast< SdDrawDocument* >( GetModel() );
- if( pDoc && pDoc->GetDocSh() && ( SFX_CREATE_MODE_EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) )
+ if( pDoc && pDoc->GetDocSh() && ( SfxObjectCreateMode::EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) )
SetSelectedPage( (sal_uInt16)nInt16 );
SetSelectedPageOnLoad( (sal_uInt16)nInt16 );
@@ -660,7 +660,7 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < :
if( pValue->Value >>= nInt32 )
{
SdDrawDocument* pDoc = dynamic_cast< SdDrawDocument* >( GetModel() );
- if( pDoc && pDoc->GetDocSh() && ( SFX_CREATE_MODE_EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) )
+ if( pDoc && pDoc->GetDocSh() && ( SfxObjectCreateMode::EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) )
SetViewShEditMode( (EditMode)nInt32, PK_STANDARD );
}
}
@@ -669,7 +669,7 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < :
if( pValue->Value >>= nInt32 )
{
SdDrawDocument* pDoc = dynamic_cast< SdDrawDocument* >( GetModel() );
- if( pDoc && pDoc->GetDocSh() && ( SFX_CREATE_MODE_EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) )
+ if( pDoc && pDoc->GetDocSh() && ( SfxObjectCreateMode::EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) )
SetViewShEditMode( (EditMode)nInt32, PK_NOTES );
}
}
@@ -678,7 +678,7 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < :
if( pValue->Value >>= nInt32 )
{
SdDrawDocument* pDoc = dynamic_cast< SdDrawDocument* >( GetModel() );
- if( pDoc && pDoc->GetDocSh() && ( SFX_CREATE_MODE_EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) )
+ if( pDoc && pDoc->GetDocSh() && ( SfxObjectCreateMode::EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) )
SetViewShEditMode( (EditMode)nInt32, PK_HANDOUT );
}
}
diff --git a/sd/source/ui/view/presvish.cxx b/sd/source/ui/view/presvish.cxx
index 34b0c57ca6b3..ba4305394cc6 100644
--- a/sd/source/ui/view/presvish.cxx
+++ b/sd/source/ui/view/presvish.cxx
@@ -79,14 +79,14 @@ TYPEINIT1( PresentationViewShell, DrawViewShell );
PresentationViewShell::PresentationViewShell( SfxViewFrame* pFrame, ViewShellBase& rViewShellBase, vcl::Window* pParentWindow, FrameView* pFrameView)
: DrawViewShell( pFrame, rViewShellBase, pParentWindow, PK_STANDARD, pFrameView)
{
- if( GetDocSh() && GetDocSh()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ if( GetDocSh() && GetDocSh()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
maOldVisArea = GetDocSh()->GetVisArea( ASPECT_CONTENT );
meShellType = ST_PRESENTATION;
}
PresentationViewShell::~PresentationViewShell (void)
{
- if( GetDocSh() && GetDocSh()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED && !maOldVisArea.IsEmpty() )
+ if( GetDocSh() && GetDocSh()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED && !maOldVisArea.IsEmpty() )
GetDocSh()->SetVisArea( maOldVisArea );
}
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index 90c9cc07157c..5619c15acf23 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -663,7 +663,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::DRAWING, xStm ) )
{
- DrawDocShellRef xShell = new DrawDocShell(SFX_CREATE_MODE_INTERNAL);
+ DrawDocShellRef xShell = new DrawDocShell(SfxObjectCreateMode::INTERNAL);
xShell->DoInitNew(0);
SdDrawDocument* pModel = xShell->GetDoc();
@@ -857,7 +857,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
if( mrDoc.GetDocSh() && ( mrDoc.GetDocSh()->GetClassName() == aObjDesc.maClassName ) )
{
uno::Reference < embed::XStorage > xStore( ::comphelper::OStorageHelper::GetStorageFromInputStream( xStm ) );
- ::sd::DrawDocShellRef xDocShRef( new ::sd::DrawDocShell( SFX_CREATE_MODE_EMBEDDED, true, mrDoc.GetDocumentType() ) );
+ ::sd::DrawDocShellRef xDocShRef( new ::sd::DrawDocShell( SfxObjectCreateMode::EMBEDDED, true, mrDoc.GetDocumentType() ) );
// mba: BaseURL doesn't make sense for clipboard functionality
SfxMedium *pMedium = new SfxMedium( xStore, OUString() );
diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx
index f6d25df97e1e..ea5e50cd4ee5 100644
--- a/sd/source/ui/view/viewshe2.cxx
+++ b/sd/source/ui/view/viewshe2.cxx
@@ -594,7 +594,7 @@ void ViewShell::SetPageSizeAndBorder(PageKind ePageKind, const Size& rNewSize,
Point aVisAreaPos;
- if ( GetDocSh()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ if ( GetDocSh()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
{
aVisAreaPos = GetDocSh()->GetVisArea(ASPECT_CONTENT).TopLeft();
}
diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx
index 1e6550b1abb2..4ef292182a1b 100644
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -167,7 +167,7 @@ void SfxPickList::AddDocumentToPickList( SfxObjectShell* pDocSh )
// Unnamed Documents and embedded-Documents not in Picklist
if ( !pDocSh->HasName() ||
- SFX_CREATE_MODE_STANDARD != pDocSh->GetCreateMode() )
+ SfxObjectCreateMode::STANDARD != pDocSh->GetCreateMode() )
return;
// Help not in History
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index 3f54b39f640f..f9a25a3ccd3b 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -482,7 +482,7 @@ void SfxObjectShell::UpdateFromTemplate_Impl( )
{
// styles should be updated, create document in organizer mode to read in the styles
//TODO: testen!
- SfxObjectShellLock xTemplDoc = CreateObjectByFactoryName( GetFactory().GetFactoryName(), SFX_CREATE_MODE_ORGANIZER );
+ SfxObjectShellLock xTemplDoc = CreateObjectByFactoryName( GetFactory().GetFactoryName(), SfxObjectCreateMode::ORGANIZER );
xTemplDoc->DoInitNew(0);
// TODO/MBA: do we need a BaseURL? Then LoadFrom must be extended!
diff --git a/sfx2/source/doc/objembed.cxx b/sfx2/source/doc/objembed.cxx
index 8acc580b8bce..a5f90700340e 100644
--- a/sfx2/source/doc/objembed.cxx
+++ b/sfx2/source/doc/objembed.cxx
@@ -119,7 +119,7 @@ void SfxObjectShell::SetVisArea( const Rectangle & rVisArea )
if( pImp->m_aVisArea != rVisArea )
{
pImp->m_aVisArea = rVisArea;
- if ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ if ( GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
{
if ( IsEnableSetModified() )
SetModified( true );
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 19e74f38ef64..3b598e737a3a 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1801,7 +1801,7 @@ void SfxObjectShell::SetCreateMode_Impl( SfxObjectCreateMode nMode )
bool SfxObjectShell::IsInPlaceActive()
{
- if ( eCreateMode != SFX_CREATE_MODE_EMBEDDED )
+ if ( eCreateMode != SfxObjectCreateMode::EMBEDDED )
return false;
SfxViewFrame* pFrame = SfxViewFrame::GetFirst( this );
@@ -1810,7 +1810,7 @@ bool SfxObjectShell::IsInPlaceActive()
bool SfxObjectShell::IsUIActive()
{
- if ( eCreateMode != SFX_CREATE_MODE_EMBEDDED )
+ if ( eCreateMode != SfxObjectCreateMode::EMBEDDED )
return false;
SfxViewFrame* pFrame = SfxViewFrame::GetFirst( this );
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 91c385548117..32dcfef727a6 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -519,7 +519,7 @@ bool SfxObjectShell::DoInitNew( SfxMedium* pMed )
{
// empty documents always get their macros from the user, so there is no reason to restrict access
pImp->aMacroMode.allowMacroExecution();
- if ( SFX_CREATE_MODE_EMBEDDED == eCreateMode )
+ if ( SfxObjectCreateMode::EMBEDDED == eCreateMode )
SetTitle(SfxResId(STR_NONAME).toString());
uno::Reference< frame::XModel > xModel ( GetModel(), uno::UNO_QUERY );
@@ -842,7 +842,7 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
}
Broadcast( SfxSimpleHint(SFX_HINT_NAMECHANGED) );
- if ( SFX_CREATE_MODE_EMBEDDED != eCreateMode )
+ if ( SfxObjectCreateMode::EMBEDDED != eCreateMode )
{
SFX_ITEMSET_ARG( pMedium->GetItemSet(), pAsTempItem, SfxBoolItem, SID_TEMPLATE, false);
SFX_ITEMSET_ARG( pMedium->GetItemSet(), pPreviewItem, SfxBoolItem, SID_PREVIEW, false);
@@ -1196,7 +1196,7 @@ bool SfxObjectShell::SaveTo_Impl
if( pMedSet )
{
SFX_ITEMSET_ARG( pMedSet, pSaveToItem, SfxBoolItem, SID_SAVETO, false );
- bCopyTo = GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ||
+ bCopyTo = GetCreateMode() == SfxObjectCreateMode::EMBEDDED ||
(pSaveToItem && pSaveToItem->GetValue());
}
@@ -1211,7 +1211,7 @@ bool SfxObjectShell::SaveTo_Impl
if ( pMedium->DocNeedsFileDateCheck() )
rMedium.CheckFileDate( pMedium->GetInitFileDate( false ) );
- if ( bCopyTo && GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
+ if ( bCopyTo && GetCreateMode() != SfxObjectCreateMode::EMBEDDED )
{
// export to the same location is forbidden
SetError( ERRCODE_IO_CANTWRITE, OUString( OSL_LOG_PREFIX ) );
@@ -1451,7 +1451,7 @@ bool SfxObjectShell::SaveTo_Impl
//fdo#61320: only store thumbnail image if the corresponding option is enabled in the configuration
if ( bOk && officecfg::Office::Common::Save::Document::GenerateThumbnail::get()
- && GetCreateMode() != SFX_CREATE_MODE_EMBEDDED && !bPasswdProvided )
+ && GetCreateMode() != SfxObjectCreateMode::EMBEDDED && !bPasswdProvided )
{
// store the thumbnail representation image
// the thumbnail is not stored in case of encrypted document
@@ -2082,7 +2082,7 @@ bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed )
pNewMed->SetCachedSignatureState_Impl( SIGNATURESTATE_NOSIGNATURES ); // set the default value back
// Set new title
- if (!pNewMed->GetName().isEmpty() && SFX_CREATE_MODE_EMBEDDED != eCreateMode)
+ if (!pNewMed->GetName().isEmpty() && SfxObjectCreateMode::EMBEDDED != eCreateMode)
InvalidateName();
SetModified(false); // reset only by set medium
Broadcast( SfxSimpleHint(SFX_HINT_MODECHANGED) );
@@ -2818,7 +2818,7 @@ bool SfxObjectShell::PreDoSaveAs_Impl
// check if a "SaveTo" is wanted, no "SaveAs"
SFX_ITEMSET_ARG( pParams, pSaveToItem, SfxBoolItem, SID_SAVETO, false );
- bool bCopyTo = GetCreateMode() == SFX_CREATE_MODE_EMBEDDED || (pSaveToItem && pSaveToItem->GetValue());
+ bool bCopyTo = GetCreateMode() == SfxObjectCreateMode::EMBEDDED || (pSaveToItem && pSaveToItem->GetValue());
// distinguish between "Save" and "SaveAs"
pImp->bIsSaving = false;
@@ -3155,7 +3155,7 @@ bool SfxObjectShell::SaveAsChildren( SfxMedium& rMedium )
if ( pImp->mpObjectContainer )
{
bool bOasis = ( SotStorage::GetVersion( xStorage ) > SOFFICE_FILEFORMAT_60 );
- GetEmbeddedObjectContainer().StoreAsChildren(bOasis,SFX_CREATE_MODE_EMBEDDED == eCreateMode,xStorage);
+ GetEmbeddedObjectContainer().StoreAsChildren(bOasis,SfxObjectCreateMode::EMBEDDED == eCreateMode,xStorage);
}
if ( bResult )
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 4b7d6dd6a47b..67405aca5d93 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -284,14 +284,14 @@ SfxObjectShell::SfxObjectShell( const sal_uInt64 i_nCreationFlags )
: pImp( new SfxObjectShell_Impl( *this ) )
, pMedium(0)
, pStyleSheetPool(0)
- , eCreateMode(SFX_CREATE_MODE_STANDARD)
+ , eCreateMode(SfxObjectCreateMode::STANDARD)
, bHasName( false )
, bIsInGenerateThumbnail ( false )
{
if (i_nCreationFlags & SFXMODEL_EMBEDDED_OBJECT)
- eCreateMode = SFX_CREATE_MODE_EMBEDDED;
+ eCreateMode = SfxObjectCreateMode::EMBEDDED;
else if (i_nCreationFlags & SFXMODEL_EXTERNAL_LINK)
- eCreateMode = SFX_CREATE_MODE_INTERNAL;
+ eCreateMode = SfxObjectCreateMode::INTERNAL;
const bool bScriptSupport = ( i_nCreationFlags & SFXMODEL_DISABLE_EMBEDDED_SCRIPTS ) == 0;
if ( !bScriptSupport )
@@ -311,18 +311,18 @@ SfxObjectShell::SfxObjectShell
SfxObjectCreateMode eMode /* Purpose, io which the SfxObjectShell
is created:
- SFX_CREATE_MODE_EMBEDDED (default)
+ SfxObjectCreateMode::EMBEDDED (default)
as SO-Server from within another
Document
- SFX_CREATE_MODE_STANDARD,
+ SfxObjectCreateMode::STANDARD,
as a normal Document open stand-alone
- SFX_CREATE_MODE_PREVIEW
+ SfxObjectCreateMode::PREVIEW
to enable a Preview, if possible are
only little information is needed
- SFX_CREATE_MODE_ORGANIZER
+ SfxObjectCreateMode::ORGANIZER
to be displayed in the Organizer, here
notning of the contents is used */
)
@@ -609,7 +609,7 @@ bool SfxObjectShell::PrepareClose
SfxApplication *pSfxApp = SfxGetpApp();
pSfxApp->NotifyEvent( SfxEventHint(SFX_EVENT_PREPARECLOSEDOC, GlobalEventConfig::GetEventName(STR_EVENT_PREPARECLOSEDOC), this) );
- if( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ if( GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
{
pImp->bPreparedForClose = true;
return true;
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index f16c5a603385..d3c4eb5c6c86 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -887,7 +887,7 @@ sal_Bool SAL_CALL SfxBaseModel::attachResource( const OUString&
{
bool bEmb(false);
if ( ( rArgs[0].Value >>= bEmb ) && bEmb )
- m_pData->m_pObjectShell->SetCreateMode_Impl( SFX_CREATE_MODE_EMBEDDED );
+ m_pData->m_pObjectShell->SetCreateMode_Impl( SfxObjectCreateMode::EMBEDDED );
}
return sal_True;
@@ -1581,7 +1581,7 @@ void SAL_CALL SfxBaseModel::storeSelf( const Sequence< beans::PropertyValue >
bool bRet = false;
// TODO/LATER: let the embedded case of saving be handled more careful
- if ( m_pData->m_pObjectShell->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ if ( m_pData->m_pObjectShell->GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
{
// If this is an embedded object that has no URL based location it should be stored to own storage.
// An embedded object can have a location based on URL in case it is a link, then it should be
@@ -1914,7 +1914,7 @@ void SAL_CALL SfxBaseModel::load( const Sequence< beans::PropertyValue >& seqA
}
// TODO/LATER: may be the mode should be retrieved from outside and the preused filter should not be set
- if ( m_pData->m_pObjectShell->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ if ( m_pData->m_pObjectShell->GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
{
SFX_ITEMSET_ARG( pMedium->GetItemSet(), pFilterItem, SfxStringItem, SID_FILTER_NAME, false );
if ( pFilterItem )
@@ -2761,7 +2761,7 @@ void SfxBaseModel::Notify( SfxBroadcaster& rBC ,
case SFX_EVENT_STORAGECHANGED:
{
if ( m_pData->m_xUIConfigurationManager.is()
- && m_pData->m_pObjectShell->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
+ && m_pData->m_pObjectShell->GetCreateMode() != SfxObjectCreateMode::EMBEDDED )
{
Reference< embed::XStorage > xConfigStorage;
OUString aUIConfigFolderName( "Configurations2" );
@@ -3051,7 +3051,7 @@ void SfxBaseModel::impl_store( const OUString& sURL
// DocumentProperties must be saved on "SaveTo", so it can be restored
// after saving
bool bCopyTo = bSaveTo ||
- m_pData->m_pObjectShell->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED;
+ m_pData->m_pObjectShell->GetCreateMode() == SfxObjectCreateMode::EMBEDDED;
Reference<document::XDocumentProperties> xOldDocProps;
if ( bCopyTo )
{
@@ -3566,7 +3566,7 @@ Reference< ui::XUIConfigurationManager2 > SfxBaseModel::getUIConfigurationManage
// embedded objects did not support local configuration data until OOo 3.0, so there's nothing to
// migrate
- if ( m_pData->m_pObjectShell->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
+ if ( m_pData->m_pObjectShell->GetCreateMode() != SfxObjectCreateMode::EMBEDDED )
{
// Import old UI configuration from OOo 1.x
Reference< embed::XStorage > xOOo1ConfigStorage;
@@ -3642,7 +3642,7 @@ void SAL_CALL SfxBaseModel::setVisualAreaSize( sal_Int64 nAspect, const awt::Siz
throw Exception(); // TODO: error handling
SfxViewFrame* pViewFrm = SfxViewFrame::GetFirst( m_pData->m_pObjectShell, false );
- if ( pViewFrm && m_pData->m_pObjectShell->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED && !pViewFrm->GetFrame().IsInPlace() )
+ if ( pViewFrm && m_pData->m_pObjectShell->GetCreateMode() == SfxObjectCreateMode::EMBEDDED && !pViewFrm->GetFrame().IsInPlace() )
{
vcl::Window* pWindow = VCLUnoHelper::GetWindow( pViewFrm->GetFrame().GetFrameInterface()->getContainerWindow() );
Size aWinSize = pWindow->GetSizePixel();
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 9f160d7615e9..e9fc0af43150 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -1241,7 +1241,7 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect )
if ( i_eConnect == E_CONNECT )
{
if ( ( m_pData->m_pViewShell->GetObjectShell() != NULL )
- && ( m_pData->m_pViewShell->GetObjectShell()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ && ( m_pData->m_pViewShell->GetObjectShell()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
)
{
SfxViewFrame* pViewFrm = m_pData->m_pViewShell->GetViewFrame();
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 434b387dc50e..c2d63d9cb88a 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -721,7 +721,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
pMedium->CloseAndRelease();
}
- xNewObj = SfxObjectShell::CreateObject( pFilter->GetServiceName(), SFX_CREATE_MODE_STANDARD );
+ xNewObj = SfxObjectShell::CreateObject( pFilter->GetServiceName(), SfxObjectCreateMode::STANDARD );
if ( xOldObj->IsModifyPasswordEntered() )
xNewObj->SetModifyPasswordEntered();
@@ -863,7 +863,7 @@ void SfxViewFrame::StateReload_Impl( SfxItemSet& rSet )
if ( !pSh ||
!pSh->HasName() ||
!( pSh->Get_Impl()->nLoadedFlags & SFX_LOADED_MAINDOCUMENT ) ||
- ( pSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED &&
+ ( pSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED &&
( !(pVSh = pSh->GetViewShell()) ||
!(pFSh = pVSh->GetFormShell()) ||
!pFSh->IsDesignMode())))
@@ -883,7 +883,7 @@ void SfxViewFrame::StateReload_Impl( SfxItemSet& rSet )
{
SfxFrame* pFrame = &GetTopFrame();
- if ( !pSh || !pSh->CanReload_Impl() || pSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ if ( !pSh || !pSh->CanReload_Impl() || pSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
rSet.DisableItem(nWhich);
else
{
@@ -1092,7 +1092,7 @@ void SfxViewFrame::ReleaseObjectShell_Impl()
Notify( *xObjSh, SfxSimpleHint(SFX_HINT_TITLECHANGED) );
Notify( *xObjSh, SfxSimpleHint(SFX_HINT_DOCCHANGED) );
- if ( 1 == xObjSh->GetOwnerLockCount() && pImp->bObjLocked && xObjSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ if ( 1 == xObjSh->GetOwnerLockCount() && pImp->bObjLocked && xObjSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
xObjSh->DoClose();
SfxObjectShellRef xDyingObjSh = xObjSh;
xObjSh.Clear();
@@ -1348,7 +1348,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
const SfxViewShell *pVSh;
const SfxShell *pFSh;
if ( !xObjSh->IsReadOnly() ||
- ( xObjSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED &&
+ ( xObjSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED &&
(pVSh = xObjSh->GetViewShell()) &&
(pFSh = pVSh->GetFormShell()) &&
!pFSh->IsDesignMode()))
diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx
index ff8f3e9f2698..8c2ba6e7f9ff 100644
--- a/sfx2/source/view/viewfrm2.cxx
+++ b/sfx2/source/view/viewfrm2.cxx
@@ -380,7 +380,7 @@ void SfxViewFrame::INetState_Impl( SfxItemSet &rItemSet )
// Add/SaveToBookmark at BASIC-IDE, QUERY-EDITOR etc. disable
SfxObjectShell *pDocSh = GetObjectShell();
bool bPseudo = pDocSh && !( pDocSh->GetFactory().GetFlags() & SFXOBJECTSHELL_HASOPENDOC );
- bool bEmbedded = pDocSh && pDocSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED;
+ bool bEmbedded = pDocSh && pDocSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED;
if ( !pDocSh || bPseudo || bEmbedded || !pDocSh->HasName() )
rItemSet.DisableItem( SID_CREATELINK );
}
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
index cd5bbc01da5d..de483e5d196a 100644
--- a/starmath/source/cursor.cxx
+++ b/starmath/source/cursor.cxx
@@ -1455,7 +1455,7 @@ void SmCursor::EndEdit(){
//TODO: Consider copying the update accessability code from SmDocShell::SetText in here...
//This somehow updates the size of SmGraphicView if it is running in embedded mode
- if( pDocShell->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ if( pDocShell->GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
pDocShell->OnDocumentPrinterChanged(0);
//Request a replaint...
@@ -1473,7 +1473,7 @@ void SmCursor::EndEdit(){
void SmCursor::RequestRepaint(){
SmViewShell *pViewSh = SmGetActiveView();
if( pViewSh ) {
- if ( SFX_CREATE_MODE_EMBEDDED == pDocShell->GetCreateMode() )
+ if ( SfxObjectCreateMode::EMBEDDED == pDocShell->GetCreateMode() )
pDocShell->Repaint();
else
pViewSh->GetGraphicWindow().Invalidate();
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index f6a0bdee9a4b..2f1c91b384c7 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -166,7 +166,7 @@ void SmDocShell::SetText(const OUString& rBuffer)
if( pViewSh )
{
pViewSh->GetViewFrame()->GetBindings().Invalidate(SID_TEXT);
- if ( SFX_CREATE_MODE_EMBEDDED == GetCreateMode() )
+ if ( SfxObjectCreateMode::EMBEDDED == GetCreateMode() )
{
// have SwOleClient::FormatChanged() to align the modified formula properly
// even if the vis area does not change (e.g. when formula text changes from
@@ -195,7 +195,7 @@ void SmDocShell::SetText(const OUString& rBuffer)
}
}
- if ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ if ( GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
OnDocumentPrinterChanged(0);
}
}
@@ -509,7 +509,7 @@ SmPrinterAccess::SmPrinterAccess( SmDocShell &rDocShell )
if ( 0 != (pPrinter = rDocShell.GetPrt()) )
{
pPrinter->Push( PushFlags::MAPMODE );
- if ( SFX_CREATE_MODE_EMBEDDED == rDocShell.GetCreateMode() )
+ if ( SfxObjectCreateMode::EMBEDDED == rDocShell.GetCreateMode() )
{
// if it is an embedded object (without it's own printer)
// we change the MapMode temporarily.
@@ -534,7 +534,7 @@ SmPrinterAccess::SmPrinterAccess( SmDocShell &rDocShell )
if ( 0 != (pRefDev = rDocShell.GetRefDev()) && pPrinter != pRefDev )
{
pRefDev->Push( PushFlags::MAPMODE );
- if ( SFX_CREATE_MODE_EMBEDDED == rDocShell.GetCreateMode() )
+ if ( SfxObjectCreateMode::EMBEDDED == rDocShell.GetCreateMode() )
{
// if it is an embedded object (without it's own printer)
// we change the MapMode temporarily.
@@ -570,7 +570,7 @@ SmPrinterAccess::~SmPrinterAccess()
Printer* SmDocShell::GetPrt()
{
- if ( SFX_CREATE_MODE_EMBEDDED == GetCreateMode() )
+ if ( SfxObjectCreateMode::EMBEDDED == GetCreateMode() )
{
// Normally the server provides the printer. But if it doesn't provide one (e.g. because
// there is no connection) it still can be the case that we know the printer because it
@@ -603,7 +603,7 @@ Printer* SmDocShell::GetPrt()
OutputDevice* SmDocShell::GetRefDev()
{
- if ( SFX_CREATE_MODE_EMBEDDED == GetCreateMode() )
+ if ( SfxObjectCreateMode::EMBEDDED == GetCreateMode() )
{
OutputDevice* pOutDev = GetDocumentRefDev();
if ( pOutDev )
@@ -734,7 +734,7 @@ bool SmDocShell::ConvertFrom(SfxMedium &rMedium)
}
}
- if ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ if ( GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
{
SetFormulaArranged( false );
Repaint();
@@ -784,7 +784,7 @@ bool SmDocShell::Load( SfxMedium& rMedium )
}
}
- if ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ if ( GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
{
SetFormulaArranged( false );
Repaint();
@@ -1289,7 +1289,7 @@ void SmDocShell::SetVisArea(const Rectangle & rVisArea)
// If outplace editing, then dont resize the OutplaceWindow. But the
// ObjectShell has to resize. Bug 56470
bool bUnLockFrame;
- if( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED && !IsInPlaceActive() && GetFrame() )
+ if( GetCreateMode() == SfxObjectCreateMode::EMBEDDED && !IsInPlaceActive() && GetFrame() )
{
GetFrame()->LockAdjustPosSizePixel();
bUnLockFrame = true;
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index 3466e51149f2..98bbbe4a8651 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -111,7 +111,7 @@ bool SmXMLExportWrapper::Export(SfxMedium &rMedium)
SmDocShell *pDocShell = pModel ?
static_cast<SmDocShell*>(pModel->GetObjectShell()) : 0;
if ( pDocShell &&
- SFX_CREATE_MODE_EMBEDDED == pDocShell->GetCreateMode() )
+ SfxObjectCreateMode::EMBEDDED == pDocShell->GetCreateMode() )
bEmbedded = true;
uno::Reference<task::XStatusIndicator> xStatusIndicator;
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index 8ef3bfeb2d4f..71df78c4cccf 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -116,7 +116,7 @@ sal_uLong SmXMLImportWrapper::Import(SfxMedium &rMedium)
pItem->GetValue() >>= xStatusIndicator;
}
- if ( SFX_CREATE_MODE_EMBEDDED == pDocShell->GetCreateMode() )
+ if ( SfxObjectCreateMode::EMBEDDED == pDocShell->GetCreateMode() )
bEmbedded = true;
}
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index 4ade3f82cef9..597afed3fb3e 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -597,7 +597,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
case HANDLE_PRINTER_NAME:
{
// embedded documents just ignore this property for now
- if ( pDocSh->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
+ if ( pDocSh->GetCreateMode() != SfxObjectCreateMode::EMBEDDED )
{
SfxPrinter *pPrinter = pDocSh->GetPrinter ( );
if (pPrinter)
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index 1193638f8a12..deea28ed1ab6 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -167,9 +167,9 @@ public:
static OUString GetEventName( sal_Int32 nId );
/// Doc is required for SO data exchange!
- SwDocShell( SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED );
+ SwDocShell( SfxObjectCreateMode eMode = SfxObjectCreateMode::EMBEDDED );
SwDocShell( const sal_uInt64 i_nSfxCreationFlags );
- SwDocShell( SwDoc *pDoc, SfxObjectCreateMode eMode = SFX_CREATE_MODE_STANDARD );
+ SwDocShell( SwDoc *pDoc, SfxObjectCreateMode eMode = SfxObjectCreateMode::STANDARD );
virtual ~SwDocShell();
/// OLE 2.0-notification.
diff --git a/sw/inc/globdoc.hxx b/sw/inc/globdoc.hxx
index d2a7452aeb85..256c9a3b455b 100644
--- a/sw/inc/globdoc.hxx
+++ b/sw/inc/globdoc.hxx
@@ -28,7 +28,7 @@ public:
SFX_DECL_OBJECTFACTORY();
TYPEINFO_OVERRIDE();
- SwGlobalDocShell(SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED);
+ SwGlobalDocShell(SfxObjectCreateMode eMode = SfxObjectCreateMode::EMBEDDED);
virtual ~SwGlobalDocShell();
virtual void FillClass( SvGlobalName * pClassName,
diff --git a/sw/inc/wdocsh.hxx b/sw/inc/wdocsh.hxx
index 21683ec8b89f..fc8bc2474085 100644
--- a/sw/inc/wdocsh.hxx
+++ b/sw/inc/wdocsh.hxx
@@ -36,7 +36,7 @@ private:
static void InitInterface_Impl();
public:
- SwWebDocShell(SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED);
+ SwWebDocShell(SfxObjectCreateMode eMode = SfxObjectCreateMode::EMBEDDED);
virtual ~SwWebDocShell();
virtual void FillClass( SvGlobalName * pClassName,
diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx
index 8257bcc0763f..26647c8139e6 100644
--- a/sw/qa/core/macros-test.cxx
+++ b/sw/qa/core/macros-test.cxx
@@ -330,7 +330,7 @@ void SwMacrosTest::testControlShapeGrouping()
void SwMacrosTest::testFdo55289()
{
SwDoc *const pDoc = new SwDoc;
- SwDocShellRef pDocShell = new SwDocShell(pDoc, SFX_CREATE_MODE_EMBEDDED);
+ SwDocShellRef pDocShell = new SwDocShell(pDoc, SfxObjectCreateMode::EMBEDDED);
// this needs to run with no layout to tickle the bugs in the special
// cases in SwXShape re-anchoring
assert(!pDoc->getIDocumentLayoutAccess().GetCurrentLayout());
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx
index 6b2bd193b256..b56d30859709 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -1533,7 +1533,7 @@ void SwDocTest::setUp()
SwGlobals::ensure();
m_pDoc = new SwDoc;
- m_xDocShRef = new SwDocShell(m_pDoc, SFX_CREATE_MODE_EMBEDDED);
+ m_xDocShRef = new SwDocShell(m_pDoc, SfxObjectCreateMode::EMBEDDED);
m_xDocShRef->DoInitNew(0);
}
diff --git a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx
index ccd7b3cbd996..952b1f1490b5 100644
--- a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx
+++ b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx
@@ -207,10 +207,10 @@ void DocumentLinksAdministrationManager::UpdateLinks( bool bUI )
sal_uInt16 nUpdateDocMode = m_rDoc.GetDocShell()->GetUpdateDocMode();
if( (nLinkMode != NEVER || document::UpdateDocMode::FULL_UPDATE == nUpdateDocMode) &&
!GetLinkManager().GetLinks().empty() &&
- SFX_CREATE_MODE_INTERNAL !=
+ SfxObjectCreateMode::INTERNAL !=
( eMode = m_rDoc.GetDocShell()->GetCreateMode()) &&
- SFX_CREATE_MODE_ORGANIZER != eMode &&
- SFX_CREATE_MODE_PREVIEW != eMode &&
+ SfxObjectCreateMode::ORGANIZER != eMode &&
+ SfxObjectCreateMode::PREVIEW != eMode &&
!m_rDoc.GetDocShell()->IsPreview() )
{
bool bAskUpdate = nLinkMode == MANUAL;
diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx
index 33a251d03902..0380e92b51f4 100644
--- a/sw/source/core/doc/docglbl.cxx
+++ b/sw/source/core/doc/docglbl.cxx
@@ -269,7 +269,7 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const OUString& rPath, bool bOutline,
OUString sFileName;
if( pStartNd->GetIndex() + 1 < aEndIdx.GetIndex() )
{
- SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL ));
+ SfxObjectShellLock xDocSh( new SwDocShell( SfxObjectCreateMode::INTERNAL ));
if( xDocSh->DoInitNew( 0 ) )
{
SwDoc* pDoc = static_cast<SwDocShell*>(&xDocSh)->GetDoc();
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 3830d107c4e3..ec05f9aa8b13 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -860,7 +860,7 @@ SfxObjectShell* SwDoc::CreateCopy(bool bCallInitNew ) const
// we have to use pointer here, since the callee has to decide whether
// SfxObjectShellLock or SfxObjectShellRef should be used sometimes the
// object will be returned with refcount set to 0 ( if no DoInitNew is done )
- SfxObjectShell* pRetShell = new SwDocShell( pRet, SFX_CREATE_MODE_STANDARD );
+ SfxObjectShell* pRetShell = new SwDocShell( pRet, SfxObjectCreateMode::STANDARD );
if( bCallInitNew )
{
// it could happen that DoInitNew creates model,
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 2f129a3a35a2..0a771c29fdff 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -6511,7 +6511,7 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
// the global retouche color.
if ( pSh->GetOut()->GetOutDevType() == OUTDEV_PRINTER ||
pSh->GetViewOptions()->IsPDFExport() ||
- ( pSh->GetDoc()->GetDocShell()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED &&
+ ( pSh->GetDoc()->GetDocShell()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED &&
!pSh->GetDoc()->GetDocShell()->IsInPlaceActive()
)
)
diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index d6bbe2e822ea..e04159bebe5c 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -266,7 +266,7 @@ bool SwOLENode::RestorePersistentData()
// TODO/LATER: Isn't a EmbeddedObjectContainer sufficient here?
// What happens to this document?
OSL_ENSURE( false, "Why are we creating a DocShell here?" );
- p = new SwDocShell( GetDoc(), SFX_CREATE_MODE_INTERNAL );
+ p = new SwDocShell( GetDoc(), SfxObjectCreateMode::INTERNAL );
p->DoInitNew( NULL );
}
@@ -425,7 +425,7 @@ SwCntntNode* SwOLENode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
{
// TODO/LATER: is EmbeddedObjectContainer not enough?
// the created document will be closed by pDoc ( should use SfxObjectShellLock )
- pPersistShell = new SwDocShell( pDoc, SFX_CREATE_MODE_INTERNAL );
+ pPersistShell = new SwDocShell( pDoc, SfxObjectCreateMode::INTERNAL );
pDoc->SetTmpDocShell( pPersistShell );
pPersistShell->DoInitNew( NULL );
}
@@ -729,7 +729,7 @@ void SwOLEObj::SetNode( SwOLENode* pNode )
// TODO/LATER: Isn't a EmbeddedObjectContainer sufficient here?
// What happens to the document?
OSL_ENSURE( false, "Why are we creating a DocShell here??" );
- p = new SwDocShell( pDoc, SFX_CREATE_MODE_INTERNAL );
+ p = new SwDocShell( pDoc, SfxObjectCreateMode::INTERNAL );
p->DoInitNew( NULL );
}
diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx b/sw/source/core/swg/SwXMLTextBlocks.cxx
index f7a094a766f9..95c6b30f89b4 100644
--- a/sw/source/core/swg/SwXMLTextBlocks.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks.cxx
@@ -62,7 +62,7 @@ SwXMLTextBlocks::SwXMLTextBlocks( const OUString& rFile )
, nFlags(0)
, nCurBlk(0)
{
- SwDocShell* pDocSh = new SwDocShell ( SFX_CREATE_MODE_INTERNAL );
+ SwDocShell* pDocSh = new SwDocShell ( SfxObjectCreateMode::INTERNAL );
if( !pDocSh->DoInitNew( 0 ) )
return;
bReadOnly = true;
@@ -108,7 +108,7 @@ SwXMLTextBlocks::SwXMLTextBlocks( const uno::Reference < embed::XStorage >& rStg
, nFlags(0)
, nCurBlk(0)
{
- SwDocShell* pDocSh = new SwDocShell ( SFX_CREATE_MODE_INTERNAL );
+ SwDocShell* pDocSh = new SwDocShell ( SfxObjectCreateMode::INTERNAL );
if( !pDocSh->DoInitNew( 0 ) )
return;
bReadOnly = false;
diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx
index 1d1554d4268a..13c9e321e060 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -816,7 +816,7 @@ SwXServiceProvider::MakeInstance(sal_uInt16 nObjectType, SwDoc & rDoc)
// paste, there should be no data provider, so that own data is used
// This should not happen during copy/paste, as this will unlink
// charts using table data.
- if (rDoc.GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED)
+ if (rDoc.GetDocShell()->GetCreateMode() != SfxObjectCreateMode::EMBEDDED)
xRet = (cppu::OWeakObject*) rDoc.getIDocumentChartDataProviderAccess().GetChartDataProvider( true /* create - if not yet available */ );
else
SAL_WARN("sw.uno",
diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx
index 01251df4e8d9..20044921164f 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -498,7 +498,7 @@ SwDoc* Reader::GetTemplateDoc()
if( aModuleOptions.IsWriter() )
{
SwDocShell *pDocSh =
- new SwDocShell ( SFX_CREATE_MODE_INTERNAL );
+ new SwDocShell ( SfxObjectCreateMode::INTERNAL );
SfxObjectShellLock xDocSh = pDocSh;
if( pDocSh->DoInitNew( 0 ) )
{
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 5f59460e8672..57a51f1f0d94 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -432,7 +432,7 @@ SwHTMLParser::~SwHTMLParser()
// Gelinkte Bereiche updaten
sal_uInt16 nLinkMode = pDoc->getIDocumentSettingAccess().getLinkUpdateMode( true );
if( nLinkMode != NEVER && bAsync &&
- SFX_CREATE_MODE_INTERNAL!=pDoc->GetDocShell()->GetCreateMode() )
+ SfxObjectCreateMode::INTERNAL!=pDoc->GetDocShell()->GetCreateMode() )
pDoc->getIDocumentLinksAdministration().GetLinkManager().UpdateAllLinks( nLinkMode == MANUAL,
true, false );
diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx
index a92c548eb61d..32ac0eaebc9d 100644
--- a/sw/source/filter/ww8/ww8glsy.cxx
+++ b/sw/source/filter/ww8/ww8glsy.cxx
@@ -206,7 +206,7 @@ bool WW8Glossary::Load( SwTextBlocks &rBlocks, bool bSaveRelFile )
if ( 0 != (nStrings = static_cast< sal_uInt16 >(aStrings.size())))
{
- SfxObjectShellLock xDocSh(new SwDocShell(SFX_CREATE_MODE_INTERNAL));
+ SfxObjectShellLock xDocSh(new SwDocShell(SfxObjectCreateMode::INTERNAL));
if (xDocSh->DoInitNew(0))
{
SwDoc *pD = static_cast<SwDocShell*>((&xDocSh))->GetDoc();
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index 1e749490e3cc..bcdb63b16d0c 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -750,7 +750,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c
// TODO/LATER: separate links from usual embedded objects
OUString StreamPath;
- if( SFX_CREATE_MODE_EMBEDDED == rDoc.GetDocShell()->GetCreateMode() )
+ if( SfxObjectCreateMode::EMBEDDED == rDoc.GetDocShell()->GetCreateMode() )
{
if ( pMedDescrMedium && pMedDescrMedium->GetItemSet() )
{
diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx
index fb0a57f9447c..7329a0e5823a 100644
--- a/sw/source/filter/xml/wrtxml.cxx
+++ b/sw/source/filter/xml/wrtxml.cxx
@@ -194,7 +194,7 @@ sal_uInt32 SwXMLWriter::_Write( const uno::Reference < task::XStatusIndicator >&
// Set base URI
xInfoSet->setPropertyValue( "BaseURI", makeAny( GetBaseURL() ) );
- if( SFX_CREATE_MODE_EMBEDDED == pDoc->GetDocShell()->GetCreateMode() )
+ if( SfxObjectCreateMode::EMBEDDED == pDoc->GetDocShell()->GetCreateMode() )
{
const OUString aName( !aDocHierarchicalName.isEmpty()
? aDocHierarchicalName
@@ -295,7 +295,7 @@ sal_uInt32 SwXMLWriter::_Write( const uno::Reference < task::XStatusIndicator >&
}
}
- bool bStoreMeta = ( SFX_CREATE_MODE_EMBEDDED != pDoc->GetDocShell()->GetCreateMode() );
+ bool bStoreMeta = ( SfxObjectCreateMode::EMBEDDED != pDoc->GetDocShell()->GetCreateMode() );
if ( !bStoreMeta )
{
try
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index dfcdbba79a5b..eca4dd2376f5 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -711,7 +711,7 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton)
//now extract a document from the target document
// the shell will be closed at the end, but it is more safe to use SfxObjectShellLock here
- SfxObjectShellLock xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) );
+ SfxObjectShellLock xTempDocShell( new SwDocShell( SfxObjectCreateMode::STANDARD ) );
xTempDocShell->DoInitNew( 0 );
SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 );
SwView* pTempView = static_cast<SwView*>( pTempFrame->GetViewShell() );
@@ -1116,7 +1116,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
//now extract a document from the target document
// the shell will be closed at the end, but it is more safe to use SfxObjectShellLock here
- SfxObjectShellLock xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) );
+ SfxObjectShellLock xTempDocShell( new SwDocShell( SfxObjectCreateMode::STANDARD ) );
xTempDocShell->DoInitNew( 0 );
SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 );
SwView* pTempView = static_cast<SwView*>( pTempFrame->GetViewShell() );
diff --git a/sw/source/uibase/app/appenv.cxx b/sw/source/uibase/app/appenv.cxx
index feca3d5c8e3a..885ee5334844 100644
--- a/sw/source/uibase/app/appenv.cxx
+++ b/sw/source/uibase/app/appenv.cxx
@@ -158,7 +158,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
pOldSh = pMyDocSh ? pMyDocSh->GetWrtShell() : 0;
// Create new document (don't show!)
- SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD ) );
+ SfxObjectShellLock xDocSh( new SwDocShell( SfxObjectCreateMode::STANDARD ) );
xDocSh->DoInitNew( 0 );
pFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 );
pNewView = static_cast<SwView*>( pFrame->GetViewShell());
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index c77ae688ee98..bfa7c50143bc 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -149,7 +149,7 @@ void SwModule::StateOther(SfxItemSet &rSet)
SwDocShell *pDocSh = static_cast<SwDocShell*>( SfxObjectShell::Current());
if ( bDisable ||
(pDocSh && (pDocSh->IsReadOnly() ||
- pDocSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED)) )
+ pDocSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED)) )
rSet.DisableItem( nWhich );
}
@@ -883,7 +883,7 @@ void NewXForms( SfxRequest& rReq )
// copied & excerpted from SwModule::InsertLab(..)
// create new document
- SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD) );
+ SfxObjectShellLock xDocSh( new SwDocShell( SfxObjectCreateMode::STANDARD) );
xDocSh->DoInitNew( 0 );
// initialize XForms
diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx
index 21704cd79c36..3a30ca4db42c 100644
--- a/sw/source/uibase/app/applab.cxx
+++ b/sw/source/uibase/app/applab.cxx
@@ -190,7 +190,7 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel)
aLabCfg.Commit();
// Create new document
- SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD));
+ SfxObjectShellLock xDocSh( new SwDocShell( SfxObjectCreateMode::STANDARD));
xDocSh->DoInitNew( 0 );
// Printer
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index 75f8fcb57f33..a6883f8bb3e0 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -241,7 +241,7 @@ bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
// Suppress SfxProgress, when we are Embedded
SW_MOD()->SetEmbeddedLoadSave(
- SFX_CREATE_MODE_EMBEDDED == GetCreateMode() );
+ SfxObjectCreateMode::EMBEDDED == GetCreateMode() );
pRdr->GetDoc()->getIDocumentSettingAccess().set(DocumentSettingId::HTML_MODE, ISA(SwWebDocShell));
@@ -259,7 +259,7 @@ bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
AddLink();
if (!m_xBasePool.is())
- m_xBasePool = new SwDocStyleSheetPool( *m_pDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
+ m_xBasePool = new SwDocStyleSheetPool( *m_pDoc, SfxObjectCreateMode::ORGANIZER == GetCreateMode() );
}
UpdateFontList();
@@ -305,11 +305,11 @@ bool SwDocShell::Save()
{
switch( GetCreateMode() )
{
- case SFX_CREATE_MODE_INTERNAL:
+ case SfxObjectCreateMode::INTERNAL:
nErr = 0;
break;
- case SFX_CREATE_MODE_ORGANIZER:
+ case SfxObjectCreateMode::ORGANIZER:
{
WriterRef xWrt;
::GetXMLWriter( aEmptyOUStr, GetMedium()->GetBaseURL( true ), xWrt );
@@ -320,13 +320,13 @@ bool SwDocShell::Save()
}
break;
- case SFX_CREATE_MODE_EMBEDDED:
+ case SfxObjectCreateMode::EMBEDDED:
// Suppress SfxProgress, if we are Embedded
SW_MOD()->SetEmbeddedLoadSave( true );
// no break;
- case SFX_CREATE_MODE_STANDARD:
- case SFX_CREATE_MODE_PREVIEW:
+ case SfxObjectCreateMode::STANDARD:
+ case SfxObjectCreateMode::PREVIEW:
default:
{
if (m_pDoc->ContainsMSVBasic())
@@ -435,7 +435,7 @@ bool SwDocShell::SaveAs( SfxMedium& rMedium )
SvGlobalName aClassName;
// The document is closed explicitly, but using SfxObjectShellLock is still more correct here
SfxObjectShellLock xDocSh =
- new SwGlobalDocShell( SFX_CREATE_MODE_INTERNAL );
+ new SwGlobalDocShell( SfxObjectCreateMode::INTERNAL );
// the global document can not be a template
xDocSh->SetupStorage( xStor, SotStorage::GetVersion( xStor ), false );
xDocSh->DoClose();
@@ -461,7 +461,7 @@ bool SwDocShell::SaveAs( SfxMedium& rMedium )
// Suppress SfxProgress when we are Embedded
SW_MOD()->SetEmbeddedLoadSave(
- SFX_CREATE_MODE_EMBEDDED == GetCreateMode() );
+ SfxObjectCreateMode::EMBEDDED == GetCreateMode() );
WriterRef xWrt;
::GetXMLWriter( aEmptyOUStr, rMedium.GetBaseURL( true ), xWrt );
@@ -687,7 +687,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium )
// Suppress SfxProgress when we are Embedded
SW_MOD()->SetEmbeddedLoadSave(
- SFX_CREATE_MODE_EMBEDDED == GetCreateMode());
+ SfxObjectCreateMode::EMBEDDED == GetCreateMode());
// Span Context in order to suppress the Selection's View
sal_uLong nErrno;
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index f9fba49adc50..91b8e4104f7c 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -704,7 +704,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
sal_uInt8 nLevel = pDlg->GetLevel();
sal_uInt8 nPara = pDlg->GetPara();
SwDoc* pSmryDoc = new SwDoc();
- SfxObjectShellLock xDocSh( new SwDocShell( pSmryDoc, SFX_CREATE_MODE_STANDARD));
+ SfxObjectShellLock xDocSh( new SwDocShell( pSmryDoc, SfxObjectCreateMode::STANDARD));
xDocSh->DoInitNew( 0 );
bool bImpress = FN_ABSTRACT_STARIMPRESS == nWhich;
@@ -1571,7 +1571,7 @@ int SwFindDocShell( SfxObjectShellRef& xDocSh,
pMed->SetFilter( pSfxFlt );
// If the new shell is created, SfxObjectShellLock should be used to let it be closed later for sure
- SwDocShell *const pNew(new SwDocShell(SFX_CREATE_MODE_INTERNAL));
+ SwDocShell *const pNew(new SwDocShell(SfxObjectCreateMode::INTERNAL));
xLockRef = pNew;
xDocSh = (SfxObjectShell*)xLockRef;
if( xDocSh->DoLoad( pMed ) )
diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx
index 7d9020455da9..a02f78742856 100644
--- a/sw/source/uibase/app/docshini.cxx
+++ b/sw/source/uibase/app/docshini.cxx
@@ -111,7 +111,7 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
else if( ISA( SwGlobalDocShell ) )
GetDoc()->getIDocumentSettingAccess().set(DocumentSettingId::GLOBAL_DOCUMENT, true); // Globaldokument
- if ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ if ( GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
SwTransferable::InitOle( this, *m_pDoc );
// set forbidden characters if necessary
@@ -490,8 +490,8 @@ bool SwDocShell::Load( SfxMedium& rMedium )
// Loading
// for MD
OSL_ENSURE( !m_xBasePool.is(), "who hasn't destroyed their Pool?" );
- m_xBasePool = new SwDocStyleSheetPool( *m_pDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
- if(GetCreateMode() != SFX_CREATE_MODE_ORGANIZER)
+ m_xBasePool = new SwDocStyleSheetPool( *m_pDoc, SfxObjectCreateMode::ORGANIZER == GetCreateMode() );
+ if(GetCreateMode() != SfxObjectCreateMode::ORGANIZER)
{
SFX_ITEMSET_ARG( rMedium.GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, false);
m_nUpdateDocMode = pUpdateDocItem ? pUpdateDocItem->GetValue() : document::UpdateDocMode::NO_UPDATE;
@@ -501,7 +501,7 @@ bool SwDocShell::Load( SfxMedium& rMedium )
sal_uInt32 nErr = ERR_SWG_READ_ERROR;
switch( GetCreateMode() )
{
- case SFX_CREATE_MODE_ORGANIZER:
+ case SfxObjectCreateMode::ORGANIZER:
{
if( ReadXML )
{
@@ -513,8 +513,8 @@ bool SwDocShell::Load( SfxMedium& rMedium )
}
break;
- case SFX_CREATE_MODE_INTERNAL:
- case SFX_CREATE_MODE_EMBEDDED:
+ case SfxObjectCreateMode::INTERNAL:
+ case SfxObjectCreateMode::EMBEDDED:
{
SwTransferable::InitOle( this, *m_pDoc );
}
@@ -522,8 +522,8 @@ bool SwDocShell::Load( SfxMedium& rMedium )
SW_MOD()->SetEmbeddedLoadSave( true );
// no break;
- case SFX_CREATE_MODE_STANDARD:
- case SFX_CREATE_MODE_PREVIEW:
+ case SfxObjectCreateMode::STANDARD:
+ case SfxObjectCreateMode::PREVIEW:
{
Reader *pReader = ReadXML;
if( pReader )
@@ -562,7 +562,7 @@ bool SwDocShell::Load( SfxMedium& rMedium )
bRet = !IsError( nErr );
if (bRet && !m_pDoc->IsInLoadAsynchron() &&
- GetCreateMode() == SFX_CREATE_MODE_STANDARD)
+ GetCreateMode() == SfxObjectCreateMode::STANDARD)
{
LoadingFinished();
}
@@ -592,7 +592,7 @@ bool SwDocShell::LoadFrom( SfxMedium& rMedium )
SwWait aWait( *this, true );
{
OSL_ENSURE( !m_xBasePool.is(), "who hasn't destroyed their Pool?" );
- m_xBasePool = new SwDocStyleSheetPool( *m_pDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
+ m_xBasePool = new SwDocStyleSheetPool( *m_pDoc, SfxObjectCreateMode::ORGANIZER == GetCreateMode() );
if( ReadXML )
{
ReadXML->SetOrganizerMode( true );
@@ -620,7 +620,7 @@ bool SwDocShell::LoadFrom( SfxMedium& rMedium )
void SwDocShell::SubInitNew()
{
OSL_ENSURE( !m_xBasePool.is(), "who hasn't destroyed their Pool?" );
- m_xBasePool = new SwDocStyleSheetPool( *m_pDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
+ m_xBasePool = new SwDocStyleSheetPool( *m_pDoc, SfxObjectCreateMode::ORGANIZER == GetCreateMode() );
UpdateFontList();
InitDrawModelAndDocShell(this, m_pDoc ? m_pDoc->getIDocumentDrawModelAccess().GetDrawModel() : 0);
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 45230c1d9e74..3f15fd3f89e5 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -965,7 +965,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
if(bCreateSingleFile)
{
// create a target docshell to put the merged document into
- xTargetDocShell = new SwDocShell( SFX_CREATE_MODE_STANDARD );
+ xTargetDocShell = new SwDocShell( SfxObjectCreateMode::STANDARD );
xTargetDocShell->DoInitNew( 0 );
if (nMaxDumpDocs)
lcl_SaveDoc( xTargetDocShell, "MergeDoc" );
@@ -2723,7 +2723,7 @@ void SwDBManager::ExecuteFormLetter( SwWrtShell& rSh,
{
// the shell will be explicitly closed, but it is more safe to use SfxObjectShellLock here
// especially for the case that the loading has failed
- SfxObjectShellLock xWorkDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL ));
+ SfxObjectShellLock xWorkDocSh( new SwDocShell( SfxObjectCreateMode::INTERNAL ));
SfxMedium* pWorkMed = new SfxMedium( sTempURL, STREAM_STD_READ );
pWorkMed->SetFilter( pSfxFlt );
if( xWorkDocSh->DoLoad(pWorkMed) )
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 1df19b765208..2ba22e414c66 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -594,7 +594,7 @@ bool SwTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo
{
SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac);
SwDocShell* pNewDocSh = new SwDocShell( pDoc,
- SFX_CREATE_MODE_EMBEDDED );
+ SfxObjectCreateMode::EMBEDDED );
aDocShellRef = pNewDocSh;
aDocShellRef->DoInitNew( NULL );
SwTransferable::InitOle( aDocShellRef, *pDoc );
@@ -824,7 +824,7 @@ int SwTransferable::PrepareForCopy( bool bIsCut )
{
pClpDocFac = new SwDocFac;
SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac);
- aDocShellRef = new SwDocShell( pDoc, SFX_CREATE_MODE_EMBEDDED);
+ aDocShellRef = new SwDocShell( pDoc, SfxObjectCreateMode::EMBEDDED);
aDocShellRef->DoInitNew( NULL );
pWrtShell->Copy( pDoc );
@@ -969,7 +969,7 @@ int SwTransferable::PrepareForCopy( bool bIsCut )
SwDocShell* pDShell;
if( !bIsCut && bDDELink &&
0 != ( pDShell = pWrtShell->GetDoc()->GetDocShell()) &&
- SFX_CREATE_MODE_STANDARD == pDShell->GetCreateMode() )
+ SfxObjectCreateMode::STANDARD == pDShell->GetCreateMode() )
{
AddFormat( SotClipboardFormatId::LINK );
refDdeLink = new SwTrnsfrDdeLink( *this, *pWrtShell );
diff --git a/sw/source/uibase/misc/glshell.cxx b/sw/source/uibase/misc/glshell.cxx
index fbbfd851d60b..f973411b850f 100644
--- a/sw/source/uibase/misc/glshell.cxx
+++ b/sw/source/uibase/misc/glshell.cxx
@@ -133,7 +133,7 @@ static bool lcl_Save( SwWrtShell& rSh, const OUString& rGroupName,
SwGlosDocShell::SwGlosDocShell(bool bNewShow)
: SwDocShell( (bNewShow)
- ? SFX_CREATE_MODE_STANDARD : SFX_CREATE_MODE_INTERNAL )
+ ? SfxObjectCreateMode::STANDARD : SfxObjectCreateMode::INTERNAL )
{
SetHelpId(SW_GLOSDOCSHELL);
}
@@ -169,7 +169,7 @@ bool SwGlosDocShell::Save()
}
SwWebGlosDocShell::SwWebGlosDocShell()
- : SwWebDocShell( SFX_CREATE_MODE_STANDARD )
+ : SwWebDocShell( SfxObjectCreateMode::STANDARD )
{
SetHelpId(SW_WEBGLOSDOCSHELL);
}
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index afcd73fd55db..912ce34066a0 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -704,7 +704,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
case SID_INSERT_VIDEO:
if ( GetShell().IsSelFrmMode()
|| GetShell().CrsrInsideInputFld()
- || SFX_CREATE_MODE_EMBEDDED == eCreateMode
+ || SfxObjectCreateMode::EMBEDDED == eCreateMode
|| bCrsrInHidden )
{
rSet.DisableItem( nWhich );
@@ -714,7 +714,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
case SID_INSERT_DIAGRAM:
if( !aMOpt.IsChart()
|| GetShell().CrsrInsideInputFld()
- || eCreateMode == SFX_CREATE_MODE_EMBEDDED
+ || eCreateMode == SfxObjectCreateMode::EMBEDDED
|| bCrsrInHidden )
{
rSet.DisableItem( nWhich );
@@ -723,7 +723,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
case FN_INSERT_SMA:
if( !aMOpt.IsMath()
- || eCreateMode == SFX_CREATE_MODE_EMBEDDED
+ || eCreateMode == SfxObjectCreateMode::EMBEDDED
|| bCrsrInHidden
|| rSh.CrsrInsideInputFld() )
{
@@ -735,7 +735,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
case SID_INSERT_OBJECT:
case SID_INSERT_PLUGIN:
{
- if( eCreateMode == SFX_CREATE_MODE_EMBEDDED || bCrsrInHidden )
+ if( eCreateMode == SfxObjectCreateMode::EMBEDDED || bCrsrInHidden )
{
rSet.DisableItem( nWhich );
}
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 2f83e176ca96..bc929053961c 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -865,7 +865,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
// no margin for OLE!
Size aBrwsBorder;
- if( SFX_CREATE_MODE_EMBEDDED != pDocSh->GetCreateMode() )
+ if( SfxObjectCreateMode::EMBEDDED != pDocSh->GetCreateMode() )
aBrwsBorder = GetMargin();
m_pWrtShell->SetBrowseBorder( aBrwsBorder );
@@ -916,7 +916,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
// Set AttrChangedNotify link
m_pWrtShell->SetChgLnk(LINK(this, SwView, AttrChangedNotify));
- if( pDocSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED &&
+ if( pDocSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED &&
!pDocSh->GetVisArea(ASPECT_CONTENT).IsEmpty() )
SetVisArea( pDocSh->GetVisArea(ASPECT_CONTENT),false);
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 19530171d8fd..ed126fe56f74 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -1394,7 +1394,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
break;
case SID_ATTR_ZOOM:
{
- if ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() )
+ if ( ( GetDocShell()->GetCreateMode() != SfxObjectCreateMode::EMBEDDED ) || !GetDocShell()->IsInPlaceActive() )
{
const SwViewOption* pVOpt = rShell.GetViewOptions();
SvxZoomType eZoom = (SvxZoomType) pVOpt->GetZoomType();
@@ -1417,7 +1417,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
break;
case SID_ATTR_VIEWLAYOUT:
{
- if ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() )
+ if ( ( GetDocShell()->GetCreateMode() != SfxObjectCreateMode::EMBEDDED ) || !GetDocShell()->IsInPlaceActive() )
{
const SwViewOption* pVOpt = rShell.GetViewOptions();
const sal_uInt16 nColumns = pVOpt->GetViewLayoutColumns();
@@ -1431,7 +1431,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
break;
case SID_ATTR_ZOOMSLIDER:
{
- if ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() )
+ if ( ( GetDocShell()->GetCreateMode() != SfxObjectCreateMode::EMBEDDED ) || !GetDocShell()->IsInPlaceActive() )
{
const SwViewOption* pVOpt = rShell.GetViewOptions();
const sal_uInt16 nCurrentZoom = pVOpt->GetZoom();
@@ -1674,7 +1674,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
break;
case SID_ATTR_ZOOM:
{
- if ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() )
+ if ( ( GetDocShell()->GetCreateMode() != SfxObjectCreateMode::EMBEDDED ) || !GetDocShell()->IsInPlaceActive() )
{
const SfxItemSet *pSet = 0;
boost::scoped_ptr<AbstractSvxZoomDialog> pDlg;
@@ -1742,7 +1742,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
case SID_ATTR_VIEWLAYOUT:
{
if ( pArgs && !rSh.getIDocumentSettingAccess()->get(DocumentSettingId::BROWSE_MODE) &&
- ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() ) )
+ ( ( GetDocShell()->GetCreateMode() != SfxObjectCreateMode::EMBEDDED ) || !GetDocShell()->IsInPlaceActive() ) )
{
if ( SfxItemState::SET == pArgs->GetItemState(SID_ATTR_VIEWLAYOUT, true, &pItem ))
{
@@ -1764,7 +1764,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
case SID_ATTR_ZOOMSLIDER:
{
- if ( pArgs && ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() ) )
+ if ( pArgs && ( ( GetDocShell()->GetCreateMode() != SfxObjectCreateMode::EMBEDDED ) || !GetDocShell()->IsInPlaceActive() ) )
{
if ( SfxItemState::SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, true, &pItem ))
{
diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx
index 04773149ddce..bcdca2d8e6df 100644
--- a/sw/source/uibase/uiview/viewport.cxx
+++ b/sw/source/uibase/uiview/viewport.cxx
@@ -62,7 +62,7 @@ static sal_uInt16 nPgNum = 0;
bool SwView::IsDocumentBorder()
{
- if (GetDocShell()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED)
+ if (GetDocShell()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED)
return true;
if (!m_pWrtShell)
@@ -282,7 +282,7 @@ void SwView::SetVisArea( const Rectangle &rRect, bool bUpdateScrollbar )
// TODO/LATER: why casting?!
GetDocShell()->SfxObjectShell::SetVisArea( aVis );
/*
- if ( GetDocShell()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ if ( GetDocShell()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
GetDocShell()->SfxInPlaceObject::SetVisArea( aVis );
else
GetDocShell()->SvEmbeddedObject::SetVisArea( aVis );*/
@@ -1100,7 +1100,7 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
//Thus also in the outplace editing the page width will be adjusted immediately.
//TODO/LATER: is that still necessary?!
/*
- if ( pDocSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ if ( pDocSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
pDocSh->SetVisArea(
pDocSh->SfxInPlaceObject::GetVisArea() );*/
if ( m_pWrtShell->GetViewOptions()->GetZoomType() != SvxZoomType::PERCENT &&
diff --git a/sw/source/uibase/uno/SwXDocumentSettings.cxx b/sw/source/uibase/uno/SwXDocumentSettings.cxx
index 990c20a25f98..c323f7261694 100644
--- a/sw/source/uibase/uno/SwXDocumentSettings.cxx
+++ b/sw/source/uibase/uno/SwXDocumentSettings.cxx
@@ -383,7 +383,7 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
OUString sPrinterName;
if( rValue >>= sPrinterName )
{
- if( !mpPrinter && !sPrinterName.isEmpty() && mpDocSh->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
+ if( !mpPrinter && !sPrinterName.isEmpty() && mpDocSh->GetCreateMode() != SfxObjectCreateMode::EMBEDDED )
{
SfxPrinter* pPrinter = mpDoc->getIDocumentDeviceAccess().getPrinter( true );
if ( OUString ( pPrinter->GetName()) != sPrinterName )
diff --git a/sw/source/uibase/uno/unodoc.cxx b/sw/source/uibase/uno/unodoc.cxx
index a3b3d7c888a8..c2782f62db81 100644
--- a/sw/source/uibase/uno/unodoc.cxx
+++ b/sw/source/uibase/uno/unodoc.cxx
@@ -63,7 +63,7 @@ com_sun_star_comp_Writer_WebDocument_get_implementation(::com::sun::star::uno::X
{
SolarMutexGuard aGuard;
SwGlobals::ensure();
- SfxObjectShell* pShell = new SwWebDocShell( SFX_CREATE_MODE_STANDARD );
+ SfxObjectShell* pShell = new SwWebDocShell( SfxObjectCreateMode::STANDARD );
uno::Reference< uno::XInterface > model( pShell->GetModel() );
model->acquire();
return model.get();
@@ -76,7 +76,7 @@ com_sun_star_comp_Writer_GlobalDocument_get_implementation(::com::sun::star::uno
{
SolarMutexGuard aGuard;
SwGlobals::ensure();
- SfxObjectShell* pShell = new SwGlobalDocShell( SFX_CREATE_MODE_STANDARD );
+ SfxObjectShell* pShell = new SwGlobalDocShell( SfxObjectCreateMode::STANDARD );
uno::Reference< uno::XInterface > model( pShell->GetModel() );
model->acquire();
return model.get();
diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx
index 626c374aa9a9..31cbc114cdf9 100644
--- a/sw/source/uibase/uno/unomailmerge.cxx
+++ b/sw/source/uibase/uno/unomailmerge.cxx
@@ -385,7 +385,7 @@ SwXMailMerge::SwXMailMerge() :
{
// create empty document
// like in: SwModule::InsertEnv (appenv.cxx)
- xDocSh = new SwDocShell( SFX_CREATE_MODE_STANDARD );
+ xDocSh = new SwDocShell( SfxObjectCreateMode::STANDARD );
xDocSh->DoInitNew( 0 );
SfxViewFrame *pFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 );
SwView *pView = static_cast<SwView*>( pFrame->GetViewShell() );
diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx
index f4eaa51a37bc..d29561e12ba9 100644
--- a/sw/source/uibase/uno/unotxvw.cxx
+++ b/sw/source/uibase/uno/unotxvw.cxx
@@ -648,7 +648,7 @@ SfxObjectShellLock SwXTextView::BuildTmpSelectionDoc()
SwWrtShell& rOldSh = m_pView->GetWrtShell();
SfxPrinter *pPrt = rOldSh.getIDocumentDeviceAccess()->getPrinter( false );
SwDocShell* pDocSh;
- SfxObjectShellLock xDocSh( pDocSh = new SwDocShell( /*pPrtDoc, */SFX_CREATE_MODE_STANDARD ) );
+ SfxObjectShellLock xDocSh( pDocSh = new SwDocShell( /*pPrtDoc, */SfxObjectCreateMode::STANDARD ) );
xDocSh->DoInitNew( 0 );
SwDoc *const pTempDoc( pDocSh->GetDoc() );
// #i103634#, #i112425#: do not expand numbering and fields on PDF export