summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2012-12-13 19:51:52 +0100
committerEike Rathke <erack@redhat.com>2012-12-13 20:21:14 +0100
commitcbd9177a3985910312d4f6a4b7c2068bbab50619 (patch)
tree99fd40159e6462328ad4cdc71b11cbf852e2bb56 /desktop
parent08a84bfc4043dbae9a52a4559a7e5a5337464e92 (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 (cherry picked from commit 623410669fa2d5da9a2ce4e3c4b81ce23605a6df)
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/migration/migration.cxx8
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