diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-11-24 13:31:52 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-11-24 13:31:52 -0800 |
commit | 55dd8546ebc365b3778b40ba9d82879f581503e1 (patch) | |
tree | 7a1b79587122d31fd2ba91c75b7ad1d166116b8c /fpdfsdk/src/fsdk_annothandler.cpp | |
parent | abea9d857e8e197d0095940f882b0db6a785d825 (diff) | |
download | pdfium-55dd8546ebc365b3778b40ba9d82879f581503e1.tar.xz |
Add "Underlying types" to master.
Change some master code to line up better with XFA, so
that the XFA changes are additive when possible, rather
than replacements.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1468253005 .
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, |