Issue 71235 - Writer having a cached value that doesn't react on changes of the configuration
Summary: Writer having a cached value that doesn't react on changes of the configuration
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOo 2.0.3
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: stefan.baltzer
QA Contact: issues@sw
Depends on:
Reported: 2006-11-06 09:11 UTC by clutz
Modified: 2013-08-07 14:42 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

Sample document with macro to demonstrate the fix (7.56 KB, application/octet-stream)
2007-05-21 16:43 UTC, thomas.lange
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description clutz 2006-11-06 09:11:30 UTC
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
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
   args(0).name = "nodepath"
   args(0).value = "/org.openoffice.Office.Writer/Content/NonprintingCharacter"

       prov = createUnoService("")
       update =

       update.HiddenCharacter = false

End Sub
Comment 1 clutz 2006-11-06 09:19:20 UTC
changed the subject
Comment 2 jsc 2006-11-06 09:43:39 UTC
jsc -> tl: can you please check this, it seems to be a missing listener or
something like that. I would agree that at least when opening a document the
changes should be noticed.
Comment 3 Mathias_Bauer 2006-11-07 16:52:57 UTC
While we are at it: perhaps there are more missing listeners for Writer view
Comment 4 Mathias_Bauer 2006-11-07 16:53:20 UTC
adjusting target
Comment 5 clutz 2006-11-08 08:34:02 UTC
what about the options in "Tools->AutoCorrect..."? 

I currently tested the property ENABLED in the config-node
/org.openoffice.Office.Writer/AutoFunction/Format/ByInput/ApplyNumbering and the
changed value is not applied in a new created textdocument, too. Is this worth a
separate issue?
Comment 6 Mathias_Bauer 2006-11-17 11:16:19 UTC
Comment 7 Oliver Specht 2007-02-09 11:24:27 UTC
The class SwContentViewConfig needs to call EnableNotification() in it's Ctor
and has to overload ::Notify() to call Load().

BTW the other three ConfigItems in the same file need the same modifications.
Comment 8 thomas.lange 2007-02-09 11:26:33 UTC
Comment 9 thomas.lange 2007-02-09 14:34:28 UTC
Fixed in CWS tl37.

Files changed:
- sw/source/ui/config/usrpref.cxx
- sw/source/ui/inc/usrpref.hxx
Comment 10 clutz 2007-03-16 10:37:35 UTC
could you please set a target milestone?
Comment 11 Mathias_Bauer 2007-04-05 17:22:04 UTC
Thomas, is this going to be integrated into a CWS planned for 2.3?
Comment 12 thomas.lange 2007-04-11 09:34:27 UTC
TL->MBA: Currently the CWS tl37 has no target assigned.
If like to have OOo 2.3 as target I can change it accordingly.
Comment 13 thomas.lange 2007-04-24 08:14:07 UTC
Comment 14 thomas.lange 2007-05-21 16:43:05 UTC
Created attachment 45298 [details]
Sample document with macro to demonstrate the fix
Comment 15 thomas.lange 2007-05-21 16:48:14 UTC
TL->MRU: you may either check this one yourself by using the macro in the
attached document or pass this one to CN or SG.
The checkbox mention in the text above is named "Hidden Text" in the English UI.
Comment 16 michael.ruess 2007-06-07 15:47:42 UTC
Reassigned to SBA.
Comment 17 stefan.baltzer 2007-06-22 14:08:04 UTC
SBA: Verified in CWS tl37.
Comment 18 stefan.baltzer 2007-09-18 15:06:42 UTC
SBA: OK in OOG680_m5 (OOo 2.3). Closed.