summaryrefslogtreecommitdiff
path: root/xfa/fwl
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fwl')
-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() {