[Libreoffice-commits] .: 2 commits - sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Tue Feb 1 22:01:59 PST 2011
sc/source/ui/dbgui/fieldwnd.cxx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 3722370b9ba57cce28c3dbc182f2d011f3c5596b
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Wed Feb 2 01:01:19 2011 -0500
Prevent selected field index from going out-of-bound, to prevent crash.
diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx
index f4e96d3..5f401e6 100644
--- a/sc/source/ui/dbgui/fieldwnd.cxx
+++ b/sc/source/ui/dbgui/fieldwnd.cxx
@@ -637,8 +637,10 @@ void ScDPFieldControlBase::SetSelection(size_t nIndex)
if (rFields.empty())
return;
- if( mnFieldSelected >= rFields.size() )
- mnFieldSelected = rFields.size() - 1;
+ if (nIndex >= rFields.size())
+ // Prevent it from going out-of-bound.
+ nIndex = rFields.size() - 1;
+
if( mnFieldSelected != nIndex )
{
size_t nOldSelected = mnFieldSelected;
commit 9c3b635bce41f1d9b74cb4364a425ae9448fc4e4
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Wed Feb 2 00:37:48 2011 -0500
Ensure that the selected field is displayed when the selection moves.
In the DataPilot main dialog, Set the selected field in the data
select area to the one at the lower right corner, and press 'r' to
move it to the Row field. This causes the selection to move to the
next field in the select area, but the selected button was not shown.
diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx
index 7f3b1da..f4e96d3 100644
--- a/sc/source/ui/dbgui/fieldwnd.cxx
+++ b/sc/source/ui/dbgui/fieldwnd.cxx
@@ -648,6 +648,8 @@ void ScDPFieldControlBase::SetSelection(size_t nIndex)
if (HasFocus())
FieldFocusChanged(nOldSelected, mnFieldSelected);
}
+
+ ScrollToShowSelection();
}
void ScDPFieldControlBase::SetSelectionHome()
More information about the Libreoffice-commits
mailing list