Skip navigation

I have been working a bit on improving the ooxml import for Impress recently, focusing on the SmartArt stuff from PowerPoint 2k7. A really nifty feature indeed. Cunningly enough, MS does not store any fallback shapes for SmartArt, thus leaving me with the sole option of implementing a SmartArt layout engine myself. Here’s what it can do already:

quickdiagram0a

And this is how the original thing looks like:

ppt03

But there’s more to it. Since I needed a SmartArt layouting engine anyways, it was quite natural to (re)use that for actually editing and relayouting the content in Impress! For that to work, of course either the ooxml input fragments or some derived data structure have to be available at the shape; again the most straight-forward way was to use ooxml directly (in the form of an in-memory representation of the xml tree, aka DOM). Having a group shape with four extra custom attributes then gives something like this:

smartart01

So “editing” this shape means tweaking the data xml fragment, i.e. adding or removing text or changing attributes, and then re-triggering the import/layouting engine. I just love it when code reuse is that easy. ;-)

What I have now is something working end-to-end, with basic import, basic layouting and basic editing working. What comes next is improving all the details, i.e. supporting all layout types, editing all aspects, not only text etc. Stay tuned!

About these ads

6 Comments

  1. I have a strong feeling that the code I had started was off-track. How was it? Did you use it or just throw it away?

    /me just curious.

    • Hub, not at all, based the work on it, thanks for laying the foundation!

  2. Nice! Sounds like you are almost done, Novel does the job again! So I guess we can totally forget what we just talked about yesterday since you do not need any more help. Looking forward for the contribution!

    /me just sarcastic.

    • Christian, no, not done by far. But definitely any help appreciated! :-)

  3. So I”m curious, can you save this to ODF format once you have the slides done?

    • George, yeah you can, but it’s a hack. ;-)


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: