[Libreoffice] [PATCH] fdo#42286, do not shrink the selected area
Pierre-André Jacquod
pjacquod at alumni.ethz.ch
Sun Nov 27 11:23:33 PST 2011
Hi,
>> BUT this is a workaround, to compensate the not so correct behaviour
>> of GetDataArea :-(
The behaviour in bINcludeOld = false seems me strange (ergh I think
wrong but you told me to be cautious), since it removes from the "side"
of the area that has not yet been extended above the last line / column,
if empty.
The implementation seems to me flawed, since it does it even if no
extension has been possible (e.g rEndRow = MAXROW), and suppress just
ONE line, if empty. What about the "new" last one ? if also empty, we
are exactly in the same situation as before, just a bit smaller. Hence
it seems me that the original programmer (12 years ago) just assumed
that only the last line / column could be empty, not e.g. the last 4 rows.
> I wouldn't say it's wrong unless I checked the original intention behind
> that code when GetDataArea() is called with bIncludeOld=false, maybe
> it's just the call in ExtendDataArea() that should pass true instead?
Done, you're right.
Finally, changed the call of the flags and documented the flags' meaning.
If you could cherry-pick 88611e702a18d2 for 3.4.5, would be nice.
Many thanks
>> desired effect. Further some tests have shown me that the behaviour
>> (regarding area) is not the same, depending if the filter is
>> activated with Data->Filter->AutoFilter or Standard filter. I fear
>> some parts will need to be quite overhauled.
>
> And the difference exactly is ...?
Visually: the standard filter adapts and shows the selected area at
activation of the filter, the auto-filter does not reflect the fact that
it will take into account a wider area. This area extension happens only
when the drop-down button is activated and the list of possible value is
calculated... and the area extended.
More subtly, this leads to 2 different ranges stored within the file if
you do
"select some area but not all data", activate standard filter , save
or if you do exactly the same with same data / input except
activating auto-filter instead of standard filter.
Out of subject: from a user perspective, I am not convinced from te fact
that the filter is allowed to change an area that has been user-defined.
No problem to auto-extend an area if auto-determined. But if a user
takes the time to do the area, this should be "holly". But this point
belongs to the user-interface list I guess...
Best regards
Pierre-André
More information about the LibreOffice
mailing list