Apache OpenOffice (AOO) Bugzilla – Issue 21614
spin buttons: allow for horizontal orientation
Last modified: 2004-12-30 08:32:47 UTC
In the course of issue 21605, we will offer the possibility to include spin button form controls into documents. There already is a VCL control which implements a spin button (SpinButton, spin.hxx/spinbtn.cxx), but it currently lacks a feature which is needed for the new control: It must be able to have a horizontal orientation, instead of always being vertically oriented.
accepted
Created attachment 10737 [details] suggested patch
fs->ssa: I noticed that some code for horizontal orientation is already there, despite what I originally said. So I could not resist tampering with this myself :). The attached patch does a number of things: - it introduces value handling for the spin button. This is completely independent on this bug here, I planned to introduce this, anyway. I think it can go into this base class (instead of deriving), at least because this class is nowhere used at the moment. - the spin button doesn't use hard-coded repeat delays anymore, but uses the MouseSettings, like it is done in scroll bars and push buttons, too. This is also independent on this bug, and was planned, anyway. For the same reason as above (nobody used this class so far), I consider this no harm. - The spin button now reacts on changes in the WB_HSCROLL and WB_REPEAT style, adjusing it's look/behaviour. Formerly, they were evaluated in the ctor only, and thus could not be changed afterwards. - it introduces a new boolean parameter bMirrorHorz at ImplDrawSpinButton. This was necessary since when drawing horizontally, the routine associated "up" with "left" and "down" with "right". This is surely not expectation conformant for a horizontal spin button, which should be similar to e.g. scroll bars. However, since the behaviour was used for (vertical) tool boxes, it cannot simply be changed, thus the extra parameter, which now is used by the SpinButton. Again, this should not have negative impact, since this function is used inside VCL only, according to http://ooo.ximian.com/lxr/ident?i=ImplDrawSpinButton.
Created attachment 10738 [details] suggested patch (now really)
Stephan, do you mind reviewing the patch? If it finds your mercy, I would grab this issue and check in the changes into my CWS.
grabbing the issue (after a off-line approval)
fixed in CWS frmcontrols01. SSA brought up the question about the accessibility of this new control - this will be clarified separately
verified in final CWS build
fix verified in 680 m66