diff options
Diffstat (limited to 'fpdfsdk/formfiller')
-rw-r--r-- | fpdfsdk/formfiller/cba_fontmap.cpp | 27 | ||||
-rw-r--r-- | fpdfsdk/formfiller/cffl_combobox.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/formfiller/cffl_textfield.cpp | 2 |
3 files changed, 15 insertions, 16 deletions
diff --git a/fpdfsdk/formfiller/cba_fontmap.cpp b/fpdfsdk/formfiller/cba_fontmap.cpp index 9102b7bf9a..b8c8865d44 100644 --- a/fpdfsdk/formfiller/cba_fontmap.cpp +++ b/fpdfsdk/formfiller/cba_fontmap.cpp @@ -79,24 +79,23 @@ void CBA_FontMap::SetDefaultFont(CPDF_Font* pFont, CPDF_Font* CBA_FontMap::FindFontSameCharset(CFX_ByteString& sFontAlias, int32_t nCharset) { - if (m_pAnnotDict->GetStringBy("Subtype") == "Widget") { - CPDF_Document* pDocument = GetDocument(); - CPDF_Dictionary* pRootDict = pDocument->GetRoot(); - if (!pRootDict) - return nullptr; + if (m_pAnnotDict->GetStringBy("Subtype") != "Widget") + return nullptr; - CPDF_Dictionary* pAcroFormDict = pRootDict->GetDictBy("AcroForm"); - if (!pAcroFormDict) - return nullptr; + CPDF_Document* pDocument = GetDocument(); + CPDF_Dictionary* pRootDict = pDocument->GetRoot(); + if (!pRootDict) + return nullptr; - CPDF_Dictionary* pDRDict = pAcroFormDict->GetDictBy("DR"); - if (!pDRDict) - return nullptr; + CPDF_Dictionary* pAcroFormDict = pRootDict->GetDictBy("AcroForm"); + if (!pAcroFormDict) + return nullptr; - return FindResFontSameCharset(pDRDict, sFontAlias, nCharset); - } + CPDF_Dictionary* pDRDict = pAcroFormDict->GetDictBy("DR"); + if (!pDRDict) + return nullptr; - return nullptr; + return FindResFontSameCharset(pDRDict, sFontAlias, nCharset); } CPDF_Document* CBA_FontMap::GetDocument() { diff --git a/fpdfsdk/formfiller/cffl_combobox.cpp b/fpdfsdk/formfiller/cffl_combobox.cpp index d489a243d9..262c485138 100644 --- a/fpdfsdk/formfiller/cffl_combobox.cpp +++ b/fpdfsdk/formfiller/cffl_combobox.cpp @@ -257,7 +257,7 @@ void CFFL_ComboBox::OnSetFocus(CPWL_Wnd* pWnd) { if (pWnd->GetClassName() == PWL_CLASSNAME_EDIT) { CPWL_Edit* pEdit = (CPWL_Edit*)pWnd; - pEdit->SetCharSet(134); + pEdit->SetCharSet(FXFONT_GB2312_CHARSET); pEdit->SetCodePage(936); pEdit->SetReadyToInput(); diff --git a/fpdfsdk/formfiller/cffl_textfield.cpp b/fpdfsdk/formfiller/cffl_textfield.cpp index be1f36b697..4f32f42ac7 100644 --- a/fpdfsdk/formfiller/cffl_textfield.cpp +++ b/fpdfsdk/formfiller/cffl_textfield.cpp @@ -269,7 +269,7 @@ void CFFL_TextField::OnSetFocus(CPWL_Wnd* pWnd) { ASSERT(m_pApp); if (pWnd->GetClassName() == PWL_CLASSNAME_EDIT) { CPWL_Edit* pEdit = (CPWL_Edit*)pWnd; - pEdit->SetCharSet(134); + pEdit->SetCharSet(FXFONT_GB2312_CHARSET); pEdit->SetCodePage(936); pEdit->SetReadyToInput(); |