sc/source/ui/cctrl/checklistmenu.cxx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
New commits: commit 0770e163ecf753004f73273f6caf060a02b65173 Author: Kohei Yoshida <kohei.yosh...@gmail.com> Date: Fri Nov 2 15:27:27 2012 -0400 Set initial focus to the check list box. This is so that when launching the autofilter popup via key stroke, the user can immediately type-ahead to find a match within the check list box. Change-Id: I8a33a52afc6005b4a7428d5f7046eff986da80d2 diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index 4a4066b..96708d5 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -1368,6 +1368,7 @@ void ScCheckListMenuWindow::launch(const Rectangle& rRect) } StartPopupMode(aRect, (FLOATWIN_POPUPMODE_DOWN | FLOATWIN_POPUPMODE_GRABFOCUS)); + cycleFocus(); // Set initial focus to the check list box. } void ScCheckListMenuWindow::close(bool bOK) commit e3250b90677fc7ae449cb3ff887ed3da35b4532f Author: Kohei Yoshida <kohei.yosh...@gmail.com> Date: Fri Nov 2 15:21:41 2012 -0400 Enable "type-ahead" search in the check list box in the autofilter popup. Many people have asked me for this. This is also enabled in the pivot table field popup (since the two basically share the same code). Change-Id: I99255839353d62c0760dd4f3a66cc7e9924ce1c3 diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index 7d30e02..4a4066b 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -914,6 +914,9 @@ ScCheckListMenuWindow::ScCheckListMenuWindow(Window* pParent, ScDocument* pDoc) maTabStopCtrls.push_back(&maBtnUnselectSingle); maTabStopCtrls.push_back(&maBtnOk); maTabStopCtrls.push_back(&maBtnCancel); + + // Enable type-ahead search in the check list box. + maChecks.SetStyle(maChecks.GetStyle() | WB_QUICK_SEARCH); } ScCheckListMenuWindow::~ScCheckListMenuWindow() commit 94fdd16062ca6fae8e18352ae0a7547e6b65fd61 Author: Kohei Yoshida <kohei.yosh...@gmail.com> Date: Fri Nov 2 14:51:35 2012 -0400 Launch pop-up right-aligned in case the cell is wider than the popup. Or else the popup and the popup button would get separated. Change-Id: I4c8dda2bf5cebe0fe0e0ce64c9c213e2926d9570 diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index d82329d..7d30e02 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -1354,7 +1354,17 @@ void ScCheckListMenuWindow::launch(const Rectangle& rRect) // We need to have at least one member selected. maBtnOk.Enable(maChecks.GetCheckedEntryCount() != 0); - StartPopupMode(rRect, (FLOATWIN_POPUPMODE_DOWN | FLOATWIN_POPUPMODE_GRABFOCUS)); + Rectangle aRect(rRect); + if (maWndSize.Width() < aRect.GetWidth()) + { + // Target rectangle (i.e. cell width) is wider than the window. + // Simulate right-aligned launch by modifying the target rectangle + // size. + long nDiff = aRect.GetWidth() - maWndSize.Width(); + aRect.Left() += nDiff; + } + + StartPopupMode(aRect, (FLOATWIN_POPUPMODE_DOWN | FLOATWIN_POPUPMODE_GRABFOCUS)); } void ScCheckListMenuWindow::close(bool bOK) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits