Re: OOo Pivoting Code Extraction

Niklas Nebel <[email protected]>
Newsgroups gmane.comp.openoffice.devel.general
Message-ID <[email protected]>
On 01.03.2011 15:14, Nuno Oliveira wrote:
> Is there anyway to build (by hand) an object to serve as input for this
> calculation?

You need a ScDPSource object, which depends on a ScDPTableData-derived 
object for the source data. ScSheetDPData is derived from ScDPTableData 
and can be constructed directly if you have a ScDocument (spreadsheet 
document) containing the data. If you want to do the calculation without 
the ScDocument, you could create your own subclass of ScDPTableData, and 
implement the virtual methods using whatever source data you have.

> If I ask you about which would be the MAIN function that starts all the
> pivoting process, what would you answer? :)

For the actual calculation (after all settings have been made), that's 
ScDPSource::CreateRes_Impl. It is called from ScDPSource::getResults, 
which returns the result data, and (via GetMemberResults and 
FillMemberResults) from ScDPLevel::getResults, which returns the 
column/row header information.

Niklas
--
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.