Return-Path: X-Original-To: apmail-corinthia-dev-archive@minotaur.apache.org Delivered-To: apmail-corinthia-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CFB3018897 for ; Mon, 8 Jun 2015 14:55:12 +0000 (UTC) Received: (qmail 6797 invoked by uid 500); 8 Jun 2015 14:55:12 -0000 Delivered-To: apmail-corinthia-dev-archive@corinthia.apache.org Received: (qmail 6766 invoked by uid 500); 8 Jun 2015 14:55:12 -0000 Mailing-List: contact dev-help@corinthia.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@corinthia.incubator.apache.org Delivered-To: mailing list dev@corinthia.incubator.apache.org Received: (qmail 6755 invoked by uid 99); 8 Jun 2015 14:55:12 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Jun 2015 14:55:12 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 4655DC0944 for ; Mon, 8 Jun 2015 14:55:12 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.991 X-Spam-Level: *** X-Spam-Status: No, score=3.991 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=3, KAM_LAZY_DOMAIN_SECURITY=1, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id DrzZxBcDK-UO for ; Mon, 8 Jun 2015 14:55:02 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with SMTP id 7B5E12761D for ; Mon, 8 Jun 2015 14:55:02 +0000 (UTC) Received: (qmail 6580 invoked by uid 99); 8 Jun 2015 14:55:02 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Jun 2015 14:55:02 +0000 Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id D2E0A1A010F for ; Mon, 8 Jun 2015 14:55:01 +0000 (UTC) Received: by wibut5 with SMTP id ut5so89208935wib.1 for ; Mon, 08 Jun 2015 07:55:00 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.194.174.194 with SMTP id bu2mr33699142wjc.76.1433775300629; Mon, 08 Jun 2015 07:55:00 -0700 (PDT) Received: by 10.28.6.131 with HTTP; Mon, 8 Jun 2015 07:55:00 -0700 (PDT) In-Reply-To: <2B52CEDA-F12B-4D3E-9861-C124BC26110E@apache.org> References: <2B52CEDA-F12B-4D3E-9861-C124BC26110E@apache.org> Date: Mon, 8 Jun 2015 16:55:00 +0200 Message-ID: Subject: Re: ODF Restructure From: jan i To: "dev@corinthia.incubator.apache.org" Content-Type: multipart/alternative; boundary=089e0141a0067b61b2051802d307 --089e0141a0067b61b2051802d307 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 8 June 2015 at 14:58, Peter Kelly wrote: > On ODFGet vs. ODFTextGet - I would suggest we stick with the latter, as i= f > & when we add support for spreadsheets and presentations, we=E2=80=99ll n= eed > additional, separate methods for those. That is, ODFPresentationGet and > ODFSheetGet. The same is true of ODFTextConverter - I expect we=E2=80=99d= have > ODFPresentationConverter and ODFSheetConverter as well. > > The Word converter is structured the way it is because at the time I wrot= e > the code, I was interested only in word processing documents. It was only > when I brought the code to Apache that it was suggested that Corinthia > become something that supports presentations and spreadsheets as well. In= a > practical sense, we don=E2=80=99t address either of these at all, and whe= ther > either of these gets implemented will depend on interest & available > man/woman-power. But I think it would be good to keep this possibility op= en > - in that sense ODFGet by itself doesn=E2=80=99t make sense sense it=E2= =80=99s not clear > what type of document is being dealt with. This is also why the Word > converter is called as what it is, rather than OOXML (though since coming > into Apache the directory structure has been put in place to cater for th= e > future implementation of OOXML spreadsheets and presentations). > I agree with peter lets keep the future open. > > Also one minor comment on coding style - all the existing code uses an > indentation of 4 spaces, no tabs, and { placed on the same line for > if/while/switch statements, and on the following line for function > definitions. I=E2=80=99m not inherently tied to one layout or another, bu= t I think > we should try to remain consistent with the style already in place. > I too do not really mind what we use, but it must be used consistent in the source, otherwise it becomes a pain to maintain. rgds jan i. > > =E2=80=94 > Dr Peter M. Kelly > pmkelly@apache.org > > PGP key: http://www.kellypmk.net/pgp-key > (fingerprint 5435 6718 59F0 DD1F BFA0 5E46 2523 BAA1 44AE 2966) > > > On 7 Jun 2015, at 7:23 pm, Ian C wrote: > > > > 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 =3D > ODFConverterNew(html,abstractStorage,package,idPrefix); > > > > //Get the styles data > > //CSSSheetRelease(converter->styleSheet); > > converter->styleSheet =3D ODFParseStyles(converter); > > > > //Convert the content.xml to an html beastie > > ODFTextGet(converter); > > > > char *cssText =3D 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 wor= d > 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 > > > > --089e0141a0067b61b2051802d307--