summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/gridwin4.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2011-11-03 22:05:12 -0400
committerKohei Yoshida <kohei.yoshida@suse.com>2011-11-04 22:40:26 -0400
commit54673798f3b765a71c7f0080c6449625782c6a9b (patch)
tree8f06a14b4000bd46c9b3d146c81c4b1cb838648e /sc/source/ui/view/gridwin4.cxx
parent34d77d7edf360c5ed1dbf5dd6e6f3a9803d7015a (diff)
Let's not use a hard-coded MAXQUERY all over the place.
For now, the maximum query size is determined by the size of the vector that holds the entries. For now, the size of the vector is fixed, and won't change. We may later work on making it dynamically sized, however...
Diffstat (limited to 'sc/source/ui/view/gridwin4.cxx')
-rw-r--r--sc/source/ui/view/gridwin4.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 9d35f84c5785..612763c9b209 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1182,7 +1182,8 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2
sal_Bool bColumnFound = false;
if (!pQueryParam->bInplace)
bSimpleQuery = false;
- for (nQuery=0; nQuery<MAXQUERY && bSimpleQuery; nQuery++)
+ SCSIZE nCount = pQueryParam->GetEntryCount();
+ for (nQuery = 0; nQuery < nCount && bSimpleQuery; ++nQuery)
if (pQueryParam->GetEntry(nQuery).bDoQuery)
{
// hier nicht auf EQUAL beschraenken
@@ -1330,7 +1331,8 @@ bool ScGridWindow::IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab )
// aQueryParam kann nur MAXQUERY Eintraege enthalten
- for ( nQuery=0; nQuery<MAXQUERY && bSimpleQuery; nQuery++ )
+ SCSIZE nCount = aQueryParam.GetEntryCount();
+ for (nQuery = 0; nQuery < nCount && bSimpleQuery; ++nQuery)
if ( aQueryParam.GetEntry(nQuery).bDoQuery )
{
if (aQueryParam.GetEntry(nQuery).nField == nCol)