Apache OpenOffice (AOO) Bugzilla – Issue 122862
Advanced filter uses wrong Data Area
Last modified: 2017-05-20 10:34:04 UTC
Steps how to reproduce Reproducible with "AOO 4.0.0-Dev – German UI / German locale [AOO400m3(Build:9702) - Rev. 1503709 (2013-07-17) ]" on German German WIN7 Home Premium (64bit)", Common 4.0-dev User Profile: 1. Open attached sample document from AOO Start Center 2. Click cell A2 ("Product") > Cell cursor appears around A2 3. Menu 'Data -> Filter -> Advanced Filter' A1:F15 becomes selected 4. Continue in Advanced Filter Dialog 'Read Filter Criteria from-> "AnyWhere1"' <ok> Expected: Filter works, some rows in data area hiden Actual: Error Message "The range does not contain a valid query" Additional Info: a) The reason for the problem is that range A1:F15 becomes selected instead of A2:F15, what is defined in 'Data -> Define Area -> FilterArea' b) Correct FilterArea A2:F15 will be selected if In step 3 you use 'Autofilter -> Standard Filter' Dropdwon c) so everything will work fin if in Step 2 you select range A2:F15 d) The problem here might be some leftover from "Bug 40300 - Wrong automatic area selection in auto-filter "? I doubt because of "e" e) That still worked fine with OOo 1.1.5 ... 3.1.1 ... AOO 3.4.1 Already Reproducible with server installation of "AOO 4.0.0-Dev – English UI / German locale [AOO400m1(Build:9700) - Rev. 1457992 - Rev.1457606]" on German WIN7 Home Premium (64bit)", own separate user profile (First AOO 4.0-Dev version available on my PC)
Created attachment 81177 [details] Sample Document See report how to use
Setting regression keyword. (There are several regressions with spreadsheets in 4.0.0)
.
defect caused by changes for bug 12666
I am trying to find a solution.
working on a fix. If the fix does not work, I will revert the changes from bug 12666 to get this regression fixed for AOO 4.0.1
approve showstopper request
set target
Created attachment 81472 [details] patch to known defects caused by 12666
Created attachment 81474 [details] patch to known defects caused by 12666
"orw" committed SVN revision 1520602 into trunk: 122862: adjust code for issue 12666 in order to solve regressions 122862, 122...
Using Linux-32 nightly build (trunk) -- AOO410m1(Build:9750) - Rev. 1520602 2013-09-09_04:36:09-Rev.1520958 Fix, based on the attached sample document, seems good for me. Advanced filter applied to A2:F11 with no errors.
The fix for this issue also solves bug 122870, bug 122955, bug 123161 and bug 123163
defect cause: The changes of bug 12666 introduced new internal used database ranges for Auto Filter function. I recognized the following problems in these changes: (1) The newly introduced database ranges are also used for Standard Filter function and Advanced Filter function. (2) The newly introduced code to determine the right database range for the Auto Filter function, Standard Filter function and Advanced Filter function more or less neglects the existence of user-defined database ranges. User-defined database ranges are not used in scenarios in which the user made no cell selection. User-defined database ranges are changed and adjusted. (3) The method which checks the existence of an Auto Filter on a certain cell on a certain sheet neglects the cell and just checks, if a newly introduced internal database range exists at the given sheet.
(In reply to Oliver-Rainer Wittmann from comment #14) > defect cause: > The changes of bug 12666 introduced new internal used database ranges for > Auto Filter function. I recognized the following problems in these changes: > (1) The newly introduced database ranges are also used for Standard Filter > function and Advanced Filter function. > (2) The newly introduced code to determine the right database range for the > Auto Filter function, Standard Filter function and Advanced Filter function > more or less neglects the existence of user-defined database ranges. > User-defined database ranges are not used in scenarios in which the user > made no cell selection. User-defined database ranges are changed and > adjusted. > (3) The method which checks the existence of an Auto Filter on a certain > cell on a certain sheet neglects the cell and just checks, if a newly > introduced internal database range exists at the given sheet. (4) Undo functionality for the creation of the new introduced internal database ranges is missing.
my solution approach: (A) Restrict the new introduced internal database ranges to the Auto Filter function. To solve bug 12666 it is not needed to used these for Standard Filter function and Advanced Filter function. (B) Remove newly introduced code to determine the right database range for Auto Filter function. But adapt the existing one to the use of the newly introduced internal database ranges. (C) Revert the changes to the code which checks the existence of a Auto Filter at a certain cell in a certain sheet (D) Provide undo functionality for the creation of the newly introduced database ranges for Auto Filter function. (E) Corrections to code snippets which checks, if a certain database range is an internal one (F) Minor refactoring resp. code clean-ups: -- new method to check, if certain database range is an "unnamed" one -- removal of TAB characters in the source code
This defect is verified fixed in Windows Nightly build(trunk) AOO410m1(Build:9750) - Rev. 1521070 based on the attached sample document
There is a new problem found when verify this defect, here is the steps: 1. Open attached sample document from AOO Start Center 2. Click cell A2 ("Product") > Cell cursor appears around A2 3. Menu 'Data -> Filter -> Advanced Filter' A2:F15 becomes selected 4. Continue in Advanced Filter Dialog 'Read Filter Criteria from-> "AnyWhere1"' <ok> > Filter works, some rows in data area hidden 5. Open Advanced Filter Dialog by click menu 'Data -> Filter -> Advanced Filter' Expected: "AnyWhere1" displays as value showed in dropdown (please see AdvancedFilter dialog_r1521070.png attached) Actual: "- undefined -" displays as value showed in dropdown
Created attachment 81518 [details] disappeared setting in AdvancedFilter dialog
(In reply to fanyuzhen from comment #17) > This defect is verified fixed in Windows Nightly build(trunk) > AOO410m1(Build:9750) - Rev. 1521070 based on the attached sample document Thanks for testing. Thus, I will integrate the fix into branch AOO401 today.
(In reply to fanyuzhen from comment #18) > There is a new problem found when verify this defect, here is the steps: > 1. Open attached sample document from AOO Start Center > 2. Click cell A2 ("Product") > > Cell cursor appears around A2 > 3. Menu 'Data -> Filter -> Advanced Filter' > A2:F15 becomes selected > 4. Continue in Advanced Filter Dialog 'Read Filter Criteria from-> > "AnyWhere1"' > <ok> > > Filter works, some rows in data area hidden > 5. Open Advanced Filter Dialog by click menu 'Data -> Filter -> Advanced > Filter' > Expected: "AnyWhere1" displays as value showed in dropdown (please see > AdvancedFilter dialog_r1521070.png attached) > Actual: "- undefined -" displays as value showed in dropdown PLEASE, do not mix existing problems with new ones. Please see http://www.openoffice.org/qa/issue_handling/pre_submission.html - One problem - one issue Please submit a new issue. I will mark the attached screen shot as obsolete.
Comment on attachment 81518 [details] disappeared setting in AdvancedFilter dialog obsolete, because it belong to another problem
There is another problem(regression from revision 1520285) found when verify this defect, here is the steps: 1. Open attached sample document from AOO Start Center 2. Click cell A2 ("Product") > Cell cursor appears around A2 3. Menu 'Data -> Filter -> Advanced Filter' A2:F15 becomes selected 4. Continue in Advanced Filter Dialog 'Read Filter Criteria from-> "AnyWhere1"' <ok> > Filter works, some rows in data area hidden 5. Click Ctrl+Z Expected: all rows display, undo the filter action Actual: nothing happens, cannot undo
(In reply to fanyuzhen from comment #23) > There is another problem(regression from revision 1520285) found when verify > this defect, here is the steps: > 1. Open attached sample document from AOO Start Center > 2. Click cell A2 ("Product") > > Cell cursor appears around A2 > 3. Menu 'Data -> Filter -> Advanced Filter' > A2:F15 becomes selected > 4. Continue in Advanced Filter Dialog 'Read Filter Criteria from-> > "AnyWhere1"' > <ok> > > Filter works, some rows in data area hidden > 5. Click Ctrl+Z > Expected: all rows display, undo the filter action > Actual: nothing happens, cannot undo Again: Please "one problem - one issue" BTW, I could not reproduce the described defect in recent installation set from Win7 build bot, rev. 1521488
> Again: Please "one problem - one issue" I will open a new issue for c#18 problem after some tests and invite "interested users"
"orw" committed SVN revision 1521881 into branches/AOO401: 122862: adjust code for issue 12666 in order to solve regressions 122862, 122...
fixed on trunk and branch AOO401
About YuZhen's test result: The first issue, I think it is a minor defect but I agree with Oliver, it is a separated issue, should not be covered in 122862. I can reproduce it in AOO3.4.0 build, so it is not related to the regression 122862 nor 12666. It is more like a user experience issue, in the last step, what will show in the dialog, leave both select box and cell range picker empty as that in MS Excel, or remember settings in the both controllers. Anyway, leaving select box empty but cell range picker is not, it looks strange. We need behavior discussion to decide the correct behavior. But it should be in post 4.0.1. The second issue, I cannot reproduce against 1521070 build.
I have opened a new issue(Bug 123240) for c#18 problem, to clarify, this is not a brand new problem as it exists in 3.4.0, it's just new found when I do more testing around advanced filter function area.
I show Clarence Guo for c#23 problem, it's strange why it is only reproduced on my Win7, still investigating ..
Waiting for the build - revision 1521881(branches/AOO401) or higher , to be available for download, to verify this defect( bug 122862)
It's verified fixed in build AOO401m4(Build:9713) - Rev. 1521921 based on the attached sample document