summaryrefslogtreecommitdiff
path: root/idlc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-08 14:04:08 +0200
committerNoel Grandin <noel@peralex.com>2015-04-09 08:41:11 +0200
commit7b4ca582fcfd77b20eea5a11bd0e87b39d640e91 (patch)
tree3065c665ba7250d47bc41e4e46ec453192ab0fd0 /idlc
parent95600edeaf48a80a1e84c44b37f4035bc4db3070 (diff)
convert RegError to scoped enum
Change-Id: I55977c38578cb59deb195d91f8948da2e0905b6a
Diffstat (limited to 'idlc')
-rw-r--r--idlc/source/astdump.cxx14
-rw-r--r--idlc/source/astenum.cxx4
-rw-r--r--idlc/source/astinterface.cxx4
-rw-r--r--idlc/source/aststruct.cxx4
-rw-r--r--idlc/source/idlcproduce.cxx8
5 files changed, 17 insertions, 17 deletions
diff --git a/idlc/source/astdump.cxx b/idlc/source/astdump.cxx
index 7195ecca6426..d7adc08c90c1 100644
--- a/idlc/source/astdump.cxx
+++ b/idlc/source/astdump.cxx
@@ -43,7 +43,7 @@ bool AstModule::dump(RegistryKey& rKey)
localKey = rKey;
}else
{
- if (rKey.createKey( OStringToOUString(getFullName(), RTL_TEXTENCODING_UTF8 ), localKey))
+ if (rKey.createKey( OStringToOUString(getFullName(), RTL_TEXTENCODING_UTF8 ), localKey) != RegError::NO_ERROR)
{
fprintf(stderr, "%s: warning, could not create key '%s' in '%s'\n",
idlc()->getOptions()->getProgramName().getStr(),
@@ -87,7 +87,7 @@ bool AstModule::dump(RegistryKey& rKey)
void const * pBlob = aBlob.getBlob(&aBlobSize);
if (localKey.setValue(emptyStr, RegValueType::BINARY,
- const_cast<RegValue>(pBlob), aBlobSize))
+ const_cast<RegValue>(pBlob), aBlobSize) != RegError::NO_ERROR)
{
fprintf(stderr, "%s: warning, could not set value of key \"%s\" in %s\n",
idlc()->getOptions()->getProgramName().getStr(),
@@ -112,7 +112,7 @@ bool AstModule::dump(RegistryKey& rKey)
if ( getNodeType() != NT_root )
{
if (localKey.setValue(emptyStr, RegValueType::BINARY,
- const_cast<RegValue>(pBlob), aBlobSize))
+ const_cast<RegValue>(pBlob), aBlobSize) != RegError::NO_ERROR)
{
fprintf(stderr, "%s: warning, could not set value of key \"%s\" in %s\n",
idlc()->getOptions()->getProgramName().getStr(),
@@ -132,7 +132,7 @@ bool AstTypeDef::dump(RegistryKey& rKey)
{
OUString emptyStr;
RegistryKey localKey;
- if (rKey.createKey( OStringToOUString(getFullName(), RTL_TEXTENCODING_UTF8 ), localKey))
+ if (rKey.createKey( OStringToOUString(getFullName(), RTL_TEXTENCODING_UTF8 ), localKey) != RegError::NO_ERROR)
{
fprintf(stderr, "%s: warning, could not create key '%s' in '%s'\n",
idlc()->getOptions()->getProgramName().getStr(),
@@ -152,7 +152,7 @@ bool AstTypeDef::dump(RegistryKey& rKey)
sal_uInt32 aBlobSize;
void const * pBlob = aBlob.getBlob(&aBlobSize);
- if (localKey.setValue(emptyStr, RegValueType::BINARY, const_cast<RegValue>(pBlob), aBlobSize))
+ if (localKey.setValue(emptyStr, RegValueType::BINARY, const_cast<RegValue>(pBlob), aBlobSize) != RegError::NO_ERROR)
{
fprintf(stderr, "%s: warning, could not set value of key \"%s\" in %s\n",
idlc()->getOptions()->getProgramName().getStr(),
@@ -219,7 +219,7 @@ bool AstService::dump(RegistryKey& rKey)
RegistryKey localKey;
if (rKey.createKey(
OStringToOUString(getFullName(), RTL_TEXTENCODING_UTF8),
- localKey)) {
+ localKey) != RegError::NO_ERROR) {
fprintf(
stderr, "%s: warning, could not create key '%s' in '%s'\n",
idlc()->getOptions()->getProgramName().getStr(),
@@ -310,7 +310,7 @@ bool AstService::dump(RegistryKey& rKey)
void const * blob = writer.getBlob(&size);
if (localKey.setValue(
emptyStr, RegValueType::BINARY, const_cast< void * >(blob),
- size))
+ size) != RegError::NO_ERROR)
{
fprintf(
stderr, "%s: warning, could not set value of key \"%s\" in %s\n",
diff --git a/idlc/source/astenum.cxx b/idlc/source/astenum.cxx
index e6855694bf4b..14318b7b1787 100644
--- a/idlc/source/astenum.cxx
+++ b/idlc/source/astenum.cxx
@@ -58,7 +58,7 @@ AstConstant* AstEnum::checkValue(AstExpression* pExpr)
bool AstEnum::dump(RegistryKey& rKey)
{
RegistryKey localKey;
- if (rKey.createKey( OStringToOUString(getFullName(), RTL_TEXTENCODING_UTF8 ), localKey))
+ if (rKey.createKey( OStringToOUString(getFullName(), RTL_TEXTENCODING_UTF8 ), localKey) != RegError::NO_ERROR)
{
fprintf(stderr, "%s: warning, could not create key '%s' in '%s'\n",
idlc()->getOptions()->getProgramName().getStr(),
@@ -92,7 +92,7 @@ bool AstEnum::dump(RegistryKey& rKey)
void const * pBlob = aBlob.getBlob(&aBlobSize);
if (localKey.setValue(emptyStr, RegValueType::BINARY,
- const_cast<RegValue>(pBlob), aBlobSize))
+ const_cast<RegValue>(pBlob), aBlobSize) != RegError::NO_ERROR)
{
fprintf(stderr, "%s: warning, could not set value of key \"%s\" in %s\n",
idlc()->getOptions()->getProgramName().getStr(),
diff --git a/idlc/source/astinterface.cxx b/idlc/source/astinterface.cxx
index a3b911a1f7c5..579ca0ac3a28 100644
--- a/idlc/source/astinterface.cxx
+++ b/idlc/source/astinterface.cxx
@@ -105,7 +105,7 @@ bool AstInterface::dump(RegistryKey& rKey)
return true;
RegistryKey localKey;
- if (rKey.createKey( OStringToOUString(getFullName(), RTL_TEXTENCODING_UTF8 ), localKey))
+ if (rKey.createKey( OStringToOUString(getFullName(), RTL_TEXTENCODING_UTF8 ), localKey) != RegError::NO_ERROR)
{
fprintf(stderr, "%s: warning, could not create key '%s' in '%s'\n",
idlc()->getOptions()->getProgramName().getStr(),
@@ -244,7 +244,7 @@ bool AstInterface::dump(RegistryKey& rKey)
sal_uInt32 aBlobSize;
void const * pBlob = aBlob.getBlob(&aBlobSize);
- if (localKey.setValue(emptyStr, RegValueType::BINARY, const_cast<RegValue>(pBlob), aBlobSize))
+ if (localKey.setValue(emptyStr, RegValueType::BINARY, const_cast<RegValue>(pBlob), aBlobSize) != RegError::NO_ERROR)
{
fprintf(stderr, "%s: warning, could not set value of key \"%s\" in %s\n",
idlc()->getOptions()->getProgramName().getStr(),
diff --git a/idlc/source/aststruct.cxx b/idlc/source/aststruct.cxx
index 3c8ab45b8daf..2b150e1e6aa3 100644
--- a/idlc/source/aststruct.cxx
+++ b/idlc/source/aststruct.cxx
@@ -78,7 +78,7 @@ bool AstStruct::isType() const {
bool AstStruct::dump(RegistryKey& rKey)
{
RegistryKey localKey;
- if (rKey.createKey( OStringToOUString(getFullName(), RTL_TEXTENCODING_UTF8 ), localKey))
+ if (rKey.createKey( OStringToOUString(getFullName(), RTL_TEXTENCODING_UTF8 ), localKey) != RegError::NO_ERROR)
{
fprintf(stderr, "%s: warning, could not create key '%s' in '%s'\n",
idlc()->getOptions()->getProgramName().getStr(),
@@ -162,7 +162,7 @@ bool AstStruct::dump(RegistryKey& rKey)
void const * pBlob = aBlob.getBlob(&aBlobSize);
if (localKey.setValue(emptyStr, RegValueType::BINARY,
- const_cast<RegValue>(pBlob), aBlobSize))
+ const_cast<RegValue>(pBlob), aBlobSize) != RegError::NO_ERROR)
{
fprintf(stderr, "%s: warning, could not set value of key \"%s\" in %s\n",
idlc()->getOptions()->getProgramName().getStr(),
diff --git a/idlc/source/idlcproduce.cxx b/idlc/source/idlcproduce.cxx
index 4d3645c34222..f40cb06ed0e4 100644
--- a/idlc/source/idlcproduce.cxx
+++ b/idlc/source/idlcproduce.cxx
@@ -154,7 +154,7 @@ produceFile(const OString& regFileName, sPair_t const*const pDepFile)
OString urlRegTmpName = convertToFileUrl(regTmpName);
Registry regFile;
- if ( regFile.create(OStringToOUString(urlRegTmpName, RTL_TEXTENCODING_UTF8)) != REG_NO_ERROR )
+ if ( regFile.create(OStringToOUString(urlRegTmpName, RTL_TEXTENCODING_UTF8)) != RegError::NO_ERROR )
{
fprintf(stderr, "%s: could not create registry file '%s'\n",
pOptions->getProgramName().getStr(), regTmpName.getStr());
@@ -165,7 +165,7 @@ produceFile(const OString& regFileName, sPair_t const*const pDepFile)
}
RegistryKey rootKey;
- if ( regFile.openRootKey(rootKey) != REG_NO_ERROR )
+ if ( regFile.openRootKey(rootKey) != RegError::NO_ERROR )
{
fprintf(stderr, "%s: could not open root of registry file '%s'\n",
pOptions->getProgramName().getStr(), regFileName.getStr());
@@ -179,7 +179,7 @@ produceFile(const OString& regFileName, sPair_t const*const pDepFile)
if ( !idlc()->getRoot()->dump(rootKey) )
{
rootKey.releaseKey();
- if (regFile.close() != REG_NO_ERROR)
+ if (regFile.close() != RegError::NO_ERROR)
{
fprintf(stderr, "%s: could not close registry file '%s'\n",
pOptions->getProgramName().getStr(), regFileName.getStr());
@@ -191,7 +191,7 @@ produceFile(const OString& regFileName, sPair_t const*const pDepFile)
}
rootKey.releaseKey();
- if ( regFile.close() != REG_NO_ERROR )
+ if ( regFile.close() != RegError::NO_ERROR )
{
fprintf(stderr, "%s: could not close registry file '%s'\n",
pOptions->getProgramName().getStr(), regFileName.getStr());