hwpf: ignore invalid style reference
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1065538 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
40dbadc49e
commit
e325b96167
@ -321,11 +321,22 @@ public final class StyleSheet implements HDFType {
|
||||
|
||||
public ParagraphProperties getParagraphStyle(int x)
|
||||
{
|
||||
if (x == NIL_STYLE)
|
||||
{
|
||||
if (x == NIL_STYLE) {
|
||||
return NIL_PAP;
|
||||
}
|
||||
return (_styleDescriptions[x] != null ? _styleDescriptions[x].getPAP() : null);
|
||||
|
||||
if (x >= _styleDescriptions.length) {
|
||||
return NIL_PAP;
|
||||
}
|
||||
|
||||
if (_styleDescriptions[x]==null) {
|
||||
return NIL_PAP;
|
||||
}
|
||||
|
||||
if (_styleDescriptions[x].getPAP()==null) {
|
||||
return NIL_PAP;
|
||||
}
|
||||
|
||||
return _styleDescriptions[x].getPAP();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user