Bug 58472

Summary: parameter type change in TextRun.setFontSize()
Product: POI Reporter: mark.o <Mark.Olesen>
Component: XSLFAssignee: POI Developers List <dev>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: P2    
Version: 3.13-dev   
Target Milestone: ---   
Hardware: PC   
OS: Linux   

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.