You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ha...@apache.org on 2016/09/23 12:26:31 UTC
svn commit: r1762054 -
/openoffice/trunk/main/lingucomponent/source/spellcheck/spell/sspellimp.cxx
Author: hanya
Date: Fri Sep 23 12:26:31 2016
New Revision: 1762054
URL: http://svn.apache.org/viewvc?rev=1762054&view=rev
Log:
#i127071# Fix illegal index on locations of spell cheker dictionary
Modified:
openoffice/trunk/main/lingucomponent/source/spellcheck/spell/sspellimp.cxx
Modified: openoffice/trunk/main/lingucomponent/source/spellcheck/spell/sspellimp.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/lingucomponent/source/spellcheck/spell/sspellimp.cxx?rev=1762054&r1=1762053&r2=1762054&view=diff
==============================================================================
--- openoffice/trunk/main/lingucomponent/source/spellcheck/spell/sspellimp.cxx (original)
+++ openoffice/trunk/main/lingucomponent/source/spellcheck/spell/sspellimp.cxx Fri Sep 23 12:26:31 2016
@@ -179,14 +179,23 @@ Sequence< Locale > SAL_CALL SpellChecker
std::list< SvtLinguConfigDictionaryEntry >::const_iterator aDictIt;
for (aDictIt = aDics.begin(); aDictIt != aDics.end(); ++aDictIt)
{
- uno::Sequence< rtl::OUString > aLocaleNames( aDictIt->aLocaleNames );
uno::Sequence< rtl::OUString > aLocations( aDictIt->aLocations );
- sal_Int32 nLen2 = aLocaleNames.getLength();
- for (k = 0; k < nLen2; ++k)
+ if ( xAccess.is() && aLocations.getLength() )
{
- if (xAccess.is() && xAccess->exists(aLocations[k]))
+ sal_Bool bAllFileExists = sal_False;
+ sal_Int32 nLength = aLocations.getLength();
+ for (sal_Int32 i = 0; i < nLength; ++i)
{
- aLocaleNamesSet.insert( aLocaleNames[k] );
+ bAllFileExists |= xAccess->exists( aLocations[i] );
+ }
+ if ( bAllFileExists )
+ {
+ uno::Sequence< rtl::OUString > aLocaleNames( aDictIt->aLocaleNames );
+ sal_Int32 nLen2 = aLocaleNames.getLength();
+ for (k = 0; k < nLen2; ++k)
+ {
+ aLocaleNamesSet.insert( aLocaleNames[k] );
+ }
}
}
}