diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2011-03-24 01:54:19 -0400 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2011-03-24 01:54:19 -0400 |
commit | 1bc121be4f4f24160d962ab0f7e266a73ae6b5bf (patch) | |
tree | 023cf9a3a08da754227af271e89be5127254a859 /sc/source/ui/dbgui/tpsubt.cxx | |
parent | ScDBData now stores ScSubTotalParam as member. (diff) | |
download | core-1bc121be4f4f24160d962ab0f7e266a73ae6b5bf.tar.gz core-1bc121be4f4f24160d962ab0f7e266a73ae6b5bf.zip |
Select the first checked position. (fdo#31220)
The dialog appears less confusing this way.
Diffstat (limited to 'sc/source/ui/dbgui/tpsubt.cxx')
-rw-r--r-- | sc/source/ui/dbgui/tpsubt.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx index 250c35793e31..ee7e31f72e67 100644 --- a/sc/source/ui/dbgui/tpsubt.cxx +++ b/sc/source/ui/dbgui/tpsubt.cxx @@ -172,6 +172,7 @@ bool ScTpSubTotalGroup::DoReset( sal_uInt16 nGroupNo, aLbGroup.SelectEntryPos( GetFieldSelPos( nField )+1 ); + sal_uInt16 nFirstChecked = 0; for ( sal_uInt16 i=0; i<nSubTotals; i++ ) { sal_uInt16 nCheckPos = GetFieldSelPos( pSubTotals[i] ); @@ -179,8 +180,12 @@ bool ScTpSubTotalGroup::DoReset( sal_uInt16 nGroupNo, aLbColumns.CheckEntryPos( nCheckPos ); *pFunction = FuncToLbPos( pFunctions[i] ); + + if (i == 0 || (i > 0 && nCheckPos < nFirstChecked)) + nFirstChecked = nCheckPos; } - aLbColumns.SelectEntryPos( 0 ); + // Select the first checked field from the top. + aLbColumns.SelectEntryPos(nFirstChecked); } else { |