Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(508)

Side by Side Diff: core/src/fpdfdoc/doc_form.cpp

Issue 1751753002: Remove implicit conversions and some cleanup (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/src/fpdfdoc/doc_bookmark.cpp ('k') | core/src/fpdfdoc/doc_formcontrol.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "core/include/fpdfdoc/fpdf_doc.h" 7 #include "core/include/fpdfdoc/fpdf_doc.h"
8 #include "core/src/fpdfdoc/doc_utils.h" 8 #include "core/src/fpdfdoc/doc_utils.h"
9 #include "third_party/base/stl_util.h" 9 #include "third_party/base/stl_util.h"
10 10
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 return AddNativeInterFormFont(m_pFormDict, m_pDocument, csNameTag); 829 return AddNativeInterFormFont(m_pFormDict, m_pDocument, csNameTag);
830 } 830 }
831 void CPDF_InterForm::RemoveFormFont(const CPDF_Font* pFont) { 831 void CPDF_InterForm::RemoveFormFont(const CPDF_Font* pFont) {
832 m_bUpdated = TRUE; 832 m_bUpdated = TRUE;
833 RemoveInterFormFont(m_pFormDict, pFont); 833 RemoveInterFormFont(m_pFormDict, pFont);
834 } 834 }
835 void CPDF_InterForm::RemoveFormFont(CFX_ByteString csNameTag) { 835 void CPDF_InterForm::RemoveFormFont(CFX_ByteString csNameTag) {
836 m_bUpdated = TRUE; 836 m_bUpdated = TRUE;
837 RemoveInterFormFont(m_pFormDict, csNameTag); 837 RemoveInterFormFont(m_pFormDict, csNameTag);
838 } 838 }
839
839 CPDF_DefaultAppearance CPDF_InterForm::GetDefaultAppearance() { 840 CPDF_DefaultAppearance CPDF_InterForm::GetDefaultAppearance() {
840 CFX_ByteString csDA; 841 if (!m_pFormDict)
841 if (!m_pFormDict) { 842 return CPDF_DefaultAppearance();
842 return csDA; 843 return CPDF_DefaultAppearance(m_pFormDict->GetStringBy("DA"));
843 }
844 csDA = m_pFormDict->GetStringBy("DA");
845 return csDA;
846 } 844 }
845
847 CPDF_Font* CPDF_InterForm::GetDefaultFormFont() { 846 CPDF_Font* CPDF_InterForm::GetDefaultFormFont() {
848 return GetDefaultInterFormFont(m_pFormDict, m_pDocument); 847 return GetDefaultInterFormFont(m_pFormDict, m_pDocument);
849 } 848 }
850 int CPDF_InterForm::GetFormAlignment() { 849 int CPDF_InterForm::GetFormAlignment() {
851 return m_pFormDict ? m_pFormDict->GetIntegerBy("Q", 0) : 0; 850 return m_pFormDict ? m_pFormDict->GetIntegerBy("Q", 0) : 0;
852 } 851 }
853 852
854 bool CPDF_InterForm::ResetForm(const std::vector<CPDF_FormField*>& fields, 853 bool CPDF_InterForm::ResetForm(const std::vector<CPDF_FormField*>& fields,
855 bool bIncludeOrExclude, 854 bool bIncludeOrExclude,
856 bool bNotify) { 855 bool bNotify) {
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
1207 FDF_ImportField(pField, L"", bNotify); 1206 FDF_ImportField(pField, L"", bNotify);
1208 } 1207 }
1209 if (bNotify && m_pFormNotify) { 1208 if (bNotify && m_pFormNotify) {
1210 m_pFormNotify->AfterFormImportData(this); 1209 m_pFormNotify->AfterFormImportData(this);
1211 } 1210 }
1212 return TRUE; 1211 return TRUE;
1213 } 1212 }
1214 void CPDF_InterForm::SetFormNotify(const CPDF_FormNotify* pNotify) { 1213 void CPDF_InterForm::SetFormNotify(const CPDF_FormNotify* pNotify) {
1215 m_pFormNotify = (CPDF_FormNotify*)pNotify; 1214 m_pFormNotify = (CPDF_FormNotify*)pNotify;
1216 } 1215 }
OLDNEW
« no previous file with comments | « core/src/fpdfdoc/doc_bookmark.cpp ('k') | core/src/fpdfdoc/doc_formcontrol.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698