OLD | NEW |
---|---|
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 Loading... | |
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 CFX_ByteString csDA; |
Tom Sepez
2016/03/01 17:53:35
Do we have no-arg constructors for CPDF_DefaultApp
Wei Li
2016/03/01 21:46:53
Done.
| |
841 if (!m_pFormDict) { | 842 if (m_pFormDict) |
842 return csDA; | 843 csDA = m_pFormDict->GetStringBy("DA"); |
843 } | 844 return CPDF_DefaultAppearance(csDA); |
844 csDA = m_pFormDict->GetStringBy("DA"); | |
845 return csDA; | |
846 } | 845 } |
846 | |
847 CPDF_Font* CPDF_InterForm::GetDefaultFormFont() { | 847 CPDF_Font* CPDF_InterForm::GetDefaultFormFont() { |
848 return GetDefaultInterFormFont(m_pFormDict, m_pDocument); | 848 return GetDefaultInterFormFont(m_pFormDict, m_pDocument); |
849 } | 849 } |
850 int CPDF_InterForm::GetFormAlignment() { | 850 int CPDF_InterForm::GetFormAlignment() { |
851 return m_pFormDict ? m_pFormDict->GetIntegerBy("Q", 0) : 0; | 851 return m_pFormDict ? m_pFormDict->GetIntegerBy("Q", 0) : 0; |
852 } | 852 } |
853 | 853 |
854 bool CPDF_InterForm::ResetForm(const std::vector<CPDF_FormField*>& fields, | 854 bool CPDF_InterForm::ResetForm(const std::vector<CPDF_FormField*>& fields, |
855 bool bIncludeOrExclude, | 855 bool bIncludeOrExclude, |
856 bool bNotify) { | 856 bool bNotify) { |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1207 FDF_ImportField(pField, L"", bNotify); | 1207 FDF_ImportField(pField, L"", bNotify); |
1208 } | 1208 } |
1209 if (bNotify && m_pFormNotify) { | 1209 if (bNotify && m_pFormNotify) { |
1210 m_pFormNotify->AfterFormImportData(this); | 1210 m_pFormNotify->AfterFormImportData(this); |
1211 } | 1211 } |
1212 return TRUE; | 1212 return TRUE; |
1213 } | 1213 } |
1214 void CPDF_InterForm::SetFormNotify(const CPDF_FormNotify* pNotify) { | 1214 void CPDF_InterForm::SetFormNotify(const CPDF_FormNotify* pNotify) { |
1215 m_pFormNotify = (CPDF_FormNotify*)pNotify; | 1215 m_pFormNotify = (CPDF_FormNotify*)pNotify; |
1216 } | 1216 } |
OLD | NEW |