Re: [dev] changing the OOo-Configuration via API has no effect during runtime
Niklas Nebel wrote: > Mathias Bauer wrote: >> Are you sure that it doesn't affect even new documents you create later? >> Then it would be a bug (Writer having a cached value that doesn't react >> on changes of the configuration) and you should create an issue. > > One may call it a bug, but it's not surprising. When the old "config > items" were changed to read their values from the configuration, proper > notification wasn't added in most places. It was something to be added > "later", and we all know how "later" never comes. Absolutely. I know how these bugs have been introduced but OTOH I think we should fix them. We already added a lot of notifications or even removed the famous ConfigItem classes and IMHO we should continue to do so. That's the reason why I want to have issues when somebody stumbles over missing notifications. At least for the project's I feel responsible for. :-) Ciao, Mathias -- Mathias Bauer - OpenOffice.org Application Framework Project Lead Please reply to the list only, [EMAIL PROTECTED] is a spam sink. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] changing the OOo-Configuration via API has no effect during runtime
Hi Frank, Hi Peter, thanks for your answers! > I will try to find how to change the view setting, but I still would > be glad if somebody else could give me a hint. viewsetting = thiscomponent.getCurrentController().getViewSettings() gives you the view settings. There is a "ShowHiddenParagraphs" (In UI: Fields: Hidden paragraphs) property and a "ShowHiddenText" property (In UI: Fields: Hidden text). But the "hidden characters" property seems to be missing. Please submit an issue for this. see http://qa.openoffice.org/issues/show_bug.cgi?id=71258 best regards, Christoph - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] changing the OOo-Configuration via API has no effect during runtime
Peter Eberlein schrieb: Hi Christoph, There are some single properties, e.g. "ShowBreaks", "ShowParaBreaks", "ShowSpaces" you can turn on or off. There is no "one for all" property. Sorry, misunderstood, Frank has answered it yet. Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] changing the OOo-Configuration via API has no effect during runtime
Hi Christoph, Christoph Lutz schrieb: Hi, So I would expect an option like "ShowHiddenCharacters", in the ViewSettings, but there is no such option. I can remember that the support of HiddenCharacters is a feature that is much younger than other features in ViewSettings. So could it be that the current implementation of a "ShowHiddenCharacters" option (somewhere else) is not conform the idea of ViewSettings? There are some single properties, e.g. "ShowBreaks", "ShowParaBreaks", "ShowSpaces" you can turn on or off. There is no "one for all" property. Regards Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] changing the OOo-Configuration via API has no effect during runtime
Hi Christoph, On 11/06/06 10:44, Christoph Lutz wrote: I will try to find how to change the view setting, but I still would be glad if somebody else could give me a hint. viewsetting = thiscomponent.getCurrentController().getViewSettings() gives you the view settings. There is a "ShowHiddenParagraphs" (In UI: Fields: Hidden paragraphs) property and a "ShowHiddenText" property (In UI: Fields: Hidden text). But the "hidden characters" property seems to be missing. Please submit an issue for this. Hope this help, Frank - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] changing the OOo-Configuration via API has no effect during runtime
Hi, > I don't know the API to change the corresponding setting at the > document, sorry. Perhaps somebody else does. I will try to find how to change the view setting, but I still would be glad if somebody else could give me a hint. The Controller (ThisComponent.currentController) of the document has a property "ViewSettings" (a com.sun.star.text.ViewSettings service) which provides access to a lot of these "show*"-Options (e.g. "ShowHiddenParagraphs"). there is also one option called "ShowHiddenText", but this option corresponds to "Tools->Options/Writer/FormattingAids/(show)Textfields: HiddenText" and not to "(show) Hidden Characters". So I would expect an option like "ShowHiddenCharacters", in the ViewSettings, but there is no such option. I can remember that the support of HiddenCharacters is a feature that is much younger than other features in ViewSettings. So could it be that the current implementation of a "ShowHiddenCharacters" option (somewhere else) is not conform the idea of ViewSettings? Any Ideas where else such an option could be found? Is it possible that the current implementation of the Controller doen't provide an API access to the searched option/property "ShowHiddenCharacter"? regards, Christoph - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] changing the OOo-Configuration via API has no effect during runtime
Mathias Bauer wrote: Are you sure that it doesn't affect even new documents you create later? Then it would be a bug (Writer having a cached value that doesn't react on changes of the configuration) and you should create an issue. One may call it a bug, but it's not surprising. When the old "config items" were changed to read their values from the configuration, proper notification wasn't added in most places. It was something to be added "later", and we all know how "later" never comes. Niklas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] changing the OOo-Configuration via API has no effect during runtime
Hi Matthias, Are you sure that it doesn't affect even new documents you create later? Then it would be a bug (Writer having a cached value that doesn't react on changes of the configuration) and you should create an issue. I checked this and it is a bug --> #71235 If it only doesn't affect the current (or other already opened) documents the reason is that this is a document setting that is read from the configuration and set when the document is created. This happens with quite a lot of view settings in Writer. If you switch it on in the GUI it will be applied to both the configuration (that's what you did in your macro) *and* the view settings of the current document thanks for the explanation. This helpes to understand the behaviour! I don't know the API to change the corresponding setting at the document, sorry. Perhaps somebody else does. I will try to find how to change the view setting, but I still would be glad if somebody else could give me a hint. thangs and best regards, Christoph - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [dev] changing the OOo-Configuration via API has no effect during runtime
Christoph Lutz wrote: > Hi, I would like to change a value of > "Tool->Options->Writer/ForrmattingAids/(show)Hidden Characters" in a > programmatic way. This is done by the macro (below), but after running > the code, the Tools->Options Dialog doesn't reflect the change. Only > after closing all office-processes and restarting the writer process, > the changed value could be seen in the dialog (so the macro is > working, but the changes don't have effect during runtime). > > Here is 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 > > So I Assume that there is jus some kind of refresh missing. Could you > give me a hint, which component has to be refreshed or what I can do > that my macro has effect during runtime? Are you sure that it doesn't affect even new documents you create later? Then it would be a bug (Writer having a cached value that doesn't react on changes of the configuration) and you should create an issue. If it only doesn't affect the current (or other already opened) documents the reason is that this is a document setting that is read from the configuration and set when the document is created. This happens with quite a lot of view settings in Writer. If you switch it on in the GUI it will be applied to both the configuration (that's what you did in your macro) *and* the view settings of the current document I don't know the API to change the corresponding setting at the document, sorry. Perhaps somebody else does. Ciao, Mathias -- Mathias Bauer - OpenOffice.org Application Framework Project Lead Please reply to the list only, [EMAIL PROTECTED] is a spam sink. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[dev] changing the OOo-Configuration via API has no effect during runtime
Hi, I would like to change a value of "Tool->Options->Writer/ForrmattingAids/(show)Hidden Characters" in a programmatic way. This is done by the macro (below), but after running the code, the Tools->Options Dialog doesn't reflect the change. Only after closing all office-processes and restarting the writer process, the changed value could be seen in the dialog (so the macro is working, but the changes don't have effect during runtime). Here is 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 So I Assume that there is jus some kind of refresh missing. Could you give me a hint, which component has to be refreshed or what I can do that my macro has effect during runtime? thanks and best regards, Christoph - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]