diff options
Diffstat (limited to 'codemaker/source/codemaker/global.cxx')
-rw-r--r-- | codemaker/source/codemaker/global.cxx | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/codemaker/source/codemaker/global.cxx b/codemaker/source/codemaker/global.cxx index 52e4e3486aa6..e3f690fe87b3 100644 --- a/codemaker/source/codemaker/global.cxx +++ b/codemaker/source/codemaker/global.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -167,7 +167,7 @@ OString createFileNameFromType( const OString& destination, OUString uSysFileName; OSL_VERIFY( FileBase::getSystemPathFromFileURL( - convertToFileUrl(fileName), uSysFileName) == FileBase::E_None ); + convertToFileUrl(fileName), uSysFileName) == FileBase::E_None ); return OUStringToOString(uSysFileName, osl_getThreadTextEncoding());; } @@ -188,14 +188,14 @@ sal_Bool checkFileContent(const OString& targetFileName, const OString& tmpFileN { FILE *target = fopen(targetFileName.getStr(), "r"); FILE *tmp = fopen(tmpFileName.getStr(), "r"); - sal_Bool bFindChanges = sal_False; + sal_Bool bFindChanges = sal_False; if (target != NULL && tmp != NULL) { - sal_Char buffer1[1024+1]; - sal_Char buffer2[1024+1]; - sal_Int32 n1 = 0; - sal_Int32 n2 = 0; + sal_Char buffer1[1024+1]; + sal_Char buffer2[1024+1]; + sal_Int32 n1 = 0; + sal_Int32 n2 = 0; while ( !bFindChanges && !feof(target) && !feof(tmp)) { @@ -212,7 +212,7 @@ sal_Bool checkFileContent(const OString& targetFileName, const OString& tmpFileN if (target) fclose(target); if (tmp) fclose(tmp); - + return bFindChanges; } @@ -223,14 +223,14 @@ sal_Bool makeValidTypeFile(const OString& targetFileName, const OString& tmpFile if (checkFileContent(targetFileName, tmpFileName)) { if ( !unlink(targetFileName.getStr()) ) if ( !rename(tmpFileName.getStr(), targetFileName.getStr()) ) - return sal_True; - } else + return sal_True; + } else return removeTypeFile(tmpFileName); } else { if (fileExists(targetFileName)) if (!removeTypeFile(targetFileName)) return sal_False; - + if ( rename(tmpFileName.getStr(), targetFileName.getStr()) ) { if (errno == EEXIST) return sal_True; @@ -303,7 +303,7 @@ FileStream::FileStream(const OString& name, FileAccessMode mode) if ( name.getLength() > 0 ) { OUString sUrl(convertToFileUrl(name)); -#ifdef SAL_UNX +#ifdef SAL_UNX sal_uInt64 uAttr = osl_File_Attribute_OwnWrite | osl_File_Attribute_OwnRead | osl_File_Attribute_GrpWrite | @@ -346,7 +346,7 @@ void FileStream::createTempFile(const OString& sPath) sTmpPath = convertToFileUrl(sTmp); if (osl_createTempFile(sTmpPath.pData, &m_file, &sTmpName.pData) == osl_File_E_None) { -#ifdef SAL_UNX +#ifdef SAL_UNX sal_uInt64 uAttr = osl_File_Attribute_OwnWrite | osl_File_Attribute_OwnRead | osl_File_Attribute_GrpWrite | @@ -356,7 +356,7 @@ void FileStream::createTempFile(const OString& sPath) m_file = NULL; return; } -#endif +#endif OUString sSysTmpName; FileBase::getSystemPathFromFileURL(sTmpName, sSysTmpName); m_name = OUStringToOString(sSysTmpName, osl_getThreadTextEncoding()); @@ -435,7 +435,7 @@ FileStream &operator<<(FileStream& o, const ::rtl::OString& s) { sal_uInt64 writtenBytes; osl_writeFile(o.m_file, s.getStr(), s.getLength() * sizeof(sal_Char), &writtenBytes); return o; - + } FileStream &operator<<(FileStream& o, ::rtl::OStringBuffer* s) { sal_uInt64 writtenBytes; |