You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ye...@apache.org on 2008/09/18 12:45:00 UTC
svn commit: r696623 - in /poi/trunk/src/scratchpad:
src/org/apache/poi/hslf/record/StyleTextPropAtom.java
testcases/org/apache/poi/hslf/record/TestStyleTextPropAtom.java
Author: yegor
Date: Thu Sep 18 03:45:00 2008
New Revision: 696623
URL: http://svn.apache.org/viewvc?rev=696623&view=rev
Log:
fixed bug 45815: bit mask values inStyleTextPropAtom are not preserved across read-write
Modified:
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestStyleTextPropAtom.java
Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java?rev=696623&r1=696622&r2=696623&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java Thu Sep 18 03:45:00 2008
@@ -157,6 +157,12 @@
new TextProp(0, 0x80, "kumi"),
new TextProp(0, 0x100, "unused3"),
new TextProp(0, 0x200, "emboss"),
+ new TextProp(0, 0x400, "nibble1"),
+ new TextProp(0, 0x800, "nibble2"),
+ new TextProp(0, 0x1000, "nibble3"),
+ new TextProp(0, 0x2000, "nibble4"),
+ new TextProp(0, 0x4000, "unused4"),
+ new TextProp(0, 0x8000, "unused5"),
new CharFlagsTextProp(),
new TextProp(2, 0x10000, "font.index"),
new TextProp(0, 0x100000, "pp10ext"),
Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestStyleTextPropAtom.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestStyleTextPropAtom.java?rev=696623&r1=696622&r2=696623&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestStyleTextPropAtom.java (original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestStyleTextPropAtom.java Thu Sep 18 03:45:00 2008
@@ -738,4 +738,35 @@
doReadWrite(data, length);
}
+
+ /**
+ * Bug 45815: bit mask values are not preserved on read-write
+ *
+ * From the test file attached to the bug:
+ *
+ * <StyleTextPropAtom info="0" type="4001" size="94" offset="114782" header="00 00 A1 0F 5E 00 00 00 ">
+ * 14 00 00 00 00 00 41 00 0A 00 06 00 50 00 07 00 01 00 00 00 00 00 00 00 02
+ * 00 00 00 01 04 00 00 01 04 01 00 00 00 01 08 00 00 01 08 0C 00 00 00 01 0C
+ * 00 00 01 0C 01 00 00 00 01 10 00 00 01 10 01 00 00 00 01 14 00 00 01 14 01
+ * 00 00 00 01 18 00 00 01 18 01 00 00 00 01 1C 00 00 01 1C
+ * </StyleTextPropAtom>
+ */
+ public void test45815() throws Exception {
+ int length = 19;
+ byte[] data = {
+ 0x00, 0x00, (byte)0xA1, 0x0F, 0x5E, 0x00, 0x00, 0x00, 0x14, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x0A, 0x00, 0x06, 0x00,
+ 0x50, 0x00, 0x07, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00,
+ 0x01, 0x04, 0x01, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00,
+ 0x01, 0x08, 0x0C, 0x00, 0x00, 0x00, 0x01, 0x0C, 0x00, 0x00,
+ 0x01, 0x0C, 0x01, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x00,
+ 0x01, 0x10, 0x01, 0x00, 0x00, 0x00, 0x01, 0x14, 0x00, 0x00,
+ 0x01, 0x14, 0x01, 0x00, 0x00, 0x00, 0x01, 0x18, 0x00, 0x00,
+ 0x01, 0x18, 0x01, 0x00, 0x00, 0x00, 0x01, 0x1C, 0x00, 0x00,
+ 0x01, 0x1C
+ };
+ doReadWrite(data, length);
+ }
+
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org