diff options
Diffstat (limited to 'idl/source/prj/parser.cxx')
-rw-r--r-- | idl/source/prj/parser.cxx | 46 |
1 files changed, 26 insertions, 20 deletions
diff --git a/idl/source/prj/parser.cxx b/idl/source/prj/parser.cxx index 34820f2f75a7..065c3e200949 100644 --- a/idl/source/prj/parser.cxx +++ b/idl/source/prj/parser.cxx @@ -32,26 +32,7 @@ bool SvIdlParser::ReadSvIdl( bool bImported, const OUString & rPath ) // only one import at the very beginning if( rTok.Is( SvHash_import() ) ) { - rTok = rInStm.GetToken_Next(); - if( rTok.IsString() ) - { - OUString aFullName; - if( osl::FileBase::E_None == osl::File::searchFileURL( - OStringToOUString(rTok.GetString(), RTL_TEXTENCODING_ASCII_US), - rPath, - aFullName) ) - { - osl::FileBase::getSystemPathFromFileURL( aFullName, aFullName ); - rBase.AddDepFile(aFullName); - SvTokenStream aTokStm( aFullName ); - SvIdlParser aInputParser(rBase, aTokStm); - bOk = aInputParser.ReadSvIdl( true, rPath ); - } - else - bOk = false; - } - else - bOk = false; + bOk = ReadModuleImport(rPath); } while( bOk ) @@ -80,4 +61,29 @@ bool SvIdlParser::ReadSvIdl( bool bImported, const OUString & rPath ) return true; } +bool SvIdlParser::ReadModuleImport(const OUString & rPath) +{ + SvToken& rTok = rInStm.GetToken_Next(); + bool bOk = true; + if( rTok.IsString() ) + { + OUString aFullName; + if( osl::FileBase::E_None == osl::File::searchFileURL( + OStringToOUString(rTok.GetString(), RTL_TEXTENCODING_ASCII_US), + rPath, + aFullName) ) + { + osl::FileBase::getSystemPathFromFileURL( aFullName, aFullName ); + rBase.AddDepFile(aFullName); + SvTokenStream aTokStm( aFullName ); + SvIdlParser aInputParser(rBase, aTokStm); + bOk = aInputParser.ReadSvIdl( true, rPath ); + } + else + bOk = false; + } + else + bOk = false; + return bOk; +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |