summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/registry/reflread.hxx8
-rw-r--r--include/registry/registry.hxx30
-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
8 files changed, 76 insertions, 76 deletions
diff --git a/include/registry/reflread.hxx b/include/registry/reflread.hxx
index b044bb75011f..a26df02ecd3c 100644
--- a/include/registry/reflread.hxx
+++ b/include/registry/reflread.hxx
@@ -112,7 +112,7 @@ public:
*/
inline RegistryTypeReader(const sal_uInt8* buffer,
sal_uInt32 bufferLen,
- sal_Bool copyData);
+ bool copyData);
/// Copy constructcor
inline RegistryTypeReader(const RegistryTypeReader& toCopy);
@@ -124,7 +124,7 @@ public:
inline RegistryTypeReader& operator == (const RegistryTypeReader& toAssign);
/// checks if the registry type reader points to a valid Api.
- inline sal_Bool isValid() const;
+ inline bool isValid() const;
/** @deprecated
returns the minor version number.
@@ -315,7 +315,7 @@ protected:
inline RegistryTypeReader::RegistryTypeReader(const sal_uInt8* buffer,
sal_uInt32 bufferLen,
- sal_Bool copyData)
+ bool copyData)
: m_pApi(initRegistryTypeReader_Api())
, m_hImpl(NULL)
{
@@ -347,7 +347,7 @@ inline RegistryTypeReader& RegistryTypeReader::operator == (const RegistryTypeRe
inline sal_uInt16 RegistryTypeReader::getMinorVersion() const
{ return m_pApi->getMinorVersion(m_hImpl); }
-inline sal_Bool RegistryTypeReader::isValid() const
+inline bool RegistryTypeReader::isValid() const
{ return (m_hImpl != NULL); }
inline sal_uInt16 RegistryTypeReader::getMajorVersion() const
diff --git a/include/registry/registry.hxx b/include/registry/registry.hxx
index d277dba559b8..6b3438cad3f6 100644
--- a/include/registry/registry.hxx
+++ b/include/registry/registry.hxx
@@ -110,13 +110,13 @@ public:
inline Registry& operator = (const Registry& toAssign);
/// checks if the registry points to a valid registry data file.
- inline sal_Bool isValid() const;
+ inline bool isValid() const;
/** returns the access mode of the registry.
@return TRUE if the access mode is readonly else FALSE.
*/
- inline sal_Bool isReadOnly() const;
+ inline bool isReadOnly() const;
/** opens the root key of the registry.
@@ -204,8 +204,8 @@ public:
inline RegError mergeKey(RegistryKey& rKey,
const rtl::OUString& keyName,
const rtl::OUString& regFileName,
- sal_Bool bWarnings = sal_False,
- sal_Bool bReport = sal_False);
+ bool bWarnings = false,
+ bool bReport = false);
/** This function reports the complete registry information of a key and all of its subkeys.
@@ -408,13 +408,13 @@ public:
inline RegistryKey& operator = (const RegistryKey& toAssign);
/// checks if the key points to a valid registry key.
- inline sal_Bool isValid() const;
+ inline bool isValid() const;
/** returns the access mode of the key.
@return TRUE if access mode is read only else FALSE.
*/
- inline sal_Bool isReadOnly() const;
+ inline bool isReadOnly() const;
/// returns the full qualified name of the key beginning with the rootkey.
inline rtl::OUString getName();
@@ -634,7 +634,7 @@ public:
@return REG_NO_ERROR if succeeds else an error code.
*/
inline RegError getResolvedKeyName(const rtl::OUString& keyName,
- sal_Bool firstLinkOnly,
+ bool firstLinkOnly,
rtl::OUString& rResolvedName) const;
/// returns the name of the registry in which the key is defined.
@@ -823,15 +823,15 @@ inline RegistryKey& RegistryKey::operator = (const RegistryKey& toAssign)
return *this;
}
-inline sal_Bool RegistryKey::isValid() const
+inline bool RegistryKey::isValid() const
{ return (m_hImpl != NULL); }
-inline sal_Bool RegistryKey::isReadOnly() const
+inline bool RegistryKey::isReadOnly() const
{
if (m_registry.isValid())
return (m_registry.m_pApi)->isKeyReadOnly(m_hImpl);
else
- return sal_False;
+ return false;
}
inline rtl::OUString RegistryKey::getName()
@@ -1125,7 +1125,7 @@ inline RegError RegistryKey::getLinkTarget(const rtl::OUString& linkName,
inline RegError RegistryKey::getResolvedKeyName(const rtl::OUString& keyName,
- sal_Bool firstLinkOnly,
+ bool firstLinkOnly,
rtl::OUString& rResolvedName) const
{
if (m_registry.isValid())
@@ -1181,10 +1181,10 @@ inline Registry& Registry::operator = (const Registry& toAssign)
return *this;
}
-inline sal_Bool Registry::isValid() const
+inline bool Registry::isValid() const
{ return ( m_hImpl != NULL ); }
-inline sal_Bool Registry::isReadOnly() const
+inline bool Registry::isReadOnly() const
{ return m_pApi->isReadOnly(m_hImpl); }
inline RegError Registry::openRootKey(RegistryKey& rRootKey)
@@ -1244,8 +1244,8 @@ inline RegError Registry::saveKey(RegistryKey& rKey,
inline RegError Registry::mergeKey(RegistryKey& rKey,
const rtl::OUString& keyName,
const rtl::OUString& regFileName,
- sal_Bool bWarnings,
- sal_Bool bReport)
+ bool bWarnings,
+ bool bReport)
{ return m_pApi->mergeKey(m_hImpl, rKey.m_hImpl, keyName.pData, regFileName.pData, bWarnings, bReport); }
inline RegError Registry::dumpRegistry(RegistryKey& rKey)
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)