Help understanding data model for Impress

Brian Fraser brian at softfrog.ca
Fri Apr 5 18:40:18 UTC 2019


Hello LO Developers,

I'm working on bug 124507 (
https://bugs.documentfoundation.org/show_bug.cgi?id=124507) for Impress in
which I need to store/load some text group data into/from the saved file.
The data is already stored in .pptx files, so I'm starting there to find my
way around getting data in and out of saved files. I will then need to save
and load the data with .odp files as well. I'm getting a little lost in the
data structures and in knowing what I should change.

I see that after a pptx file is parsed,
MainSequence::createMainSequence(...) builds its internal data structures
(such as CustomAnimationEffect objects) from an XTimeContainer.

1. Do I need to add an additional type of information (text group info)
into the XTimeContainer (or one of its child nodes)? It seems this data
would be set while parsing the data file, and then read/updated during
operation. I could then extract the data from the node during
createMainSequence(...) and have it create the CustomAnimationTextGroup
objects with the extracted settings.

2. If so, would I create a new class like XAnimationTextGroup? Does this
then require adding an .idl file? Does this become exposed in the API?

3. I see that animcore.cxx's AnimationNode class implements XTimeContainer
(and the rest of the tree node types). Should I make it also implement the
new XAnimationTextGroup?

4. For actually processing the .pptx file, the text group info is stored in
the following XML path:
<p:sld>
<p:timing>
<p:bldLst>
<p:bldP
spid="3"
grpId="0"
build="p"
bldLvl="2" // Group text by
uiExpand="1"
rev="1" // Reverse order
advAuto="1200" // Auto advance time (ms)
/>
...
4a) I see that there is a bldP token handled in buildlistcontent.cxx;
however the code currently does nothing. Is there a similar example in the
LO code which I can reference for extracting the values from the XML data?

4b) Once extracted, should I process it in CommonTimeNodeContext's
constructor (it lists handling the attribute XML_bldLvl as "TODO")?

4c) Then add code in TimeNode::setNode() to set attribute value on the
approprate X... object (such as XAnimate?)?


Thank you for any ideas on what I should do, or where to look for more help!
Brian.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20190405/99b059a9/attachment.html>


More information about the LibreOffice mailing list