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/prj/database.cxx | |
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/prj/database.cxx')
-rw-r--r-- | idl/source/prj/database.cxx | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx index ff6365e6b00a..7e907e769302 100644 --- a/idl/source/prj/database.cxx +++ b/idl/source/prj/database.cxx @@ -21,11 +21,11 @@ #include <ctype.h> #include <stdio.h> #include <stdlib.h> -#include <tools/fsys.hxx> #include <tools/debug.hxx> #include <database.hxx> #include <globals.hxx> #include <rtl/strbuf.hxx> +#include <osl/file.hxx> SvIdlDataBase::SvIdlDataBase( const SvCommand& rCmd ) : bExport( sal_False ) @@ -205,17 +205,17 @@ sal_Bool SvIdlDataBase::InsertId( const rtl::OString& rIdName, sal_uLong nVal ) sal_Bool SvIdlDataBase::ReadIdFile( const String & rFileName ) { - DirEntry aFullName( rFileName ); - aFullName.Find( GetPath() ); + OUString aFullName; + osl::File::searchFileURL( rFileName, GetPath(), aFullName); + osl::FileBase::getSystemPathFromFileURL( aFullName, aFullName ); for ( size_t i = 0, n = aIdFileList.size(); i < n; ++i ) if ( *aIdFileList[ i ] == rFileName ) return sal_True; aIdFileList.push_back( new String( rFileName ) ); - - this->AddDepFile(aFullName.GetFull()); - SvTokenStream aTokStm( aFullName.GetFull() ); + this->AddDepFile( aFullName ); + SvTokenStream aTokStm( aFullName ); if( aTokStm.GetStream().GetError() == SVSTREAM_OK ) { SvToken * pTok = aTokStm.GetToken_Next(); @@ -634,20 +634,22 @@ sal_Bool SvIdlWorkingBase::ReadSvIdl( SvTokenStream & rInStm, sal_Bool bImported pTok = rInStm.GetToken_Next(); if( pTok->IsString() ) { - DirEntry aFullName(rtl::OStringToOUString(pTok->GetString(), RTL_TEXTENCODING_ASCII_US)); - if( aFullName.Find( rPath ) ) + OUString aFullName; + if( osl::FileBase::E_None == osl::File::searchFileURL( + rtl::OStringToOUString(pTok->GetString(), RTL_TEXTENCODING_ASCII_US), + rPath, + aFullName) ) { - this->AddDepFile(aFullName.GetFull()); - SvFileStream aStm( aFullName.GetFull(), - STREAM_STD_READ | STREAM_NOCREATE ); + osl::FileBase::getSystemPathFromFileURL( aFullName, aFullName ); + this->AddDepFile(aFullName); + SvFileStream aStm( aFullName, STREAM_STD_READ | STREAM_NOCREATE ); Load( aStm ); if( aStm.GetError() != SVSTREAM_OK ) { if( aStm.GetError() == SVSTREAM_WRONGVERSION ) { rtl::OStringBuffer aStr("wrong version, file "); - aStr.append(rtl::OUStringToOString( - aFullName.GetFull(), RTL_TEXTENCODING_UTF8)); + aStr.append(rtl::OUStringToOString( aFullName, RTL_TEXTENCODING_UTF8)); SetError(aStr.makeStringAndClear(), pTok); WriteError( rInStm ); bOk = sal_False; @@ -656,7 +658,7 @@ sal_Bool SvIdlWorkingBase::ReadSvIdl( SvTokenStream & rInStm, sal_Bool bImported { aStm.Seek( 0 ); aStm.ResetError(); - SvTokenStream aTokStm( aStm, aFullName.GetFull() ); + SvTokenStream aTokStm( aStm, aFullName ); bOk = ReadSvIdl( aTokStm, sal_True, rPath ); } } |