View | Details | Raw Unified | Return to bug 55385
Collapse All | Expand All

(-)src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFFont.java (-1 / +13 lines)
Lines 288-293 Link Here
288
     *
288
     *
289
     * @param bold - boldness to use
289
     * @param bold - boldness to use
290
     */
290
     */
291
    @Override
291
    public void setBold(boolean bold) {
292
    public void setBold(boolean bold) {
292
        if(bold){
293
        if(bold){
293
            CTBooleanProperty ctBold = _ctFont.sizeOfBArray() == 0 ? _ctFont.addNewB() : _ctFont.getBArray(0);
294
            CTBooleanProperty ctBold = _ctFont.sizeOfBArray() == 0 ? _ctFont.addNewB() : _ctFont.getBArray(0);
Lines 297-302 Link Here
297
        }
298
        }
298
    }
299
    }
299
300
301
    /*
302
     * Enable font boldness if <tt>boldweight</tt> is {@link #BOLDWEIGHT_BOLD}.
303
     * Disable font boldness for all other values.
304
     * 
305
     * This method is provided for interface compatibility with {@link org.apache.poi.ss.usermodel.Font}
306
     * The OOXML format cannot store custom font weights.
307
     */
308
    @Override
300
    public void setBoldweight(short boldweight)
309
    public void setBoldweight(short boldweight)
301
    {
310
    {
302
        setBold(boldweight == BOLDWEIGHT_BOLD);
311
        setBold(boldweight == BOLDWEIGHT_BOLD);
Lines 304-314 Link Here
304
313
305
    /**
314
    /**
306
     * get the boldness to use
315
     * get the boldness to use
316
     * 
317
     * This method is provided for interface compatibility with {@link org.apache.poi.ss.usermodel.Font}
318
     * 
307
     * @return boldweight
319
     * @return boldweight
308
     * @see #BOLDWEIGHT_NORMAL
320
     * @see #BOLDWEIGHT_NORMAL
309
     * @see #BOLDWEIGHT_BOLD
321
     * @see #BOLDWEIGHT_BOLD
310
     */
322
     */
311
323
    @Override
312
    public short getBoldweight()
324
    public short getBoldweight()
313
    {
325
    {
314
        return getBold() ? BOLDWEIGHT_BOLD : BOLDWEIGHT_NORMAL;
326
        return getBold() ? BOLDWEIGHT_BOLD : BOLDWEIGHT_NORMAL;

Return to bug 55385