corinthia-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian C <...@amham.net>
Subject ODF Restructure
Date Sun, 07 Jun 2015 12:23:29 GMT
Hi Gabriela,

attached is a patch that reorganises the ODF world to be more like the way
Word documents are processed.

I changed to the top level from operations to use an ODFGet. Which in turn
uses an ODFConverter.  The heart of the ODFGet function is

    ODFConverter *converter =
ODFConverterNew(html,abstractStorage,package,idPrefix);

    //Get the styles data
    //CSSSheetRelease(converter->styleSheet);
    converter->styleSheet = ODFParseStyles(converter);

    //Convert the content.xml to an html beastie
    ODFTextGet(converter);

    char *cssText = CSSSheetCopyCSSText(converter->styleSheet);
    HTMLAddInternalStyleSheet(converter->html, cssText);
    HTML_safeIndent(converter->html->docNode,0);

Which parses for styles as I did before ( so still needs some work).
Then calls an edited ODFTextGet - which is much as it was.

The code has just been twisted around to match the structure of the word
world.

Which means I can't help thinking that we could/should abstract out the
common aspects of converters.

It converts the headers.odt document to an html which shows the headers ok.
I also attached my version of headers.odt since I changed some of the
styles to try and emphasize their differences.

I hope it makes sense to you and that your patch tool can digest it.

-- 
Cheers,

Ian C

Mime
View raw message