Eike Rathke wrote: > Summary: > > - Framework sets fcfg_calc_filters.xcu UserData as FilterData property. > - User may set FilterOptions property, for example in a macro. > - ScFilterOptionsObj::execute() processing: > - IF FilterOptions set: > - use FilterOptions to initialize dialog settings. > - ELSE IF optional other application configuration's presets may > define dialog settings: > - use those > - ELSE IF FilterData set: > - use FilterData to initialize dialog settings. > - ELSE > - use application's defaults. > - set FilterOptions from dialog values. > - process filter. > > Does that make sense?
The "userdata" property in the xcu file is something I wouldn't use for this purpose but as the filter is free to use this field as it likes it's up to you to decide. I would do it like this: (1) Check for FilterOptions or FilterData If one of them is set -> use it. If both are set -> error. (2) Check the configuration settings for your "userdata", whereever you have stored it, either in filter xcu or somewhere else. Use this data. The dialog is used only to give the user a chance to overwrite the configuration data from step (2). It will be called through an API that is under control of SFX and SFX will do it only if the loading process happens under UI control, not if loading is done via API without explicit permission to show dialogs. SFX will also not show the dialog if FilterData or FilterOptions are set. In case the dialog is executed it should be initialized with the data from the configuration and the filter should proceed with what the dialog returns. Wether you store any changes made in the dialog in configuration is up to you. Best regards, 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]