diff options
author | Eike Rathke <erack@redhat.com> | 2012-12-13 19:51:52 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2012-12-13 20:18:56 +0100 |
commit | 623410669fa2d5da9a2ce4e3c4b81ce23605a6df (patch) | |
tree | f8068bdc447c7aa69b12bc935654ac338abdfb88 /desktop/source/migration | |
parent | 5deba0e70c9287e6e933df458c21cc3e72f3aa70 (diff) |
fdo#58060 use acor_und.dat and LANGUAGE_UNDETERMINED
Previous versions used an empty language tag for LANGUAGE_DONTKNOW with the
"[All]" autocorrection entry and read/wrote from/to arco_.dat file. An empty
language tag otherwise is used for system locale and doesn't convert flawlessly
with the new LanguageTag system. Instead use LANGUAGE_UNDETERMINED with the ISO
639 code 'und' so the file name is "acor_und.dat".
During user profile migration an existing 3/user/autocorr/acor_.dat is copied
to the new 4/user/autocorr/acor_und.dat
Change-Id: I593f24829c6efd58f36e93ebd3385a3c925f7217
Diffstat (limited to 'desktop/source/migration')
-rw-r--r-- | desktop/source/migration/migration.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx index 6036ef5c8a05..1b4115af805c 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -922,6 +922,14 @@ void MigrationImpl::copyFiles() { // remove installation prefix from file localName = i_file->copy(m_aInfo.userdata.getLength()); + if (localName.endsWith( "/autocorr/acor_.dat")) + { + // Previous versions used an empty language tag for + // LANGUAGE_DONTKNOW with the "[All]" autocorrection entry. + // As of LibreOffice 4.0 it is 'und' for LANGUAGE_UNDETERMINED + // so the file name is "acor_und.dat". + localName = localName.copy( 0, localName.getLength() - 4) + "und.dat"; + } destName = userInstall + localName; INetURLObject aURL(destName); // check whether destination directory exists |