[Libreoffice] [PATCH] fdo#42286, do not shrink the selected area

Pierre-André Jacquod pjacquod at alumni.ethz.ch
Tue Nov 29 01:07:04 PST 2011


Hi Eike

> Now you also changed bOnlyDown=false to bOnlyDown=true, which leads to
> not include newly appended columns of an area.

half true: the condition is exactly that the newly appended column data 
touch by an angle the already defined area (like C3 to B2) and that all 
other cells below the area are empty.
All columns right/left of the area are filtered.

> Why?
very bad reason: I did not really intended to commit this change yet. I 
wanted to ask you about it. But it seems I was too deeply thinking about 
it, I oversee my mixing. F**

less bad reason: If you activates the auto-filter, and append a column 
as mentioned above, you suddenly have columns filtered without "seeing" 
it, the drop-down at the top of the column not being present.

I will change it (due to point 1), except you oppose :- )

> Grounded speculation: if user adds a column or row immediately adjacent
> to a data area it is usually related to the already existing data and
> she wants that to be included, maybe even doesn't know that earlier the
> filter was setup using a selection.

A good point. On the other hand,this makes impossible to filter in the 
middle of data. But this case is very special.


Else, I have attached 3 patches for review touching this function:

* the first one make the flag onlyDown working also for shrinking... No 
reason that you can just extend down, but shrink on all direction? This 
seems to be more coherent with the flag activation.

* the second patch make the shrinking corresponding to the name of the 
function: GetDataArea: i.e. shrinks as long as the outer row/column is 
empty, and not just delete the last one since empty.

* the 3d one: just minor clean up: variable scope reduction and better 
documentation.

Thanks for all
best regards
Pierre-André


More information about the LibreOffice mailing list