diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-11-03 22:05:12 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-11-04 22:40:26 -0400 |
commit | 54673798f3b765a71c7f0080c6449625782c6a9b (patch) | |
tree | 8f06a14b4000bd46c9b3d146c81c4b1cb838648e /sc/source/ui/vba | |
parent | 34d77d7edf360c5ed1dbf5dd6e6f3a9803d7015a (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/vba')
-rw-r--r-- | sc/source/ui/vba/vbarange.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 0fb69e0134c8..3373263a312c 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -4407,7 +4407,7 @@ void lcl_SetAllQueryForField( ScQueryParam& aParam, SCCOLROW nField ) { bool bFound = false; SCSIZE i = 0; - for (; i<MAXQUERY && !bFound; i++) + for (; i < aParam.GetEntryCount() && !bFound; ++i) { ScQueryEntry& rEntry = aParam.GetEntry(i); if ( rEntry.nField == nField) @@ -4764,8 +4764,7 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const { // find the any field with the query and select all ScQueryParam aParam = lcl_GetQueryParam( pShell, nSheet ); - SCSIZE i = 0; - for (; i<MAXQUERY; i++) + for (SCSIZE i = 0; i< aParam.GetEntryCount(); ++i) { ScQueryEntry& rEntry = aParam.GetEntry(i); if ( rEntry.bDoQuery ) |