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

Unified Diff: core/fpdfapi/fpdf_page/cpdf_form.cpp

Issue 1923153002: CPDF_Document::LoadPattern() and friends always have a valid matrix. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@clean_doc2
Patch Set: rebase Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « BUILD.gn ('k') | core/fpdfapi/fpdf_page/cpdf_pattern.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_page/cpdf_form.cpp
diff --git a/core/fpdfapi/fpdf_page/cpdf_form.cpp b/core/fpdfapi/fpdf_page/cpdf_form.cpp
index 54698c60b6bc5ff5ede326c44fcf8fcac22ed116..570419f58f4c2730372ab3b8a92acfe6cecc04d3 100644
--- a/core/fpdfapi/fpdf_page/cpdf_form.cpp
+++ b/core/fpdfapi/fpdf_page/cpdf_form.cpp
@@ -18,15 +18,13 @@ CPDF_Form::CPDF_Form(CPDF_Document* pDoc,
CPDF_Dictionary* pParentResources) {
m_pDocument = pDoc;
m_pFormStream = pFormStream;
- m_pFormDict = pFormStream ? pFormStream->GetDict() : NULL;
+ m_pFormDict = pFormStream ? pFormStream->GetDict() : nullptr;
m_pResources = m_pFormDict->GetDictBy("Resources");
m_pPageResources = pPageResources;
- if (!m_pResources) {
+ if (!m_pResources)
m_pResources = pParentResources;
- }
- if (!m_pResources) {
+ if (!m_pResources)
m_pResources = pPageResources;
- }
m_Transparency = 0;
LoadTransInfo();
}
@@ -34,23 +32,23 @@ CPDF_Form::CPDF_Form(CPDF_Document* pDoc,
CPDF_Form::~CPDF_Form() {}
void CPDF_Form::StartParse(CPDF_AllStates* pGraphicStates,
- CFX_Matrix* pParentMatrix,
+ const CFX_Matrix* pParentMatrix,
CPDF_Type3Char* pType3Char,
int level) {
- if (m_ParseState == CONTENT_PARSED || m_ParseState == CONTENT_PARSING) {
+ if (m_ParseState == CONTENT_PARSED || m_ParseState == CONTENT_PARSING)
return;
- }
+
m_pParser.reset(new CPDF_ContentParser);
m_pParser->Start(this, pGraphicStates, pParentMatrix, pType3Char, level);
m_ParseState = CONTENT_PARSING;
}
void CPDF_Form::ParseContent(CPDF_AllStates* pGraphicStates,
- CFX_Matrix* pParentMatrix,
+ const CFX_Matrix* pParentMatrix,
CPDF_Type3Char* pType3Char,
int level) {
StartParse(pGraphicStates, pParentMatrix, pType3Char, level);
- ContinueParse(NULL);
+ ContinueParse(nullptr);
}
CPDF_Form* CPDF_Form::Clone() const {
« no previous file with comments | « BUILD.gn ('k') | core/fpdfapi/fpdf_page/cpdf_pattern.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698