diff options
author | Krisztian Pinter <pin.terminator@gmail.com> | 2013-03-22 21:08:31 +0100 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2013-03-25 13:08:52 +0000 |
commit | eec2eb05a22966de319ecf370b0c880d7b83a79a (patch) | |
tree | bc0a1dfc7491f77550d6e9a52aeab06e3d5f5cfc /idl/source/objects | |
parent | 56a52889e65a17e324fc10cf341690385f5a9dd9 (diff) |
fdo#39445 writing out tools/fsys.hxx (idl)
Removed uses of fsys from database.cxx, command.cxx, module.cxx, svidl.cxx.
Also removed a lot of cruft from svidl.cxx and command.hxx; unused variables
and code relating to them, eg. variables aCxxFile, aHxxFile, aSrcFile, aODLFile.
Changed some Strings to OUStrings in svidl.cxx and command.hxx.
Change-Id: I708284f70435c8f65cdcfc954af43976e28b8c9d
Reviewed-on: https://gerrit.libreoffice.org/2935
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
Diffstat (limited to 'idl/source/objects')
-rw-r--r-- | idl/source/objects/module.cxx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx index 4b975104836b..e83c23bb11eb 100644 --- a/idl/source/objects/module.cxx +++ b/idl/source/objects/module.cxx @@ -24,8 +24,8 @@ #include <module.hxx> #include <globals.hxx> #include <database.hxx> -#include <tools/fsys.hxx> #include <tools/debug.hxx> +#include <osl/file.hxx> SV_IMPL_META_FACTORY1( SvMetaModule, SvMetaExtern ); @@ -222,12 +222,16 @@ void SvMetaModule::ReadContextSvIdl( SvIdlDataBase & rBase, SvToken * pTok = rInStm.GetToken_Next(); if( pTok->IsString() ) { - DirEntry aFullName( rtl::OStringToOUString(pTok->GetString(), RTL_TEXTENCODING_ASCII_US) ); - rBase.StartNewFile( aFullName.GetFull() ); - if( aFullName.Find( rBase.GetPath() ) ) + OUString aFullName(rtl::OStringToOUString(pTok->GetString(), RTL_TEXTENCODING_ASCII_US)); + rBase.StartNewFile( aFullName ); + osl::FileBase::RC searchError = osl::File::searchFileURL(aFullName, rBase.GetPath(), aFullName); + osl::FileBase::getSystemPathFromFileURL( aFullName, aFullName ); + + if( osl::FileBase::E_None == searchError ) { - rBase.AddDepFile(aFullName.GetFull()); - SvTokenStream aTokStm( aFullName.GetFull() ); + rBase.AddDepFile( aFullName ); + SvTokenStream aTokStm( aFullName ); + if( SVSTREAM_OK == aTokStm.GetStream().GetError() ) { // rescue error from old file @@ -252,19 +256,15 @@ void SvMetaModule::ReadContextSvIdl( SvIdlDataBase & rBase, } else { - rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM( - "cannot open file: ")); - aStr.append(rtl::OUStringToOString(aFullName.GetFull(), - RTL_TEXTENCODING_UTF8)); + rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("cannot open file: ")); + aStr.append(rtl::OUStringToOString(aFullName, RTL_TEXTENCODING_UTF8)); rBase.SetError(aStr.makeStringAndClear(), pTok); } } else { - rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM( - "cannot find file:")); - aStr.append(rtl::OUStringToOString(aFullName.GetFull(), - RTL_TEXTENCODING_UTF8)); + rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("cannot find file:")); + aStr.append(rtl::OUStringToOString(aFullName, RTL_TEXTENCODING_UTF8)); rBase.SetError(aStr.makeStringAndClear(), pTok); } } |