diff options
Diffstat (limited to 'fpdfsdk/src/fsdk_annothandler.cpp')
-rw-r--r-- | fpdfsdk/src/fsdk_annothandler.cpp | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/fpdfsdk/src/fsdk_annothandler.cpp b/fpdfsdk/src/fsdk_annothandler.cpp index 9209a46f49..ee06091bff 100644 --- a/fpdfsdk/src/fsdk_annothandler.cpp +++ b/fpdfsdk/src/fsdk_annothandler.cpp @@ -577,28 +577,24 @@ void CPDFSDK_BFAnnotHandler::OnCreate(CPDFSDK_Annot* pAnnot) { } void CPDFSDK_BFAnnotHandler::OnLoad(CPDFSDK_Annot* pAnnot) { - ASSERT(pAnnot != NULL); - - CFX_ByteString sSubType = pAnnot->GetSubType(); + if (pAnnot->GetSubType() == BFFT_SIGNATURE) + return; - if (sSubType == BFFT_SIGNATURE) { - } else { - CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; - if (!pWidget->IsAppearanceValid()) - pWidget->ResetAppearance(NULL, FALSE); - - int nFieldType = pWidget->GetFieldType(); - if (nFieldType == FIELDTYPE_TEXTFIELD || nFieldType == FIELDTYPE_COMBOBOX) { - FX_BOOL bFormated = FALSE; - CFX_WideString sValue = pWidget->OnFormat(bFormated); - if (bFormated && nFieldType == FIELDTYPE_COMBOBOX) { - pWidget->ResetAppearance(sValue.c_str(), FALSE); - } + CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; + if (!pWidget->IsAppearanceValid()) + pWidget->ResetAppearance(NULL, FALSE); + + int nFieldType = pWidget->GetFieldType(); + if (nFieldType == FIELDTYPE_TEXTFIELD || nFieldType == FIELDTYPE_COMBOBOX) { + FX_BOOL bFormated = FALSE; + CFX_WideString sValue = pWidget->OnFormat(bFormated); + if (bFormated && nFieldType == FIELDTYPE_COMBOBOX) { + pWidget->ResetAppearance(sValue.c_str(), FALSE); } - - if (m_pFormFiller) - m_pFormFiller->OnLoad(pAnnot); } + + if (m_pFormFiller) + m_pFormFiller->OnLoad(pAnnot); } FX_BOOL CPDFSDK_BFAnnotHandler::OnSetFocus(CPDFSDK_Annot* pAnnot, |