diff options
-rw-r--r-- | codemaker/source/codemaker/global.cxx | 50 | ||||
-rw-r--r-- | codemaker/source/codemaker/options.cxx | 2 | ||||
-rw-r--r-- | codemaker/source/cppumaker/cppuoptions.cxx | 8 | ||||
-rw-r--r-- | codemaker/source/cppumaker/cppuoptions.hxx | 2 | ||||
-rw-r--r-- | codemaker/source/javamaker/javaoptions.cxx | 8 | ||||
-rw-r--r-- | codemaker/source/javamaker/javaoptions.hxx | 2 | ||||
-rw-r--r-- | include/codemaker/global.hxx | 16 | ||||
-rw-r--r-- | include/codemaker/options.hxx | 4 | ||||
-rw-r--r-- | unodevtools/source/skeletonmaker/cppcompskeleton.cxx | 4 | ||||
-rw-r--r-- | unodevtools/source/skeletonmaker/javacompskeleton.cxx | 2 |
10 files changed, 49 insertions, 49 deletions
diff --git a/codemaker/source/codemaker/global.cxx b/codemaker/source/codemaker/global.cxx index 54ceeb1dc8bd..9549763477b2 100644 --- a/codemaker/source/codemaker/global.cxx +++ b/codemaker/source/codemaker/global.cxx @@ -65,7 +65,7 @@ OString getTempDir(const OString& sFileName) OString createFileNameFromType( const OString& destination, const OString typeName, const OString postfix, - sal_Bool bLowerCase, + bool bLowerCase, const OString prefix ) { OString type(typeName.replace('.', '/')); @@ -77,21 +77,21 @@ OString createFileNameFromType( const OString& destination, sal_uInt32 length = destination.getLength(); - sal_Bool withPoint = sal_False; + bool withPoint = false; if (length == 0) { length++; - withPoint = sal_True; + withPoint = true; } length += prefix.getLength() + type.getLength() + postfix.getLength(); - sal_Bool withSeparator = sal_False; + bool withSeparator = false; if (!(destination.endsWith("\\") || destination.endsWith("/")) && !(type.startsWith("\\") || type.startsWith("/"))) { length++; - withSeparator = sal_True; + withSeparator = true; } OStringBuffer fileNameBuf(length); @@ -158,24 +158,24 @@ OString createFileNameFromType( const OString& destination, return OUStringToOString(uSysFileName, osl_getThreadTextEncoding());; } -sal_Bool fileExists(const OString& fileName) +bool fileExists(const OString& fileName) { FILE *f= fopen(fileName.getStr(), "r"); if (f != NULL) { fclose(f); - return sal_True; + return true; } - return sal_False; + return false; } -sal_Bool checkFileContent(const OString& targetFileName, const OString& tmpFileName) +bool checkFileContent(const OString& targetFileName, const OString& tmpFileName) { FILE *target = fopen(targetFileName.getStr(), "r"); FILE *tmp = fopen(tmpFileName.getStr(), "r"); - sal_Bool bFindChanges = sal_False; + bool bFindChanges = false; if (target != NULL && tmp != NULL) { @@ -190,10 +190,10 @@ sal_Bool checkFileContent(const OString& targetFileName, const OString& tmpFileN n2 = fread(buffer2, sizeof(sal_Char), 1024, tmp); if ( n1 != n2 ) - bFindChanges = sal_True; + bFindChanges = true; else if ( memcmp(buffer1, buffer2, n2) != 0 ) - bFindChanges = sal_True; + bFindChanges = true; } } @@ -203,36 +203,36 @@ sal_Bool checkFileContent(const OString& targetFileName, const OString& tmpFileN return bFindChanges; } -sal_Bool makeValidTypeFile(const OString& targetFileName, const OString& tmpFileName, - sal_Bool bFileCheck) +bool makeValidTypeFile(const OString& targetFileName, const OString& tmpFileName, + bool bFileCheck) { if (bFileCheck) { if (checkFileContent(targetFileName, tmpFileName)) { if ( !unlink(targetFileName.getStr()) ) if ( !rename(tmpFileName.getStr(), targetFileName.getStr()) ) - return sal_True; + return true; } else return removeTypeFile(tmpFileName); } else { if (fileExists(targetFileName)) if (!removeTypeFile(targetFileName)) - return sal_False; + return false; if ( rename(tmpFileName.getStr(), targetFileName.getStr()) ) { if (errno == EEXIST) - return sal_True; + return true; } else - return sal_True; + return true; } - return sal_False; + return false; } -sal_Bool removeTypeFile(const OString& fileName) +bool removeTypeFile(const OString& fileName) { if ( !unlink(fileName.getStr()) ) - return sal_True; + return true; - return sal_False; + return false; } OUString convertToFileUrl(const OString& fileName) @@ -283,12 +283,12 @@ FileStream::~FileStream() osl_closeFile(m_file); } -sal_Bool FileStream::isValid() +bool FileStream::isValid() { if ( m_file ) - return sal_True; + return true; - return sal_False; + return false; } void FileStream::createTempFile(const OString& sPath) diff --git a/codemaker/source/codemaker/options.cxx b/codemaker/source/codemaker/options.cxx index 328cc9ceb81c..67ae20f229c4 100644 --- a/codemaker/source/codemaker/options.cxx +++ b/codemaker/source/codemaker/options.cxx @@ -36,7 +36,7 @@ const OString& Options::getProgramName() const return m_program; } -sal_Bool Options::isValid(const OString& option) const +bool Options::isValid(const OString& option) const { return m_options.find(option) != m_options.end(); } diff --git a/codemaker/source/cppumaker/cppuoptions.cxx b/codemaker/source/cppumaker/cppuoptions.cxx index 9ea0138a6c73..e2584d5f6558 100644 --- a/codemaker/source/cppumaker/cppuoptions.cxx +++ b/codemaker/source/cppumaker/cppuoptions.cxx @@ -34,10 +34,10 @@ using ::rtl::OString; #define SEPARATOR '\\' #endif -sal_Bool CppuOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile) +bool CppuOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile) throw( IllegalArgument ) { - sal_Bool ret = sal_True; + bool ret = true; sal_uInt16 i=0; if (!bCmdFile) @@ -51,7 +51,7 @@ sal_Bool CppuOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile) if (ac < 2) { fprintf(stderr, "%s", prepareHelp().getStr()); - ret = sal_False; + ret = false; } i = 1; @@ -268,7 +268,7 @@ sal_Bool CppuOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile) if( cmdFile == NULL ) { fprintf(stderr, "%s", prepareHelp().getStr()); - ret = sal_False; + ret = false; } else { diff --git a/codemaker/source/cppumaker/cppuoptions.hxx b/codemaker/source/cppumaker/cppuoptions.hxx index f07e945d1ff5..1d0c6cb6e0df 100644 --- a/codemaker/source/cppumaker/cppuoptions.hxx +++ b/codemaker/source/cppumaker/cppuoptions.hxx @@ -30,7 +30,7 @@ public: ~CppuOptions() {} - sal_Bool initOptions(int ac, char* av[], sal_Bool bCmdFile=sal_False) + bool initOptions(int ac, char* av[], sal_Bool bCmdFile=sal_False) throw( IllegalArgument ); OString prepareHelp(); diff --git a/codemaker/source/javamaker/javaoptions.cxx b/codemaker/source/javamaker/javaoptions.cxx index 5e9130c16e19..66f7c2775aed 100644 --- a/codemaker/source/javamaker/javaoptions.cxx +++ b/codemaker/source/javamaker/javaoptions.cxx @@ -30,10 +30,10 @@ #define SEPARATOR '\\' #endif -sal_Bool JavaOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile) +bool JavaOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile) throw( IllegalArgument ) { - sal_Bool ret = sal_True; + bool ret = true; sal_uInt16 i=0; if (!bCmdFile) @@ -47,7 +47,7 @@ sal_Bool JavaOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile) if (ac < 2) { fprintf(stderr, "%s", prepareHelp().getStr()); - ret = sal_False; + ret = false; } i = 1; @@ -193,7 +193,7 @@ sal_Bool JavaOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile) if( cmdFile == NULL ) { fprintf(stderr, "%s", prepareHelp().getStr()); - ret = sal_False; + ret = false; } else { int rargc=0; diff --git a/codemaker/source/javamaker/javaoptions.hxx b/codemaker/source/javamaker/javaoptions.hxx index 128ebbcd4d6e..62b05b1e66de 100644 --- a/codemaker/source/javamaker/javaoptions.hxx +++ b/codemaker/source/javamaker/javaoptions.hxx @@ -30,7 +30,7 @@ public: ~JavaOptions() {} - sal_Bool initOptions(int ac, char* av[], sal_Bool bCmdFile=sal_False) + bool initOptions(int ac, char* av[], sal_Bool bCmdFile=sal_False) throw( IllegalArgument ); OString prepareHelp(); diff --git a/include/codemaker/global.hxx b/include/codemaker/global.hxx index 5693e3ac8aba..c739aed58f83 100644 --- a/include/codemaker/global.hxx +++ b/include/codemaker/global.hxx @@ -32,7 +32,7 @@ struct EqualString { - sal_Bool operator()(const ::rtl::OString& str1, const ::rtl::OString& str2) const + bool operator()(const ::rtl::OString& str1, const ::rtl::OString& str2) const { return (str1 == str2); } @@ -48,7 +48,7 @@ struct HashString struct LessString { - sal_Bool operator()(const ::rtl::OString& str1, const ::rtl::OString& str2) const + bool operator()(const ::rtl::OString& str1, const ::rtl::OString& str2) const { return (str1 < str2); } @@ -75,7 +75,7 @@ public: FileStream(); virtual ~FileStream(); - sal_Bool isValid(); + bool isValid(); void createTempFile(const ::rtl::OString& sPath); void close(); @@ -107,14 +107,14 @@ private: ::rtl::OString createFileNameFromType(const ::rtl::OString& destination, const ::rtl::OString type, const ::rtl::OString postfix, - sal_Bool bLowerCase=sal_False, + bool bLowerCase=false, const ::rtl::OString prefix=""); -sal_Bool fileExists(const ::rtl::OString& fileName); -sal_Bool makeValidTypeFile(const ::rtl::OString& targetFileName, +bool fileExists(const ::rtl::OString& fileName); +bool makeValidTypeFile(const ::rtl::OString& targetFileName, const ::rtl::OString& tmpFileName, - sal_Bool bFileCheck); -sal_Bool removeTypeFile(const ::rtl::OString& fileName); + bool bFileCheck); +bool removeTypeFile(const ::rtl::OString& fileName); ::rtl::OUString convertToFileUrl(const ::rtl::OString& fileName); diff --git a/include/codemaker/options.hxx b/include/codemaker/options.hxx index 2290d83a5bc0..b3a4e5c330da 100644 --- a/include/codemaker/options.hxx +++ b/include/codemaker/options.hxx @@ -47,13 +47,13 @@ public: Options(); virtual ~Options(); - virtual sal_Bool initOptions(int ac, char* av[], sal_Bool bCmdFile=sal_False) + virtual bool initOptions(int ac, char* av[], sal_Bool bCmdFile=sal_False) throw( IllegalArgument ) = 0; virtual ::rtl::OString prepareHelp() = 0; const ::rtl::OString& getProgramName() const; - sal_Bool isValid(const ::rtl::OString& option) const; + bool isValid(const ::rtl::OString& option) const; const ::rtl::OString getOption(const ::rtl::OString& option) const throw( IllegalArgument ); diff --git a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx index 3228a8c065c9..5ce7501634d8 100644 --- a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx +++ b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx @@ -1060,7 +1060,7 @@ void generateSkeleton(ProgramOptions const & options, if ( !standardout && pofs && ((std::ofstream*)pofs)->is_open()) { ((std::ofstream*)pofs)->close(); delete pofs; - OSL_VERIFY(makeValidTypeFile(compFileName, tmpFileName, sal_False)); + OSL_VERIFY(makeValidTypeFile(compFileName, tmpFileName, false)); } } catch (CannotDumpException & e) { std::cerr << "ERROR: " << e.getMessage() << "\n"; @@ -1223,7 +1223,7 @@ void generateCalcAddin(ProgramOptions const & options, if ( !standardout && pofs && ((std::ofstream*)pofs)->is_open()) { ((std::ofstream*)pofs)->close(); delete pofs; - OSL_VERIFY(makeValidTypeFile(compFileName, tmpFileName, sal_False)); + OSL_VERIFY(makeValidTypeFile(compFileName, tmpFileName, false)); } } catch (CannotDumpException & e) { std::cerr << "ERROR: " << e.getMessage() << "\n"; diff --git a/unodevtools/source/skeletonmaker/javacompskeleton.cxx b/unodevtools/source/skeletonmaker/javacompskeleton.cxx index 0f4ef7613501..1fd478b8d0ab 100644 --- a/unodevtools/source/skeletonmaker/javacompskeleton.cxx +++ b/unodevtools/source/skeletonmaker/javacompskeleton.cxx @@ -915,7 +915,7 @@ void generateSkeleton(ProgramOptions const & options, if ( !standardout && pofs && ((std::ofstream*)pofs)->is_open()) { ((std::ofstream*)pofs)->close(); delete pofs; - OSL_VERIFY(makeValidTypeFile(compFileName, tmpFileName, sal_False)); + OSL_VERIFY(makeValidTypeFile(compFileName, tmpFileName, false)); } } catch (CannotDumpException & e) { std::cerr << "ERROR: " << e.getMessage() << "\n"; |