diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-02-15 14:52:41 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-02-17 17:55:17 +0100 |
commit | 07d3807e999445c87553e7a6c5876d07ca431737 (patch) | |
tree | d3bf3fa3c2ea9f11961144d8f7c9889405426abe /codemaker | |
parent | 824c59a38d0e5d3a7f65193e4b4087cf1e0fe64f (diff) |
codemaker: sal_Bool -> bool
Change-Id: I2cacac2aa7e48b3b9d8d060137d5c6d6f1d06b3f
Diffstat (limited to 'codemaker')
-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 |
6 files changed, 36 insertions, 36 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(); |