summaryrefslogtreecommitdiffstats
path: root/svx/source/dialog/langbox.cxx
diff options
context:
space:
mode:
authorThomas Lange <tl@openoffice.org>2001-06-13 11:31:52 +0000
committerThomas Lange <tl@openoffice.org>2001-06-13 11:31:52 +0000
commitd5cc876f6f8304701c4e347f21e0fb80b9554c3d (patch)
treea860bdf6fe569be4485380ce3cba05b0099d3b1a /svx/source/dialog/langbox.cxx
parent#85243# SvxGetSelectableLanguages and SvxGetLanguagePos removed from dead code (diff)
downloadcore-d5cc876f6f8304701c4e347f21e0fb80b9554c3d.tar.gz
core-d5cc876f6f8304701c4e347f21e0fb80b9554c3d.zip
#85243# SvxGetSelectableLanguages replaced
Diffstat (limited to 'svx/source/dialog/langbox.cxx')
-rw-r--r--svx/source/dialog/langbox.cxx22
1 files changed, 13 insertions, 9 deletions
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index 7f9bbab2b441..3ae7c18ca77d 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: langbox.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: er $ $Date: 2001-06-12 15:06:00 $
+ * last change: $Author: tl $ $Date: 2001-06-13 12:31:52 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -356,18 +356,22 @@ USHORT SvxLanguageBox::InsertLanguage( const LanguageType nLangType, USHORT nPos
USHORT nAt = 0;
if ( m_bWithCheckmark )
{
- const USHORT nLanguageCount = SvxGetSelectableLanguages().getLength();
- const Language* pLangList = SvxGetSelectableLanguages().getConstArray();
sal_Bool bFound = sal_False;
- for ( USHORT i = 0; i < nLanguageCount; ++i )
+ Reference< XSpellChecker1 > xSpell( SvxGetSpellChecker(), UNO_QUERY );
+ if (xSpell.is())
{
- if ( nLangType == pLangList[i] )
+ Sequence< INT16 > aLang( xSpell->getLanguages() );
+ const USHORT nLanguageCount = aLang.getLength();
+ const Language* pLangList = aLang.getConstArray();
+ for ( USHORT i = 0; i < nLanguageCount; ++i )
{
- bFound = sal_True;
- break;
+ if ( nLangType == pLangList[i] )
+ {
+ bFound = sal_True;
+ break;
+ }
}
}
-
if ( !bFound )
nAt = InsertEntry( aStrEntry, m_aNotCheckedImage, nPos );
else