Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


On Wed, 2011-06-29 at 22:24 +0200, Markus Mohrhard wrote:
Kohei, I think, as this is mostly your area, you might want to have a
closer look at the whole code around the offset problem.

So, everything comes down to what PivotField::nCol is expected to
contain; is it a (always 0-based) dimension index, or a column index
whose smallest index may not be always 0.  The column offset variable
was there because PivotField::nCol was expected to contain a column
index rather than a dimension index if the data source was a sheet,
while for the other data source types it was expected to contain a
dimension index.

First things first, Bubli's fix appears to work just fine.  This is all
good.

Now, that would also imply that in the latest pivot table code,
PivotField::nCol always contain a dimension index even for the internal
sheet data source type.  I remember I fixed some bugs some time ago in
this area because nCol didn't contain a column index, so I know for a
fact that this was not always the case.

Maybe my re-work of the dialog changed this, my cache table re-work did
this.  I don't know for sure.  But I have to keep this fact in mind
going forward, in case I come across any old code that may still expect
PivotField::nCol to contain a column index.  But that's fine since I
personally prefer it always containing a dimension index anyway. :-)

Regards,

Kohei

-- 
Kohei Yoshida, LibreOffice hacker, Calc
<kyoshida@novell.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.