aboutsummaryrefslogtreecommitdiffstats
path: root/src/scratchpad
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2018-12-28 23:42:57 +0000
committerAndreas Beeker <kiwiwings@apache.org>2018-12-28 23:42:57 +0000
commita78bd71fc1f3bd60af434774744b5dfacfced403 (patch)
tree05dbbea86b4b9485ce190cdd9184df620a0c3e6d /src/scratchpad
parent83d4d4169f4bb2492f09f84e72a50f92e86a5f44 (diff)
downloadpoi-a78bd71fc1f3bd60af434774744b5dfacfced403.tar.gz
poi-a78bd71fc1f3bd60af434774744b5dfacfced403.zip
Add Enum method to help identifying unknown records with POI-Visualizer
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1849897 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/scratchpad')
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/record/UnknownRecordPlaceholder.java17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/UnknownRecordPlaceholder.java b/src/scratchpad/src/org/apache/poi/hslf/record/UnknownRecordPlaceholder.java
index db928f29ac..4790ae1ee6 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/record/UnknownRecordPlaceholder.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/record/UnknownRecordPlaceholder.java
@@ -17,11 +17,12 @@
package org.apache.poi.hslf.record;
-import org.apache.poi.util.IOUtils;
-import org.apache.poi.util.LittleEndian;
import java.io.IOException;
import java.io.OutputStream;
+import org.apache.poi.util.IOUtils;
+import org.apache.poi.util.LittleEndian;
+
/**
* If we come across a record we don't know about, we create one of
* these. It allows us to keep track of what it contains, so we can
@@ -30,6 +31,7 @@ import java.io.OutputStream;
* @author Nick Burch
*/
+@SuppressWarnings("unused")
public final class UnknownRecordPlaceholder extends RecordAtom
{
@@ -56,7 +58,16 @@ public final class UnknownRecordPlaceholder extends RecordAtom
/**
* Return the value we were given at creation
*/
- public long getRecordType() { return _type; }
+ public long getRecordType() {
+ return _type;
+ }
+
+ /**
+ * Return the value as enum we were given at creation
+ */
+ public RecordTypes getRecordTypeEnum() {
+ return RecordTypes.forTypeID((int)_type);
+ }
/**
* Write the contents of the record back, so it can be written