Kaydet (Commit) 8cb1c1ec authored tarafından Noel Grandin's avatar Noel Grandin

remove unused SlotId/Volatile from .SDI files

Change-Id: I29f039c2fec8433fa062c603b64afffa60e7b0d0
üst 353b9b43
......@@ -32,8 +32,6 @@ struct SvGlobalHashNames
SvStringHashEntryRef MM_HelpText;
SvStringHashEntryRef MM_void;
SvStringHashEntryRef MM_shell;
SvStringHashEntryRef MM_SlotId;
SvStringHashEntryRef MM_Volatile;
SvStringHashEntryRef MM_Toggle;
SvStringHashEntryRef MM_AutoUpdate;
SvStringHashEntryRef MM_Asynchron;
......@@ -112,8 +110,6 @@ HASH_INLINE(module)
HASH_INLINE(interface)
HASH_INLINE(HelpText)
HASH_INLINE(shell)
HASH_INLINE(SlotId)
HASH_INLINE(Volatile)
HASH_INLINE(Toggle)
HASH_INLINE(AutoUpdate)
HASH_INLINE(Asynchron)
......
......@@ -33,7 +33,6 @@ class SvMetaSlot : public SvMetaAttribute
SvIdentifier aStateMethod;
SvBOOL aPseudoSlots;
SvBOOL aVolatile;
SvBOOL aToggle;
SvBOOL aAutoUpdate;
......@@ -68,10 +67,6 @@ class SvMetaSlot : public SvMetaAttribute
void SetEnumValue(SvMetaEnumValue *p)
{ pEnumValue = p; }
protected:
void SetVolatile( bool bSet )
{
aVolatile = bSet;
}
void SetToggle( bool bSet )
{
aToggle = bSet;
......
......@@ -124,13 +124,6 @@ bool SvMetaSlot::GetPseudoSlots() const
if( aPseudoSlots.IsSet() || !GetRef() ) return aPseudoSlots;
return static_cast<SvMetaSlot *>(GetRef())->GetPseudoSlots();
}
bool SvMetaSlot::GetVolatile() const
{
// Cachable and Volatile are exclusive
if( !GetRef() || aVolatile.IsSet() )
return aVolatile;
return static_cast<SvMetaSlot *>(GetRef())->GetVolatile();
}
bool SvMetaSlot::GetToggle() const
{
if( aToggle.IsSet() || !GetRef() ) return aToggle;
......@@ -239,8 +232,6 @@ void SvMetaSlot::ReadAttributesSvIdl( SvIdlDataBase & rBase,
bOk |= aStateMethod.ReadSvIdl( SvHash_StateMethod(), rInStm );
bOk |= aDisableFlags.ReadSvIdl( SvHash_DisableFlags(), rInStm );
if( aVolatile.ReadSvIdl( SvHash_Volatile(), rInStm ) )
SetVolatile( aVolatile ), bOk = true;
if( aToggle.ReadSvIdl( SvHash_Toggle(), rInStm ) )
SetToggle( aToggle ), bOk = true;
if( aAutoUpdate.ReadSvIdl( SvHash_AutoUpdate(), rInStm ) )
......@@ -762,8 +753,6 @@ void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount,
WriteTab( rOutStm, 4 );
// write flags
if( GetVolatile() )
rOutStm.WriteCharPtr( MakeSlotName( SvHash_Volatile() ).getStr() ).WriteChar( '|' );
if( GetToggle() )
rOutStm.WriteCharPtr( MakeSlotName( SvHash_Toggle() ).getStr() ).WriteChar( '|' );
if( GetAutoUpdate() )
......
......@@ -155,7 +155,6 @@ void SvMetaAttribute::ReadAttributesSvIdl( SvIdlDataBase & rBase,
SvTokenStream & rInStm )
{
SvMetaReference::ReadAttributesSvIdl( rBase, rInStm );
aSlotId.ReadSvIdl( rBase, SvHash_SlotId(), rInStm );
aExport.ReadSvIdl( SvHash_Export(), rInStm );
aHidden.ReadSvIdl( SvHash_Hidden(), rInStm );
aReadOnlyDoc.ReadSvIdl( SvHash_ReadOnlyDoc(), rInStm );
......
......@@ -60,7 +60,6 @@ SvGlobalHashNames::SvGlobalHashNames()
, MM_HelpText( INS( "HelpText" ) )
, MM_void( INS( "void" ) )
, MM_shell( INS( "shell" ) )
, MM_SlotId( INS( "SlotId" ) )
, MM_Toggle( INS( "Toggle" ) )
, MM_AutoUpdate( INS( "AutoUpdate" ) )
, MM_Asynchron( INS( "Asynchron" ) )
......
......@@ -29,7 +29,6 @@
enum class SfxSlotMode {
NONE = 0x0000L, // default
VOLATILE = 0x0002L, // per Timer every 2s get new,
TOGGLE = 0x0004L, // inverted for Execute old value
AUTOUPDATE = 0x0008L, // invalidated the status automatically after execute
......@@ -57,7 +56,7 @@ enum class SfxSlotMode {
namespace o3tl
{
template<> struct typed_flags<SfxSlotMode> : is_typed_flags<SfxSlotMode, 0x1fec72eL> {};
template<> struct typed_flags<SfxSlotMode> : is_typed_flags<SfxSlotMode, 0x1fec72cL> {};
}
......
......@@ -75,7 +75,6 @@ static sal_uInt16 nTimeOut = 300;
#define TIMEOUT_FIRST nTimeOut
#define TIMEOUT_UPDATING 20
#define TIMEOUT_IDLE 2500
typedef std::unordered_map< sal_uInt16, bool > InvalidateSlotMap;
......@@ -505,9 +504,7 @@ void SfxBindings::Update
{
// Query Status
const SfxSlotServer* pMsgServer = pDispatcher ? pCache->GetSlotServer(*pDispatcher, pImp->xProv) : nullptr;
if ( !pCache->IsControllerDirty() &&
( !pMsgServer ||
!pMsgServer->GetSlot()->IsMode(SfxSlotMode::VOLATILE) ) )
if ( !pCache->IsControllerDirty() )
{
pImp->bInUpdate = false;
InvalidateSlotsInMap_Impl();
......@@ -1644,23 +1641,7 @@ bool SfxBindings::NextJob_Impl(Timer * pTimer)
pImp->nMsgPos = 0;
// check for volatile slots
bool bVolatileSlotsPresent = false;
for ( sal_uInt16 n = 0; n < nCount; ++n )
{
SfxStateCache* pCache = (*pImp->pCaches)[n];
const SfxSlotServer *pSlotServer = pCache->GetSlotServer(*pDispatcher, pImp->xProv);
if ( pSlotServer && pSlotServer->GetSlot()->IsMode(SfxSlotMode::VOLATILE) )
{
pCache->Invalidate(false);
bVolatileSlotsPresent = true;
}
}
if (bVolatileSlotsPresent)
pImp->aTimer.SetTimeout(TIMEOUT_IDLE);
else
pImp->aTimer.Stop();
pImp->aTimer.Stop();
// Update round is finished
pImp->bInNextJob = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment