ASF Bugzilla – Attachment 34344 Details for
Bug 55936
[PATCH] Tabstop alignment and leader
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
ParagraphSprmUncompressor changes
bug55936.patch (text/plain), 2.26 KB, created by
Javen O'Neal
on 2016-10-09 05:07:57 UTC
(
hide
)
Description:
ParagraphSprmUncompressor changes
Filename:
MIME Type:
Creator:
Javen O'Neal
Created:
2016-10-09 05:07:57 UTC
Size:
2.26 KB
patch
obsolete
>Index: src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java >=================================================================== >--- src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java (revision 1763940) >+++ src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java (working copy) >@@ -98,8 +98,9 @@ > * @param grpprl The original papx. > * @param offset The current offset in the papx. > * @param spra A part of the sprm that defined this operation. >+ * @throws ClassNotFoundException > */ >- static void unCompressPAPOperation (ParagraphProperties newPAP, SprmOperation sprm) >+ static void unCompressPAPOperation (ParagraphProperties newPAP, SprmOperation sprm) throws ClassNotFoundException > { > switch (sprm.getOperation()) > { >@@ -402,7 +403,7 @@ > case 0x4d: > // sprmPShd -- 0xc64d > ShadingDescriptor shadingDescriptor = new ShadingDescriptor( >- sprm.getGrpprl(), 3 ); >+ sprm.getGrpprl(), sprm.getGrpprlOffset()); > newPAP.setShading( shadingDescriptor ); > break; > case 0x5d: >@@ -431,13 +432,15 @@ > } > } > >- private static void handleTabs(ParagraphProperties pap, SprmOperation sprm) >+ private static void handleTabs(ParagraphProperties pap, SprmOperation sprm) throws ClassNotFoundException > { > byte[] grpprl = sprm.getGrpprl(); > int offset = sprm.getGrpprlOffset(); > int delSize = grpprl[offset++]; > int[] tabPositions = pap.getRgdxaTab(); >+ Class.forName("org.apache.poi.hwpf.model.TabDescriptor"); > TabDescriptor[] tabDescriptors = pap.getRgtbd(); >+ //System.out.println("tab : " + tabDescriptors[0]); > > Map<Integer, TabDescriptor> tabMap = new HashMap<Integer, TabDescriptor>(); > for (int x = 0; x < tabPositions.length; x++) >@@ -456,7 +459,7 @@ > for (int x = 0; x < addSize; x++) > { > Integer key = Integer.valueOf(LittleEndian.getShort(grpprl, offset)); >- TabDescriptor val = new TabDescriptor( grpprl, start + ((TabDescriptor.getSize() * addSize) + x) ); >+ TabDescriptor val = new TabDescriptor( grpprl, start + ((TabDescriptor.getSize() * addSize) + x) + addSize); > tabMap.put(key, val); > offset += LittleEndian.SHORT_SIZE; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 55936
:
31160
| 34344