From 54673798f3b765a71c7f0080c6449625782c6a9b Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Thu, 3 Nov 2011 22:05:12 -0400 Subject: 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... --- sc/source/ui/view/gridwin4.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sc/source/ui/view/gridwin4.cxx') 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; nQueryGetEntryCount(); + 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