Apache OpenOffice (AOO) Bugzilla – Issue 21860
Autorepeat to be added to Form Controls
Last modified: 2006-05-31 14:29:06 UTC
Hi, I thought I would suggest that autorepeat be added to the Form Controls that can have the property Spin=Yes. The controls which I have found so far that this could be added are: Date Field Time Field Numerical Field Currency Field Formatted Field This would then align the functionality of these controls with the new Spinbutton and Scrollbar controls. Thanks Kelvin
grabbing and confirming
fs->ssa: The VCL control (SpinField) already supports this. Since implementing issue 21277 and issue 21605 (scroll bar and spin button controls), our toolkit implementations *also* support this in general, so adding this functionality is really simple - I just have to declare that the respective control models should support this property. (Event better: It's equally simple to add this to button controls) However, there's one thing: To be consistent, it would make sense to also specify the repeat delay, which is used when keeping the mouse pressed over the spin buttons. This is what is available for scroll bars and spin buttons now, and would make a lot of sense for the other fields. The SpinField uses (like the SpinButton before) some hard-coded values for this delay. In opposite, the PushButton uses timeouts as specified in the MouseSettings. I would like to not only add the "Repeat" flag (which, as said, is trivial), but also the "Repeat Delay" setting. For this, we would need to teach the SpinField to (alternatively) get it's timeouts from the settings. What's your opinion about this? Should we simply change this for all SpinFields? Should we add an option to the SpinField. Should we do nothing at all and better not touch this control? (Would it influence your opinion if I'd tell that I'd be willing to do this change in VCL myself? :)
forgot to mention: The defaults for the delay in the settings are 370/50 (the first is the timeout until the very first repeat, the second the time between succeeding repeats), for SpinFields, values of 280/60 are hard-coded. So, IMO, it wouldn't change very much if we *always* use the settings ...
Using the settings and getting rid of hard coded timings is always a good thing to do - implementing it by yourself is even better (hey, it's open source after all...) I don't see any problems in this extension and I don't think we should make it optional. As I understand, you just want to use the same timings as for scrollbars and spinbuttons, right ? Perhaps MT has an idea where those hard coded constants came from, but if it's still usable do it.
Created attachment 10784 [details] suggested patch to SpinField class
talked with MT, he can't imagine any reason why the hard coded values were there. SO I'm going to apply to attached patch to spinfld.cxx. Thanks Stephan!
added fix (actually only a few lines besides the patch attached here) to CWS frmcontrols01.
fs->clu: please verify in CWS frmcontrols01
verified in cws
verified
verified in master (680m19-1) available in next outcomming version
change subcomponent to 'none'