diff options
author | Philipp Lohmann <pl@openoffice.org> | 2001-05-10 09:59:09 +0000 |
---|---|---|
committer | Philipp Lohmann <pl@openoffice.org> | 2001-05-10 09:59:09 +0000 |
commit | 7937b1c2ec6f7bc55998803af4a60398127d5d2f (patch) | |
tree | cdb14a0de8556590a7679674a03e39d70a787f44 /registry/source | |
parent | 61123ae95e8b990e796a785f0b2b86df91560272 (diff) |
new string api
Diffstat (limited to 'registry/source')
-rw-r--r-- | registry/source/regimpl.cxx | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/registry/source/regimpl.cxx b/registry/source/regimpl.cxx index fee71f47595b..a99015ee66b8 100644 --- a/registry/source/regimpl.cxx +++ b/registry/source/regimpl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: regimpl.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: pl $ $Date: 2001-05-10 10:46:51 $ + * last change: $Author: pl $ $Date: 2001-05-10 10:59:09 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -609,10 +609,9 @@ RegError ORegistry::createKey(RegKeyHandle hKey, const OUString& keyName, sFullPath.append((sal_Unicode)'/'); sal_Int32 nIndex = 0; - sal_Int32 nToken = 0; do { - token = sFullKeyName.getToken( nToken++, '/', nIndex ); + token = sFullKeyName.getToken( 0, '/', nIndex ); if (token.getLength()) { if (rStoreDir.create(pKey->getStoreFile(), sFullPath.getStr(), token, KEY_MODE_CREATE)) @@ -1911,13 +1910,12 @@ RegError ORegistry::createLink(RegKeyHandle hKey, OStoreDirectory rStoreDir; OUString sFullPath(ROOT); - sal_Int32 actToken = 0; sal_Int32 nIndex = 0; OUString token; do { - token = sFullLinkName.getToken(actToken++, '/', nIndex); + token = sFullLinkName.getToken(0, '/', nIndex); if( token.getLength() > 0 ) { @@ -2004,7 +2002,6 @@ RegError ORegistry::deleteLink(RegKeyHandle hKey, const OUString& linkName) OUString ORegistry::resolveLinks(ORegKey* pKey, const OUString& path, sal_Bool firstLinkOnly) { OUString resolvedPath(pKey->getName()); -// sal_Int32 tokenCount = path.getTokenCount('/'); sal_Int32 actToken = 0; sal_Int32 nIndex = 0; OUString token; @@ -2014,11 +2011,12 @@ OUString ORegistry::resolveLinks(ORegKey* pKey, const OUString& path, sal_Bool f resolvedPath += ROOT; if ( path.getStr()[0] == '/' ) - ++actToken; + nIndex++, actToken++; do { - token = path.getToken( actToken++, '/', nIndex ); + token = path.getToken( 0, '/', nIndex ); + actToken++; if( token.getLength() > 0 ) { pLink = resolveLink(pKey, resolvedPath, token); |