summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-02-24 13:21:11 +0200
committerNoel Grandin <noel@peralex.com>2015-02-25 10:34:26 +0200
commitfcf339ca5f198529a1eaf70e2ec893f75a843558 (patch)
tree97dd80e34cf4b7371b5ad210181fc5e1b5bce82f
parent1c4e95db104cd5f732bc41a539a7dc5fd9269ef6 (diff)
convert SFX_SLOT_ constants to enum class
Change-Id: Icc3aad14d9d0c59c1c1c8f124f0626a9f947b93f
-rw-r--r--idl/source/objects/object.cxx2
-rw-r--r--idl/source/objects/slot.cxx16
-rw-r--r--include/sfx2/ctrlitem.hxx5
-rw-r--r--include/sfx2/msg.hxx100
-rw-r--r--sd/source/ui/dlg/PaneShells.cxx4
-rw-r--r--sfx2/source/appl/appdispatchprovider.cxx4
-rw-r--r--sfx2/source/appl/appuno.cxx8
-rw-r--r--sfx2/source/control/bindings.cxx6
-rw-r--r--sfx2/source/control/ctrlitem.cxx2
-rw-r--r--sfx2/source/control/dispatch.cxx16
-rw-r--r--sfx2/source/control/request.cxx10
-rw-r--r--sfx2/source/control/shell.cxx2
-rw-r--r--sfx2/source/menu/mnuitem.cxx2
-rw-r--r--sfx2/source/menu/virtmenu.cxx4
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx8
-rw-r--r--svx/source/toolbars/extrusionbar.cxx2
-rw-r--r--svx/source/toolbars/fontworkbar.cxx2
-rw-r--r--sw/source/uibase/uiview/viewstat.cxx4
18 files changed, 97 insertions, 100 deletions
diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index 96bd62e91794..320faa9d3ffe 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -434,7 +434,7 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
.WriteCharPtr( ", 0, 0, " )
.WriteCharPtr( "SFX_STUB_PTR_EXEC_NONE," )
.WriteCharPtr( "SFX_STUB_PTR_STATE_NONE," )
- .WriteCharPtr( "0, SfxVoidItem, 0, 0, \"\", 0 )" ) << endl;
+ .WriteCharPtr( "SfxSlotMode::NONE, SfxVoidItem, 0, 0, \"\", SfxSlotMode::NONE )" ) << endl;
}
rOutStm << endl;
rOutStm.WriteCharPtr( "};" ) << endl;
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx
index f0853a7e86f1..e0a895399515 100644
--- a/idl/source/objects/slot.cxx
+++ b/idl/source/objects/slot.cxx
@@ -640,9 +640,9 @@ void SvMetaSlot::Insert( SvSlotElementList& rList, const OString& rPrefix,
static OString MakeSlotName( SvStringHashEntry * pEntry )
{
- OStringBuffer aName("SFX_SLOT_");
- aName.append(pEntry->GetName());
- return aName.makeStringAndClear().toAsciiUpperCase();
+ OStringBuffer aName("SfxSlotMode::");
+ aName.append(pEntry->GetName().toAsciiUpperCase());
+ return aName.makeStringAndClear();
};
void SvMetaSlot::WriteSlotStubs( const OString& rShellName,
@@ -882,7 +882,7 @@ void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount,
rOutStm.WriteCharPtr( MakeSlotName( SvHash_ImageRotation() ).getStr() ).WriteChar( '|' );
if( GetImageReflection() )
rOutStm.WriteCharPtr( MakeSlotName( SvHash_ImageReflection() ).getStr() ).WriteChar( '|' );
- rOutStm.WriteChar( '0' );
+ rOutStm.WriteCharPtr( "SfxSlotMode::NONE" );
rOutStm.WriteChar( ',' ) << endl;
WriteTab( rOutStm, 4 );
@@ -949,15 +949,15 @@ void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount,
// Method/Property flags
if( IsMethod() )
- rOutStm.WriteCharPtr( "SFX_SLOT_METHOD|" );
+ rOutStm.WriteCharPtr( "SfxSlotMode::METHOD|" );
if( IsVariable() )
{
- rOutStm.WriteCharPtr( "SFX_SLOT_PROPGET|" );
+ rOutStm.WriteCharPtr( "SfxSlotMode::PROPGET|" );
if( !GetReadonly() )
- rOutStm.WriteCharPtr( "SFX_SLOT_PROPSET|" );
+ rOutStm.WriteCharPtr( "SfxSlotMode::PROPSET|" );
}
- rOutStm.WriteChar( '0' );
+ rOutStm.WriteCharPtr( "SfxSlotMode::NONE" );
}
{
diff --git a/include/sfx2/ctrlitem.hxx b/include/sfx2/ctrlitem.hxx
index fa5b7b9ac853..63648c7fea1a 100644
--- a/include/sfx2/ctrlitem.hxx
+++ b/include/sfx2/ctrlitem.hxx
@@ -23,6 +23,9 @@
#include <sfx2/dllapi.h>
#include <sal/types.h>
#include <svl/poolitem.hxx>
+#if defined( DBG_UTIL )
+#include <sfx2/msg.hxx>
+#endif
class SfxPoolItem;
class SfxBindings;
@@ -37,7 +40,7 @@ private:
protected:
#if defined( DBG_UTIL )
- SAL_DLLPRIVATE void CheckConfigure_Impl( sal_uIntPtr nType );
+ SAL_DLLPRIVATE void CheckConfigure_Impl( SfxSlotMode nType );
#endif
public:
diff --git a/include/sfx2/msg.hxx b/include/sfx2/msg.hxx
index ca5a5ac9a78a..52cf3444b326 100644
--- a/include/sfx2/msg.hxx
+++ b/include/sfx2/msg.hxx
@@ -25,53 +25,47 @@
#include <rtl/ustring.hxx>
#include <sfx2/dllapi.h>
#include <svl/itemset.hxx>
+#include <o3tl/typed_flags_set.hxx>
+
+enum class SfxSlotMode {
+ NONE = 0x0000L, // exclusiv to VOLATILE, default
+ CACHABLE = 0x0001L, // exclusiv to VOLATILE, default
+ VOLATILE = 0x0002L, // per Timer every 2s get new, exclusive to CACHABLE
+
+ TOGGLE = 0x0004L, // inverted for Execute old value
+ AUTOUPDATE = 0x0008L, // invalidated the status automatically after execute
+ SYNCHRON = 0x0010L, // exclusive to ASYNCHRON, default
+ ASYNCHRON = 0x0020L, // via Post-Message, exclusive to SYNCHRON
+ HASDIALOG = 0x0080L, // Coordinates for dialogue after recofig
+
+ NORECORD = 0x0100L, // no recording
+ RECORDPERITEM = 0x0200L, // each item, one statement
+ RECORDPERSET = 0x0400L, // The whole Set is a Statement, default
+ RECORDMANUAL = 0x0800L, // Recording by the application developer is default
+ RECORDABSOLUTE = 0x1000000L, // Recording with absolute Target
+ STANDARD = 0x00411L, // CACHABLE | SYNCHRON | RECORDPERSET;
+
+ PROPGET = 0x1000L, // get property
+ PROPSET = 0x2000L, // set property, exclusive to METHOD
+ METHOD = 0x4000L, // Method, exclusiv to PROPSET
+
+ FASTCALL = 0x8000L, // No test if disabled before Execute
+
+ STATUSBARCONFIG = 0x10000L, // configurable status row
+ MENUCONFIG = 0x20000L, // configurable Menu
+ TOOLBOXCONFIG = 0x40000L, // configurable Toolboxen
+ ACCELCONFIG = 0x80000L, // configurable keys
+
+ CONTAINER = 0x100000L, // Operated by the container at InPlace
+ READONLYDOC = 0x200000L, // also available for read-only Documents
+ IMAGEROTATION = 0x400000L, // Rotate image on Vertical/Bi-directional writing
+ IMAGEREFLECTION = 0x800000L // Mirror image on Vertical/Bi-directional writing
+};
-
-#define SFX_SLOT_CACHABLE 0x0001L // exclusiv to VOLATILE, default
-#define SFX_SLOT_VOLATILE 0x0002L // per Timer every 2s get new,
- // exclusiv to CACHABLE
-#define SFX_SLOT_TOGGLE 0x0004L // inverted for Execute old value
-#define SFX_SLOT_AUTOUPDATE 0x0008L // invalidated the status automatically
- // after execute
-
-#define SFX_SLOT_SYNCHRON 0x0010L // exclusiv to ASYNCHRON, default
-#define SFX_SLOT_ASYNCHRON 0x0020L // via Post-Message, exclusiv
- // to SYNCHRON
-
-#define SFX_SLOT_HASDIALOG 0x0080L // Coordinates for dialogue after recofig
-
-#define SFX_SLOT_NORECORD 0x0100L // no recording
-#define SFX_SLOT_RECORDPERITEM 0x0200L // each item, one statement
-#define SFX_SLOT_RECORDPERSET 0x0400L // The whole Set is a Statement, default
-#define SFX_SLOT_RECORDMANUAL 0x0800L // Recording by the application
- // developer is default
-
-#define SFX_SLOT_RECORDABSOLUTE 0x1000000L // Recording with absolute Target
-#define SFX_SLOT_STANDARD ( SFX_SLOT_CACHABLE | \
- SFX_SLOT_SYNCHRON | \
- SFX_SLOT_RECORDPERSET )
-
-#define SFX_SLOT_PROPGET 0x1000L // get property
-#define SFX_SLOT_PROPSET 0x2000L // set property, exclusiv to
- // SFX_SLOT_METHOD
-#define SFX_SLOT_METHOD 0x4000L // Method, exclusiv to SFX_SLOT_PROPSET
-
-#define SFX_SLOT_FASTCALL 0x8000L // No test if disabled before Execute
-
-#define SFX_SLOT_STATUSBARCONFIG 0x10000L // configurable status row
-#define SFX_SLOT_MENUCONFIG 0x20000L // configurable Menu
-#define SFX_SLOT_TOOLBOXCONFIG 0x40000L // configurable Toolboxen
-#define SFX_SLOT_ACCELCONFIG 0x80000L // configurable keys
-
-#define SFX_SLOT_CONTAINER 0x100000L // Operated by the container at
- // InPlace
-#define SFX_SLOT_READONLYDOC 0x200000L // also available for
- // read-only Documents
-#define SFX_SLOT_IMAGEROTATION 0x400000L // Rotate image on Vertical/
- // Bi-directional writing
-#define SFX_SLOT_IMAGEREFLECTION 0x800000L // Mirror image on Vertical/
- // Bi-directional writing
-
+namespace o3tl
+{
+ template<> struct typed_flags<SfxSlotMode> : is_typed_flags<SfxSlotMode, 0x1ffffbfL> {};
+}
class SfxRequest;
@@ -228,7 +222,7 @@ public:
sal_uInt16 nSlotId; // Unique slot-ID in Shell
sal_uInt16 nGroupId; // for configuration region
sal_uIntPtr nHelpId; // Usually == nSlotId
- sal_uIntPtr nFlags; // artihmetic ordered Flags
+ SfxSlotMode nFlags; // artihmetic ordered Flags
sal_uInt16 nMasterSlotId; // Enum-Slot for example Which-Id
sal_uInt16 nValue; // Value, in case of Enum-Slot
@@ -250,11 +244,11 @@ public:
public:
- SfxSlotKind GetKind() const;
+ SfxSlotKind GetKind() const;
sal_uInt16 GetSlotId() const;
sal_uIntPtr GetHelpId() const;
- sal_uIntPtr GetMode() const;
- bool IsMode( sal_uIntPtr nMode ) const;
+ SfxSlotMode GetMode() const;
+ bool IsMode( SfxSlotMode nMode ) const;
sal_uInt16 GetGroupId() const;
sal_uInt16 GetMasterSlotId() const { return nMasterSlotId; }
sal_uInt16 GetWhich( const SfxItemPool &rPool ) const;
@@ -295,7 +289,7 @@ inline sal_uIntPtr SfxSlot::GetHelpId() const
// returns a bitfield with flags
-inline sal_uIntPtr SfxSlot::GetMode() const
+inline SfxSlotMode SfxSlot::GetMode() const
{
return nFlags;
}
@@ -303,9 +297,9 @@ inline sal_uIntPtr SfxSlot::GetMode() const
// determines if the specified mode is assigned
-inline bool SfxSlot::IsMode( sal_uIntPtr nMode ) const
+inline bool SfxSlot::IsMode( SfxSlotMode nMode ) const
{
- return (nFlags & nMode) != 0;
+ return bool(nFlags & nMode);
}
diff --git a/sd/source/ui/dlg/PaneShells.cxx b/sd/source/ui/dlg/PaneShells.cxx
index 59f066d0758a..e22c1cb6fafe 100644
--- a/sd/source/ui/dlg/PaneShells.cxx
+++ b/sd/source/ui/dlg/PaneShells.cxx
@@ -33,7 +33,7 @@ namespace sd {
SFX_SLOTMAP(LeftImpressPaneShell)
{
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+ { 0, 0, 0, SfxSlotMode::NONE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
};
SFX_IMPL_INTERFACE(LeftImpressPaneShell, SfxShell)
@@ -59,7 +59,7 @@ LeftImpressPaneShell::~LeftImpressPaneShell (void)
SFX_SLOTMAP(LeftDrawPaneShell)
{
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+ { 0, 0, 0, SfxSlotMode::NONE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
};
SFX_IMPL_INTERFACE(LeftDrawPaneShell, SfxShell)
diff --git a/sfx2/source/appl/appdispatchprovider.cxx b/sfx2/source/appl/appdispatchprovider.cxx
index 53c33651aa39..d761f83676c6 100644
--- a/sfx2/source/appl/appdispatchprovider.cxx
+++ b/sfx2/source/appl/appdispatchprovider.cxx
@@ -184,7 +184,7 @@ throw (uno::RuntimeException, std::exception)
std::list< sal_Int16 > aGroupList;
SfxSlotPool* pAppSlotPool = &SfxGetpApp()->GetAppSlotPool_Impl();
- const sal_uIntPtr nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG );
+ const SfxSlotMode nMode( SfxSlotMode::TOOLBOXCONFIG|SfxSlotMode::ACCELCONFIG|SfxSlotMode::MENUCONFIG );
// Gruppe anw"ahlen ( Gruppe 0 ist intern )
for ( sal_uInt16 i=0; i<pAppSlotPool->GetGroupCount(); i++ )
@@ -219,7 +219,7 @@ throw (uno::RuntimeException, std::exception)
if ( pAppSlotPool )
{
- const sal_uIntPtr nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG );
+ const SfxSlotMode nMode( SfxSlotMode::TOOLBOXCONFIG|SfxSlotMode::ACCELCONFIG|SfxSlotMode::MENUCONFIG );
OUString aCmdPrefix( ".uno:" );
// Gruppe anw"ahlen ( Gruppe 0 ist intern )
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index a64ec0369229..21091580b60e 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -188,7 +188,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
return;
const beans::PropertyValue* pPropsVal = rArgs.getConstArray();
- if ( !pSlot->IsMode(SFX_SLOT_METHOD) )
+ if ( !pSlot->IsMode(SfxSlotMode::METHOD) )
{
// slot is a property
const SfxType* pType = pSlot->GetType();
@@ -936,7 +936,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
#endif
const SfxType *pType = pSlot->GetType();
- if ( !pSlot->IsMode(SFX_SLOT_METHOD) )
+ if ( !pSlot->IsMode(SfxSlotMode::METHOD) )
{
// slot is a property
sal_uInt16 nWhich = rSet.GetPool()->GetWhich(nSlotId);
@@ -1126,7 +1126,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
// not really set
continue;
- if ( !pSlot->IsMode(SFX_SLOT_METHOD) && nId == rSet.GetPool()->GetWhich( pSlot->GetSlotId() ) )
+ if ( !pSlot->IsMode(SfxSlotMode::METHOD) && nId == rSet.GetPool()->GetWhich( pSlot->GetSlotId() ) )
continue;
bool bIsMediaDescriptor = isMediaDescriptor( nSlotId );
@@ -1273,7 +1273,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
beans::PropertyValue *pValue = aSequ.getArray();
sal_Int32 nActProp=0;
- if ( !pSlot->IsMode(SFX_SLOT_METHOD) )
+ if ( !pSlot->IsMode(SfxSlotMode::METHOD) )
{
// slot is a property
sal_uInt16 nWhich = rSet.GetPool()->GetWhich(nSlotId);
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 466d8185c774..7aa2e8e1ff52 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -510,7 +510,7 @@ void SfxBindings::Update
const SfxSlotServer* pMsgServer = pDispatcher ? pCache->GetSlotServer(*pDispatcher, pImp->xProv) : NULL;
if ( !pCache->IsControllerDirty() &&
( !pMsgServer ||
- !pMsgServer->GetSlot()->IsMode(SFX_SLOT_VOLATILE) ) )
+ !pMsgServer->GetSlot()->IsMode(SfxSlotMode::VOLATILE) ) )
{
pImp->bInUpdate = false;
InvalidateSlotsInMap_Impl();
@@ -1204,7 +1204,7 @@ void SfxBindings::Execute_Impl( SfxRequest& aReq, const SfxSlot* pSlot, SfxShell
// Which value has to be mapped for Attribute slots
const sal_uInt16 nSlotId = pSlot->GetSlotId();
aReq.SetSlot( nSlotId );
- if ( pSlot->IsMode(SFX_SLOT_TOGGLE) )
+ if ( pSlot->IsMode(SfxSlotMode::TOGGLE) )
{
// The value is attached to a toggleable attribute (Bools)
sal_uInt16 nWhich = pSlot->GetWhich(rPool);
@@ -1651,7 +1651,7 @@ IMPL_LINK( SfxBindings, NextJob_Impl, Timer *, pTimer )
{
SfxStateCache* pCache = (*pImp->pCaches)[n];
const SfxSlotServer *pSlotServer = pCache->GetSlotServer(*pDispatcher, pImp->xProv);
- if ( pSlotServer && pSlotServer->GetSlot()->IsMode(SFX_SLOT_VOLATILE) )
+ if ( pSlotServer && pSlotServer->GetSlot()->IsMode(SfxSlotMode::VOLATILE) )
{
pCache->Invalidate(false);
bVolatileSlotsPresent = true;
diff --git a/sfx2/source/control/ctrlitem.cxx b/sfx2/source/control/ctrlitem.cxx
index dcc788ea5c7e..c602e443b457 100644
--- a/sfx2/source/control/ctrlitem.cxx
+++ b/sfx2/source/control/ctrlitem.cxx
@@ -28,7 +28,7 @@
#ifdef DBG_UTIL
-void SfxControllerItem::CheckConfigure_Impl( sal_uIntPtr nType )
+void SfxControllerItem::CheckConfigure_Impl( SfxSlotMode nType )
{
// Real Slot? (i.e. no Separator etc.)
if ( !nId )
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 46d1d3f7d330..930ed0b07d83 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -216,7 +216,7 @@ int SfxDispatcher::Call_Impl(SfxShell& rShell, const SfxSlot &rSlot, SfxRequest
SFX_STACK(SfxDispatcher::Call_Impl);
// The slot may be called (meaning enabled)
- if ( rSlot.IsMode(SFX_SLOT_FASTCALL) || rShell.CanExecuteSlot_Impl(rSlot) )
+ if ( rSlot.IsMode(SfxSlotMode::FASTCALL) || rShell.CanExecuteSlot_Impl(rSlot) )
{
if ( GetFrame() )
{
@@ -238,13 +238,13 @@ int SfxDispatcher::Call_Impl(SfxShell& rShell, const SfxSlot &rSlot, SfxRequest
if(xSupplier.is())
xRecorder = xSupplier->getDispatchRecorder();
- if ( bRecord && xRecorder.is() && !rSlot.IsMode(SFX_SLOT_NORECORD) )
+ if ( bRecord && xRecorder.is() && !rSlot.IsMode(SfxSlotMode::NORECORD) )
rReq.Record_Impl( rShell, rSlot, xRecorder, GetFrame() );
}
}
// Get all that is needed, because the slot may not have survived the
// Execute if it is a 'pseudo slot' for macros or verbs.
- bool bAutoUpdate = rSlot.IsMode(SFX_SLOT_AUTOUPDATE);
+ bool bAutoUpdate = rSlot.IsMode(SfxSlotMode::AUTOUPDATE);
// API-call parentheses and document-lock during the calls
{
@@ -835,7 +835,7 @@ void SfxDispatcher::_Execute(SfxShell& rShell, const SfxSlot& rSlot,
if ( bool(eCallMode & SfxCallMode::ASYNCHRON) ||
( (eCallMode & SfxCallMode::SYNCHRON) == SfxCallMode::SLOT &&
- rSlot.IsMode(SFX_SLOT_ASYNCHRON) ) )
+ rSlot.IsMode(SfxSlotMode::ASYNCHRON) ) )
{
SfxDispatcher *pDispat = this;
while ( pDispat )
@@ -1344,7 +1344,7 @@ void SfxDispatcher::_Update_Impl( bool bUIActive, bool bIsMDIApp, bool bIsIPOwne
if ( bReadOnlyShell )
{
// only show ChildWindows if their slot is allowed for readonly documents
- if ( pSlot && !pSlot->IsMode( SFX_SLOT_READONLYDOC ) )
+ if ( pSlot && !pSlot->IsMode( SfxSlotMode::READONLYDOC ) )
continue;
}
@@ -1356,7 +1356,7 @@ void SfxDispatcher::_Update_Impl( bool bUIActive, bool bIsMDIApp, bool bIsIPOwne
sal_uInt16 nMode = SFX_VISIBILITY_STANDARD;
if( pSlot )
{
- if ( pSlot->IsMode(SFX_SLOT_CONTAINER) )
+ if ( pSlot->IsMode(SfxSlotMode::CONTAINER) )
{
if ( pWorkWin->IsVisible_Impl( SFX_VISIBILITY_CLIENT ) )
nMode |= SFX_VISIBILITY_CLIENT;
@@ -1795,13 +1795,13 @@ bool SfxDispatcher::_FindServer(sal_uInt16 nSlot, SfxSlotServer& rServer, bool b
if ( pSlot && pSlot->nDisableFlags && ( pSlot->nDisableFlags & pObjShell->GetDisableFlags() ) != 0 )
return false;
- if ( pSlot && !( pSlot->nFlags & SFX_SLOT_READONLYDOC ) && bReadOnly )
+ if ( pSlot && !( pSlot->nFlags & SfxSlotMode::READONLYDOC ) && bReadOnly )
return false;
if ( pSlot )
{
// Slot belongs to Container?
- bool bIsContainerSlot = pSlot->IsMode(SFX_SLOT_CONTAINER);
+ bool bIsContainerSlot = pSlot->IsMode(SfxSlotMode::CONTAINER);
bool bIsInPlace = xImp->pFrame && xImp->pFrame->GetObjectShell()->IsInPlaceActive();
// Shell belongs to Server?
diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx
index 50e71b5779a8..1ef8e2956de2 100644
--- a/sfx2/source/control/request.cxx
+++ b/sfx2/source/control/request.cxx
@@ -698,7 +698,7 @@ void SfxRequest::Done_Impl
SfxItemPool &rPool = pImp->pShell->GetPool();
// Property-Slot?
- if ( !pImp->pSlot->IsMode(SFX_SLOT_METHOD) )
+ if ( !pImp->pSlot->IsMode(SfxSlotMode::METHOD) )
{
// get the property as SfxPoolItem
const SfxPoolItem *pItem;
@@ -719,7 +719,7 @@ void SfxRequest::Done_Impl
}
// record everything in a single statement?
- else if ( pImp->pSlot->IsMode(SFX_SLOT_RECORDPERSET) )
+ else if ( pImp->pSlot->IsMode(SfxSlotMode::RECORDPERSET) )
{
uno::Sequence < beans::PropertyValue > aSeq;
if ( pSet )
@@ -728,7 +728,7 @@ void SfxRequest::Done_Impl
}
// record each item as a single statement
- else if ( pImp->pSlot->IsMode(SFX_SLOT_RECORDPERITEM) )
+ else if ( pImp->pSlot->IsMode(SfxSlotMode::RECORDPERITEM) )
{
if ( pSet )
{
@@ -743,8 +743,8 @@ void SfxRequest::Done_Impl
// play it safe; repair the wrong flags
OSL_FAIL( "recursion RecordPerItem - use RecordPerSet!" );
SfxSlot *pSlot = (SfxSlot*) pImp->pSlot;
- pSlot->nFlags &= ~((sal_uIntPtr)SFX_SLOT_RECORDPERITEM);
- pSlot->nFlags &= SFX_SLOT_RECORDPERSET;
+ pSlot->nFlags &= ~(SfxSlotMode::RECORDPERITEM);
+ pSlot->nFlags &= SfxSlotMode::RECORDPERSET;
}
// Record a Sub-Request
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index 3aee3e0c6f27..3d28d8045396 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -570,7 +570,7 @@ void SfxShell::SetVerbs(const com::sun::star::uno::Sequence < com::sun::star::em
// Verb slots must be executed asynchronously, so that they can be
// destroyed while executing.
- pNewSlot->nFlags = SFX_SLOT_ASYNCHRON | SFX_SLOT_CONTAINER;
+ pNewSlot->nFlags = SfxSlotMode::ASYNCHRON | SfxSlotMode::CONTAINER;
pNewSlot->nMasterSlotId = 0;
pNewSlot->nValue = 0;
pNewSlot->fnExec = SFX_STUB_PTR(SfxShell,VerbExec);
diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx
index 455d517db161..16c42e71fbc2 100644
--- a/sfx2/source/menu/mnuitem.cxx
+++ b/sfx2/source/menu/mnuitem.cxx
@@ -84,7 +84,7 @@ void SfxMenuControl::Bind(
SetId( nSlotId );
#ifdef DBG_UTIL
- CheckConfigure_Impl(SFX_SLOT_MENUCONFIG);
+ CheckConfigure_Impl(SfxSlotMode::MENUCONFIG);
#endif
}
diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx
index 610f7e453bb5..3355cde2d3e6 100644
--- a/sfx2/source/menu/virtmenu.cxx
+++ b/sfx2/source/menu/virtmenu.cxx
@@ -96,13 +96,13 @@ void SfxMenuImageControl_Impl::Update()
{
sal_uInt16 nslotId = pSVMenu->GetItemId( nPos );
const SfxSlot* pSlot = pPool->GetSlot( nslotId );
- if ( pSlot && pSlot->IsMode( SFX_SLOT_IMAGEROTATION ) )
+ if ( pSlot && pSlot->IsMode( SfxSlotMode::IMAGEROTATION ) )
{
pSVMenu->SetItemImageMirrorMode( nslotId, false );
pSVMenu->SetItemImageAngle( nslotId, lRotation );
}
- if ( pSlot && pSlot->IsMode( SFX_SLOT_IMAGEREFLECTION ) )
+ if ( pSlot && pSlot->IsMode( SfxSlotMode::IMAGEREFLECTION ) )
pSVMenu->SetItemImageMirrorMode( nslotId, bIsMirrored );
}
}
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 021aea48b351..1d27f842eda2 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -752,7 +752,7 @@ Reference< frame::XDispatch > SAL_CALL SfxBaseController::queryDispatch( const
pSlot = rSlotPool.GetUnoSlot( aMasterCommand );
else
pSlot = rSlotPool.GetUnoSlot( aURL.Path );
- if ( pSlot && ( !pAct->GetFrame().IsInPlace() || !pSlot->IsMode( SFX_SLOT_CONTAINER ) ) )
+ if ( pSlot && ( !pAct->GetFrame().IsInPlace() || !pSlot->IsMode( SfxSlotMode::CONTAINER ) ) )
return pAct->GetBindings().GetDispatch( pSlot, aURL, bMasterCommand );
else
{
@@ -809,7 +809,7 @@ Reference< frame::XDispatch > SAL_CALL SfxBaseController::queryDispatch( const
SfxSlotPool& rSlotPool = SfxSlotPool::GetSlotPool( pAct );
const SfxSlot* pSlot = rSlotPool.GetSlot( nId );
- if ( pSlot && ( !pAct->GetFrame().IsInPlace() || !pSlot->IsMode( SFX_SLOT_CONTAINER ) ) )
+ if ( pSlot && ( !pAct->GetFrame().IsInPlace() || !pSlot->IsMode( SfxSlotMode::CONTAINER ) ) )
return pAct->GetBindings().GetDispatch( pSlot, aURL, false );
else
{
@@ -1137,7 +1137,7 @@ throw (RuntimeException, std::exception)
SfxSlotPool* pPool = &SfxSlotPool::GetSlotPool( pViewFrame );
SfxSlotPool* pSlotPool = pPool ? pPool : &SFX_SLOTPOOL();
- const sal_uIntPtr nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG );
+ const SfxSlotMode nMode( SfxSlotMode::TOOLBOXCONFIG|SfxSlotMode::ACCELCONFIG|SfxSlotMode::MENUCONFIG );
// Select Group ( Group 0 is internal )
for ( sal_uInt16 i=0; i<pSlotPool->GetGroupCount(); i++ )
@@ -1169,7 +1169,7 @@ throw (RuntimeException, std::exception)
SolarMutexGuard aGuard;
if ( m_pData->m_pViewShell )
{
- const sal_uIntPtr nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG );
+ const SfxSlotMode nMode( SfxSlotMode::TOOLBOXCONFIG|SfxSlotMode::ACCELCONFIG|SfxSlotMode::MENUCONFIG );
SfxViewFrame* pViewFrame( m_pData->m_pViewShell->GetFrame() );
SfxSlotPool* pPool( &SfxSlotPool::GetSlotPool( pViewFrame ));
diff --git a/svx/source/toolbars/extrusionbar.cxx b/svx/source/toolbars/extrusionbar.cxx
index 45cb1404d77e..68d5a3ad50c9 100644
--- a/svx/source/toolbars/extrusionbar.cxx
+++ b/svx/source/toolbars/extrusionbar.cxx
@@ -51,7 +51,7 @@ using namespace ::com::sun::star::uno;
// tragen wir etwas ein, was hier (hoffentlich) nie vorkommt).
SFX_SLOTMAP(ExtrusionBar)
{
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+ { 0, 0, 0, SfxSlotMode::NONE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
};
SFX_IMPL_INTERFACE(ExtrusionBar, SfxShell)
diff --git a/svx/source/toolbars/fontworkbar.cxx b/svx/source/toolbars/fontworkbar.cxx
index 6dfbfa010e1b..90671611bc83 100644
--- a/svx/source/toolbars/fontworkbar.cxx
+++ b/svx/source/toolbars/fontworkbar.cxx
@@ -169,7 +169,7 @@ void SetFontWorkShapeTypeState( SdrView* pSdrView, SfxItemSet& rSet )
// tragen wir etwas ein, was hier (hoffentlich) nie vorkommt).
SFX_SLOTMAP(FontworkBar)
{
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+ { 0, 0, 0, SfxSlotMode::NONE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
};
SFX_IMPL_INTERFACE(FontworkBar, SfxShell)
diff --git a/sw/source/uibase/uiview/viewstat.cxx b/sw/source/uibase/uiview/viewstat.cxx
index 875b7b473858..d55975b86d9c 100644
--- a/sw/source/uibase/uiview/viewstat.cxx
+++ b/sw/source/uibase/uiview/viewstat.cxx
@@ -196,7 +196,7 @@ void SwView::GetState(SfxItemSet &rSet)
SfxImageItem aImgItem(nWhich, bWeb ? SwView::m_nWebInsertCtrlState : SwView::m_nInsertCtrlState);
SfxSlotPool& rPool = SfxSlotPool::GetSlotPool( GetViewFrame() );
const SfxSlot* pSlot = rPool.GetSlot( aImgItem.GetValue() );
- if(pSlot && pSlot->IsMode( SFX_SLOT_IMAGEROTATION ))
+ if(pSlot && pSlot->IsMode( SfxSlotMode::IMAGEROTATION ))
{
if(m_pWrtShell->IsInVerticalText())
aImgItem.SetRotation(2700);
@@ -218,7 +218,7 @@ void SwView::GetState(SfxItemSet &rSet)
SfxImageItem aImgItem(nWhich, SwView::m_nInsertObjectCtrlState);
SfxSlotPool& rPool = SfxSlotPool::GetSlotPool( GetViewFrame() );
const SfxSlot* pSlot = rPool.GetSlot( aImgItem.GetValue() );
- if(pSlot && pSlot->IsMode( SFX_SLOT_IMAGEROTATION ))
+ if(pSlot && pSlot->IsMode( SfxSlotMode::IMAGEROTATION ))
{
if (m_pWrtShell->IsInVerticalText())
aImgItem.SetRotation(2700);