diff options
author | Rüdiger Timm <rt@openoffice.org> | 2005-05-13 07:09:21 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2005-05-13 07:09:21 +0000 |
commit | 34717b796f8ba12c25e4d9ebab2ededde7858396 (patch) | |
tree | 981603d3ef76c95a1d71f47c21a29f70e81daed4 /desktop | |
parent | cc476123f53e4e06daa82030eb9200d0eca112de (diff) |
INTEGRATION: CWS lo5 (1.4.10); FILE MERGED
2005/05/03 15:07:24 lo 1.4.10.3: #122219# starsuite 7 migration + improvement of findInstallation()
2005/05/03 13:09:35 lo 1.4.10.2: #122219# starsuite 7 migration + improvement of findInstallation()
2005/05/02 09:32:06 lo 1.4.10.1: #122219# starsuite 7 migration + improvement of findInstallation()
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/migration/migration.cxx | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx index aba3241ea169..7b6a47c77dc7 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -2,9 +2,9 @@ * * $RCSfile: migration.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: obo $ $Date: 2005-04-18 12:22:44 $ + * last change: $Author: rt $ $Date: 2005-05-13 08:09:21 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -179,9 +179,6 @@ MigrationImpl::~MigrationImpl() sal_Bool MigrationImpl::doMigration() { - // XXX not implemented in this CWS - // return sal_False; - if (sal_True /*checkState()*/) { try{ @@ -308,18 +305,30 @@ install_info MigrationImpl::findInstallation() Config aVersion(usVersion); aVersion.SetGroup("Versions"); + + strings_v vInst; + ByteString sInst; + for (int i=0; i<aVersion.GetKeyCount(); i++) { + sInst =aVersion.GetKeyName(i); + vInst.push_back(OUString(static_cast< OString >(sInst), sInst.Len(), RTL_TEXTENCODING_UTF8)); + } + ByteString sInstall; - strings_v::const_iterator i_ver = m_vrVersions->begin(); - while (i_ver != m_vrVersions->end()) - { - // this will use the last valid version from the sversion file - // aInfo will be overwritten for each matching version identifier - if ((sInstall = aVersion.ReadKey(OUStringToOString(*i_ver, RTL_TEXTENCODING_UTF8))).Len() > 0) + strings_v::const_iterator i_ins = vInst.begin(); + while (i_ins != vInst.end()) { + strings_v::const_iterator i_ver = m_vrVersions->begin(); + while (i_ver != m_vrVersions->end()) { - aInfo.productname = *i_ver; - aInfo.userdata = OUString(static_cast< OString >(sInstall), sInstall.Len(), RTL_TEXTENCODING_UTF8); + // this will use the last valid version from the sversion file + // aInfo will be overwritten for each matching version identifier + if ( i_ins->indexOf(*i_ver) == 0) { + sInstall = aVersion.ReadKey(OUStringToOString(*i_ins, RTL_TEXTENCODING_UTF8)); + aInfo.productname = *i_ins; + aInfo.userdata = OUString(static_cast< OString >(sInstall), sInstall.Len(), RTL_TEXTENCODING_UTF8); + } + i_ver++; } - i_ver++; + i_ins++; } return aInfo; } |