summaryrefslogtreecommitdiff
path: root/registry
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-02-15 14:52:57 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-02-17 17:55:17 +0100
commit20726ae6644236481cd15e2156935ba842cf88fd (patch)
treeaa16ebb9e654c0c774b969afe93850b594b05fa9 /registry
parent07d3807e999445c87553e7a6c5876d07ca431737 (diff)
registry: sal_Bool -> bool
Change-Id: Iaf118eca7a7b24945afbc1959ad78c712e4a299b
Diffstat (limited to 'registry')
-rw-r--r--registry/source/keyimpl.hxx4
-rw-r--r--registry/source/reflread.cxx12
-rw-r--r--registry/source/regimpl.cxx24
-rw-r--r--registry/source/regimpl.hxx18
-rw-r--r--registry/tools/regcompare.cxx54
-rw-r--r--registry/tools/regmerge.cxx2
6 files changed, 57 insertions, 57 deletions
diff --git a/registry/source/keyimpl.hxx b/registry/source/keyimpl.hxx
index 281872eb48da..7d76d18d32aa 100644
--- a/registry/source/keyimpl.hxx
+++ b/registry/source/keyimpl.hxx
@@ -99,7 +99,7 @@ public:
bool isDeleted() const
{ return m_bDeleted != 0; }
- void setDeleted (sal_Bool bKeyDeleted)
+ void setDeleted (bool bKeyDeleted)
{ m_bDeleted = bKeyDeleted ? 1 : 0; }
bool isModified() const
@@ -108,7 +108,7 @@ public:
void setModified (bool bModified = true)
{ m_bModified = bModified ? 1 : 0; }
- sal_Bool isReadOnly() const
+ bool isReadOnly() const
{ return m_pRegistry->isReadOnly(); }
sal_uInt32 countSubKeys();
diff --git a/registry/source/reflread.cxx b/registry/source/reflread.cxx
index 7fffd6e6ed1d..1eaf9552e299 100644
--- a/registry/source/reflread.cxx
+++ b/registry/source/reflread.cxx
@@ -249,7 +249,7 @@ public:
CPInfoTag readTag(sal_uInt16 index);
const sal_Char* readUTF8NameConstant(sal_uInt16 index);
- sal_Bool readBOOLConstant(sal_uInt16 index);
+ bool readBOOLConstant(sal_uInt16 index);
sal_Int8 readBYTEConstant(sal_uInt16 index);
sal_Int16 readINT16Constant(sal_uInt16 index);
sal_uInt16 readUINT16Constant(sal_uInt16 index);
@@ -343,15 +343,15 @@ const sal_Char* ConstantPool::readUTF8NameConstant(sal_uInt16 index)
return aName;
}
-sal_Bool ConstantPool::readBOOLConstant(sal_uInt16 index)
+bool ConstantPool::readBOOLConstant(sal_uInt16 index)
{
- sal_Bool aBool = sal_False;
+ bool aBool = false;
if (m_pIndex && (index> 0) && (index <= m_numOfEntries))
{
if (readUINT16(m_pIndex[index - 1] + CP_OFFSET_ENTRY_TAG) == CP_TAG_CONST_BOOL)
{
- aBool = (sal_Bool) readBYTE(m_pIndex[index - 1] + CP_OFFSET_ENTRY_DATA);
+ aBool = readBYTE(m_pIndex[index - 1] + CP_OFFSET_ENTRY_DATA) != 0;
}
}
@@ -1081,7 +1081,7 @@ public:
sal_uInt16 m_offset_SUPERTYPES;
TypeRegistryEntry(
- const sal_uInt8* buffer, sal_uInt32 len, sal_Bool copyBuffer);
+ const sal_uInt8* buffer, sal_uInt32 len, bool copyBuffer);
// throws std::bad_alloc
~TypeRegistryEntry();
@@ -1090,7 +1090,7 @@ public:
};
TypeRegistryEntry::TypeRegistryEntry(
- const sal_uInt8* buffer, sal_uInt32 len, sal_Bool copyBuffer):
+ const sal_uInt8* buffer, sal_uInt32 len, bool copyBuffer):
BlopObject(buffer, len, copyBuffer), m_pCP(NULL), m_pFields(NULL),
m_pMethods(NULL), m_pReferences(NULL), m_refCount(1), m_nSuperTypes(0),
m_offset_SUPERTYPES(0)
diff --git a/registry/source/regimpl.cxx b/registry/source/regimpl.cxx
index 348bdf10e648..9c23c266c622 100644
--- a/registry/source/regimpl.cxx
+++ b/registry/source/regimpl.cxx
@@ -653,7 +653,7 @@ RegError ORegistry::createKey(RegKeyHandle hKey, const OUString& keyName,
{
*phNewKey = m_openKeyTable[sFullKeyName];
((ORegKey*)*phNewKey)->acquire();
- ((ORegKey*)*phNewKey)->setDeleted(sal_False);
+ ((ORegKey*)*phNewKey)->setDeleted(false);
return REG_NO_ERROR;
}
@@ -850,7 +850,7 @@ RegError ORegistry::eraseKey(ORegKey* pKey, const OUString& keyName)
pOldKey->setModified();
// set flag deleted !!!
- pOldKey->setDeleted(sal_True);
+ pOldKey->setDeleted(true);
return pKey->closeKey(pOldKey);
}
@@ -900,7 +900,7 @@ RegError ORegistry::deleteSubkeysAndValues(ORegKey* pKey)
// loadKey
//
RegError ORegistry::loadKey(RegKeyHandle hKey, const OUString& regFileName,
- sal_Bool bWarnings, sal_Bool bReport)
+ bool bWarnings, bool bReport)
{
RegError _ret = REG_NO_ERROR;
ORegKey* pKey = static_cast< ORegKey* >(hKey);
@@ -948,7 +948,7 @@ RegError ORegistry::loadKey(RegKeyHandle hKey, const OUString& regFileName,
// saveKey
//
RegError ORegistry::saveKey(RegKeyHandle hKey, const OUString& regFileName,
- sal_Bool bWarnings, sal_Bool bReport)
+ bool bWarnings, bool bReport)
{
RegError _ret = REG_NO_ERROR;
ORegKey* pKey = static_cast< ORegKey* >(hKey);
@@ -1002,8 +1002,8 @@ RegError ORegistry::loadAndSaveValue(ORegKey* pTargetKey,
ORegKey* pSourceKey,
const OUString& valueName,
sal_uInt32 nCut,
- sal_Bool bWarnings,
- sal_Bool bReport)
+ bool bWarnings,
+ bool bReport)
{
OStoreStream rValue;
sal_uInt8* pBuffer;
@@ -1130,9 +1130,9 @@ RegError ORegistry::checkBlop(OStoreStream& rValue,
const OUString& sTargetPath,
sal_uInt32 srcValueSize,
sal_uInt8* pSrcBuffer,
- sal_Bool bReport)
+ bool bReport)
{
- RegistryTypeReader reader(pSrcBuffer, srcValueSize, sal_False);
+ RegistryTypeReader reader(pSrcBuffer, srcValueSize, false);
if (reader.getTypeClass() == RT_TYPE_INVALID)
{
@@ -1159,7 +1159,7 @@ RegError ORegistry::checkBlop(OStoreStream& rValue,
if (!rValue.readAt(VALUE_HEADEROFFSET, pBuffer, valueSize, rwBytes) &&
(rwBytes == valueSize))
{
- RegistryTypeReader reader2(pBuffer, valueSize, sal_False);
+ RegistryTypeReader reader2(pBuffer, valueSize, false);
if ((reader.getTypeClass() != reader2.getTypeClass())
|| reader2.getTypeClass() == RT_TYPE_INVALID)
@@ -1335,8 +1335,8 @@ RegError ORegistry::loadAndSaveKeys(ORegKey* pTargetKey,
ORegKey* pSourceKey,
const OUString& keyName,
sal_uInt32 nCut,
- sal_Bool bWarnings,
- sal_Bool bReport)
+ bool bWarnings,
+ bool bReport)
{
RegError _ret = REG_NO_ERROR;
OUString sRelPath(pSourceKey->getName().copy(nCut));
@@ -1359,7 +1359,7 @@ RegError ORegistry::loadAndSaveKeys(ORegKey* pTargetKey,
if (m_openKeyTable.count(sFullKeyName) > 0)
{
- m_openKeyTable[sFullKeyName]->setDeleted(sal_False);
+ m_openKeyTable[sFullKeyName]->setDeleted(false);
}
ORegKey* pTmpKey = 0;
diff --git a/registry/source/regimpl.hxx b/registry/source/regimpl.hxx
index deeae444311f..055e0d0a5770 100644
--- a/registry/source/regimpl.hxx
+++ b/registry/source/regimpl.hxx
@@ -91,13 +91,13 @@ public:
RegError loadKey(RegKeyHandle hKey,
const OUString& regFileName,
- sal_Bool bWarings=sal_False,
- sal_Bool bReport=sal_False);
+ bool bWarings=false,
+ bool bReport=false);
RegError saveKey(RegKeyHandle hKey,
const OUString& regFileName,
- sal_Bool bWarings=sal_False,
- sal_Bool bReport=sal_False);
+ bool bWarings=false,
+ bool bReport=false);
RegError dumpRegistry(RegKeyHandle hKey) const;
@@ -128,14 +128,14 @@ private:
ORegKey* pSourceKey,
const OUString& valueName,
sal_uInt32 nCut,
- sal_Bool bWarnings=sal_False,
- sal_Bool bReport=sal_False);
+ bool bWarnings=false,
+ bool bReport=false);
RegError checkBlop(store::OStoreStream& rValue,
const OUString& sTargetPath,
sal_uInt32 srcValueSize,
sal_uInt8* pSrcBuffer,
- sal_Bool bReport=sal_False);
+ bool bReport=false);
RegError mergeModuleValue(store::OStoreStream& rTargetValue,
RegistryTypeReader& reader,
@@ -145,8 +145,8 @@ private:
ORegKey* pSourceKey,
const OUString& keyName,
sal_uInt32 nCut,
- sal_Bool bWarnings=sal_False,
- sal_Bool bReport=sal_False);
+ bool bWarnings=false,
+ bool bReport=false);
RegError dumpValue(const OUString& sPath,
const OUString& sName,
diff --git a/registry/tools/regcompare.cxx b/registry/tools/regcompare.cxx
index dd63bff7609e..6d22d611f090 100644
--- a/registry/tools/regcompare.cxx
+++ b/registry/tools/regcompare.cxx
@@ -450,17 +450,17 @@ static void printConstValue(RTConstValue& constValue)
}
}
-static void dumpTypeClass(sal_Bool & rbDump, RTTypeClass typeClass, OUString const & keyName)
+static void dumpTypeClass(bool & rbDump, RTTypeClass typeClass, OUString const & keyName)
{
if (rbDump)
fprintf(stdout, "%s: %s\n", getTypeClass(typeClass), U2S(keyName));
- rbDump = sal_False;
+ rbDump = false;
}
static sal_uInt32 checkConstValue(Options_Impl const & options,
const OUString& keyName,
RTTypeClass typeClass,
- sal_Bool & bDump,
+ bool & bDump,
RTConstValue& constValue1,
RTConstValue& constValue2,
sal_uInt16 index1)
@@ -621,7 +621,7 @@ enum verbosity_t {SILENT, REPORT};
static sal_uInt32 checkField(Options_Impl const & options,
const OUString& keyName,
RTTypeClass typeClass,
- sal_Bool & bDump,
+ bool & bDump,
typereg::Reader& reader1,
typereg::Reader& reader2,
sal_uInt16 index1,
@@ -734,7 +734,7 @@ static char const * getParamMode(RTParamMode paramMode)
static sal_uInt32 checkMethod(Options_Impl const & options,
const OUString& keyName,
RTTypeClass typeClass,
- sal_Bool & bDump,
+ bool & bDump,
typereg::Reader& reader1,
typereg::Reader& reader2,
sal_uInt16 index)
@@ -905,7 +905,7 @@ static char const * getReferenceType(RTReferenceType refType)
static sal_uInt32 checkReference(Options_Impl const & options,
const OUString& keyName,
RTTypeClass typeClass,
- sal_Bool & bDump,
+ bool & bDump,
typereg::Reader& reader1,
typereg::Reader& reader2,
sal_uInt16 index1,
@@ -962,7 +962,7 @@ static sal_uInt32 checkReference(Options_Impl const & options,
static sal_uInt32 checkFieldsWithoutOrder(Options_Impl const & options,
const OUString& keyName,
RTTypeClass typeClass,
- sal_Bool & bDump,
+ bool & bDump,
typereg::Reader& reader1,
typereg::Reader& reader2)
{
@@ -982,7 +982,7 @@ static sal_uInt32 checkFieldsWithoutOrder(Options_Impl const & options,
}
}
- sal_Bool bFound = sal_False;
+ bool bFound = false;
::std::set< sal_uInt16 > moreProps;
for (i=0; i < nFields1; i++)
@@ -991,7 +991,7 @@ static sal_uInt32 checkFieldsWithoutOrder(Options_Impl const & options,
{
if (!checkField(options, keyName, typeClass, bDump, reader1, reader2, i, j, SILENT))
{
- bFound = sal_True;
+ bFound = true;
moreProps.insert(j);
break;
}
@@ -1008,7 +1008,7 @@ static sal_uInt32 checkFieldsWithoutOrder(Options_Impl const & options,
}
else
{
- bFound = sal_False;
+ bFound = false;
}
}
@@ -1044,7 +1044,7 @@ static sal_uInt32 checkBlob(
typereg::Reader& reader2, sal_uInt32 size2)
{
sal_uInt32 nError = 0;
- sal_Bool bDump = sal_True;
+ bool bDump = true;
if ( options.fullCheck() && (size1 != size2) )
{
@@ -1127,13 +1127,13 @@ static sal_uInt32 checkBlob(
sal_uInt16 nFields1 = (sal_uInt16)reader1.getFieldCount();
sal_uInt16 nFields2 = (sal_uInt16)reader2.getFieldCount();
- sal_Bool bCheckNormal = sal_True;
+ bool bCheckNormal = true;
if ( (typeClass == RT_TYPE_SERVICE ||
typeClass == RT_TYPE_MODULE ||
typeClass == RT_TYPE_CONSTANTS) && options.unoTypeCheck() )
{
- bCheckNormal = sal_False;
+ bCheckNormal = false;
}
if ( bCheckNormal )
@@ -1216,7 +1216,7 @@ static sal_uInt32 checkBlob(
}
}
- sal_Bool bFound = sal_False;
+ bool bFound = false;
::std::set< sal_uInt16 > moreReferences;
for (i=0; i < nReference1; i++)
@@ -1225,7 +1225,7 @@ static sal_uInt32 checkBlob(
{
if (!checkReference(options, keyName, typeClass, bDump, reader1, reader2, i, j))
{
- bFound = sal_True;
+ bFound = true;
moreReferences.insert(j);
break;
}
@@ -1244,7 +1244,7 @@ static sal_uInt32 checkBlob(
}
else
{
- bFound = sal_False;
+ bFound = false;
}
}
@@ -1321,7 +1321,7 @@ static sal_uInt32 checkValueDifference(
if ( valueType1 == valueType2 )
{
- sal_Bool bEqual = sal_True;
+ bool bEqual = true;
switch (valueType1)
{
case RG_VALUETYPE_LONGLIST:
@@ -1334,14 +1334,14 @@ static sal_uInt32 checkValueDifference(
sal_uInt32 length2 = valueList1.getLength();
if ( length1 != length2 )
{
- bEqual = sal_False;
+ bEqual = false;
break;
}
for (sal_uInt32 i=0; i<length1; i++)
{
if ( valueList1.getElement(i) != valueList2.getElement(i) )
{
- bEqual = sal_False;
+ bEqual = false;
break;
}
}
@@ -1357,14 +1357,14 @@ static sal_uInt32 checkValueDifference(
sal_uInt32 length2 = valueList1.getLength();
if ( length1 != length2 )
{
- bEqual = sal_False;
+ bEqual = false;
break;
}
for (sal_uInt32 i=0; i<length1; i++)
{
if ( strcmp(valueList1.getElement(i), valueList2.getElement(i)) != 0 )
{
- bEqual = sal_False;
+ bEqual = false;
break;
}
}
@@ -1380,14 +1380,14 @@ static sal_uInt32 checkValueDifference(
sal_uInt32 length2 = valueList1.getLength();
if ( length1 != length2 )
{
- bEqual = sal_False;
+ bEqual = false;
break;
}
for (sal_uInt32 i=0; i<length1; i++)
{
if ( rtl_ustr_compare(valueList1.getElement(i), valueList2.getElement(i)) != 0 )
{
- bEqual = sal_False;
+ bEqual = false;
break;
}
}
@@ -1722,12 +1722,12 @@ static sal_uInt32 checkDifferences(
for (i=0; i<length1; i++)
{
- sal_Bool bFound = sal_False;
+ bool bFound = false;
for (j=0; j<length2; j++)
{
if ( subKeyNames1.getElement(i) == subKeyNames2.getElement(j) )
{
- bFound = sal_True;
+ bFound = true;
keys.insert(subKeyNames1.getElement(i));
break;
}
@@ -1841,12 +1841,12 @@ static sal_uInt32 checkDifferences(
for (i=0; i<length2; i++)
{
- sal_Bool bFound = sal_False;
+ bool bFound = false;
for (j=0; j<length1; j++)
{
if ( subKeyNames2.getElement(i) == subKeyNames1.getElement(j) )
{
- bFound = sal_True;
+ bFound = true;
keys.insert(subKeyNames2.getElement(i));
break;
}
diff --git a/registry/tools/regmerge.cxx b/registry/tools/regmerge.cxx
index dda9382f8977..8353554068b6 100644
--- a/registry/tools/regmerge.cxx
+++ b/registry/tools/regmerge.cxx
@@ -132,7 +132,7 @@ int __cdecl main( int argc, char * argv[] )
for (size_t i = 2; i < args.size(); i++)
{
OUString targetRegName( convertToFileUrl(args[i].c_str(), args[i].size()) );
- RegError _ret = reg.mergeKey(rootKey, mergeKeyName, targetRegName, sal_False, options.isVerbose());
+ RegError _ret = reg.mergeKey(rootKey, mergeKeyName, targetRegName, false, options.isVerbose());
if (_ret != REG_NO_ERROR)
{
if (_ret == REG_MERGE_CONFLICT)