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 9E0C518DFB for ; Fri, 8 May 2015 12:45:25 +0000 (UTC) Received: (qmail 28882 invoked by uid 500); 8 May 2015 12:45:25 -0000 Delivered-To: apmail-corinthia-dev-archive@corinthia.apache.org Received: (qmail 28850 invoked by uid 500); 8 May 2015 12:45:25 -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 28837 invoked by uid 99); 8 May 2015 12:45:25 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 May 2015 12:45:25 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id C0D021A2465 for ; Fri, 8 May 2015 12:45:24 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.88 X-Spam-Level: X-Spam-Status: No, score=0.88 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, KAM_LIVE=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id ThuQHpVdLnSz for ; Fri, 8 May 2015 12:45:17 +0000 (UTC) Received: from mail-ig0-f177.google.com (mail-ig0-f177.google.com [209.85.213.177]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 01900212CE for ; Fri, 8 May 2015 12:45:17 +0000 (UTC) Received: by igbsb11 with SMTP id sb11so19939686igb.0 for ; Fri, 08 May 2015 05:45:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Bq2SUcf5lUbs2cGYZft5vjglz83v6pRd/lPVkSyytT8=; b=mn8i3WXDzWzdL+zaHYJK84d0dTIJDdgO+H2BFC8HGKik5+zzF2HH+HNsIizhsbTSC1 UvXwMqhRRYgenWZ3PhYWlxg7qUtBONiFtTGdUoFsGkJ3uutKO6YyAz6n3D9hZIGNxS7E P5l/2czwQ4XEj+Jk8p53yNMkwnAGdaRirnKWeyzgXpG3+nrMMTg8Krujny8O5dS8qdHa qohC/FBEa9AVRC8+NLuZxM4JLWD6UalFa2MiAXODTYrRG1GTKgTfz7TgUXBtGh9t7VuT JtuUPS+68Bl+2ZxfvfLPj5uGaV8lrJn1lS6MEqD3/0M9VlIHE2UoQhl65VTiDJ1CzsXY FZnw== MIME-Version: 1.0 X-Received: by 10.50.114.9 with SMTP id jc9mr3980104igb.49.1431089115867; Fri, 08 May 2015 05:45:15 -0700 (PDT) Received: by 10.107.14.16 with HTTP; Fri, 8 May 2015 05:45:15 -0700 (PDT) In-Reply-To: References: Date: Fri, 8 May 2015 13:45:15 +0100 Message-ID: Subject: Re: Confused about DFNode and DFXMLNames.h enum structure From: Gabriela Gibson To: dev Content-Type: text/plain; charset=UTF-8 Nevermind, I figured it out this morning. ;-D G On 5/7/15, Gabriela Gibson wrote: > Sorry for the delay, I've been a bit off colour for last week and > also, I'm quite confused %-) > > Here is what I do: > > void printNode(DFNode *n) > { > if (n == NULL) return; > printf("Tag = %d \t", n->tag); > printf("seqNo = %zu \t", n->seqNo); > printf("value = %s \t\t", n->value); > if (n->tag > 2) > printf("ODFKey = %s ", translateXMLEnumName[n->tag-10]); > printf("\n"); > } > > where translateXMLEnumName is a homemade mapping that gives me the > enum name of the tag. > > This is what I see: > Tag = 1485 seqNo = 2 value = (null) ODFKey = > OFFICE_SCRIPTS > Tag = 1475 seqNo = 3 value = (null) ODFKey = > OFFICE_FONT_FACE_DECLS > Tag = 1600 seqNo = 4 value = (null) ODFKey = > STYLE_FONT_FACE > Tag = 1600 seqNo = 5 value = (null) ODFKey = > STYLE_FONT_FACE > Tag = 1600 seqNo = 6 value = (null) ODFKey = > STYLE_FONT_FACE > Tag = 1600 seqNo = 7 value = (null) ODFKey = > STYLE_FONT_FACE > Tag = 1600 seqNo = 8 value = (null) ODFKey = > STYLE_FONT_FACE > Tag = 1452 seqNo = 9 value = (null) ODFKey = > OFFICE_AUTOMATIC_STYLES > Tag = 1736 seqNo = 10 value = (null) ODFKey = > STYLE_STYLE > Tag = 1767 seqNo = 11 value = (null) ODFKey = > STYLE_TEXT_PROPERTIES > Tag = 1455 seqNo = 12 value = (null) ODFKey = > OFFICE_BODY > Tag = 1493 seqNo = 13 value = (null) ODFKey = > OFFICE_TEXT > Tag = 2294 seqNo = 14 value = (null) ODFKey = > TEXT_SEQUENCE_DECLS > Tag = 2293 seqNo = 15 value = (null) ODFKey = > TEXT_SEQUENCE_DECL > Tag = 2293 seqNo = 16 value = (null) ODFKey = > TEXT_SEQUENCE_DECL > Tag = 2293 seqNo = 17 value = (null) ODFKey = > TEXT_SEQUENCE_DECL > Tag = 2293 seqNo = 18 value = (null) ODFKey = > TEXT_SEQUENCE_DECL > Tag = 2158 seqNo = 19 value = (null) ODFKey = TEXT_H > Tag = 2 seqNo = 20 value = Headline One > Tag = 2241 seqNo = 21 value = (null) ODFKey = TEXT_P > Tag = 2241 seqNo = 22 value = (null) ODFKey = TEXT_P > Tag = 2 seqNo = 23 value = This is > Tag = 2270 seqNo = 24 value = (null) ODFKey = TEXT_S > Tag = 2 seqNo = 25 value = paragraph one, > Tag = 2158 seqNo = 26 value = (null) ODFKey = TEXT_H > Tag = 2 seqNo = 27 value = Headline Two > Tag = 2241 seqNo = 28 value = (null) ODFKey = TEXT_P > Tag = 2241 seqNo = 29 value = (null) ODFKey = TEXT_P > Tag = 2 seqNo = 30 value = This is a paragraph two, > Tag = 2158 seqNo = 31 value = (null) ODFKey = TEXT_H > Tag = 2 seqNo = 32 value = Headline Three > .../etc etc > ===================================================== > > With these lines: > > Tag = 2158 seqNo = 19 value = (null) ODFKey = TEXT_H > Tag = 2 seqNo = 20 value = Headline One > > > I'm not too sure what to do with those --- 'Headline One' for example > should correspond to something like TEXT_H1 Since TEXT_H doesn't give > me the full story here --- I cannot seem to get ahold of the actual > value in the raw data in contents.xml, which would tell me that: > > Headline > One > > Trouble is, I just cannot see how to grab hold of either the markers: > > text:style-name="Heading_20_1" or text:outline-level="1". > > Which would make my life easy here. > > The plan was to park all those markers in a neat little struct and > maybe also add function pointers to the rows, so I'd have { INCOMING, > ..., function_name }, and then just can easily pick things off in the > traverseContent() function. > > thanks for any hints! > > G > -- > Visit my Coding Diary: http://gabriela-gibson.blogspot.com/ > -- Visit my Coding Diary: http://gabriela-gibson.blogspot.com/