summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-10-11 16:01:26 +0200
committerNoel Grandin <noelgrandin@gmail.com>2014-10-11 15:14:52 +0000
commit8044acf2db9d125d5ed58ed25df5df4a90f37ac6 (patch)
tree67af1fff3f9bc0d144b80d5ecbe5a078cd08dbd3 /sfx2/source
parentcb7ede2d9970a4d162dc71922f578922c0d6235a (diff)
convert SFX_CALLMODE constants to SfxCallMode enum class
and fix a couple of bugs in SC and SW where the call mode was being passed to the hints parameter by accident Change-Id: Ief805410b3f7035e012e229e77f92d5832430f58 Reviewed-on: https://gerrit.libreoffice.org/11916 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/appl/appdde.cxx2
-rw-r--r--sfx2/source/appl/appopen.cxx8
-rw-r--r--sfx2/source/appl/appserv.cxx10
-rw-r--r--sfx2/source/appl/sfxpicklist.cxx2
-rw-r--r--sfx2/source/control/bindings.cxx10
-rw-r--r--sfx2/source/control/dispatch.cxx24
-rw-r--r--sfx2/source/control/request.cxx24
-rw-r--r--sfx2/source/control/unoctitm.cxx8
-rw-r--r--sfx2/source/dialog/basedlgs.cxx4
-rw-r--r--sfx2/source/dialog/dockwin.cxx2
-rw-r--r--sfx2/source/dialog/recfloat.cxx4
-rw-r--r--sfx2/source/dialog/templdlg.cxx4
-rw-r--r--sfx2/source/dialog/titledockwin.cxx2
-rw-r--r--sfx2/source/dialog/versdlg.cxx6
-rw-r--r--sfx2/source/doc/objmisc.cxx2
-rw-r--r--sfx2/source/doc/objserv.cxx8
-rw-r--r--sfx2/source/view/frame.cxx2
-rw-r--r--sfx2/source/view/frmload.cxx2
-rw-r--r--sfx2/source/view/viewfrm.cxx10
-rw-r--r--sfx2/source/view/viewfrm2.cxx2
-rw-r--r--sfx2/source/view/viewsh.cxx2
21 files changed, 69 insertions, 69 deletions
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index 9de5f084c4cf..f0dc0e735f03 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -150,7 +150,7 @@ bool ImplDdeService::MakeTopic( const OUString& rNm )
SfxBoolItem aSilent(SID_SILENT, sal_True);
SfxDispatcher* pDispatcher = SfxGetpApp()->GetDispatcher_Impl();
const SfxPoolItem* pRet = pDispatcher->Execute( SID_OPENDOC,
- SFX_CALLMODE_SYNCHRON,
+ SfxCallMode::SYNCHRON,
&aName, &aNewView,
&aSilent, 0L );
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 2b8c1ae5e0a8..0df4a09bcc9d 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -324,7 +324,7 @@ sal_uIntPtr SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const OUStri
SfxStringItem aReferer( SID_REFERER, OUString("private:user") );
SfxStringItem aFlags( SID_OPTIONS, OUString("T") );
SfxBoolItem aHidden( SID_HIDDEN, true );
- const SfxPoolItem *pRet = GetDispatcher_Impl()->Execute( SID_OPENDOC, SFX_CALLMODE_SYNCHRON, &aName, &aHidden, &aReferer, &aFlags, 0L );
+ const SfxPoolItem *pRet = GetDispatcher_Impl()->Execute( SID_OPENDOC, SfxCallMode::SYNCHRON, &aName, &aHidden, &aReferer, &aFlags, 0L );
const SfxObjectItem *pObj = PTR_CAST( SfxObjectItem, pRet );
if ( pObj )
xDoc = const_cast<SfxObjectShell*>(PTR_CAST( SfxObjectShell, pObj->GetShell() ));
@@ -423,7 +423,7 @@ void SfxApplication::NewDocDirectExec_Impl( SfxRequest& rReq )
aFactName = SvtModuleOptions().GetDefaultModuleName();
- SfxRequest aReq( SID_OPENDOC, SFX_CALLMODE_SYNCHRON, GetPool() );
+ SfxRequest aReq( SID_OPENDOC, SfxCallMode::SYNCHRON, GetPool() );
OUString aFact("private:factory/");
aFact += aFactName;
aReq.AppendItem( SfxStringItem( SID_FILE_NAME, aFact ) );
@@ -525,7 +525,7 @@ void SfxApplication::NewDocExec_Impl( SfxRequest& rReq )
}
else
{
- SfxCallMode eMode = SFX_CALLMODE_SYNCHRON;
+ SfxCallMode eMode = SfxCallMode::SYNCHRON;
const SfxPoolItem *pRet=0;
SfxStringItem aReferer( SID_REFERER, "private:user" );
@@ -702,7 +702,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
// when rescheduling
// TODO/LATER: use URLList argument and always remove one document after another, each step in asychronous execution, until finished
// but only if reschedule is a problem
- GetDispatcher_Impl()->Execute( SID_OPENDOC, SFX_CALLMODE_SYNCHRON, *rReq.GetArgs() );
+ GetDispatcher_Impl()->Execute( SID_OPENDOC, SfxCallMode::SYNCHRON, *rReq.GetArgs() );
// check for special interaction "NO MORE DOCUMENTS ALLOWED" and
// break loop then. Otherwise we risk showing the same interaction more than once.
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 13370f472e2d..0db333fe5953 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -183,7 +183,7 @@ namespace
SfxStringItem aURL(SID_FILE_NAME, OUString(".component:Bibliography/View1"));
SfxStringItem aRef(SID_REFERER, OUString("private:user"));
SfxStringItem aTarget(SID_TARGETNAME, OUString("_blank"));
- SfxViewFrame::Current()->GetDispatcher()->Execute( SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, &aURL, &aRef, &aTarget, 0L);
+ SfxViewFrame::Current()->GetDispatcher()->Execute( SID_OPENDOC, SfxCallMode::ASYNCHRON, &aURL, &aRef, &aTarget, 0L);
}
catch (const Exception & e)
{
@@ -294,7 +294,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
SfxStringItem aNameItem( SID_FILE_NAME, OUString("vnd.sun.star.cmd:logout") );
SfxStringItem aReferer( SID_REFERER, "private/user" );
- pAppData_Impl->pAppDispat->Execute( SID_OPENDOC, SFX_CALLMODE_SLOT, &aNameItem, &aReferer, 0L );
+ pAppData_Impl->pAppDispat->Execute( SID_OPENDOC, SfxCallMode::SLOT, &aNameItem, &aReferer, 0L );
return;
}
@@ -415,7 +415,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
pObjSh;
pObjSh = SfxObjectShell::GetNext( *pObjSh ) )
{
- SfxRequest aReq( SID_SAVEDOC, 0, pObjSh->GetPool() );
+ SfxRequest aReq( SID_SAVEDOC, SfxCallMode::SLOT, pObjSh->GetPool() );
if ( pObjSh->IsModified() )
{
pObjSh->ExecuteSlot( aReq );
@@ -623,7 +623,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
break;
}
- pCurrentShell->GetDispatcher()->Execute(SID_ATTR_ZOOM, SFX_CALLMODE_ASYNCHRON, &aZoom, 0L);
+ pCurrentShell->GetDispatcher()->Execute(SID_ATTR_ZOOM, SfxCallMode::ASYNCHRON, &aZoom, 0L);
break;
}
@@ -1087,7 +1087,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
SfxObjectShell* pObjShell = pView->GetObjectShell();
if ( pViewShell && pObjShell )
{
- SfxRequest aReq( SID_BASICIDE_SHOWWINDOW, SFX_CALLMODE_SYNCHRON, pObjShell->GetPool() );
+ SfxRequest aReq( SID_BASICIDE_SHOWWINDOW, SfxCallMode::SYNCHRON, pObjShell->GetPool() );
aReq.SetArgs( *pArgs );
pViewShell->ExecuteSlot( aReq );
}
diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx
index a416e2e60380..c36ebc45adbc 100644
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -337,7 +337,7 @@ void SfxPickList::ExecuteEntry( sal_uInt32 nIndex )
if ( pPick )
{
- SfxRequest aReq( SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, SfxGetpApp()->GetPool() );
+ SfxRequest aReq( SID_OPENDOC, SfxCallMode::ASYNCHRON, SfxGetpApp()->GetPool() );
aReq.AppendItem( SfxStringItem( SID_FILE_NAME, pPick->aName ));
aReq.AppendItem( SfxStringItem( SID_REFERER, "private:user" ) );
aReq.AppendItem( SfxStringItem( SID_TARGETNAME, "_default" ) );
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 33e49cd4056e..9da461ecfcbd 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -997,7 +997,7 @@ const SfxPoolItem* SfxBindings::ExecuteSynchron( sal_uInt16 nId, const SfxPoolIt
if( !nId || !pDispatcher )
return NULL;
- return Execute_Impl( nId, ppItems, nModi, SFX_CALLMODE_SYNCHRON, ppInternalArgs );
+ return Execute_Impl( nId, ppItems, nModi, SfxCallMode::SYNCHRON, ppInternalArgs );
}
bool SfxBindings::Execute( sal_uInt16 nId, const SfxPoolItem** ppItems, sal_uInt16 nModi, SfxCallMode nCallMode,
@@ -1054,7 +1054,7 @@ const SfxPoolItem* SfxBindings::Execute_Impl( sal_uInt16 nId, const SfxPoolItem*
aReq.AppendItem( **ppItems++ );
// cache binds to an external dispatch provider
- pCache->Dispatch( aReq.GetArgs(), nCallMode == SFX_CALLMODE_SYNCHRON );
+ pCache->Dispatch( aReq.GetArgs(), nCallMode == SfxCallMode::SYNCHRON );
SfxPoolItem *pVoid = new SfxVoidItem( nId );
DeleteItemOnIdle( pVoid );
return pVoid;
@@ -1121,7 +1121,7 @@ void SfxBindings::Execute_Impl( SfxRequest& aReq, const SfxSlot* pSlot, SfxShell
const sal_uInt16 nSlotId = pRealSlot->GetSlotId();
aReq.SetSlot( nSlotId );
aReq.AppendItem( SfxAllEnumItem( rPool.GetWhich(nSlotId), pSlot->GetValue() ) );
- pDispatcher->_Execute( *pShell, *pRealSlot, aReq, aReq.GetCallMode() | SFX_CALLMODE_RECORD );
+ pDispatcher->_Execute( *pShell, *pRealSlot, aReq, aReq.GetCallMode() | SfxCallMode::RECORD );
}
else if ( SFX_KIND_ATTR == pSlot->GetKind() )
{
@@ -1201,10 +1201,10 @@ void SfxBindings::Execute_Impl( SfxRequest& aReq, const SfxSlot* pSlot, SfxShell
}
}
- pDispatcher->_Execute( *pShell, *pSlot, aReq, aReq.GetCallMode() | SFX_CALLMODE_RECORD );
+ pDispatcher->_Execute( *pShell, *pSlot, aReq, aReq.GetCallMode() | SfxCallMode::RECORD );
}
else
- pDispatcher->_Execute( *pShell, *pSlot, aReq, aReq.GetCallMode() | SFX_CALLMODE_RECORD );
+ pDispatcher->_Execute( *pShell, *pSlot, aReq, aReq.GetCallMode() | SfxCallMode::RECORD );
}
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index a1b2ea02f3ca..b471b3e45dc0 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -836,8 +836,8 @@ void SfxDispatcher::_Execute(SfxShell& rShell, const SfxSlot& rSlot,
if ( IsLocked( rSlot.GetSlotId() ) )
return;
- if ( (eCallMode & SFX_CALLMODE_ASYNCHRON) ||
- ( !(eCallMode & SFX_CALLMODE_SYNCHRON) &&
+ if ( bool(eCallMode & SfxCallMode::ASYNCHRON) ||
+ ( (eCallMode & SfxCallMode::SYNCHRON) == SfxCallMode::SLOT &&
rSlot.IsMode(SFX_SLOT_ASYNCHRON) ) )
{
SfxDispatcher *pDispat = this;
@@ -848,7 +848,7 @@ void SfxDispatcher::_Execute(SfxShell& rShell, const SfxSlot& rSlot,
{
if ( &rShell == *(pDispat->pImp->aStack.rbegin() + n) )
{
- if ( eCallMode & SFX_CALLMODE_RECORD )
+ if ( bool(eCallMode & SfxCallMode::RECORD) )
rReq.AllowRecording( true );
pDispat->pImp->xPoster->Post(new SfxRequest(rReq));
return;
@@ -859,7 +859,7 @@ void SfxDispatcher::_Execute(SfxShell& rShell, const SfxSlot& rSlot,
}
}
else
- Call_Impl( rShell, rSlot, rReq, SFX_CALLMODE_RECORD==(eCallMode&SFX_CALLMODE_RECORD) );
+ Call_Impl( rShell, rSlot, rReq, SfxCallMode::RECORD==(eCallMode&SfxCallMode::RECORD) );
}
/** Helper function to put from rItem below the Which-ID in the pool of the
@@ -913,7 +913,7 @@ const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode nCall,
SfxShell *pShell = 0;
const SfxSlot *pSlot = 0;
if ( GetShellAndSlot_Impl( nSlot, &pShell, &pSlot, false,
- SFX_CALLMODE_MODAL==(nCall&SFX_CALLMODE_MODAL) ) )
+ SfxCallMode::MODAL==(nCall&SfxCallMode::MODAL) ) )
{
SfxAllItemSet aSet( pShell->GetPool() );
if ( pArgs )
@@ -938,7 +938,7 @@ const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode nCall,
/** Method to excecute a <SfxSlot>s over the Slot-Id.
@param nSlot the Id of the executing function
- @param eCall SFX_CALLMODE_SYNCRHON, ..._ASYNCHRON or ..._SLOT
+ @param eCall SfxCallMode::SYNCRHON, ..._ASYNCHRON or ..._SLOT
@param pArgs Zero teminated C-Array of Parameters
@param pInternalArgs Zero terminated C-Array of Parameters
@@ -958,7 +958,7 @@ const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall,
SfxShell *pShell = 0;
const SfxSlot *pSlot = 0;
if ( GetShellAndSlot_Impl( nSlot, &pShell, &pSlot, false,
- SFX_CALLMODE_MODAL==(eCall&SFX_CALLMODE_MODAL) ) )
+ SfxCallMode::MODAL==(eCall&SfxCallMode::MODAL) ) )
{
SfxRequest* pReq;
if ( pArgs && *pArgs )
@@ -988,7 +988,7 @@ const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall,
/** Method to excecute a <SfxSlot>s over the Slot-Id.
@param nSlot the Id of the executing function
- @param eCall SFX_CALLMODE_SYNCRHON, ..._ASYNCHRON or ..._SLOT
+ @param eCall SfxCallMode::SYNCRHON, ..._ASYNCHRON or ..._SLOT
@param rArgs <SfxItemSet> with the parameters
@return const SfxPoolItem* Pointer to the SfxPoolItem valid to the next run
@@ -1013,7 +1013,7 @@ const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall,
SfxShell *pShell = 0;
const SfxSlot *pSlot = 0;
if ( GetShellAndSlot_Impl( nSlot, &pShell, &pSlot, false,
- SFX_CALLMODE_MODAL==(eCall&SFX_CALLMODE_MODAL) ) )
+ SfxCallMode::MODAL==(eCall&SfxCallMode::MODAL) ) )
{
SfxAllItemSet aSet( pShell->GetPool() );
SfxItemIter aIter(rArgs);
@@ -1037,7 +1037,7 @@ const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall,
of stack objects.
@param nSlot the Id of the executing function
- @param eCall SFX_CALLMODE_SYNCRHON, ..._ASYNCHRON or ..._SLOT
+ @param eCall SfxCallMode::SYNCRHON, ..._ASYNCHRON or ..._SLOT
@param pArg1 First parameter
@param ... Zero terminated list of parameters
@@ -1050,7 +1050,7 @@ const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall,
[Example]
- pDispatcher->Execute( SID_OPENDOCUMENT, SFX_CALLMODE_SYNCHRON,
+ pDispatcher->Execute( SID_OPENDOCUMENT, SfxCallMode::SYNCHRON,
&SfxStringItem( SID_FILE_NAME, "\\tmp\\temp.sdd" ),
&SfxStringItem( SID_FILTER_NAME, "StarDraw Presentation" ),
&SfxBoolItem( SID_DOC_READONLY, sal_False ),
@@ -1065,7 +1065,7 @@ const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall,
SfxShell *pShell = 0;
const SfxSlot *pSlot = 0;
if ( GetShellAndSlot_Impl( nSlot, &pShell, &pSlot, false,
- SFX_CALLMODE_MODAL==(eCall&SFX_CALLMODE_MODAL) ) )
+ SfxCallMode::MODAL==(eCall&SfxCallMode::MODAL) ) )
{
SfxAllItemSet aSet( pShell->GetPool() );
diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx
index b3d8b0d79c1e..6c7d0a35d4ba 100644
--- a/sfx2/source/control/request.cxx
+++ b/sfx2/source/control/request.cxx
@@ -63,7 +63,7 @@ struct SfxRequest_Impl: public SfxListener
bool bDone; // at all executed
bool bIgnored; // Cancelled by the User
bool bCancelled; // no longer notify
- sal_uInt16 nCallMode; // Synch/Asynch/API/Record
+ SfxCallMode nCallMode; // Synch/Asynch/API/Record
bool bAllowRecording;
SfxAllItemSet* pInternalArgs;
SfxViewFrame* pViewFrame;
@@ -80,7 +80,7 @@ struct SfxRequest_Impl: public SfxListener
, bDone(false)
, bIgnored(false)
, bCancelled(false)
- , nCallMode( SFX_CALLMODE_SYNCHRON )
+ , nCallMode( SfxCallMode::SYNCHRON )
, bAllowRecording( false )
, pInternalArgs( 0 )
, pViewFrame(0)
@@ -191,7 +191,7 @@ SfxRequest::SfxRequest
pImp->pRetVal = 0;
pImp->pShell = 0;
pImp->pSlot = 0;
- pImp->nCallMode = SFX_CALLMODE_SYNCHRON;
+ pImp->nCallMode = SfxCallMode::SYNCHRON;
pImp->pViewFrame = pViewFrame;
if( pImp->pViewFrame->GetDispatcher()->GetShellAndSlot_Impl( nSlotId, &pImp->pShell, &pImp->pSlot, true, true ) )
{
@@ -260,8 +260,8 @@ SfxRequest::SfxRequest
SfxRequest::SfxRequest
(
sal_uInt16 nSlotId,
- sal_uInt16 nMode,
- const SfxAllItemSet& rSfxArgs
+ SfxCallMode nMode,
+ const SfxAllItemSet& rSfxArgs
)
// creates a SfxRequest with arguments
@@ -280,7 +280,7 @@ SfxRequest::SfxRequest
}
-sal_uInt16 SfxRequest::GetCallMode() const
+SfxCallMode SfxRequest::GetCallMode() const
{
return pImp->nCallMode;
}
@@ -289,7 +289,7 @@ sal_uInt16 SfxRequest::GetCallMode() const
bool SfxRequest::IsSynchronCall() const
{
- return SFX_CALLMODE_SYNCHRON == ( SFX_CALLMODE_SYNCHRON & pImp->nCallMode );
+ return SfxCallMode::SYNCHRON == ( SfxCallMode::SYNCHRON & pImp->nCallMode );
}
@@ -297,9 +297,9 @@ bool SfxRequest::IsSynchronCall() const
void SfxRequest::SetSynchronCall( bool bSynchron )
{
if ( bSynchron )
- pImp->nCallMode |= SFX_CALLMODE_SYNCHRON;
+ pImp->nCallMode |= SfxCallMode::SYNCHRON;
else
- pImp->nCallMode &= ~(sal_uInt16) SFX_CALLMODE_SYNCHRON;
+ pImp->nCallMode &= ~SfxCallMode::SYNCHRON;
}
void SfxRequest::SetInternalArgs_Impl( const SfxAllItemSet& rArgs )
@@ -834,7 +834,7 @@ bool SfxRequest::IsAPI() const
*/
{
- return SFX_CALLMODE_API == ( SFX_CALLMODE_API & pImp->nCallMode );
+ return SfxCallMode::API == ( SfxCallMode::API & pImp->nCallMode );
}
@@ -860,8 +860,8 @@ bool SfxRequest::AllowsRecording() const
{
bool bAllow = pImp->bAllowRecording;
if( !bAllow )
- bAllow = ( SFX_CALLMODE_API != ( SFX_CALLMODE_API & pImp->nCallMode ) ) &&
- ( SFX_CALLMODE_RECORD == ( SFX_CALLMODE_RECORD & pImp->nCallMode ) );
+ bAllow = ( SfxCallMode::API != ( SfxCallMode::API & pImp->nCallMode ) ) &&
+ ( SfxCallMode::RECORD == ( SfxCallMode::RECORD & pImp->nCallMode ) );
return bAllow;
}
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 9bcbcea23353..752a2f75d4e4 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -732,7 +732,7 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const ::com::sun::star::util
addParametersToArgs( aURL, lNewArgs );
// Try to find call mode and frame name inside given arguments...
- SfxCallMode nCall = SFX_CALLMODE_STANDARD;
+ SfxCallMode nCall = SfxCallMode::RECORD;
sal_Int32 nMarkArg = -1;
// Filter arguments which shouldn't be part of the sequence property value
@@ -745,7 +745,7 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const ::com::sun::star::util
{
bool bTemp;
if( rProp.Value >>= bTemp )
- nCall = bTemp ? SFX_CALLMODE_SYNCHRON : SFX_CALLMODE_ASYNCHRON;
+ nCall = bTemp ? SfxCallMode::SYNCHRON : SfxCallMode::ASYNCHRON;
}
else if( rProp.Name == "Bookmark" )
{
@@ -771,7 +771,7 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const ::com::sun::star::util
// Overwrite possible detected sychron argument, if real listener exists (currently no other way)
if ( rListener.is() )
- nCall = SFX_CALLMODE_SYNCHRON;
+ nCall = SfxCallMode::SYNCHRON;
if( GetId() == SID_JUMPTOMARK && nMarkArg == - 1 )
{
@@ -813,7 +813,7 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const ::com::sun::star::util
{
const SfxSlot *pSlot = 0;
if ( pDispatcher->GetShellAndSlot_Impl( GetId(), &pShell, &pSlot, false,
- SFX_CALLMODE_MODAL==(nCall&SFX_CALLMODE_MODAL), false ) )
+ SfxCallMode::MODAL==(nCall&SfxCallMode::MODAL), false ) )
{
if ( bMasterSlave )
{
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index faa709386790..534c8ab4d018 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -384,7 +384,7 @@ bool SfxModelessDialog::Close()
SfxBoolItem aValue( pImp->pMgr->GetType(), false);
pBindings->GetDispatcher_Impl()->Execute(
pImp->pMgr->GetType(),
- SFX_CALLMODE_RECORD|SFX_CALLMODE_SYNCHRON, &aValue, 0L );
+ SfxCallMode::RECORD|SfxCallMode::SYNCHRON, &aValue, 0L );
return true;
}
@@ -498,7 +498,7 @@ bool SfxFloatingWindow::Close()
SfxBoolItem aValue( pImp->pMgr->GetType(), false);
pBindings->GetDispatcher_Impl()->Execute(
pImp->pMgr->GetType(),
- SFX_CALLMODE_RECORD|SFX_CALLMODE_SYNCHRON, &aValue, 0L );
+ SfxCallMode::RECORD|SfxCallMode::SYNCHRON, &aValue, 0L );
return true;
}
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 7129fb300e8b..1e8d32d08320 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -1678,7 +1678,7 @@ bool SfxDockingWindow::Close()
SfxBoolItem aValue( pMgr->GetType(), false);
pBindings->GetDispatcher_Impl()->Execute(
- pMgr->GetType(), SFX_CALLMODE_RECORD | SFX_CALLMODE_ASYNCHRON, &aValue, 0L );
+ pMgr->GetType(), SfxCallMode::RECORD | SfxCallMode::ASYNCHRON, &aValue, 0L );
return true;
}
diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx
index ccb6da5cf6d4..4e746944038a 100644
--- a/sfx2/source/dialog/recfloat.cxx
+++ b/sfx2/source/dialog/recfloat.cxx
@@ -142,7 +142,7 @@ SfxRecordingFloatWrapper_Impl::~SfxRecordingFloatWrapper_Impl()
SfxBoolItem aItem( FN_PARAM_1, true );
com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > xRecorder = pBindings->GetRecorder();
if ( xRecorder.is() )
- pBindings->GetDispatcher()->Execute( SID_STOP_RECORDING, SFX_CALLMODE_SYNCHRON, &aItem, 0L );
+ pBindings->GetDispatcher()->Execute( SID_STOP_RECORDING, SfxCallMode::SYNCHRON, &aItem, 0L );
}
bool SfxRecordingFloatWrapper_Impl::QueryClose()
@@ -195,7 +195,7 @@ SfxRecordingFloat_Impl::SfxRecordingFloat_Impl(
// start recording
SfxBoolItem aItem( SID_RECORDMACRO, true );
- GetBindings().GetDispatcher()->Execute( SID_RECORDMACRO, SFX_CALLMODE_SYNCHRON, &aItem, 0L );
+ GetBindings().GetDispatcher()->Execute( SID_RECORDMACRO, SfxCallMode::SYNCHRON, &aItem, 0L );
}
SfxRecordingFloat_Impl::~SfxRecordingFloat_Impl()
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 688250db96db..05b443c726d6 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -1679,7 +1679,7 @@ bool SfxCommonTemplateDialog_Impl::Execute_Impl(
DeletionWatcher aDeleted(*this);
sal_uInt16 nModi = pModifier ? *pModifier : 0;
const SfxPoolItem* pItem = rDispatcher.Execute(
- nId, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD | SFX_CALLMODE_MODAL,
+ nId, SfxCallMode::SYNCHRON | SfxCallMode::RECORD | SfxCallMode::MODAL,
pItems, nModi );
// Dialog can be destroyed while in Execute() because started
@@ -1782,7 +1782,7 @@ void SfxCommonTemplateDialog_Impl::FamilySelect(sal_uInt16 nEntry)
nActFamily = nEntry;
SfxDispatcher* pDispat = pBindings->GetDispatcher_Impl();
SfxUInt16Item aItem( SID_STYLE_FAMILY, nEntry );
- pDispat->Execute( SID_STYLE_FAMILY, SFX_CALLMODE_SYNCHRON, &aItem, 0L );
+ pDispat->Execute( SID_STYLE_FAMILY, SfxCallMode::SYNCHRON, &aItem, 0L );
pBindings->Invalidate( SID_STYLE_FAMILY );
pBindings->Update( SID_STYLE_FAMILY );
UpdateFamily_Impl();
diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx
index 5ada9dd90cc6..b63f4bbf8d26 100644
--- a/sfx2/source/dialog/titledockwin.cxx
+++ b/sfx2/source/dialog/titledockwin.cxx
@@ -270,7 +270,7 @@ namespace sfx2
const SfxBoolItem aVisibility( nChildWindowId, false );
GetBindings().GetDispatcher()->Execute(
nChildWindowId,
- SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
+ SfxCallMode::ASYNCHRON | SfxCallMode::RECORD,
&aVisibility,
NULL
);
diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index 970a5c5f683c..5b3ebd592afb 100644
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -356,11 +356,11 @@ void SfxVersionDialog::Open_Impl()
// there is a password, it should be used during the opening
SfxUnoAnyItem aEncryptionDataItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) );
pViewFrame->GetDispatcher()->Execute(
- SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, &aFile, &aItem, &aTarget, &aReferer, &aEncryptionDataItem, 0L );
+ SID_OPENDOC, SfxCallMode::ASYNCHRON, &aFile, &aItem, &aTarget, &aReferer, &aEncryptionDataItem, 0L );
}
else
pViewFrame->GetDispatcher()->Execute(
- SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, &aFile, &aItem, &aTarget, &aReferer, 0L );
+ SID_OPENDOC, SfxCallMode::ASYNCHRON, &aFile, &aItem, &aTarget, &aReferer, 0L );
Close();
}
@@ -450,7 +450,7 @@ IMPL_LINK( SfxVersionDialog, ButtonHdl_Impl, Button*, pButton )
if ( pFilterOptItem )
aSet.Put( *pFilterOptItem );
- pViewFrame->GetDispatcher()->Execute( SID_DOCUMENT_COMPARE, SFX_CALLMODE_ASYNCHRON, aSet );
+ pViewFrame->GetDispatcher()->Execute( SID_DOCUMENT_COMPARE, SfxCallMode::ASYNCHRON, aSet );
Close();
}
else if (pButton == m_pCmisButton)
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index de61da83e613..f3e2001790d9 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1455,7 +1455,7 @@ void AutoReloadTimer_Impl::Timeout()
aSet.Put(
SfxStringItem(SID_REFERER, pObjSh->GetMedium()->GetName()));
}
- SfxRequest aReq( SID_RELOAD, 0, aSet );
+ SfxRequest aReq( SID_RELOAD, SfxCallMode::SLOT, aSet );
pObjSh->Get_Impl()->pReloadTimer = 0;
delete this;
pFrame->ExecReload_Impl( aReq );
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index e5d547753695..e1d3068ffe33 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -741,7 +741,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
{
SfxAllItemSet aArgs( GetPool() );
aArgs.Put( SfxBoolItem( SID_SAVEACOPYITEM, true ) );
- SfxRequest aSaveACopyReq( SID_EXPORTDOC, SFX_CALLMODE_API, aArgs );
+ SfxRequest aSaveACopyReq( SID_EXPORTDOC, SfxCallMode::API, aArgs );
ExecFile_Impl( aSaveACopyReq );
if ( !aSaveACopyReq.IsDone() )
{
@@ -814,7 +814,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
SfxAllItemSet aArgs( GetPool() );
SfxStringItem aTmpItem( SID_FILE_NAME, pNameItem->GetValue() );
aArgs.Put( aTmpItem, aTmpItem.Which() );
- SfxRequest aSaveAsReq( SID_SAVEASDOC, SFX_CALLMODE_API, aArgs );
+ SfxRequest aSaveAsReq( SID_SAVEASDOC, SfxCallMode::API, aArgs );
ExecFile_Impl( aSaveAsReq );
if ( !aSaveAsReq.IsDone() )
{
@@ -1267,7 +1267,7 @@ void SfxObjectShell::ExecView_Impl(SfxRequest &rReq)
SfxStringItem aName( SID_FILE_NAME, aFileName );
SfxBoolItem aCreateView( SID_OPEN_NEW_VIEW, true );
SfxGetpApp()->GetAppDispatcher_Impl()->Execute(
- SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, &aName,
+ SID_OPENDOC, SfxCallMode::ASYNCHRON, &aName,
&aCreateView, 0L);
}
}
@@ -1432,7 +1432,7 @@ void SfxObjectShell::ImplSign( bool bScriptingContent )
sal_uInt16 nId = SID_SAVEDOC;
if ( !GetMedium() || GetMedium()->GetName().isEmpty() )
nId = SID_SAVEASDOC;
- SfxRequest aSaveRequest( nId, 0, GetPool() );
+ SfxRequest aSaveRequest( nId, SfxCallMode::SLOT, GetPool() );
//ToDo: Review. We needed to call SetModified, otherwise the document would not be saved.
SetModified(true);
ExecFile_Impl( aSaveRequest );
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index 054abf843993..4e64860c7d06 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -949,7 +949,7 @@ const SfxPoolItem* SfxFrame::OpenDocumentSynchron( SfxItemSet& i_rSet, const Ref
{
i_rSet.Put( SfxUnoFrameItem( SID_FILLFRAME, i_rTargetFrame ) );
i_rSet.ClearItem( SID_TARGETNAME );
- return SfxGetpApp()->GetDispatcher_Impl()->Execute( SID_OPENDOC, SFX_CALLMODE_SYNCHRON, i_rSet );
+ return SfxGetpApp()->GetDispatcher_Impl()->Execute( SID_OPENDOC, SfxCallMode::SYNCHRON, i_rSet );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx
index 521972330501..044fb1c15e5f 100644
--- a/sfx2/source/view/frmload.cxx
+++ b/sfx2/source/view/frmload.cxx
@@ -343,7 +343,7 @@ namespace
bool SfxFrameLoader_Impl::impl_createNewDocWithSlotParam( const sal_uInt16 _nSlotID, const Reference< XFrame >& i_rxFrame,
const bool i_bHidden )
{
- SfxRequest aRequest( _nSlotID, SFX_CALLMODE_SYNCHRON, SfxGetpApp()->GetPool() );
+ SfxRequest aRequest( _nSlotID, SfxCallMode::SYNCHRON, SfxGetpApp()->GetPool() );
aRequest.AppendItem( SfxUnoFrameItem( SID_FILLFRAME, i_rxFrame ) );
if ( i_bHidden )
aRequest.AppendItem( SfxBoolItem( SID_HIDDEN, true ) );
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 5b47c7c34b60..b0c06b9aabd7 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -361,7 +361,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
aSet.Put( *pOptions );
}
- GetDispatcher()->Execute( SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, aSet );
+ GetDispatcher()->Execute( SID_OPENDOC, SfxCallMode::ASYNCHRON, aSet );
return;
}
@@ -520,7 +520,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
aSet.Put( *pOptions );
}
- GetDispatcher()->Execute( SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, aSet );
+ GetDispatcher()->Execute( SID_OPENDOC, SfxCallMode::ASYNCHRON, aSet );
return;
}
else
@@ -772,7 +772,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
aSet.Put( SfxBoolItem( SID_TEMPLATE, true ) );
if( pFilter )
aSet.Put( SfxStringItem( SID_FILTER_NAME, pFilter->GetFilterName() ) );
- GetDispatcher()->Execute( SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, aSet );
+ GetDispatcher()->Execute( SID_OPENDOC, SfxCallMode::ASYNCHRON, aSet );
}
}
}
@@ -2601,7 +2601,7 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const OUString& sMacro )
return;
SfxApplication* pSfxApp = SfxGetpApp();
- SfxRequest aReq( SID_BASICCHOOSER, SFX_CALLMODE_SYNCHRON, pSfxApp->GetPool() );
+ SfxRequest aReq( SID_BASICCHOOSER, SfxCallMode::SYNCHRON, pSfxApp->GetPool() );
aReq.AppendItem( SfxBoolItem(SID_RECORDMACRO,true) );
const SfxPoolItem* pRet = SfxGetpApp()->ExecuteSlot( aReq );
OUString aScriptURL;
@@ -2764,7 +2764,7 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const OUString& sMacro )
if ( pDispat )
{
SfxMacroInfoItem aInfoItem( SID_BASICIDE_ARG_MACROINFO, pBasMgr, aLibName, aModuleName, OUString(), OUString() );
- pDispat->Execute( SID_BASICIDE_UPDATEMODULESOURCE, SFX_CALLMODE_SYNCHRON, &aInfoItem, 0L );
+ pDispat->Execute( SID_BASICIDE_UPDATEMODULESOURCE, SfxCallMode::SYNCHRON, &aInfoItem, 0L );
}
}
}
diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx
index 531f1b433ac3..cd9f43c1494b 100644
--- a/sfx2/source/view/viewfrm2.cxx
+++ b/sfx2/source/view/viewfrm2.cxx
@@ -218,7 +218,7 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq )
break;
}
- SfxRequest aReq( SID_OPENDOC, SFX_CALLMODE_SYNCHRON, GetPool() );
+ SfxRequest aReq( SID_OPENDOC, SfxCallMode::SYNCHRON, GetPool() );
OUString aFact("private:factory/");
aFact += aFactName;
aReq.AppendItem( SfxStringItem( SID_FILE_NAME, aFact ) );
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index e82def5003f4..4eb4d4b375ee 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1877,7 +1877,7 @@ void SfxViewShell::JumpToMark( const OUString& rMark )
SfxStringItem aMarkItem( SID_JUMPTOMARK, rMark );
GetViewFrame()->GetDispatcher()->Execute(
SID_JUMPTOMARK,
- SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD,
+ SfxCallMode::SYNCHRON|SfxCallMode::RECORD,
&aMarkItem, 0L );
}