Bug 58472 - parameter type change in TextRun.setFontSize()
Summary: parameter type change in TextRun.setFontSize()
Status: RESOLVED WONTFIX
Alias: None
Product: POI
Classification: Unclassified
Component: XSLF (show other bugs)
Version: 3.13-dev
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-02 13:49 UTC by mark.o
Modified: 2015-10-04 09:49 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mark.o 2015-10-02 13:49:38 UTC
XSLFTextRun.setFontSize() now expects a Double (was double).
This prevents promotion from int, which seems to be an unneeded break in functionality. Why not retain the unboxed primitives?
Comment 1 mark.o 2015-10-02 14:06:23 UTC
Note:
SL : [sg]etFontSize uses Double
SS : [sg]etFontSize uses double
WP : [sg]etFontSize uses int
Comment 2 Andreas Beeker 2015-10-03 23:33:16 UTC
Lets start with the javadocs for this function:
"font size in points, if null the underlying fontsize will be unset"

> This prevents promotion from int ...
... but fontsizes can be also specified as real numbers

> Why not retain the unboxed primitives?
setting the value to null will force the usage of the slidelayout value.
Even worse is using something as -1 as indicator for unset values.

Currently I haven't applied this logic to all methods.
Whenever something is promoted to common sl, I'll adapt the handling in X/HSLF 
accordingly.
Comment 3 mark.o 2015-10-04 09:49:30 UTC
> "font size in points, if null the underlying fontsize will be unset"
> setting the value to null will force the usage of the slidelayout value.

OK - this is now quite clear. Thanks for the explanation.