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

Side by Side Diff: fpdfsdk/fsdk_baseannot.cpp

Issue 1835693002: Remove FX_DWORD from fpdfsdk/ and testing/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: 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 | « fpdfsdk/fsdk_annothandler.cpp ('k') | fpdfsdk/fsdk_baseform.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 <algorithm> 7 #include <algorithm>
8 8
9 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" 9 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h"
10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h"
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 FX_SYSTEMTIME CPDFSDK_BAAnnot::GetModifiedDate() const { 615 FX_SYSTEMTIME CPDFSDK_BAAnnot::GetModifiedDate() const {
616 FX_SYSTEMTIME systime; 616 FX_SYSTEMTIME systime;
617 CFX_ByteString str = m_pAnnot->GetAnnotDict()->GetStringBy("M"); 617 CFX_ByteString str = m_pAnnot->GetAnnotDict()->GetStringBy("M");
618 618
619 CPDFSDK_DateTime dt(str); 619 CPDFSDK_DateTime dt(str);
620 dt.ToSystemTime(systime); 620 dt.ToSystemTime(systime);
621 621
622 return systime; 622 return systime;
623 } 623 }
624 624
625 void CPDFSDK_BAAnnot::SetFlags(FX_DWORD nFlags) { 625 void CPDFSDK_BAAnnot::SetFlags(uint32_t nFlags) {
626 m_pAnnot->GetAnnotDict()->SetAtInteger("F", nFlags); 626 m_pAnnot->GetAnnotDict()->SetAtInteger("F", nFlags);
627 } 627 }
628 628
629 FX_DWORD CPDFSDK_BAAnnot::GetFlags() const { 629 uint32_t CPDFSDK_BAAnnot::GetFlags() const {
630 return m_pAnnot->GetAnnotDict()->GetIntegerBy("F"); 630 return m_pAnnot->GetAnnotDict()->GetIntegerBy("F");
631 } 631 }
632 632
633 void CPDFSDK_BAAnnot::SetAppState(const CFX_ByteString& str) { 633 void CPDFSDK_BAAnnot::SetAppState(const CFX_ByteString& str) {
634 if (str.IsEmpty()) 634 if (str.IsEmpty())
635 m_pAnnot->GetAnnotDict()->RemoveAt("AS"); 635 m_pAnnot->GetAnnotDict()->RemoveAt("AS");
636 else 636 else
637 m_pAnnot->GetAnnotDict()->SetAtString("AS", str); 637 m_pAnnot->GetAnnotDict()->SetAtString("AS", str);
638 } 638 }
639 639
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 } 877 }
878 878
879 FX_FLOAT CPDFSDK_Annot::GetMinHeight() const { 879 FX_FLOAT CPDFSDK_Annot::GetMinHeight() const {
880 return BA_ANNOT_MINHEIGHT; 880 return BA_ANNOT_MINHEIGHT;
881 } 881 }
882 882
883 FX_BOOL CPDFSDK_BAAnnot::CreateFormFiller() { 883 FX_BOOL CPDFSDK_BAAnnot::CreateFormFiller() {
884 return TRUE; 884 return TRUE;
885 } 885 }
886 FX_BOOL CPDFSDK_BAAnnot::IsVisible() const { 886 FX_BOOL CPDFSDK_BAAnnot::IsVisible() const {
887 FX_DWORD nFlags = GetFlags(); 887 uint32_t nFlags = GetFlags();
888 return !((nFlags & ANNOTFLAG_INVISIBLE) || (nFlags & ANNOTFLAG_HIDDEN) || 888 return !((nFlags & ANNOTFLAG_INVISIBLE) || (nFlags & ANNOTFLAG_HIDDEN) ||
889 (nFlags & ANNOTFLAG_NOVIEW)); 889 (nFlags & ANNOTFLAG_NOVIEW));
890 } 890 }
891 891
892 CPDF_Action CPDFSDK_BAAnnot::GetAction() const { 892 CPDF_Action CPDFSDK_BAAnnot::GetAction() const {
893 return CPDF_Action(m_pAnnot->GetAnnotDict()->GetDictBy("A")); 893 return CPDF_Action(m_pAnnot->GetAnnotDict()->GetDictBy("A"));
894 } 894 }
895 895
896 void CPDFSDK_BAAnnot::SetAction(const CPDF_Action& action) { 896 void CPDFSDK_BAAnnot::SetAction(const CPDF_Action& action) {
897 ASSERT(action.GetDict()); 897 ASSERT(action.GetDict());
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 958
959 CPDF_Page* CPDFSDK_Annot::GetPDFPage() { 959 CPDF_Page* CPDFSDK_Annot::GetPDFPage() {
960 return m_pPageView ? m_pPageView->GetPDFPage() : nullptr; 960 return m_pPageView ? m_pPageView->GetPDFPage() : nullptr;
961 } 961 }
962 962
963 #ifdef PDF_ENABLE_XFA 963 #ifdef PDF_ENABLE_XFA
964 CPDFXFA_Page* CPDFSDK_Annot::GetPDFXFAPage() { 964 CPDFXFA_Page* CPDFSDK_Annot::GetPDFXFAPage() {
965 return m_pPageView ? m_pPageView->GetPDFXFAPage() : nullptr; 965 return m_pPageView ? m_pPageView->GetPDFXFAPage() : nullptr;
966 } 966 }
967 #endif // PDF_ENABLE_XFA 967 #endif // PDF_ENABLE_XFA
OLDNEW
« no previous file with comments | « fpdfsdk/fsdk_annothandler.cpp ('k') | fpdfsdk/fsdk_baseform.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698