To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=72559





------- Additional comments from [EMAIL PROTECTED] Tue Aug 14 10:59:12 +0000 
2007 -------
DicOOo creates an entry in linguistic.xcu as an attempt to activate newly
installed dictionaries

The isAdmin is true if share layer is writable so it may mead to true under
windows. Then the providerService points to nthe share layer and then trying to
access /org.openoffice.Office.Linguistic/ creates it ?

the problem is that the problem is not systematic, so i don not see this as a
flaw in the routine, but feel free to point me on any problem

here is the code

sub WriteLinguisticSettings(language, country, dictype)

' check for access level
if isAdmin then
        providerService = "com.sun.star.configuration.AdministrationProvider"
else
        providerService = "com.sun.star.configuration.ConfigurationProvider"
endif

'create registry configuration access service
Dim aSettings, aConfigProvider
Dim aParams2(0) As new com.sun.star.beans.PropertyValue
aConfigProvider = createUnoService(providerService)
aParams2(0).Name = "nodepath"
aParams2(0).Value = "/org.openoffice.Office.Linguistic/"
aSettings = aConfigProvider.createInstanceWithArguments(
"com.sun.star.configuration.ConfigurationUpdateAccess", aParams2() )

locale = language + "-" + country

select case dictype
   case "DICT"
                settingObject = aSettings.servicemanager.spellcheckerlist
                settingLastObject =  
aSettings.servicemanager.LastFoundSpellCheckers
                service = "org.openoffice.lingu.MySpellSpellChecker"    
   case "HYPH"
                settingObject = aSettings.servicemanager.hyphenatorlist
                settingLastObject =  
aSettings.servicemanager.LastFoundHyphenators
                service = "org.openoffice.lingu.LibHnjHyphenator"
   case "THES"
                settingObject = aSettings.servicemanager.thesauruslist
                settingLastObject =  aSettings.servicemanager.LastFoundThesauri
                if OOoVersion < 190 then
                        service = "org.openoffice.lingu.basic.Thesaurus"
                else
                        service = "org.openoffice.lingu.new.Thesaurus"  
                endif   
end select

if settingObject.hasByName(locale) then
        settingObject.replaceByName(locale, service)
else
        settingObject.insertByName(locale, service)
endif

aSettings.commitChanges()

if settingLastObject.hasByName(locale) then
        settingLastObject.replaceByName(locale, service)
else
        settingLastObject.insertByName(locale, service)
endif

' force to re-eveluate the whole linguistic.xcu file
aSettings.servicemanager.DataFilesChangedCheckValue = -1

aSettings.commitChanges()

end sub

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to