Kaydet (Commit) 4e3baf32 authored tarafından Michael Meeks's avatar Michael Meeks

svidl: more helpful error message for missing slot / types.

Change-Id: I89537f526e465137f5e8c17b4d7fd134ba59af4a
üst 72a0656f
......@@ -182,6 +182,7 @@ void SvMetaName::ReadAttributesSvIdl( SvIdlDataBase & rBase,
if( !SetName( aName.getString(), &rBase ) )
rInStm.Seek( nTokPos );
}
aHelpContext.ReadSvIdl( rBase, SvHash_HelpContext(), rInStm );
aHelpText.ReadSvIdl( rBase, rInStm );
aConfigName.ReadSvIdl( SvHash_ConfigName(), rInStm );
......
......@@ -218,7 +218,13 @@ sal_Bool SvMetaAttribute::ReadSvIdl( SvIdlDataBase & rBase,
bOk = SvMetaName::ReadSvIdl( rBase, rInStm );
}
else
rBase.SetError( "unknown type", rInStm.GetToken() );
{
SvToken *pTok = rInStm.GetToken();
rBase.SetError( "unknown type of token. Each new SID needs an "
"item statement in an SDI file, eg. "
"SfxVoidItem FooItem " + pTok->GetTokenAsString() +
" ... which describes the slot more fully", pTok );
}
if( !bOk )
rInStm.Seek( nTokPos );
......
......@@ -160,7 +160,7 @@ void SvIdlDataBase::Save( SvStream & rStm, sal_uInt32 nFlags )
void SvIdlDataBase::SetError( const OString& rError, SvToken * pTok )
{
if( pTok->GetLine() > 10000 )
aError.SetText( "hgchcg" );
aError.SetText( "line count overflow" );
if( aError.nLine < pTok->GetLine()
|| (aError.nLine == pTok->GetLine() && aError.nColumn < pTok->GetColumn()) )
......
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