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

Miklos Vajna vmiklos at collabora.co.uk
Sat Dec 27 03:11:20 PST 2014


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

New commits:
commit d3a5596c77afad6df538ad615111e0ee984b62e7
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Sat Dec 27 12:10:46 2014 +0100

    VSDX: import <cp:keywords>
    
    Change-Id: I7c61cde25389b5bee26885822d8995dfca7d031b

diff --git a/src/lib/VSDXMetaData.cpp b/src/lib/VSDXMetaData.cpp
index b9ba9bb..72435bb 100644
--- a/src/lib/VSDXMetaData.cpp
+++ b/src/lib/VSDXMetaData.cpp
@@ -74,6 +74,9 @@ void libvisio::VSDXMetaData::readCoreProperties(xmlTextReaderPtr reader)
       if (tokenType == XML_READER_TYPE_ELEMENT)
         m_metaData.insert("dc:date", readString(reader, XML_DCTERMS_MODIFIED));
       break;
+    case XML_CP_KEYWORDS:
+      if (tokenType == XML_READER_TYPE_ELEMENT)
+        m_metaData.insert("meta:keyword", readString(reader, XML_CP_KEYWORDS));
     default:
       break;
     }
diff --git a/src/lib/tokens.txt b/src/lib/tokens.txt
index 84cc90d..d4ad31d 100644
--- a/src/lib/tokens.txt
+++ b/src/lib/tokens.txt
@@ -227,6 +227,7 @@ XForm
 XForm1D
 Y
 cp:coreProperties
+cp:keywords
 dc:creator
 dc:subject
 dc:title
diff --git a/src/test/importtest.cpp b/src/test/importtest.cpp
index 9567453..274a36f 100644
--- a/src/test/importtest.cpp
+++ b/src/test/importtest.cpp
@@ -145,6 +145,7 @@ void ImportTest::testVsdxMetadataTitle()
   // Test <dcterms:created> and <dcterms:modified>.
   assertXPath(m_doc, "/document/setDocumentMetaData", "creation-date", "2014-11-24T10:35:17Z");
   assertXPath(m_doc, "/document/setDocumentMetaData", "date", "2014-11-24T10:41:22Z");
+  assertXPath(m_doc, "/document/setDocumentMetaData", "keyword", "mytag");
 }
 
 void ImportTest::testVsdMetadataTitleMs1252()


More information about the Libreoffice-commits mailing list