summaryrefslogtreecommitdiff
path: root/xfa/fde
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fde')
-rw-r--r--xfa/fde/cfde_txtedtpage.cpp6
-rw-r--r--xfa/fde/cfde_txtedtparag.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/xfa/fde/cfde_txtedtpage.cpp b/xfa/fde/cfde_txtedtpage.cpp
index ef16939116..122eb40f7d 100644
--- a/xfa/fde/cfde_txtedtpage.cpp
+++ b/xfa/fde/cfde_txtedtpage.cpp
@@ -215,7 +215,7 @@ int32_t CFDE_TxtEdtPage::SelectWord(const CFX_PointF& fPoint, int32_t& nCount) {
if (nIndex < 0) {
return -1;
}
- std::unique_ptr<CFX_WordBreak> pIter(new CFX_WordBreak);
+ auto pIter = pdfium::MakeUnique<CFX_WordBreak>();
pIter->Attach(new CFDE_TxtEdtBuf::Iterator(pBuf));
pIter->SetAt(nIndex);
nCount = pIter->GetWordLength();
@@ -238,8 +238,8 @@ int32_t CFDE_TxtEdtPage::LoadPage(const CFX_RectF* pClipBox,
if (pParams->dwMode & FDE_TEXTEDITMODE_Password) {
wcAlias = m_pEditEngine->GetAliasChar();
}
- m_pIter.reset(new CFDE_TxtEdtBuf::Iterator(static_cast<CFDE_TxtEdtBuf*>(pBuf),
- wcAlias));
+ m_pIter = pdfium::MakeUnique<CFDE_TxtEdtBuf::Iterator>(
+ static_cast<CFDE_TxtEdtBuf*>(pBuf), wcAlias);
CFX_TxtBreak* pBreak = m_pEditEngine->GetTextBreak();
pBreak->EndBreak(CFX_BreakType::Paragraph);
pBreak->ClearBreakPieces();
diff --git a/xfa/fde/cfde_txtedtparag.cpp b/xfa/fde/cfde_txtedtparag.cpp
index ceff448f2c..bcacc66695 100644
--- a/xfa/fde/cfde_txtedtparag.cpp
+++ b/xfa/fde/cfde_txtedtparag.cpp
@@ -43,8 +43,8 @@ void CFDE_TxtEdtParag::LoadParag() {
if (pParam->dwMode & FDE_TEXTEDITMODE_Password)
wcAlias = m_pEngine->GetAliasChar();
- std::unique_ptr<IFX_CharIter> pIter(new CFDE_TxtEdtBuf::Iterator(
- static_cast<CFDE_TxtEdtBuf*>(pTxtBuf), wcAlias));
+ auto pIter = pdfium::MakeUnique<CFDE_TxtEdtBuf::Iterator>(
+ static_cast<CFDE_TxtEdtBuf*>(pTxtBuf), wcAlias);
pIter->SetAt(m_nCharStart);
int32_t nEndIndex = m_nCharStart + m_nCharCount;
std::vector<int32_t> LineBaseArr;