summaryrefslogtreecommitdiff
path: root/xfa/fwl/cfwl_edit.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-08-16 16:37:16 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-17 15:39:14 +0000
commitb3e7bfa6ed35651a22df314352883ccb44a7203d (patch)
tree7d5c4734bb8203f358890d09d2bafc49bc7fa67a /xfa/fwl/cfwl_edit.cpp
parent1748c4f6e42cda6ffa6bf32731d2fd525c060cf1 (diff)
downloadpdfium-b3e7bfa6ed35651a22df314352883ccb44a7203d.tar.xz
Cleanup visibilty and unused methods in xfa/fde
This CL fixes the visibility of some methods in xfa/fde along with removing unused methods. Unused params are also removed. Change-Id: Ic6e6d2ac8d07dc4bdabb3e0121831e4bf3fbb8ec Reviewed-on: https://pdfium-review.googlesource.com/11271 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fwl/cfwl_edit.cpp')
-rw-r--r--xfa/fwl/cfwl_edit.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/xfa/fwl/cfwl_edit.cpp b/xfa/fwl/cfwl_edit.cpp
index 18fbd33b39..7dd8baded8 100644
--- a/xfa/fwl/cfwl_edit.cpp
+++ b/xfa/fwl/cfwl_edit.cpp
@@ -433,7 +433,7 @@ bool CFWL_Edit::OnPageLoad(int32_t nPageIndex) {
if (!pPage)
return false;
- pPage->LoadPage(nullptr);
+ pPage->LoadPage();
return true;
}
@@ -442,7 +442,7 @@ bool CFWL_Edit::OnPageUnload(int32_t nPageIndex) {
if (!pPage)
return false;
- pPage->UnloadPage(nullptr);
+ pPage->UnloadPage();
return true;
}
@@ -595,7 +595,12 @@ void CFWL_Edit::RenderText(CFX_RenderDevice* pRenderDev,
if (!pTextSet)
return;
- CFX_RetainPtr<CFGAS_GEFont> pFont = pTextSet->GetFont();
+ CFDE_TxtEdtEngine* engine = pPage.GetEngine();
+ ASSERT(engine);
+ const FDE_TXTEDTPARAMS* params = engine->GetEditParams();
+ ASSERT(params);
+
+ CFX_RetainPtr<CFGAS_GEFont> pFont = params->pFont;
if (!pFont)
return;
@@ -623,9 +628,8 @@ void CFWL_Edit::RenderText(CFX_RenderDevice* pRenderDev,
char_pos.resize(iCount, FXTEXT_CHARPOS());
iCount = pTextSet->GetDisplayPos(pText, char_pos.data());
- CFDE_TextOut::DrawString(pRenderDev, pTextSet->GetFontColor(), pFont,
- char_pos.data(), iCount, pTextSet->GetFontSize(),
- &mt);
+ CFDE_TextOut::DrawString(pRenderDev, params->dwFontColor, pFont,
+ char_pos.data(), iCount, params->fFontSize, &mt);
}
}
@@ -719,17 +723,17 @@ void CFWL_Edit::UpdateEditParams() {
void CFWL_Edit::UpdateEditLayout() {
if (m_EdtEngine.GetTextLength() <= 0)
- m_EdtEngine.SetTextByStream(nullptr);
+ m_EdtEngine.SetText(L"");
CFDE_TxtEdtPage* pPage = m_EdtEngine.GetPage(0);
if (pPage)
- pPage->UnloadPage(nullptr);
+ pPage->UnloadPage();
m_EdtEngine.Layout();
pPage = m_EdtEngine.GetPage(0);
if (pPage)
- pPage->LoadPage(nullptr);
+ pPage->LoadPage();
}
bool CFWL_Edit::UpdateOffset() {