diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2006-06-19 13:26:48 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2006-06-19 13:26:48 +0000 |
commit | bbc0550588e186efced4ffdabdb4ab7355fe2a9a (patch) | |
tree | bec4cfb5d9541554e6503457ae5a429a26d629fb /registry/source | |
parent | 39948f73625b113946391145dea48148c5db5d24 (diff) |
INTEGRATION: CWS warnings01 (1.4.118); FILE MERGED
2005/11/21 13:37:35 sb 1.4.118.4: #i53898# Made code warning-free.
2005/09/22 22:03:17 sb 1.4.118.3: RESYNC: (1.4-1.5); FILE MERGED
2005/09/05 10:06:49 sb 1.4.118.2: #i53898# Made code warning-free.
2005/08/29 14:09:42 sb 1.4.118.1: #i53898# Made code warning-free.
Diffstat (limited to 'registry/source')
-rw-r--r-- | registry/source/keyimpl.cxx | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/registry/source/keyimpl.cxx b/registry/source/keyimpl.cxx index 9a70511c9e17..b470ef03ad38 100644 --- a/registry/source/keyimpl.cxx +++ b/registry/source/keyimpl.cxx @@ -4,9 +4,9 @@ * * $RCSfile: keyimpl.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: rt $ $Date: 2005-09-09 05:14:42 $ + * last change: $Author: hr $ $Date: 2006-06-19 14:26:48 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -50,7 +50,7 @@ //********************************************************************* // ORegKey() // -ORegKey::ORegKey(const OUString& keyName, const OStoreDirectory& rStoreDir, ORegistry* pReg) +ORegKey::ORegKey(const OUString& keyName, ORegistry* pReg) : m_refCount(1) , m_name(keyName) , m_bDeleted(sal_False) @@ -69,7 +69,7 @@ ORegKey::ORegKey(const OUString& keyName, const OStoreDirectory& rStoreDir, OReg // ORegKey() // ORegKey::ORegKey(const OUString& keyName, const OUString& linkName, - const OStoreDirectory& rStoreDir, ORegistry* pReg) + ORegistry* pReg) : m_refCount(1) , m_name(keyName) , m_bDeleted(sal_False) @@ -133,14 +133,15 @@ RegError ORegKey::openSubKeys(const OUString& keyName, RegKeyHandle** phOpenSubK { ORegKey* pKey; OUString sFullKeyName, sSubKeyName; - RegKeyHandle hSKey, hSubKey; + RegKeyHandle hSKey = 0, hSubKey; RegError _ret = REG_NO_ERROR; sal_uInt32 nSubKeys; ORegKey* *subKeys; if ( keyName.getLength() ) { - if ((_ret = openKey(keyName, &hSKey))) + _ret = openKey(keyName, &hSKey); + if (_ret) { *phOpenSubKeys = NULL; *pnSubKeys = 0; @@ -173,7 +174,8 @@ RegError ORegKey::openSubKeys(const OUString& keyName, RegKeyHandle** phOpenSubK sFullKeyName += m_pRegistry->ROOT; sFullKeyName += sSubKeyName; - if (_ret = pKey->openKey(sSubKeyName, &hSubKey)) + _ret = pKey->openKey(sSubKeyName, &hSubKey); + if (_ret) { *phOpenSubKeys = NULL; *pnSubKeys = 0; @@ -213,7 +215,8 @@ RegError ORegKey::getKeyNames(const OUString& keyName, if (keyName.getLength()) { - if (_ret = openKey(keyName, (RegKeyHandle*)&pKey, RESOLVE_PART)) + _ret = openKey(keyName, (RegKeyHandle*)&pKey, RESOLVE_PART); + if (_ret) { *pSubKeyNames = NULL; *pnSubKeys = 0; @@ -419,6 +422,9 @@ RegError ORegKey::setValue(const OUString& valueName, RegValueType vType, RegVal case RG_VALUETYPE_BINARY: rtl_copyMemory(pBuffer+VALUE_HEADEROFFSET, value, size); break; + default: + OSL_ASSERT(false); + break; } @@ -1047,7 +1053,9 @@ RegError ORegKey::getKeyType(const OUString& name, RegKeyType* pKeyType) const if ( name.getLength() ) { - if ((_ret = ((ORegKey*)this)->openKey(name, (RegKeyHandle*)&pKey, RESOLVE_PART))) + _ret = ((ORegKey*)this)->openKey( + name, (RegKeyHandle*)&pKey, RESOLVE_PART); + if (_ret) return _ret; if (pKey->isLink()) @@ -1082,7 +1090,8 @@ RegError ORegKey::createLink(const OUString& linkName, const OUString& linkTarge if (m_pRegistry->openKey(this, linkName, (RegKeyHandle*)&pKey, RESOLVE_PART)) { - if (_ret = m_pRegistry->createKey(this, linkName, (RegKeyHandle*)&pKey)) + _ret = m_pRegistry->createKey(this, linkName, (RegKeyHandle*)&pKey); + if (_ret) return _ret; } else { @@ -1124,7 +1133,9 @@ RegError ORegKey::getLinkTarget(const OUString& linkName, OUString& linkTarget) if ( linkName.getLength() ) { - if (_ret = ((ORegKey*)this)->openKey(linkName, (RegKeyHandle*)&pKey, RESOLVE_PART)) + _ret = ((ORegKey*)this)->openKey( + linkName, (RegKeyHandle*)&pKey, RESOLVE_PART); + if (_ret) return REG_INVALID_LINK; _ret = pKey->getLinkTarget(OUString(), linkTarget); @@ -1142,10 +1153,10 @@ RegError ORegKey::getLinkTarget(const OUString& linkName, OUString& linkTarget) } RegError ORegKey::getResolvedKeyName(const OUString& keyName, - OUString& resolvedName, - sal_Bool firstLinkOnly) + OUString& resolvedName) { - return m_pRegistry->getResolvedKeyName((ORegKey*)this, keyName, resolvedName, firstLinkOnly); + return + m_pRegistry->getResolvedKeyName((ORegKey*)this, keyName, resolvedName); } //********************************************************************* |