summaryrefslogtreecommitdiff
path: root/xfa/fwl/theme
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fwl/theme')
-rw-r--r--xfa/fwl/theme/cfwl_checkboxtp.cpp3
-rw-r--r--xfa/fwl/theme/cfwl_widgettp.cpp5
2 files changed, 5 insertions, 3 deletions
diff --git a/xfa/fwl/theme/cfwl_checkboxtp.cpp b/xfa/fwl/theme/cfwl_checkboxtp.cpp
index 4ff2ccd2a6..9109cb61c4 100644
--- a/xfa/fwl/theme/cfwl_checkboxtp.cpp
+++ b/xfa/fwl/theme/cfwl_checkboxtp.cpp
@@ -7,6 +7,7 @@
#include "xfa/fwl/theme/cfwl_checkboxtp.h"
#include "core/fxge/cfx_pathdata.h"
+#include "third_party/base/ptr_util.h"
#include "xfa/fde/tto/fde_textout.h"
#include "xfa/fwl/cfwl_checkbox.h"
#include "xfa/fwl/cfwl_themebackground.h"
@@ -219,7 +220,7 @@ void CFWL_CheckBoxTP::SetThemeData() {
void CFWL_CheckBoxTP::InitCheckPath(FX_FLOAT fCheckLen) {
if (!m_pCheckPath) {
- m_pCheckPath.reset(new CFX_Path);
+ m_pCheckPath = pdfium::MakeUnique<CFX_Path>();
m_pCheckPath->Create();
FX_FLOAT fWidth = kSignPath;
FX_FLOAT fHeight = -kSignPath;
diff --git a/xfa/fwl/theme/cfwl_widgettp.cpp b/xfa/fwl/theme/cfwl_widgettp.cpp
index efc1e96335..3b436d8302 100644
--- a/xfa/fwl/theme/cfwl_widgettp.cpp
+++ b/xfa/fwl/theme/cfwl_widgettp.cpp
@@ -9,6 +9,7 @@
#include <algorithm>
#include <utility>
+#include "third_party/base/ptr_util.h"
#include "xfa/fde/tto/fde_textout.h"
#include "xfa/fgas/font/cfgas_fontmgr.h"
#include "xfa/fgas/font/cfgas_gefont.h"
@@ -173,7 +174,7 @@ void CFWL_WidgetTP::InitTTO() {
m_pFDEFont =
CFWL_FontManager::GetInstance()->FindFont(FX_WSTRC(L"Helvetica"), 0, 0);
- m_pTextOut.reset(new CFDE_TextOut);
+ m_pTextOut = pdfium::MakeUnique<CFDE_TextOut>();
m_pTextOut->SetFont(m_pFDEFont);
m_pTextOut->SetFontSize(FWLTHEME_CAPACITY_FontSize);
m_pTextOut->SetTextColor(FWLTHEME_CAPACITY_TextColor);
@@ -641,7 +642,7 @@ bool CFWL_FontData::LoadFont(const CFX_WideStringC& wsFontFamily,
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
m_pFontMgr = CFGAS_FontMgr::Create(FX_GetDefFontEnumerator());
#else
- m_pFontSource.reset(new CFX_FontSourceEnum_File);
+ m_pFontSource = pdfium::MakeUnique<CFX_FontSourceEnum_File>();
m_pFontMgr = CFGAS_FontMgr::Create(m_pFontSource.get());
#endif
}