Issue 93203

Summary: Some of the OOo configuration elements are not updated synchronously using the API
Product: App Dev Reporter: Giuseppe Castagno (aka beppec56) <giuseppe.castagno>
Component: apiAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: cno, issues
Version: 3.3.0 or older (OOo)   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description Giuseppe Castagno (aka beppec56) 2008-08-28 12:30:54 UTC
It seems that some of the elements on the OOo configuration tree reachable by
API are not updated correctly on the rest of OOo application if changed through API.
To check, follow this sequence on OOo 2.4.1 with en-US user interface, operating
system Debian, en-US user interface on KDE desktop

1) check in Tools > Options – Load/Save – General – “Save†group, the  “Always
create backup copy†checkbox is unchecked.

2) check in Tools > Options – Language Settings – Languages – “Language ofâ€
group, the   “User interface†listbox is set to “Defaultâ€. The two listboxes
“Locale setting†and “Default currency†should be at “Defaultâ€
If not, then set all of them and restart OOo as appropriate.

3) use the following chunk of OOo macro code on 2.4.1 version and run it:

Sub Main
	GlobalScope.BasicLibraries.LoadLibrary("Tools")
	oTheConfigRoot = GetRegistryKeyContent("org.openoffice.Office.Common/", true)
	oTheConfigRoot.Save.Document.CreateBackup = true
	oTheConfigRoot.commitChanges()

	oTheSetupRoot = GetRegistryKeyContent("org.openoffice.Setup/", true)
	oTheSetupRoot.L10N.ooSetupSystemLocale = "it-IT"
	oTheSetupRoot.L10N.ooSetupCurrency = "EUR-it-IT"
	oTheSetupRoot.L10N.DecimalSeparatorAsLocale = true
	oTheSetupRoot.commitChanges()
End Sub

4) now check again the settings:
the one set in 1) above is unchanged, whereas it should have been checked,
the ones set in 2) are correctly changed:
The two listboxes “Locale setting†and “Default currency†are at “Italian
(Italy)†and “EUR € Italian (Itally)†as expected.

If you restart OOo the setting described in 1) above is shown correctly changed
to checked state.
In my opinion after the commitChanges() method returns, the setting described in
1) above should be changed as the other two, without the need to restart OOo.
Comment 1 jsc 2008-08-28 12:40:17 UTC
jsc -> pb: i am not 100% sure if you are responsible for this but you are at
least the master of the options dialog. 
Comment 2 cno 2008-08-29 14:25:16 UTC
also see http://www.openoffice.org/servlets/ReadMsg?list=dev&msgNo=18373
(and just reading a bit throught that thread, I see the related issue 71235 and
issue 71258 )
Comment 3 pb 2008-09-09 07:44:25 UTC
pb: accepted for 3.x.
Comment 4 Mathias_Bauer 2009-03-11 12:19:56 UTC
Taking over
Comment 5 Marcus 2017-05-20 11:27:30 UTC
Reset assigne to the default "issues@openoffice.apache.org".