[Libreoffice-commits] libvisio.git: 2 commits - src/lib src/test
Miklos Vajna
vmiklos at collabora.co.uk
Sun Dec 28 10:26:58 PST 2014
src/lib/VSDMetaData.cpp | 4 ++++
src/lib/VSDXMetaData.cpp | 2 ++
src/lib/tokens.txt | 1 +
src/test/importtest.cpp | 2 ++
4 files changed, 9 insertions(+)
New commits:
commit d4684217ee9dd48e3352430e6d869824642f4082
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Sun Dec 28 14:13:39 2014 +0100
VSD: import description
Change-Id: I33b47f4ee903f9f4d07383df0552284de7401d7b
diff --git a/src/lib/VSDMetaData.cpp b/src/lib/VSDMetaData.cpp
index 44e6f62..0288392 100644
--- a/src/lib/VSDMetaData.cpp
+++ b/src/lib/VSDMetaData.cpp
@@ -97,6 +97,7 @@ void libvisio::VSDMetaData::readPropertyIdentifierAndOffset(librevenge::RVNGInpu
#define PIDSI_SUBJECT 0x00000003
#define PIDSI_AUTHOR 0x00000004
#define PIDSI_KEYWORDS 0x00000005
+#define PIDSI_COMMENTS 0x00000006
void libvisio::VSDMetaData::readTypedPropertyValue(librevenge::RVNGInputStream *input, uint32_t index, uint32_t offset)
{
@@ -132,6 +133,9 @@ void libvisio::VSDMetaData::readTypedPropertyValue(librevenge::RVNGInputStream *
case PIDSI_KEYWORDS:
m_metaData.insert("meta:keyword", string);
break;
+ case PIDSI_COMMENTS:
+ m_metaData.insert("dc:description", string);
+ break;
}
}
}
diff --git a/src/test/importtest.cpp b/src/test/importtest.cpp
index 41f2b0c..bb3388e 100644
--- a/src/test/importtest.cpp
+++ b/src/test/importtest.cpp
@@ -158,6 +158,7 @@ void ImportTest::testVsdMetadataTitleMs1252()
assertXPath(m_doc, "/document/setDocumentMetaData", "subject", "mysubject");
assertXPath(m_doc, "/document/setDocumentMetaData", "initial-creator", "vmiklos creator");
assertXPath(m_doc, "/document/setDocumentMetaData", "keyword", "mytag");
+ assertXPath(m_doc, "/document/setDocumentMetaData", "description", "mycomment");
}
void ImportTest::testVsdMetadataTitleUtf8()
commit db443edcc59a9d48395e25f04a4c380d15877e4e
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Sun Dec 28 14:10:03 2014 +0100
VSDX: import description
Change-Id: I5e9e6fd793bb44c954e8255e70952badfb442d57
diff --git a/src/lib/VSDXMetaData.cpp b/src/lib/VSDXMetaData.cpp
index 1ce1dcd..7a0ff83 100644
--- a/src/lib/VSDXMetaData.cpp
+++ b/src/lib/VSDXMetaData.cpp
@@ -75,6 +75,8 @@ void libvisio::VSDXMetaData::readCoreProperties(xmlTextReaderPtr reader)
break;
case XML_CP_KEYWORDS:
m_metaData.insert("meta:keyword", readString(reader, XML_CP_KEYWORDS));
+ case XML_DC_DESCRIPTION:
+ m_metaData.insert("dc:description", readString(reader, XML_DC_DESCRIPTION));
default:
break;
}
diff --git a/src/lib/tokens.txt b/src/lib/tokens.txt
index d4ad31d..617fb1a 100644
--- a/src/lib/tokens.txt
+++ b/src/lib/tokens.txt
@@ -233,3 +233,4 @@ dc:subject
dc:title
dcterms:created
dcterms:modified
+dc:description
diff --git a/src/test/importtest.cpp b/src/test/importtest.cpp
index 7aa8336..41f2b0c 100644
--- a/src/test/importtest.cpp
+++ b/src/test/importtest.cpp
@@ -146,6 +146,7 @@ void ImportTest::testVsdxMetadataTitle()
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");
+ assertXPath(m_doc, "/document/setDocumentMetaData", "description", "mycomment");
}
void ImportTest::testVsdMetadataTitleMs1252()
More information about the Libreoffice-commits
mailing list