Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | SQL editor: all text selected when window recivies focus | ||||||
---|---|---|---|---|---|---|---|
Product: | Base | Reporter: | Ariel Constenla-Haile <arielch> | ||||
Component: | code | Assignee: | marc.neumann | ||||
Status: | CLOSED FIXED | QA Contact: | issues@dba <issues> | ||||
Severity: | Trivial | ||||||
Priority: | P3 | CC: | frank.schoenheit, issues, max.odendahl | ||||
Version: | DEV300m37 | Keywords: | usability | ||||
Target Milestone: | OOo 3.1 | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Issue Type: | PATCH | Latest Confirmation in: | --- | ||||
Developer Difficulty: | --- | ||||||
Attachments: |
|
Description
Ariel Constenla-Haile
2008-12-09 00:20:33 UTC
mod->fs: this behaviour has been like that since the beginning of time, there is extra code so it behaves that way, but I don't know the reason for that. If you agree this change would be a good one, I can still do it as a bug fix for 3.1 fs->mod: I think it would be a change to the better. However, one needs to be careful that really only the SQL view is affected. Where's the code for selecting everything? In dbaccess, or some base class? mod->fs: seems like I remembered wrong about the extra code, this behaviour is enabled for all MultiLineEdits But all we have to do is call EnableFocusSelectionHide(true) in our sqledit constructor object and all should be fine. Would you integrate into some dba31* cws? Just attach a patch, and I'll commit to CWS dba31g fs->mod: you volunteered, so you should own it :) Thanks. mod->fs: m37 is broken for me, I can't package it, so I could not verify the patch, but I think it should do the trick Created attachment 58683 [details]
patch
sadly, this patch doesn't work (in that it simply doesn't have the desired result). Looking into TextWindow::GetFocus, I think it's mbFocusSelectionHide you need to affect. This variable controls whether the selection is hidden when the control does not have the focus, and as a side effect, it also controls whether or not the complete text is selected when the control gains the focus. Perhaps a better solution, instead of working around the TextWindow's strange mixture of the "hide selection on un-focus" with the "select all on focus" concepts, it would be better to - introduce a SELECTION_OPTION_SELECT_ALL_ON_FOCUS in vcl's settings.hxx - set this bit by default when constructing a StyleSettings instance - reset this bit in the OSqlEdit's constructor - respect this flag in TextWindow::GetFocus At least this would be the cleanest way, IMO. >>mbFocusSelectionHide you need to affect
EnableFocusSelectionHide() does affect exactly this variable...but if it does
not work....
No time to debug, as I am very busy right now with other stuff, this must be
postponed then :-(
EnableFocusSelectionHide(false) instead of EnableFocusSelectionHide(true) does the trick :) ... committed to CWS dba31g, thanks for the patch! fixed in CWS dba31g find more information about this CWS, like when it is available in the master builds, in EIS, the Environment Information System: http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=DEV300%2Fdba31g enable and hide in the same name and having a boolean variable should be forbidden ;-) thanks fs for integrating > enable and hide in the same name and having a boolean variable should be
> forbidden ;-)
indeed ....
fs->msc: please verify in CWS dba31g verified in CWS dba31g find more information about this CWS, like when it is available in the master builds, in EIS, the Environment Information System: http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=DEV300%2Fdba31g Hi, this is fixed in master OOO310_m2. I close this issue now. Bye Marc |