summaryrefslogtreecommitdiff
path: root/xfa/fde/cfde_txtedtengine.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-03-09 13:27:29 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-03-09 18:52:36 +0000
commit52c73c24ab053e839182d3cdac6cbb758ce3a196 (patch)
tree85c59ac2c3d445809703bcf38e15339dc3403f20 /xfa/fde/cfde_txtedtengine.cpp
parente14df7d86c641a42dcea5fa0eedfa16aa49fcb92 (diff)
downloadpdfium-chromium/3037.tar.xz
Remove unused Txt break policies.chromium/3037
These are unset in the code, remove support. Change-Id: I76ef73929a1f74f59ccdd7bbd054d04dc9c5c6e7 Reviewed-on: https://pdfium-review.googlesource.com/2938 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'xfa/fde/cfde_txtedtengine.cpp')
-rw-r--r--xfa/fde/cfde_txtedtengine.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/xfa/fde/cfde_txtedtengine.cpp b/xfa/fde/cfde_txtedtengine.cpp
index a61f6ab4d9..fbc5e159ed 100644
--- a/xfa/fde/cfde_txtedtengine.cpp
+++ b/xfa/fde/cfde_txtedtengine.cpp
@@ -53,7 +53,7 @@ FDE_TXTEDT_TEXTCHANGE_INFO::FDE_TXTEDT_TEXTCHANGE_INFO() {}
FDE_TXTEDT_TEXTCHANGE_INFO::~FDE_TXTEDT_TEXTCHANGE_INFO() {}
CFDE_TxtEdtEngine::CFDE_TxtEdtEngine()
- : m_pTxtBuf(new CFDE_TxtEdtBuf()),
+ : m_pTxtBuf(pdfium::MakeUnique<CFDE_TxtEdtBuf>()),
m_nPageLineCount(20),
m_nLineCount(0),
m_nAnchorPos(-1),
@@ -81,11 +81,11 @@ CFDE_TxtEdtEngine::~CFDE_TxtEdtEngine() {
void CFDE_TxtEdtEngine::SetEditParams(const FDE_TXTEDTPARAMS& params) {
if (!m_pTextBreak)
- m_pTextBreak = pdfium::MakeUnique<CFX_TxtBreak>(FX_TXTBREAKPOLICY_None);
+ m_pTextBreak = pdfium::MakeUnique<CFX_TxtBreak>();
m_Param = params;
m_wLineEnd = params.wLineBreakChar;
- m_bAutoLineEnd = (m_Param.nLineEnd == FDE_TXTEDIT_LINEEND_Auto);
+ m_bAutoLineEnd = m_Param.nLineEnd == FDE_TXTEDIT_LINEEND_Auto;
UpdateTxtBreak();
}
@@ -930,8 +930,7 @@ void CFDE_TxtEdtEngine::RebuildParagraphs() {
FX_WCHAR wChar = L' ';
int32_t nParagStart = 0;
int32_t nIndex = 0;
- std::unique_ptr<IFX_CharIter> pIter(
- new CFDE_TxtEdtBuf::Iterator(m_pTxtBuf.get()));
+ auto pIter = pdfium::MakeUnique<CFDE_TxtEdtBuf::Iterator>(m_pTxtBuf.get());
pIter->SetAt(0);
do {
wChar = pIter->GetChar();
@@ -1376,7 +1375,7 @@ bool CFDE_TxtEdtEngine::MoveEnd() {
}
bool CFDE_TxtEdtEngine::IsFitArea(CFX_WideString& wsText) {
- std::unique_ptr<CFDE_TextOut> pTextOut(new CFDE_TextOut);
+ auto pTextOut = pdfium::MakeUnique<CFDE_TextOut>();
pTextOut->SetLineSpace(m_Param.fLineSpace);
pTextOut->SetFont(m_Param.pFont);
pTextOut->SetFontSize(m_Param.fFontSize);