summaryrefslogtreecommitdiff
path: root/sfx2/source/control/request.cxx
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/control/request.cxx
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/control/request.cxx')
-rw-r--r--sfx2/source/control/request.cxx24
1 files changed, 12 insertions, 12 deletions
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;
}