Change raw pointer to unique_ptr 83/262583/5
authorBowon Ryu <bowon.ryu@samsung.com>
Fri, 13 Aug 2021 09:20:00 +0000 (18:20 +0900)
committerBowon Ryu <bowon.ryu@samsung.com>
Fri, 13 Aug 2021 11:52:29 +0000 (20:52 +0900)
The mPlaceholderFont pointer is allocated memory once only
when the text-controller uses a placeholder.
This will persist until mEventData is destroyed.
Changed to a smart pointer suitable for maintenance.

Additionally,
In SetPlaceholderTextFontWidth() and SetPlaceholderTextFontSlant(), mPlaceholderFont can not be NULL.

Even if there is no value in SetFontStyleProperty, it is always set to None,
This is because an instance of mPlaceholderFont is created through SetPlaceholderTextFontWeight(), which is called first.

So this causes coverage issues.
Replace the duplicate code with CreatePlaceholderFont() solves this problem.

Change-Id: Ibd11b02f22e505be8643c9360b5d5e5e2de1b318
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>

No differences found