To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=71235
                 Issue #|71235
                 Summary|changing a value in the global OOo-configuration via a
                        |pi has no effect when opening a new writer document du
                        |ring runtime
               Component|api
                 Version|OOo 2.0.3
                Platform|All
                     URL|
              OS/Version|Linux
                  Status|UNCONFIRMED
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|code
             Assigned to|jsc
             Reported by|clutz





------- Additional comments from [EMAIL PROTECTED] Mon Nov  6 01:11:30 -0800 
2006 -------
I change the value of the property "HiddenCharacter" of the nodpath
"/org.openoffice.Office.Writer/Content/NonprintingCharacter" in the global
OOo-configuration via api.

Since writer documents use a internal caching of configuration options bound to
the view, this changed value doesn't effect already opened writer documents, but
after opening a new document, the changed value should be reflected by the
"Tool->Options->Writer/ForrmattingAids/" dialog of the new document. But this is
NOT done at the moment!

Here is how to reproduce:

1) open a new writer document. 
2) open the dialog "Tool->Options->Writer/ForrmattingAids/" and set ("check")
the checkbox "HiddenCharacter" (I dont' know the exact label - translated from
german), so that hidden characters will be shown in the document.
3) run the below macro (which simply unsets the former setting in the global
configuration)
4) open a new writer document
5) open the dialog "Tool->Options->Writer/ForrmattingAids/HiddenCharacter" in
the menubar of the NEW document. The checkbox is still "checked", so step 3)
didn't has effect on new documents.

that's all. If you dont't belive my macro is workung you could additionally do
the following steps:

6) close all OOo-documents/windows/processes
7) open a new writer documents (check if OOos slashscreen was shown that
indicates a successfull restart)
8) look at "Tool->Options->Writer/ForrmattingAids/HiddenCharacter". The checkbox
is now UNchecked, so you can see that the below macro is working, but OOo simply
doesn't recognize the changed configuration value during runtime.

Here the code:

Sub setConfigOption
   dim args(1) as new com.sun.star.beans.PropertyValue
   args(0).name = "nodepath"
   args(0).value = "/org.openoffice.Office.Writer/Content/NonprintingCharacter"

       prov = 
createUnoService("com.sun.star.configuration.ConfigurationProvider")
       update =
prov.createInstanceWithArguments("com.sun.star.configuration.ConfigurationUpdateAccess",
args)

       update.HiddenCharacter = false
       update.commitChanges()

       update.dispose()
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