Bug 37323 - Autofilter not working
Summary: Autofilter not working
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.4.0 Beta5
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Markus Mohrhard
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-18 08:40 UTC by Juan
Modified: 2023-10-27 20:56 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Buggy autofilter sample (50.14 KB, application/x-vnd.oasis.opendocument.spreadsheet)
2011-05-19 07:50 UTC, Juan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juan 2011-05-18 08:40:12 UTC
I have found a number of issues with the attached file.

1) Selecting any item from the 'Date' column combo box does nothing: no filter is applied, no dialog open for 'Standard filter...", nothing.

2) Remove columns E, F, G, H.  The combo boxes from the first row of those columns is removed.  Save the file and reopen.  The combo boxes are there again!

3) Remove the 'calc' sheet (it is one of the two sheets: 'calc' and 'bitacora').  Save the file and reopen again.  The autofilter (of the 'bitacroa' sheet) is gone!

I have only tested the above behavior in LibO 3.4 Beta5 under WinXP; however I have seen filter-related problems ever since the first release of LibreOffice.  

None of these issues is reproducible using OO 3.3.0 (OOO330m20 Build:9567) under Win XP SP3.

Juan
Comment 1 Markus Mohrhard 2011-05-18 10:58:26 UTC
I have a look at it.

Does this work with LibreOffice 3.3.2? I rewrote some parts of the autofilter import/export for 3.4.
Comment 2 Markus Mohrhard 2011-05-18 11:27:28 UTC
Juan, did you forget to attach a file?
Comment 3 Juan 2011-05-19 07:50:32 UTC
Created attachment 46906 [details]
Buggy autofilter sample

Don't know what happened, I remember attaching the file... anyway, here it is
Comment 4 Juan 2011-05-19 07:54:20 UTC
(In reply to comment #1)
> I have a look at it.
> 
> Does this work with LibreOffice 3.3.2? I rewrote some parts of the autofilter
> import/export for 3.4.

I will check it and let you know.  It is unfortunate that it is impossible to make two separate installs of LibO (I attempted this by installing LibO 3.4 on a separate path, but 3.3.2 were removed without asking!).
Comment 5 Juan 2011-05-19 09:20:39 UTC
(In reply to comment #1)
 
> Does this work with LibreOffice 3.3.2? I rewrote some parts of the autofilter
> import/export for 3.4.

The before mentioned issues are not present under 3.3.2 (OOO330m19 build 202) & WinXP

Juan
Comment 6 Markus Mohrhard 2011-05-19 10:31:17 UTC
Can you try to reproduce it with a new file. It seems that during the creation of this file somthing went totally wrong. If I fix the content of the ods file by hand and import it, the autofilter works fine. After saving the file, the next import works correctly.

Even a quick look into the code seems to show that there is no bug regarding the import/export of autofilter.

Did you create this file with LibO 3.4 Beta5 or did you import it from some different format?
Comment 7 Juan 2011-05-19 12:06:02 UTC
(In reply to comment #6)
> Can you try to reproduce it with a new file. It seems that during the creation
> of this file somthing went totally wrong. If I fix the content of the ods file
> by hand and import it, the autofilter works fine. After saving the file, the
> next import works correctly.
> 
> Even a quick look into the code seems to show that there is no bug regarding
> the import/export of autofilter.
> 
> Did you create this file with LibO 3.4 Beta5 or did you import it from some
> different format?

I created this file long time ago (maybe around OO 2.3 or 2.4).  

In any case, I think that ideally (quality) software should not become unstable ( because of a problem in a file like in this case).  Either it should not open it at all (not very nice approach), or it should attempt to repair the file.

I do not know if this helps, but I have noticed some other issues when a filter is applied in different files (just did not have the time to file a bug at the time).

I think there is at least one bug report about them, like when a value is copied from one cell to others, and cells on hidden rows are also modified.

I can also remember erratic behavior navigating inside a filtered sheet, like the end-cursor, home-cursor, ctrl-cursor key combinations stopping in unexpected cells/rows.

Point is: are any of those issues connected to the autofilter code? (I have no idea, just wondering).

In my opinion, it is very important to not let those kind of bugs slip into final releases for the benefit of the product.  As a developer, I can somehow picture the process that LibO is going through (not an easy one for sure).

But the story is different for final users, where those issues are delicate as they could potentially harm the ecosystem by maintaining some people's perception/connection of LibO (open source software in general) with low quality products.

My intention is to provide positive feedback for the benefit of the community, hope these comments are taken in that direction.
Comment 8 Markus Mohrhard 2011-05-19 12:51:16 UTC
No these bugs are unrelated.

I think I understand now what goes wrong. We introduced some rework to the autofilter code so that we can have one autofilter per sheet.

It seems that the import of the old global databaserange to the new sheet local goes wrong and is always added to the first sheet.

For now you can change the order of the two sheets either in any OpenOffice version or in a Libo 3.3 version. Then save the file and opening in LibreOffice 3.4 should work fine. I don't think that my patch will go into the 3.4.0 version but hopefully into 3.4.1.

But all in all thanks a lot for your good work here.
Comment 9 Markus Mohrhard 2011-05-19 20:56:59 UTC
Ok,

your first point is now fixed. 

I'm not quite sure if your second point still occures but if it will I'm not quite sure if it is a bug.

Your third point was related to the first point, because the db data was inserted into the wrong sheet.

I asked for insertion into 3-4-0 too, so maybe we are lucky and this will be in 3.4 RC2 already.