Copy Writer styles XML to Impress equivalent?

Discuss the presentation application

Copy Writer styles XML to Impress equivalent?

Postby gsd4me » Sun Jan 29, 2017 9:16 pm

Dear all
Some guidance please as to the detailed workings of XML styles applicable to OO:

I have been tasked with converting a OO Writer document to an Impress presentation.
Not too difficult I surmised but I am now getting more involved with it and some questions are being raised in my mind. I want to do it this way so that I can delve more deeply into XML (new to me as a methodology so want to learn its intricacies) and I would rather not have to purchase a professional package to do what I want as I regard that as "cheating"!!!

The Writer document is straightforward - simply a lot of paragraphs containing text that has already been formatted - so font, underline, size, colour background etc are already present in the document.

There are quite a few of these paragraphs, so manually creating a presentation will be a pain in the backside; besides, the document may (in fact, will) change over time and I don't want to waste time and I want to automate the conversion.

I have decided to use Python to do what I want to do - no reason beyond that it is what is installed on my systems.

Currently I can open the source Writer document, extract the relevant paragraph texts from the XML "content" file and read all the relevant attributes etc. applicable to the text from the "styles" file.
I can create a blank, new presentation, create slides, text placeholders etc. in the destination file

Simple question is - can I simply REPLACE the "styles" document in the presentation file with that which already exists in the Writer document? As indicated, the styles exist in the original document, it is a brand new Impress XML doc and so everything is available for me already. If so - how to do this total file replacement? Or is there some uniqueness to the Writer variant that precludes it being copied directly into the Impress equivalent XML zipfile?

Alternatively, how do I insert the relevant individual styles from the source to the presentation. IE is there a "read XML style" Python method and a "write XML style" Python method that can be used over all known styles in the source, even if they are system-generated as per the standards? I have done an internet search and nothing is showing up that directly equates as what I want to do

Can anyone help me here?
Many thanks in advance
gsd4me
 
Posts: 18
Joined: Thu Sep 08, 2011 3:01 pm

Return to Impress

Who is online

Users browsing this forum: No registered users and 1 guest