summaryrefslogtreecommitdiff
path: root/idl/source/objects/module.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'idl/source/objects/module.cxx')
-rw-r--r--idl/source/objects/module.cxx136
1 files changed, 0 insertions, 136 deletions
diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx
index b364ddf7bedc..11b31cbe84f8 100644
--- a/idl/source/objects/module.cxx
+++ b/idl/source/objects/module.cxx
@@ -33,142 +33,6 @@ SvMetaModule::SvMetaModule( bool bImp )
{
}
-void SvMetaModule::ReadAttributesSvIdl( SvIdlDataBase & rBase,
- SvTokenStream & rInStm )
-{
- SvMetaReference::ReadAttributesSvIdl( rBase, rInStm );
-
- if( ReadStringSvIdl( SvHash_SlotIdFile(), rInStm, aSlotIdFile ) )
- {
- if( !rBase.ReadIdFile( OStringToOUString(aSlotIdFile, RTL_TEXTENCODING_ASCII_US)) )
- {
- throw SvParseException( rInStm, "cannot read file: " + aSlotIdFile );
- }
- }
-}
-
-void SvMetaModule::ReadContextSvIdl( SvIdlDataBase & rBase,
- SvTokenStream & rInStm )
-{
- sal_uInt32 nTokPos = rInStm.Tell();
- if( rInStm.GetToken().Is( SvHash_interface() )
- || rInStm.GetToken().Is( SvHash_shell() ) )
- {
- tools::SvRef<SvMetaClass> aClass( new SvMetaClass() );
- if( aClass->ReadSvIdl( rBase, rInStm ) )
- {
- aClassList.push_back( aClass );
- // announce globally
- rBase.GetClassList().push_back( aClass );
- }
- }
- else if( rInStm.GetToken().Is( SvHash_enum() ) )
- {
- tools::SvRef<SvMetaTypeEnum> aEnum( new SvMetaTypeEnum() );
-
- if( aEnum->ReadSvIdl( rBase, rInStm ) )
- {
- // announce globally
- rBase.GetTypeList().push_back( aEnum );
- }
- }
- else if( rInStm.GetToken().Is( SvHash_item() )
- || rInStm.GetToken().Is( SvHash_struct() ) )
- {
- tools::SvRef<SvMetaType> xItem(new SvMetaType() );
-
- if( xItem->ReadSvIdl( rBase, rInStm ) )
- {
- // announce globally
- rBase.GetTypeList().push_back( xItem );
- }
- }
- else if( rInStm.GetToken().Is( SvHash_include() ) )
- {
- bool bOk = false;
- rInStm.GetToken_Next();
- SvToken& rTok = rInStm.GetToken_Next();
- if( rTok.IsString() )
- {
- OUString aFullName(OStringToOUString(rTok.GetString(), RTL_TEXTENCODING_ASCII_US));
- rBase.StartNewFile( aFullName );
- osl::FileBase::RC searchError = osl::File::searchFileURL(aFullName, rBase.GetPath(), aFullName);
- if( osl::FileBase::E_None != searchError )
- {
- OStringBuffer aStr("cannot find file:");
- aStr.append(OUStringToOString(aFullName, RTL_TEXTENCODING_UTF8));
- throw SvParseException(aStr.makeStringAndClear(), rTok);
- }
- osl::FileBase::getSystemPathFromFileURL( aFullName, aFullName );
- rBase.AddDepFile( aFullName );
- SvTokenStream aTokStm( aFullName );
-
- if( SVSTREAM_OK != aTokStm.GetStream().GetError() )
- {
- OStringBuffer aStr("cannot open file: ");
- aStr.append(OUStringToOString(aFullName, RTL_TEXTENCODING_UTF8));
- throw SvParseException(aStr.makeStringAndClear(), rTok);
- }
- // rescue error from old file
- SvIdlError aOldErr = rBase.GetError();
- // reset error
- rBase.SetError( SvIdlError() );
-
- sal_uInt32 nBeginPos = 0xFFFFFFFF; // can not happen with Tell
- while( nBeginPos != aTokStm.Tell() )
- {
- nBeginPos = aTokStm.Tell();
- ReadContextSvIdl( rBase, aTokStm );
- aTokStm.ReadIfDelimiter();
- }
- bOk = aTokStm.GetToken().IsEof();
- if( !bOk )
- {
- rBase.WriteError( aTokStm );
- }
- // recover error from old file
- rBase.SetError( aOldErr );
- }
- if( !bOk )
- rInStm.Seek( nTokPos );
- }
- else
- {
- tools::SvRef<SvMetaSlot> xSlot( new SvMetaSlot() );
-
- if( xSlot->ReadSvIdl( rBase, rInStm ) )
- {
- if( xSlot->Test( rInStm ) )
- {
- // announce globally
- rBase.AppendSlot( xSlot );
- }
- }
- }
-}
-
-bool SvMetaModule::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm )
-{
- sal_uInt32 nTokPos = rInStm.Tell();
- SvToken& rTok = rInStm.GetToken_Next();
- bool bOk = rTok.Is( SvHash_module() );
- rInStm.ReadIfDelimiter();
- if( bOk )
- {
- rBase.Push( this ); // onto the context stack
-
- if( ReadNameSvIdl( rInStm ) )
- {
- // set pointer to itself
- bOk = SvMetaObject::ReadSvIdl( rBase, rInStm );
- }
- rBase.GetStack().pop_back(); // remove from stack
- }
- if( !bOk )
- rInStm.Seek( nTokPos );
- return bOk;
-}
-
void SvMetaModule::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
{
for( sal_uLong n = 0; n < aClassList.size(); n++ )