diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2017-04-30 14:02:18 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2017-05-01 01:30:44 +0300 |
commit | c2f7c567b7264c25180e2717eabad61c4c92ae0e (patch) | |
tree | 498adf9aa359c2d831e5c765227c1153b29b5185 /idl/source/prj/parser.cxx | |
parent | 1c6cb1e8386eb627adb0c70169582cc58fd76ec7 (diff) |
svidl: Adapt to SlotType removal
No diff in workdir/SdiTarget.
BEWARE: If you're going to revert this for whatever
reason, you should also revert the previous commit
that removed the SlotType property from sdi files!
Change-Id: I78cc391a6b47f4672157926eba1b55e786f48f2d
Diffstat (limited to 'idl/source/prj/parser.cxx')
-rw-r--r-- | idl/source/prj/parser.cxx | 59 |
1 files changed, 16 insertions, 43 deletions
diff --git a/idl/source/prj/parser.cxx b/idl/source/prj/parser.cxx index da8e574c17a6..f0683ab92a92 100644 --- a/idl/source/prj/parser.cxx +++ b/idl/source/prj/parser.cxx @@ -381,70 +381,43 @@ bool SvIdlParser::ReadSlot(SvMetaSlot& rSlot) void SvIdlParser::ReadSlotAttribute( SvMetaSlot& rSlot ) { - bool bOk = false; - bOk |= ReadIfIdAttribute(rSlot.aGroupId, SvHash_GroupId() ); - bOk |= ReadIfIdAttribute(rSlot.aExecMethod, SvHash_ExecMethod() ); - bOk |= ReadIfIdAttribute(rSlot.aStateMethod, SvHash_StateMethod() ); - bOk |= ReadStringSvIdl( SvHash_DisableFlags(), rInStm, rSlot.aDisableFlags ); - bOk |= ReadIfBoolAttribute(rSlot.aReadOnlyDoc, SvHash_ReadOnlyDoc() ); - bOk |= ReadIfBoolAttribute(rSlot.aExport, SvHash_Export() ); - - bOk |= ReadIfBoolAttribute(rSlot.aToggle, SvHash_Toggle() ); - bOk |= ReadIfBoolAttribute(rSlot.aAutoUpdate, SvHash_AutoUpdate() ); - bOk |= ReadIfBoolAttribute(rSlot.aAsynchron, SvHash_Asynchron() ); - bOk |= ReadIfBoolAttribute(rSlot.aRecordAbsolute, SvHash_RecordAbsolute() ); + ReadIfIdAttribute(rSlot.aGroupId, SvHash_GroupId() ); + ReadIfIdAttribute(rSlot.aExecMethod, SvHash_ExecMethod() ); + ReadIfIdAttribute(rSlot.aStateMethod, SvHash_StateMethod() ); + ReadStringSvIdl( SvHash_DisableFlags(), rInStm, rSlot.aDisableFlags ); + ReadIfBoolAttribute(rSlot.aReadOnlyDoc, SvHash_ReadOnlyDoc() ); + ReadIfBoolAttribute(rSlot.aExport, SvHash_Export() ); + + ReadIfBoolAttribute(rSlot.aToggle, SvHash_Toggle() ); + ReadIfBoolAttribute(rSlot.aAutoUpdate, SvHash_AutoUpdate() ); + ReadIfBoolAttribute(rSlot.aAsynchron, SvHash_Asynchron() ); + ReadIfBoolAttribute(rSlot.aRecordAbsolute, SvHash_RecordAbsolute() ); if( ReadIfBoolAttribute(rSlot.aRecordPerItem, SvHash_RecordPerItem()) ) { if (rSlot.aRecordPerSet.IsSet() || rSlot.aNoRecord.IsSet()) throw SvParseException(rInStm, "conflicting attributes"); rSlot.SetRecordPerItem( rSlot.aRecordPerItem ); - bOk = true; } if( ReadIfBoolAttribute(rSlot.aRecordPerSet, SvHash_RecordPerSet() ) ) { if (rSlot.aRecordPerItem.IsSet() || rSlot.aNoRecord.IsSet()) throw SvParseException(rInStm, "conflicting attributes"); rSlot.SetRecordPerSet( rSlot.aRecordPerSet ); - bOk = true; } if( ReadIfBoolAttribute(rSlot.aNoRecord, SvHash_NoRecord() ) ) { if (rSlot.aRecordPerItem.IsSet() || rSlot.aRecordPerSet.IsSet()) throw SvParseException(rInStm, "conflicting attributes"); rSlot.SetNoRecord( rSlot.aNoRecord ); - bOk = true; } - bOk |= ReadIfBoolAttribute(rSlot.aMenuConfig, SvHash_MenuConfig() ); - bOk |= ReadIfBoolAttribute(rSlot.aToolBoxConfig, SvHash_ToolBoxConfig() ); - bOk |= ReadIfBoolAttribute(rSlot.aAccelConfig, SvHash_AccelConfig() ); - - bOk |= ReadIfBoolAttribute(rSlot.aFastCall, SvHash_FastCall() ); - bOk |= ReadIfBoolAttribute(rSlot.aContainer, SvHash_Container() ); - - if( bOk ) - return; - - if( !rSlot.aSlotType.is() ) - { - sal_uInt32 nTokPos = rInStm.Tell(); - SvToken& rTok = rInStm.GetToken_Next(); - if( rTok.Is( SvHash_SlotType() ) ) - { - if( rInStm.ReadIf( '=' ) ) - { - rSlot.aSlotType = rBase.ReadKnownType( rInStm ); - if( !rSlot.aSlotType.is() ) - throw SvParseException( rInStm, "SlotType with unknown item type" ); - if( !rSlot.aSlotType->IsItem() ) - throw SvParseException( rInStm, "the SlotType is not a item" ); - return; - } - } - rInStm.Seek( nTokPos ); + ReadIfBoolAttribute(rSlot.aMenuConfig, SvHash_MenuConfig() ); + ReadIfBoolAttribute(rSlot.aToolBoxConfig, SvHash_ToolBoxConfig() ); + ReadIfBoolAttribute(rSlot.aAccelConfig, SvHash_AccelConfig() ); - } + ReadIfBoolAttribute(rSlot.aFastCall, SvHash_FastCall() ); + ReadIfBoolAttribute(rSlot.aContainer, SvHash_Container() ); } void SvIdlParser::ReadInterfaceOrShellMethod( SvMetaAttribute& rAttr ) |