[Libreoffice-commits] libvisio.git: src/lib src/test

Miklos Vajna vmiklos at collabora.co.uk
Wed Jan 28 01:50:17 PST 2015


 src/lib/VSDXMetaData.cpp |    3 +++
 src/lib/tokens.txt       |    1 +
 src/test/importtest.cpp  |    1 +
 3 files changed, 5 insertions(+)

New commits:
commit 1bda66b9c0c1cc2b9dcf323a0a45e314b5d4410f
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Sun Jan 18 11:52:35 2015 +0100

    VSDX: import <cp:category> as librevenge:category
    
    Change-Id: Idb2367009d24c49d111227b8dca1b6e40045f8c9

diff --git a/src/lib/VSDXMetaData.cpp b/src/lib/VSDXMetaData.cpp
index 8516690..4987cb2 100644
--- a/src/lib/VSDXMetaData.cpp
+++ b/src/lib/VSDXMetaData.cpp
@@ -82,6 +82,9 @@ void libvisio::VSDXMetaData::readCoreProperties(xmlTextReaderPtr reader)
     case XML_CP_LASTMODIFIEDBY:
       m_metaData.insert("dc:creator", readString(reader, XML_CP_LASTMODIFIEDBY));
       break;
+    case XML_CP_CATEGORY:
+      m_metaData.insert("librevenge:category", readString(reader, XML_CP_CATEGORY));
+      break;
     default:
       break;
     }
diff --git a/src/lib/tokens.txt b/src/lib/tokens.txt
index 2d0022b..6b01690 100644
--- a/src/lib/tokens.txt
+++ b/src/lib/tokens.txt
@@ -235,3 +235,4 @@ dcterms:created
 dcterms:modified
 dc:description
 cp:lastModifiedBy
+cp:category
diff --git a/src/test/importtest.cpp b/src/test/importtest.cpp
index 2b1aec6..29b99fd 100644
--- a/src/test/importtest.cpp
+++ b/src/test/importtest.cpp
@@ -176,6 +176,7 @@ void ImportTest::testVsdxMetadataTitle()
   assertXPath(m_doc, "/document/setDocumentMetaData", "keyword", "mytag");
   assertXPath(m_doc, "/document/setDocumentMetaData", "description", "mycomment");
   assertXPath(m_doc, "/document/setDocumentMetaData", "creator", "vmiklos modifier");
+  assertXPath(m_doc, "/document/setDocumentMetaData", "category", "mycategory");
 }
 
 void ImportTest::testVsdMetadataTitleMs1252()


More information about the Libreoffice-commits mailing list