diff options
Diffstat (limited to 'fpdfsdk/formfiller')
-rw-r--r-- | fpdfsdk/formfiller/cba_fontmap.cpp | 30 | ||||
-rw-r--r-- | fpdfsdk/formfiller/cffl_combobox.cpp | 4 | ||||
-rw-r--r-- | fpdfsdk/formfiller/cffl_formfiller.cpp | 21 | ||||
-rw-r--r-- | fpdfsdk/formfiller/cffl_iformfiller.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/formfiller/cffl_listbox.cpp | 4 | ||||
-rw-r--r-- | fpdfsdk/formfiller/cffl_textfield.cpp | 7 |
6 files changed, 34 insertions, 34 deletions
diff --git a/fpdfsdk/formfiller/cba_fontmap.cpp b/fpdfsdk/formfiller/cba_fontmap.cpp index 4c74d5a242..9102b7bf9a 100644 --- a/fpdfsdk/formfiller/cba_fontmap.cpp +++ b/fpdfsdk/formfiller/cba_fontmap.cpp @@ -16,9 +16,9 @@ CBA_FontMap::CBA_FontMap(CPDFSDK_Annot* pAnnot, CFX_SystemHandler* pSystemHandler) : CPWL_FontMap(pSystemHandler), - m_pDocument(NULL), - m_pAnnotDict(NULL), - m_pDefaultFont(NULL), + m_pDocument(nullptr), + m_pAnnotDict(nullptr), + m_pDefaultFont(nullptr), m_sAPType("N") { CPDF_Page* pPage = pAnnot->GetPDFPage(); @@ -31,7 +31,7 @@ CBA_FontMap::~CBA_FontMap() {} void CBA_FontMap::Reset() { Empty(); - m_pDefaultFont = NULL; + m_pDefaultFont = nullptr; m_sDefaultFontName = ""; } @@ -83,20 +83,20 @@ CPDF_Font* CBA_FontMap::FindFontSameCharset(CFX_ByteString& sFontAlias, CPDF_Document* pDocument = GetDocument(); CPDF_Dictionary* pRootDict = pDocument->GetRoot(); if (!pRootDict) - return NULL; + return nullptr; CPDF_Dictionary* pAcroFormDict = pRootDict->GetDictBy("AcroForm"); if (!pAcroFormDict) - return NULL; + return nullptr; CPDF_Dictionary* pDRDict = pAcroFormDict->GetDictBy("DR"); if (!pDRDict) - return NULL; + return nullptr; return FindResFontSameCharset(pDRDict, sFontAlias, nCharset); } - return NULL; + return nullptr; } CPDF_Document* CBA_FontMap::GetDocument() { @@ -107,14 +107,14 @@ CPDF_Font* CBA_FontMap::FindResFontSameCharset(CPDF_Dictionary* pResDict, CFX_ByteString& sFontAlias, int32_t nCharset) { if (!pResDict) - return NULL; + return nullptr; CPDF_Dictionary* pFonts = pResDict->GetDictBy("Font"); if (!pFonts) - return NULL; + return nullptr; CPDF_Document* pDocument = GetDocument(); - CPDF_Font* pFind = NULL; + CPDF_Font* pFind = nullptr; for (const auto& it : *pFonts) { const CFX_ByteString& csKey = it.first; CPDF_Object* pObj = it.second; @@ -165,7 +165,7 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont, CPDF_Stream* pStream = pAPDict->GetStreamBy(m_sAPType); if (!pStream) { - pStream = new CPDF_Stream(NULL, 0, NULL); + pStream = new CPDF_Stream(nullptr, 0, nullptr); int32_t objnum = m_pDocument->AddIndirectObject(pStream); pAPDict->SetAtReference(m_sAPType, m_pDocument, objnum); } @@ -174,7 +174,7 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont, if (!pStreamDict) { pStreamDict = new CPDF_Dictionary; - pStream->InitStream(NULL, 0, pStreamDict); + pStream->InitStream(nullptr, 0, pStreamDict); } if (pStreamDict) { @@ -199,7 +199,7 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont, } CPDF_Font* CBA_FontMap::GetAnnotDefaultFont(CFX_ByteString& sAlias) { - CPDF_Dictionary* pAcroFormDict = NULL; + CPDF_Dictionary* pAcroFormDict = nullptr; const bool bWidget = (m_pAnnotDict->GetStringBy("Subtype") == "Widget"); if (bWidget) { if (CPDF_Dictionary* pRootDict = m_pDocument->GetRoot()) @@ -218,7 +218,7 @@ CPDF_Font* CBA_FontMap::GetAnnotDefaultFont(CFX_ByteString& sAlias) { } } - CPDF_Dictionary* pFontDict = NULL; + CPDF_Dictionary* pFontDict = nullptr; if (!sDA.IsEmpty()) { CPDF_SimpleParser syntax(sDA.AsStringC()); diff --git a/fpdfsdk/formfiller/cffl_combobox.cpp b/fpdfsdk/formfiller/cffl_combobox.cpp index 8b2da626b2..d489a243d9 100644 --- a/fpdfsdk/formfiller/cffl_combobox.cpp +++ b/fpdfsdk/formfiller/cffl_combobox.cpp @@ -14,7 +14,7 @@ #include "fpdfsdk/pdfwindow/PWL_ComboBox.h" CFFL_ComboBox::CFFL_ComboBox(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot) - : CFFL_FormFiller(pApp, pAnnot), m_pFontMap(NULL) { + : CFFL_FormFiller(pApp, pAnnot), m_pFontMap(nullptr) { m_State.nIndex = 0; m_State.nStart = 0; m_State.nEnd = 0; @@ -227,7 +227,7 @@ CPWL_Wnd* CFFL_ComboBox::ResetPDFWindow(CPDFSDK_PageView* pPageView, DestroyPDFWindow(pPageView); - CPWL_Wnd* pRet = NULL; + CPWL_Wnd* pRet = nullptr; if (bRestoreValue) { RestoreState(pPageView); diff --git a/fpdfsdk/formfiller/cffl_formfiller.cpp b/fpdfsdk/formfiller/cffl_formfiller.cpp index 8ee6da387d..d7bc9586a4 100644 --- a/fpdfsdk/formfiller/cffl_formfiller.cpp +++ b/fpdfsdk/formfiller/cffl_formfiller.cpp @@ -88,7 +88,8 @@ void CFFL_FormFiller::OnDraw(CPDFSDK_PageView* pPageView, } else { CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; if (CFFL_IFormFiller::IsVisible(pWidget)) - pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL); + pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, + nullptr); } } @@ -98,7 +99,7 @@ void CFFL_FormFiller::OnDrawDeactive(CPDFSDK_PageView* pPageView, CFX_Matrix* pUser2Device, uint32_t dwFlags) { CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; - pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL); + pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, nullptr); } void CFFL_FormFiller::OnCreate(CPDFSDK_Annot* pAnnot) {} @@ -293,7 +294,7 @@ PWL_CREATEPARAM CFFL_FormFiller::GetCreateParam() { ASSERT(m_pApp); PWL_CREATEPARAM cp; - cp.pParentWnd = NULL; + cp.pParentWnd = nullptr; cp.pProvider = this; cp.rcRectWnd = GetPDFWindowRect(); @@ -690,23 +691,25 @@ void CFFL_Button::OnDraw(CPDFSDK_PageView* pPageView, CPDF_FormControl::HighlightingMode eHM = pCtrl->GetHighlightingMode(); if (eHM != CPDF_FormControl::Push) { - pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL); + pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, nullptr); return; } if (m_bMouseDown) { if (pWidget->IsWidgetAppearanceValid(CPDF_Annot::Down)) - pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Down, NULL); + pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Down, nullptr); else - pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL); + pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, + nullptr); } else if (m_bMouseIn) { if (pWidget->IsWidgetAppearanceValid(CPDF_Annot::Rollover)) pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Rollover, - NULL); + nullptr); else - pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL); + pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, + nullptr); } else { - pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL); + pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, nullptr); } } diff --git a/fpdfsdk/formfiller/cffl_iformfiller.cpp b/fpdfsdk/formfiller/cffl_iformfiller.cpp index 9dcc734a24..107197fa72 100644 --- a/fpdfsdk/formfiller/cffl_iformfiller.cpp +++ b/fpdfsdk/formfiller/cffl_iformfiller.cpp @@ -97,7 +97,7 @@ void CFFL_IFormFiller::OnDraw(CPDFSDK_PageView* pPageView, pFormFiller->OnDrawDeactive(pPageView, pAnnot, pDevice, pUser2Device, dwFlags); } else { - pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL); + pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, nullptr); } if (!IsReadOnly(pWidget) && IsFillingAllowed(pWidget)) diff --git a/fpdfsdk/formfiller/cffl_listbox.cpp b/fpdfsdk/formfiller/cffl_listbox.cpp index dc4f07d0d2..cbac83cb55 100644 --- a/fpdfsdk/formfiller/cffl_listbox.cpp +++ b/fpdfsdk/formfiller/cffl_listbox.cpp @@ -16,7 +16,7 @@ #define FFL_DEFAULTLISTBOXFONTSIZE 12.0f CFFL_ListBox::CFFL_ListBox(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pWidget) - : CFFL_FormFiller(pApp, pWidget), m_pFontMap(NULL) {} + : CFFL_FormFiller(pApp, pWidget), m_pFontMap(nullptr) {} CFFL_ListBox::~CFFL_ListBox() { delete m_pFontMap; @@ -193,7 +193,7 @@ CPWL_Wnd* CFFL_ListBox::ResetPDFWindow(CPDFSDK_PageView* pPageView, DestroyPDFWindow(pPageView); - CPWL_Wnd* pRet = NULL; + CPWL_Wnd* pRet = nullptr; if (bRestoreValue) { RestoreState(pPageView); diff --git a/fpdfsdk/formfiller/cffl_textfield.cpp b/fpdfsdk/formfiller/cffl_textfield.cpp index 7399651234..be1f36b697 100644 --- a/fpdfsdk/formfiller/cffl_textfield.cpp +++ b/fpdfsdk/formfiller/cffl_textfield.cpp @@ -11,7 +11,7 @@ #include "fpdfsdk/include/fsdk_mgr.h" CFFL_TextField::CFFL_TextField(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot) - : CFFL_FormFiller(pApp, pAnnot), m_pFontMap(NULL) { + : CFFL_FormFiller(pApp, pAnnot), m_pFontMap(nullptr) { m_State.nStart = m_State.nEnd = 0; } @@ -30,9 +30,6 @@ PWL_CREATEPARAM CFFL_TextField::GetCreateParam() { cp.dwFlags |= PES_PASSWORD; } - if (!(nFlags & FIELDFLAG_DONOTSPELLCHECK)) { - } - if (nFlags & FIELDFLAG_MULTILINE) { cp.dwFlags |= PES_MULTILINE | PES_AUTORETURN | PES_TOP; @@ -244,7 +241,7 @@ CPWL_Wnd* CFFL_TextField::ResetPDFWindow(CPDFSDK_PageView* pPageView, DestroyPDFWindow(pPageView); - CPWL_Wnd* pRet = NULL; + CPWL_Wnd* pRet = nullptr; if (bRestoreValue) { RestoreState(pPageView); |