Yes, it helped a lot! It confirms the findings I had after sending the email, and adds valuable knowledge that I wasn't able to get while navigating through the several files ;)
Is there anyway to build (by hand) an object to serve as input for this calculation? If I ask you about which would be the MAIN function that starts all the pivoting process, what would you answer? :) Thank you very much! On Tue, Mar 1, 2011 at 9:49 AM, Niklas Nebel <[email protected]>wrote: > On 28.02.2011 23:23, Nuno Oliveira wrote: > >> As I'm taking this project again, I bumped into some questions that you >> may answer me immediately, I'm sure! >> >> Well I'm trying to discover which and where is the function that >> performs the pivoting calculation. >> By the hints you gave me before I'm searching for this function on >> dptabres.cxx, and there I found a Calculate function, but it makes me >> believe that it is not the function I'm searching for... >> Also I am searching for the input for this calculation, and that >> function takes some arguments that I can't assume as a structure holding >> all the data to perform such computation. >> >> Can you give me some more hints about the form that the input takes for >> the calculation? >> And which is the main function where the pivoting calculation starts? >> > > It's all distributed across several classes. ScDPSource::CreateRes_Impl > creates ScDPResultMember objects pColResRoot and pRowResRoot which (in their > children) contain the results. The CalcResults call then creates a cache of > the source data and iterates through the rows (in > ScDPTableData::CalcResultsFromCacheTable and ProcessRowData). For each > source data row, ScDPResultMember::ProcessData is called which updates the > results. > > In the results, ScDPResultMember has the information about a whole column > or row. pChildDimension (ScDPResultDimension) is an array of > ScDPResultMember objects for the next nested field. pDataRoot > (ScDPDataMember) holds the column/row result, and in the case of pRowRoot it > also has a similar structure of child member arrays (pChildDimension) for > the results within that row. > > The data for an individual result value is updated with each source entry > in ScDPAggData::Update, and the result is calculated from that in > ScDPAggData::Calculate. > > Does that help a bit? > > > Niklas > -- > ------------------------------------------------------------------------ > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] with Subject: help > -- Nuno Oliveira -- ------------------------------------------------------------------------ To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] with Subject: help
