Forum at OOoForum.orgThe Forum
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

[OLE] Spellcheck issues using Swedish dictionary

Post new topic   Reply to topic Forum Index -> Macros and API
View previous topic :: View next topic  
Author Message

Joined: 30 Dec 2010
Posts: 2

PostPosted: Thu Dec 30, 2010 3:12 am    Post subject: [OLE] Spellcheck issues using Swedish dictionary Reply with quote

Hi! I've been developing a PowerBuilder application which used OpenOffice for spellchecking of text in a text box. I've created a locale and used this to set up the spellchecker as follows:


string ls_exceptionMsg, ls_language, ls_dialect, ls_variant

ls_language = "sv"
ls_dialect = "SE"
ls_variant = ""

OLEObject lo_locale
lo_localClass = io_coreReflection.forName( '')
lo_localClass.CreateObject( REF lo_locale )

lo_locale.Language = ls_language
lo_locale.Country = ls_dialect
lo_locale.Variant = ls_variant

OLEObject lo_propertyValue[]
io_propertyClass.CreateObject(REF lo_propertyValue[1])

OLEObject lo_LSM
lo_LSM = io_servicemanager.CreateInstance("")

OLEObject lo_spellchecker
lo_spellchecker = lo_LSM.getspellchecker()

any la_tempReturn

//Simple test to check spellchecker is set up correctly
la_tempReturn = lo_spellchecker.spell( "bol" ,lo_locale , lo_propertyValue)
IF NOT isValid(la_tempReturn) THEN

The above code also does a quick spellcheck test with the string "bol" which is not a valid word. The code works perfectly (i.e. does not return FAILURE) if the language string used is "en" with country code "US", but "sv" "SE" does not. I've checked the word "bol" in the OpenOffice software and the spellchecker makes about 10 word suggestions in Swedish.

I've checked with the ISO codes I found in another thread and "sv" "SE" is the right combination for Swedish, and I've also followed this thread: and ensured that my dictionary is correctly installed and configured.

What might the problem be?

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Forum Index -> Macros and API All times are GMT - 8 Hours
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group