Awesome Hub!
From this commit it appears that the metadata is plain text and cannot
contain markup like different fonts, font size, italics etc. Is this
correct?
Cheers
Martin
On Sat, Jul 25, 2009 at 12:19 PM, Martin Sevior<martines@unimelb.edu.au> wrote:
> -------- Forwarded Message --------
> From: cvs@abisource.com
> Reply-to: abiword-dev@abisource.com
> To: abisource-cvs-commit@abisource.com
> Subject: hub - r27343 - in abiword/branches/odf-medata/src: text/ptbl/xp
> wp/impexp/xp
> Date: Sat, 25 Jul 2009 02:57:18 +0200 (CEST)
>
> Author: hub
> Date: 2009-07-25 02:57:17 +0200 (Sat, 25 Jul 2009)
> New Revision: 27343
>
> Added:
> abiword/branches/odf-medata/src/text/ptbl/xp/pf_Frag_Meta.h
> abiword/branches/odf-medata/src/text/ptbl/xp/pm_MetaData.cpp
> abiword/branches/odf-medata/src/text/ptbl/xp/pm_MetaData.h
> abiword/branches/odf-medata/src/text/ptbl/xp/pm_MetaDataStore.cpp
> abiword/branches/odf-medata/src/text/ptbl/xp/pm_MetaDataStore.h
> abiword/branches/odf-medata/src/text/ptbl/xp/pm_MetaDataTypes.h
> Modified:
> abiword/branches/odf-medata/src/text/ptbl/xp/Makefile.am
> abiword/branches/odf-medata/src/text/ptbl/xp/pd_Document.cpp
> abiword/branches/odf-medata/src/text/ptbl/xp/pd_Document.h
> abiword/branches/odf-medata/src/text/ptbl/xp/pf_Frag_Object.cpp
> abiword/branches/odf-medata/src/text/ptbl/xp/pf_Frag_Object.h
> abiword/branches/odf-medata/src/text/ptbl/xp/pf_Frag_Strux.cpp
> abiword/branches/odf-medata/src/text/ptbl/xp/pf_Frag_Strux.h
> abiword/branches/odf-medata/src/wp/impexp/xp/ie_exp_AbiWord_1.cpp
> abiword/branches/odf-medata/src/wp/impexp/xp/ie_imp_AbiWord_1.cpp
> abiword/branches/odf-medata/src/wp/impexp/xp/ie_imp_XML.h
> Log:
> First pass at the metadata implementation.
>
>
> Modified: abiword/branches/odf-medata/src/text/ptbl/xp/Makefile.am
> ===================================================================
> --- abiword/branches/odf-medata/src/text/ptbl/xp/Makefile.am 2009-07-24 19:54:07 UTC (rev 27342)
> +++ abiword/branches/odf-medata/src/text/ptbl/xp/Makefile.am 2009-07-25 00:57:17 UTC (rev 27343)
> @@ -21,6 +21,7 @@
> pf_Frag_FmtMark.cpp \
> pf_Frag_FmtMark.h \
> pf_Frag.h \
> + pf_Frag_Meta.h \
> pf_Fragments.cpp \
> pf_Fragments.h \
> pf_Frag_Object.cpp \
> @@ -36,6 +37,11 @@
> pf_Frag_Text.cpp \
> pf_Frag_Text.h \
> pl_Listener.h \
> + pm_MetaData.h \
> + pm_MetaData.cpp \
> + pm_MetaDataTypes.h \
> + pm_MetaDataStore.h \
> + pm_MetaDataStore.cpp \
> po_Bookmark.cpp \
> po_Bookmark.h \
> pp_AttrProp.cpp \
>
> Modified: abiword/branches/odf-medata/src/text/ptbl/xp/pd_Document.cpp
> ===================================================================
> --- abiword/branches/odf-medata/src/text/ptbl/xp/pd_Document.cpp 2009-07-24 19:54:07 UTC (rev 27342)
> +++ abiword/branches/odf-medata/src/text/ptbl/xp/pd_Document.cpp 2009-07-25 00:57:17 UTC (rev 27343)
> @@ -3,6 +3,7 @@
> /* AbiWord
> * Copyright (C) 1998 AbiSource, Inc.
> * Copyright (c) 2001,2002,2003 Tomas Frydrych
> + * Copyright (c) 2009 Hubert Figuiere
> *
> * This program is free software; you can redistribute it and/or
> * modify it under the terms of the GNU General Public License
> @@ -63,6 +64,7 @@
> #include "ut_path.h"
> #include "ut_locale.h"
> #include "pp_Author.h"
> +#include "pm_MetaDataStore.h"
>
> // these are needed because of the exportGetVisDirectionAtPosition() mechanism
> #include "fp_Run.h"
> @@ -194,7 +196,8 @@
> m_bShowAuthors(true),
> m_bExportAuthorAtts(false), //should be false by default. Set true to test
> m_iMyAuthorInt(-1),
> - m_iLastAuthorInt(-1)
> + m_iLastAuthorInt(-1),
> + m_metadatastore(new pm_MetaDataStore())
> {
> XAP_App::getApp()->getPrefs()->getPrefsValueBool(AP_PREF_KEY_LockStyles,&m_bLockedStyles);
> UT_ASSERT(isOrigUUID());
> @@ -232,6 +235,7 @@
> // since these are not owned by us.
>
> // TODO: delete the key/data pairs
> + DELETEP(m_metadatastore);
> }
>
>
>
> Modified: abiword/branches/odf-medata/src/text/ptbl/xp/pd_Document.h
> ===================================================================
> --- abiword/branches/odf-medata/src/text/ptbl/xp/pd_Document.h 2009-07-24 19:54:07 UTC (rev 27342)
> +++ abiword/branches/odf-medata/src/text/ptbl/xp/pd_Document.h 2009-07-25 00:57:17 UTC (rev 27343)
> @@ -62,6 +62,7 @@
> class UT_UTF8String;
> class pp_Author;
>
> +class pm_MetaDataStore;
>
> #ifdef PT_TEST
> #include "ut_test.h"
> @@ -632,6 +633,15 @@
>
> UT_GenericStringMap<UT_UTF8String*> & getMetaData () { return m_metaDataMap ; }
>
> + pm_MetaDataStore *getMetaDataStore()
> + {
> + return m_metadatastore;
> + }
> + const pm_MetaDataStore *getMetaDataStore() const
> + {
> + return m_metadatastore;
> + }
> +
> // document-level property handling functions
> const PP_AttrProp * getAttrProp() const;
> PT_AttrPropIndex getAttrPropIndex() const {return m_indexAP;}
> @@ -843,6 +853,8 @@
> UT_sint32 m_iLastAuthorInt;
> UT_GenericVector<ImagePage *> m_pPendingImagePage;
> UT_GenericVector<TextboxPage *> m_pPendingTextboxPage;
> +
> + pm_MetaDataStore * m_metadatastore;
> };
>
> #endif /* PD_DOCUMENT_H */
>
> Added: abiword/branches/odf-medata/src/text/ptbl/xp/pf_Frag_Meta.h
> ===================================================================
> --- abiword/branches/odf-medata/src/text/ptbl/xp/pf_Frag_Meta.h (rev 0)
> +++ abiword/branches/odf-medata/src/text/ptbl/xp/pf_Frag_Meta.h 2009-07-25 00:57:17 UTC (rev 27343)
> @@ -0,0 +1,48 @@
> +/* AbiWord
> + * Copyright (C) 2009 Hubert Figuiere
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version 2
> + * of the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
> + * 02111-1307, USA.
> + */
> +
> +
> +#ifndef __PF_FRAG_META_H__
> +#define __PF_FRAG_META_H__
> +
> +#include "pf_Frag.h"
> +#include "pm_MetaDataTypes.h"
> +
> +class pt_PieceTable;
> +
> +class pf_Frag_Meta
> + : public pf_Frag
> +{
> +public:
> + pf_Frag_Meta(pt_PieceTable * pPT,
> + PFType type,
> + PT_AttrPropIndex indexAP)
> + : pf_Frag(pPT, type, indexAP)
> + {
> + }
> +
> + PMMetaDataId getMetaId() const;
> + void setMetaId(PMMetaDataId id);
> +
> +private:
> + PMMetaDataId m_metaid;
> +};
> +
> +
> +#endif
>
> Modified: abiword/branches/odf-medata/src/text/ptbl/xp/pf_Frag_Object.cpp
> ===================================================================
> --- abiword/branches/odf-medata/src/text/ptbl/xp/pf_Frag_Object.cpp 2009-07-24 19:54:07 UTC (rev 27342)
> +++ abiword/branches/odf-medata/src/text/ptbl/xp/pf_Frag_Object.cpp 2009-07-25 00:57:17 UTC (rev 27343)
> @@ -30,7 +30,7 @@
> pf_Frag_Object::pf_Frag_Object(pt_PieceTable * pPT,
> PTObjectType objectType,
> PT_AttrPropIndex indexAP)
> - : pf_Frag(pPT, pf_Frag::PFT_Object, pf_FRAG_OBJECT_LENGTH)
> + : pf_Frag_Meta(pPT, pf_Frag::PFT_Object, pf_FRAG_OBJECT_LENGTH)
> {
> m_pObjectSubclass = NULL;
> m_objectType = objectType;
>
> Modified: abiword/branches/odf-medata/src/text/ptbl/xp/pf_Frag_Object.h
> ===================================================================
> --- abiword/branches/odf-medata/src/text/ptbl/xp/pf_Frag_Object.h 2009-07-24 19:54:07 UTC (rev 27342)
> +++ abiword/branches/odf-medata/src/text/ptbl/xp/pf_Frag_Object.h 2009-07-25 00:57:17 UTC (rev 27343)
> @@ -23,7 +23,7 @@
> #define PF_FRAG_OBJECT_H
>
> #include "ut_types.h"
> -#include "pf_Frag.h"
> +#include "pf_Frag_Meta.h"
> #include "pt_Types.h"
> #include "fd_Field.h"
> #include "po_Bookmark.h"
> @@ -32,7 +32,7 @@
> an image) in the document.
> */
>
> -class ABI_EXPORT pf_Frag_Object : public pf_Frag
> +class ABI_EXPORT pf_Frag_Object : public pf_Frag_Meta
> {
> public:
> pf_Frag_Object(pt_PieceTable * pPT,
>
> Modified: abiword/branches/odf-medata/src/text/ptbl/xp/pf_Frag_Strux.cpp
> ===================================================================
> --- abiword/branches/odf-medata/src/text/ptbl/xp/pf_Frag_Strux.cpp 2009-07-24 19:54:07 UTC (rev 27342)
> +++ abiword/branches/odf-medata/src/text/ptbl/xp/pf_Frag_Strux.cpp 2009-07-25 00:57:17 UTC (rev 27343)
> @@ -25,7 +25,7 @@
> PTStruxType struxType,
> UT_uint32 length,
> PT_AttrPropIndex indexAP)
> - : pf_Frag(pPT, pf_Frag::PFT_Strux, length)
> + : pf_Frag_Meta(pPT, pf_Frag::PFT_Strux, length)
> {
> m_struxType = struxType;
> m_indexAP = indexAP;
>
> Modified: abiword/branches/odf-medata/src/text/ptbl/xp/pf_Frag_Strux.h
> ===================================================================
> --- abiword/branches/odf-medata/src/text/ptbl/xp/pf_Frag_Strux.h 2009-07-24 19:54:07 UTC (rev 27342)
> +++ abiword/branches/odf-medata/src/text/ptbl/xp/pf_Frag_Strux.h 2009-07-25 00:57:17 UTC (rev 27343)
> @@ -22,7 +22,7 @@
> #define PF_FRAG_STRUX_H
>
> #include "ut_types.h"
> -#include "pf_Frag.h"
> +#include "pf_Frag_Meta.h"
> #include "pt_Types.h"
> #include "pd_Document.h"
>
> @@ -37,7 +37,7 @@
> run-time stuff.
> */
>
> -class ABI_EXPORT pf_Frag_Strux : public pf_Frag
> +class ABI_EXPORT pf_Frag_Strux : public pf_Frag_Meta
> {
> public:
> pf_Frag_Strux(pt_PieceTable * pPT,
>
> Added: abiword/branches/odf-medata/src/text/ptbl/xp/pm_MetaData.cpp
> ===================================================================
> --- abiword/branches/odf-medata/src/text/ptbl/xp/pm_MetaData.cpp (rev 0)
> +++ abiword/branches/odf-medata/src/text/ptbl/xp/pm_MetaData.cpp 2009-07-25 00:57:17 UTC (rev 27343)
> @@ -0,0 +1,28 @@
> +/* AbiWord
> + * Copyright (C) 2009 Hubert Figuiere
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version 2
> + * of the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
> + * 02111-1307, USA.
> + */
> +
> +
> +#include "pm_MetaData.h"
> +
> +
> +pm_MetaData::pm_MetaData(const std::string & id)
> + : m_id(id)
> +{
> +
> +}
>
> Added: abiword/branches/odf-medata/src/text/ptbl/xp/pm_MetaData.h
> ===================================================================
> --- abiword/branches/odf-medata/src/text/ptbl/xp/pm_MetaData.h (rev 0)
> +++ abiword/branches/odf-medata/src/text/ptbl/xp/pm_MetaData.h 2009-07-25 00:57:17 UTC (rev 27343)
> @@ -0,0 +1,41 @@
> +/* AbiWord
> + * Copyright (C) 2009 Hubert Figuiere
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version 2
> + * of the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
> + * 02111-1307, USA.
> + */
> +
> +
> +#ifndef __PM_METADATA_H_
> +#define __PM_METADATA_H_
> +
> +#include <map>
> +#include <string>
> +
> +
> +class pm_MetaData
> +{
> +public:
> + pm_MetaData(const std::string & id);
> +
> +
> +private:
> + std::string m_id;
> + // key/value pairs from RDF.
> + std::map<std::string, std::string> m_data;
> +};
> +
> +
> +#endif
>
> Added: abiword/branches/odf-medata/src/text/ptbl/xp/pm_MetaDataStore.cpp
> ===================================================================
> --- abiword/branches/odf-medata/src/text/ptbl/xp/pm_MetaDataStore.cpp (rev 0)
> +++ abiword/branches/odf-medata/src/text/ptbl/xp/pm_MetaDataStore.cpp 2009-07-25 00:57:17 UTC (rev 27343)
> @@ -0,0 +1,49 @@
> +/* AbiWord
> + * Copyright (C) 2009 Hubert Figuiere
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version 2
> + * of the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
> + * 02111-1307, USA.
> + */
> +
> +
> +
> +#include "pm_MetaDataStore.h"
> +
> +
> +
> +pm_MetaDataStore::pm_MetaDataStore()
> + : m_lastid(0)
> +{
> +}
> +
> +
> +
> +pm_MetaData * pm_MetaDataStore::findMetaData(PMMetaDataId id) const
> +{
> + MetaIdMap::const_iterator iter = m_mapstore.find(id);
> + if(iter == m_mapstore.end()) {
> + return NULL;
> + }
> + return iter->second;
> +}
> +
> +
> +
> +PMMetaDataId pm_MetaDataStore::addMetaData(pm_MetaData *meta)
> +{
> + m_lastid++;
> + m_mapstore.insert(std::make_pair(m_lastid, meta));
> + return m_lastid;
> +}
>
> Added: abiword/branches/odf-medata/src/text/ptbl/xp/pm_MetaDataStore.h
> ===================================================================
> --- abiword/branches/odf-medata/src/text/ptbl/xp/pm_MetaDataStore.h (rev 0)
> +++ abiword/branches/odf-medata/src/text/ptbl/xp/pm_MetaDataStore.h 2009-07-25 00:57:17 UTC (rev 27343)
> @@ -0,0 +1,69 @@
> +/* AbiWord
> + * Copyright (C) 2009 Hubert Figuiere
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version 2
> + * of the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
> + * 02111-1307, USA.
> + */
> +
> +
> +
> +#ifndef __PM_METADATASTORE_H_
> +#define __PM_METADATASTORE_H_
> +
> +#include <map>
> +
> +#include "pm_MetaDataTypes.h"
> +
> +class pm_MetaData;
> +
> +
> +
> +class pm_MetaDataStore
> +{
> +public:
> + typedef std::map<PMMetaDataId, pm_MetaData*> MetaIdMap;
> +
> + pm_MetaDataStore();
> +
> + /** Return true is there is nothing in it. */
> + bool empty() const
> + {
> + return m_mapstore.empty();
> + }
> +
> + /** Lookup for a metadata with whose id is %id
> + * @return NULL if not found
> + */
> + pm_MetaData * findMetaData(PMMetaDataId id) const;
> + /** Add a metadata to the store.
> + * @param meta the metadata. The pointer becomes owned by the store
> + * unless it failed.
> + * @return the id if the metadata. 0 if for some reason it couldn't.
> + */
> + PMMetaDataId addMetaData(pm_MetaData *meta);
> + const MetaIdMap & getStore() const
> + {
> + return m_mapstore;
> + }
> +private:
> +// pm_MetaDataStore(const & pm_MetaDataStore);
> +// pm_MetaDataStore & operator=(const pm_MetaDataStore &);
> +
> + MetaIdMap m_mapstore;
> + PMMetaDataId m_lastid;
> +};
> +
> +
> +#endif
>
> Added: abiword/branches/odf-medata/src/text/ptbl/xp/pm_MetaDataTypes.h
> ===================================================================
> --- abiword/branches/odf-medata/src/text/ptbl/xp/pm_MetaDataTypes.h (rev 0)
> +++ abiword/branches/odf-medata/src/text/ptbl/xp/pm_MetaDataTypes.h 2009-07-25 00:57:17 UTC (rev 27343)
> @@ -0,0 +1,31 @@
> +/* AbiWord
> + * Copyright (C) 2009 Hubert Figuiere
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version 2
> + * of the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
> + * 02111-1307, USA.
> + */
> +
> +#ifndef __PM_METADATATYPES_H_
> +#define __PM_METADATATYPES_H_
> +
> +#include "ut_types.h"
> +
> +
> +// the metadata id.
> +typedef UT_uint32 PMMetaDataId;
> +
> +
> +#endif
> +
>
> Modified: abiword/branches/odf-medata/src/wp/impexp/xp/ie_exp_AbiWord_1.cpp
> ===================================================================
> --- abiword/branches/odf-medata/src/wp/impexp/xp/ie_exp_AbiWord_1.cpp 2009-07-24 19:54:07 UTC (rev 27342)
> +++ abiword/branches/odf-medata/src/wp/impexp/xp/ie_exp_AbiWord_1.cpp 2009-07-25 00:57:17 UTC (rev 27343)
> @@ -1,5 +1,4 @@
> -/* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */
> -
> +/* -*- mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: t -*- */
> /* AbiWord
> * Copyright (C) 1998 AbiSource, Inc.
> *
> @@ -28,6 +27,7 @@
> #include "ut_bytebuf.h"
> #include "ut_base64.h"
> #include "ut_debugmsg.h"
> +#include "ut_std_string.h"
> #include "ut_string_class.h"
> #include "ut_uuid.h"
>
> @@ -42,6 +42,8 @@
> #include "pd_Document.h"
> #include "pd_Style.h"
>
> +#include "pm_MetaDataStore.h"
> +
> #include "pp_AttrProp.h"
> #include "pp_Author.h"
>
> @@ -232,7 +234,8 @@
> void _handleLists(void);
> void _handlePageSize(void);
> void _handleDataItems(void);
> - void _handleMetaData(void);
> + void _handleMetaData(void);
> + void _handleSemanticMetaData(void);
> void _handleRevisions(void);
> void _handleHistory(void);
> void _handleAuthors(void);
> @@ -808,6 +811,7 @@
> // now we begin the actual document.
>
> _handleMetaData();
> + _handleSemanticMetaData();
> _handleHistory();
> _handleRevisions();
> _handleStyles();
> @@ -1482,6 +1486,27 @@
> return;
> }
>
> +void s_AbiWord_1_Listener::_handleSemanticMetaData(void)
> +{
> + const pm_MetaDataStore * store = m_pDocument->getMetaDataStore();
> + if(!store->empty())
> + {
> + m_pie->write("<semetadata>\n");
> +
> + for(pm_MetaDataStore::MetaIdMap::const_iterator iter = store->getStore().begin();
> + iter != store->getStore().end(); ++iter)
> + {
> +
> + std::string xml = UT_std_string_sprintf("<meta id=\"%d\">", iter->first);
> + m_pie->write(xml.c_str());
> +#warning TODO
> + m_pie->write("</meta>");
> + }
> + }
> + m_pie->write("</semetadata>\n");
> +}
> +
> +
> void s_AbiWord_1_Listener::_handleMetaData(void)
> {
> if (m_pie->isCopying ())
>
> Modified: abiword/branches/odf-medata/src/wp/impexp/xp/ie_imp_AbiWord_1.cpp
> ===================================================================
> --- abiword/branches/odf-medata/src/wp/impexp/xp/ie_imp_AbiWord_1.cpp 2009-07-24 19:54:07 UTC (rev 27342)
> +++ abiword/branches/odf-medata/src/wp/impexp/xp/ie_imp_AbiWord_1.cpp 2009-07-25 00:57:17 UTC (rev 27343)
> @@ -1,5 +1,4 @@
> -/* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */
> -
> +/* -*- mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: t -*- */
> /* AbiWord
> * Copyright (C) 1998 AbiSource, Inc.
> *
> @@ -251,6 +250,8 @@
> #define TT_AUTHOR 38 //<author>
> #define TT_ANN 39 //<ann> Annotate region
> #define TT_ANNOTATE 40 //<annotate> Annotation content
> +#define TT_SEMETADATA 41 //<semetadta> Semantic Metadata section
> +#define TT_SMETA 42 //<meta> Semantic Metadata
>
>
> /*
> @@ -301,6 +302,7 @@
> { "m", TT_META },
> { "margin", TT_MARGINNOTE },
> { "math", TT_MATH },
> + { "meta", TT_SMETA },
> { "metadata", TT_METADATA },
> { "p", TT_BLOCK },
> { "pagesize", TT_PAGESIZE },
> @@ -310,6 +312,7 @@
> { "revisions", TT_REVISIONSECTION},
> { "s", TT_STYLE },
> { "section", TT_SECTION },
> + { "semetadata", TT_SEMETADATA },
> { "styles", TT_STYLESECTION },
> { "table", TT_TABLE },
> { "toc", TT_TOC },
> @@ -932,6 +935,18 @@
> m_currentMetaDataName = _getXMLPropValue("key", atts);
> goto cleanup;
>
> + case TT_SEMETADATA:
> + X_VerifyParseState(_PS_Doc);
> + m_parseState = _PS_SeMetaData;
> + goto cleanup;
> +
> + case TT_SMETA:
> + X_VerifyParseState(_PS_SeMetaData);
> + m_parseState = _PS_SMeta;
> +#warning TODO
> +// m_currentMetaDataName = _getXMLPropValue("key", atts);
> + goto cleanup;
> +
> case TT_TABLE:
> m_parseState = _PS_Sec;
> m_bWroteSection = true;
> @@ -1272,6 +1287,16 @@
> m_parseState = _PS_MetaData;
> return;
>
> + case TT_SEMETADATA:
> + X_VerifyParseState(_PS_SeMetaData);
> + m_parseState = _PS_Doc;
> + return;
> +
> + case TT_SMETA:
> + X_VerifyParseState(_PS_SMeta);
> + m_parseState = _PS_SeMetaData;
> + return;
> +
> case TT_OTHER:
> default:
> UT_DEBUGMSG(("Unknown end tag [%s]\n",name));
>
> Modified: abiword/branches/odf-medata/src/wp/impexp/xp/ie_imp_XML.h
> ===================================================================
> --- abiword/branches/odf-medata/src/wp/impexp/xp/ie_imp_XML.h 2009-07-24 19:54:07 UTC (rev 27342)
> +++ abiword/branches/odf-medata/src/wp/impexp/xp/ie_imp_XML.h 2009-07-25 00:57:17 UTC (rev 27343)
> @@ -1,5 +1,4 @@
> -//* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */
> -
> +/* -*- mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: t -*- */
> /* AbiWord
> * Copyright (C) 2001 AbiSource, Inc.
> *
> @@ -124,6 +123,8 @@
> _PS_PageSize,
> _PS_MetaData,
> _PS_Meta,
> + _PS_SeMetaData,
> + _PS_SMeta,
> _PS_RevisionSec,
> _PS_Revision,
> _PS_AuthorSec,
>
> -----------------------------------------------
> To unsubscribe from this list, send a message to
> abisource-cvs-commit-request@abisource.com with the word
> unsubscribe in the message body.
>
>
Received on Sat, 25 Jul 2009 12:23:09 +1000
This archive was generated by hypermail 2.1.8 : Sat Jul 25 2009 - 04:24:42 CEST