Patch from bug #52190 - null check on XWPF setFontFamily
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1202620 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a44fc7b05a
commit
959ab00472
@ -34,6 +34,7 @@
|
|||||||
|
|
||||||
<changes>
|
<changes>
|
||||||
<release version="3.8-beta5" date="2011-??-??">
|
<release version="3.8-beta5" date="2011-??-??">
|
||||||
|
<action dev="poi-developers" type="fix">52190 - null check on XWPF setFontFamily</action>
|
||||||
<action dev="poi-developers" type="fix">52062 - ensure that temporary files in SXSSF are deleted</action>
|
<action dev="poi-developers" type="fix">52062 - ensure that temporary files in SXSSF are deleted</action>
|
||||||
<action dev="poi-developers" type="fix">50936 - Exception parsing MS Word 8.0 file (as duplicate of 47958)</action>
|
<action dev="poi-developers" type="fix">50936 - Exception parsing MS Word 8.0 file (as duplicate of 47958)</action>
|
||||||
<action dev="poi-developers" type="fix">47958 - ArrayIndexOutOfBoundsException from PicturesTable.getAllPictures() during Escher tree walk</action>
|
<action dev="poi-developers" type="fix">47958 - ArrayIndexOutOfBoundsException from PicturesTable.getAllPictures() during Escher tree walk</action>
|
||||||
|
@ -91,7 +91,6 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRow;
|
|||||||
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTSelection;
|
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTSelection;
|
||||||
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTSheet;
|
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTSheet;
|
||||||
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTSheetCalcPr;
|
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTSheetCalcPr;
|
||||||
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTSheetData;
|
|
||||||
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTSheetFormatPr;
|
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTSheetFormatPr;
|
||||||
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTSheetPr;
|
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTSheetPr;
|
||||||
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTSheetProtection;
|
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTSheetProtection;
|
||||||
|
@ -461,7 +461,7 @@ public class XWPFRun {
|
|||||||
* @param fontFamily
|
* @param fontFamily
|
||||||
*/
|
*/
|
||||||
public void setFontFamily(String fontFamily) {
|
public void setFontFamily(String fontFamily) {
|
||||||
CTRPr pr = run.getRPr();
|
CTRPr pr = run.isSetRPr() ? run.getRPr() : run.addNewRPr();
|
||||||
CTFonts fonts = pr.isSetRFonts() ? pr.getRFonts() : pr.addNewRFonts();
|
CTFonts fonts = pr.isSetRFonts() ? pr.getRFonts() : pr.addNewRFonts();
|
||||||
fonts.setAscii(fontFamily);
|
fonts.setAscii(fontFamily);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user