summaryrefslogtreecommitdiff
path: root/lingucomponent
diff options
context:
space:
mode:
Diffstat (limited to 'lingucomponent')
-rw-r--r--lingucomponent/source/spellcheck/spell/sspellimp.cxx21
1 files changed, 17 insertions, 4 deletions
diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
index e8ec4e8dd346..51166e6d2cad 100644
--- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx
+++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
@@ -43,6 +43,7 @@
#include <osl/file.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/textenc.h>
+#include <sal/log.hxx>
#include <list>
#include <set>
@@ -153,12 +154,24 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales()
{
uno::Sequence< OUString > aLocaleNames( aDictIt->aLocaleNames );
uno::Sequence< OUString > aLocations( aDictIt->aLocations );
- sal_Int32 nLen2 = aLocaleNames.getLength();
- for (k = 0; k < nLen2; ++k)
+ SAL_WARN_IF(
+ aLocaleNames.hasElements() && !aLocations.hasElements(),
+ "lingucomponent", "no locations");
+ if (aLocations.hasElements())
{
- if (xAccess.is() && xAccess->exists(aLocations[k]))
+ if (xAccess.is() && xAccess->exists(aLocations[0]))
{
- aLocaleNamesSet.insert( aLocaleNames[k] );
+ sal_Int32 nLen2 = aLocaleNames.getLength();
+ for (k = 0; k < nLen2; ++k)
+ {
+ aLocaleNamesSet.insert( aLocaleNames[k] );
+ }
+ }
+ else
+ {
+ SAL_WARN(
+ "lingucomponent",
+ "missing <" << aLocations[0] << ">");
}
}
}