mirror of https://github.com/apache/poi.git
Apply patch from bug #52662 - CharacterRun NPE fix when fetching symbol fonts, where no fonts are defined
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1243907 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
073c3e278f
commit
9e1165c24a
|
@ -34,6 +34,7 @@
|
||||||
|
|
||||||
<changes>
|
<changes>
|
||||||
<release version="3.8-beta6" date="2012-??-??">
|
<release version="3.8-beta6" date="2012-??-??">
|
||||||
|
<action dev="poi-developers" type="fix">52662 - CharacterRun NPE fix when fetching symbol fonts, where no fonts are defined</action>
|
||||||
<action dev="poi-developers" type="add">52658 - support mergin table cells in XSLF</action>
|
<action dev="poi-developers" type="add">52658 - support mergin table cells in XSLF</action>
|
||||||
<action dev="poi-developers" type="add">validate row number and column index in SXSSF when creating new rows / cells</action>
|
<action dev="poi-developers" type="add">validate row number and column index in SXSSF when creating new rows / cells</action>
|
||||||
<action dev="poi-developers" type="fix">51498 - fixed evaluation of blank cells in COUNTIF</action>
|
<action dev="poi-developers" type="fix">51498 - fixed evaluation of blank cells in COUNTIF</action>
|
||||||
|
|
|
@ -606,8 +606,13 @@ public final class CharacterRun
|
||||||
public Ffn getSymbolFont()
|
public Ffn getSymbolFont()
|
||||||
{
|
{
|
||||||
if (isSymbol()) {
|
if (isSymbol()) {
|
||||||
|
if (_doc.getFontTable() == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
// Fetch all font names
|
||||||
Ffn[] fontNames = _doc.getFontTable().getFontNames();
|
Ffn[] fontNames = _doc.getFontTable().getFontNames();
|
||||||
|
|
||||||
|
// Try to find the name of the font for our symbol
|
||||||
if (fontNames.length <= _props.getFtcSym())
|
if (fontNames.length <= _props.getFtcSym())
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue