summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-12-27 12:10:46 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-12-27 12:10:46 +0100
commitd3a5596c77afad6df538ad615111e0ee984b62e7 (patch)
tree06c35d1bdde829281cbc00b61674fd28f479756e
parent20434231174c9638c0c997199447ee638613a0a3 (diff)
VSDX: import <cp:keywords>
Change-Id: I7c61cde25389b5bee26885822d8995dfca7d031b
-rw-r--r--src/lib/VSDXMetaData.cpp3
-rw-r--r--src/lib/tokens.txt1
-rw-r--r--src/test/importtest.cpp1
3 files changed, 5 insertions, 0 deletions
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()