Author: kiwiwings
Date: Fri Dec 28 23:42:57 2018
New Revision: 1849897
URL: http://svn.apache.org/viewvc?rev=1849897&view=rev
Log:
Add Enum method to help identifying unknown records with POI-Visualizer
Modified:
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/UnknownRecordPlaceholder.java
Modified:
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/UnknownRecordPlaceholder.java
URL:
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/UnknownRecordPlaceholder.java?rev=1849897&r1=1849896&r2=1849897&view=diff
==============================================================================
---
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/UnknownRecordPlaceholder.java
(original)
+++
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/UnknownRecordPlaceholder.java
Fri Dec 28 23:42:57 2018
@@ -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 UnknownRecordPlacehol
/**
* 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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]