From 181dd88e2c9a82697c408b91724808f724c76e08 Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Thu, 14 Aug 2008 18:40:17 +0000 Subject: [PATCH] INTEGRATION: CWS tl58 (1.17.12); FILE MERGED 2008/08/06 09:39:38 tl 1.17.12.1: #i92453# fix for extensions defining multiple dictionaries for the same locale --- lingucomponent/source/thesaurus/libnth/nthesimp.cxx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx index 859d89533a8a..c712a29c9fdf 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx +++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: nthesimp.cxx,v $ - * $Revision: 1.17 $ + * $Revision: 1.18 $ * * This file is part of OpenOffice.org. * @@ -201,9 +201,14 @@ Sequence< Locale > SAL_CALL Thesaurus::getLocales() aSuppLocales[k++] = aTmp; } - //! now have one dictionary entry for each locale - //! (this is necessary in order to allow for several locales for one dictionary) - numthes = aSuppLocales.getLength(); + //! For each dictionary and each locale we need a seperate entry. + //! If this results in more than one dictionary per locale than (for now) + //! it is undefined which dictionary gets used. + //! In the future the implementation should support using several dictionaries + //! for one locale. + numthes = 0; + for (aDictIt = aDics.begin(); aDictIt != aDics.end(); ++aDictIt) + numthes = numthes + aDictIt->aLocaleNames.getLength(); // add dictionary information aThes = new MyThes* [numthes];