On Fri, 2007-06-22 at 17:16 +0800, gaozm wrote: > Hello Kohei: > I'm Gao Zemin, about issue27745, I think it should related with the > following file, sc/source/core/data/column3.cxx, void > ScColumn::GetFilterEntries(SCROW nStartRow, SCROW nEndRow, > TypedStrCollection& rStrings), Do you think this is correct? > I hope you can give me some suggestion that how to fix this issue, thank > you very much!
Ok. I just read through the neighboring code of ScColumn::GetFilterEntries, which is ultimately called from ScGridWindow::DoAutoFilterMenue. And my answer will be "Yes", in the sense that you'll eventually need to touch this function as part of your fix. However, be aware of what Eike says in the issue: http://www.openoffice.org/issues/show_bug.cgi?id=27745#desc10 The major difference is that, Excel seems to build the filter value list in steps, one column at a time, as it applies filtering to each column in order. But Calc builds the value list for each column individually, and each column has no information as to what rows has already been filtered by the previous columns. To do that, the information for each filtered column needs to be stored internally in sorted order (in the order they were applied), and use that information when building a value list for a new column that's not yet filtered. And that can be tricky. So, you would probably need to first examine how Excel does it, under different scenarios, in order to see a logic in Excel's behavior. Try to filter multiple columns in different orders, and try to unfilter a previously filtered column, and how that affects the list for a new column, etc. Then try to code that logic in Calc. In the end, you'll probably need to touch more areas than just ScColumn::GetFilterEntries. Hope this helps. Kohei --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
