Bug 51424 - Ignore exceptions in ParagraphSprmUncompressor

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1138834 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yegor Kozlov 2011-06-23 11:21:05 +00:00
parent abe5618b5d
commit d45f22ad8d
2 changed files with 17 additions and 1 deletions

View File

@ -34,6 +34,7 @@
<changes> <changes>
<release version="3.8-beta4" date="2011-??-??"> <release version="3.8-beta4" date="2011-??-??">
<action dev="poi-developers" type="add">51424 - Ignore exceptions in ParagraphSprmUncompressor</action>
<action dev="poi-developers" type="fix">51415 - Fixed Workbook.createSheet(sheetName) to truncate names longer than 31 characters</action> <action dev="poi-developers" type="fix">51415 - Fixed Workbook.createSheet(sheetName) to truncate names longer than 31 characters</action>
<action dev="poi-developers" type="fix">51332 - Fixed internal IDs of shapes generated by HSSFPatriarch when there are more than 1023 drawing objects </action> <action dev="poi-developers" type="fix">51332 - Fixed internal IDs of shapes generated by HSSFPatriarch when there are more than 1023 drawing objects </action>
<action dev="poi-developers" type="fix">48408 - Improved documentation for Sheet.setColumnWidth </action> <action dev="poi-developers" type="fix">48408 - Improved documentation for Sheet.setColumnWidth </action>

View File

@ -24,6 +24,8 @@ import org.apache.poi.hwpf.usermodel.LineSpacingDescriptor;
import org.apache.poi.hwpf.usermodel.ShadingDescriptor; import org.apache.poi.hwpf.usermodel.ShadingDescriptor;
import org.apache.poi.hwpf.usermodel.DropCapSpecifier; import org.apache.poi.hwpf.usermodel.DropCapSpecifier;
import org.apache.poi.util.LittleEndian; import org.apache.poi.util.LittleEndian;
import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
@ -33,6 +35,9 @@ import java.util.ArrayList;
public final class ParagraphSprmUncompressor public final class ParagraphSprmUncompressor
extends SprmUncompressor extends SprmUncompressor
{ {
private static final POILogger logger = POILogFactory
.getLogger( ParagraphSprmUncompressor.class );
public ParagraphSprmUncompressor() public ParagraphSprmUncompressor()
{ {
} }
@ -60,7 +65,17 @@ public final class ParagraphSprmUncompressor
// table row // table row
if (sprm.getType() == SprmOperation.PAP_TYPE) if (sprm.getType() == SprmOperation.PAP_TYPE)
{ {
unCompressPAPOperation(newProperties, sprm); try
{
unCompressPAPOperation( newProperties, sprm );
}
catch ( Exception exc )
{
logger.log(
POILogger.ERROR,
"Unable to apply SPRM operation '"
+ sprm.getOperation() + "': ", exc );
}
} }
} }