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

Unified Diff: core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp

Issue 1417033004: Merge to XFA: Add type cast definitions for CPDF_Name. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 2 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
Index: core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp
index 6d071f3ae065eb80252786227b3657af13c8c775..62a3c679961083ae80a42d70600753c4715710ca 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp
@@ -510,11 +510,8 @@ void CPDF_AllStates::ProcessExtGS(CPDF_Dictionary* pGS,
continue;
}
case FXBSTR_ID('T', 'R', '2', 0):
- if (pObject && pObject->GetType() != PDFOBJ_NAME) {
- pGeneralState->m_pTR = pObject;
- } else {
- pGeneralState->m_pTR = NULL;
- }
+ pGeneralState->m_pTR =
+ (pObject && !pObject->IsName()) ? pObject : nullptr;
break;
case FXBSTR_ID('B', 'M', 0, 0): {
CFX_ByteString mode;

Powered by Google App Engine
This is Rietveld 408576698