From 2a22882dff0b64ee419f97754d63fd7b4e5203ae Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Wed, 11 Jan 2012 15:51:10 +0000 Subject: [PATCH] POIXMLPropertiesTextExtractor support for extracting custom OOXML properties as text git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1230106 13f79535-47bb-0310-9956-ffa450edef68 --- src/documentation/content/xdocs/status.xml | 1 + .../poi/POIXMLPropertiesTextExtractor.java | 39 +++++++++++++++++-- .../poi/TestXMLPropertiesTextExtractor.java | 17 +++++++- 3 files changed, 51 insertions(+), 6 deletions(-) diff --git a/src/documentation/content/xdocs/status.xml b/src/documentation/content/xdocs/status.xml index 38c7666b9..3a1e1999f 100644 --- a/src/documentation/content/xdocs/status.xml +++ b/src/documentation/content/xdocs/status.xml @@ -34,6 +34,7 @@ + POIXMLPropertiesTextExtractor support for extracting custom OOXML properties as text 52449 - Support writing XWPF documents with glossaries (Glossaries are not yet supported, but can now be written out again without changes) 52446 - Handle files which have been truncated by a few bytes in NPropertyTable 52438 - Update CellDateFormatter to handle times without seconds diff --git a/src/ooxml/java/org/apache/poi/POIXMLPropertiesTextExtractor.java b/src/ooxml/java/org/apache/poi/POIXMLPropertiesTextExtractor.java index 22ff8902c..05528f628 100644 --- a/src/ooxml/java/org/apache/poi/POIXMLPropertiesTextExtractor.java +++ b/src/ooxml/java/org/apache/poi/POIXMLPropertiesTextExtractor.java @@ -20,6 +20,7 @@ package org.apache.poi; import org.apache.poi.openxml4j.opc.internal.PackagePropertiesPart; import org.openxmlformats.schemas.officeDocument.x2006.customProperties.CTProperty; +import java.math.BigDecimal; import java.util.Date; import java.util.List; @@ -131,12 +132,42 @@ public class POIXMLPropertiesTextExtractor extends POIXMLTextExtractor { props = getDocument().getProperties().getCustomProperties().getUnderlyingProperties(); List properties = props.getPropertyList(); - for(int i = 0; i