summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/fpdf_page/fpdf_page_parser.cpp')
-rw-r--r--core/fpdfapi/fpdf_page/fpdf_page_parser.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp
index 70e1d1aea6..5272a4464b 100644
--- a/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp
+++ b/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp
@@ -686,21 +686,19 @@ void CPDF_StreamContentParser::Handle_ConcatMatrix() {
}
void CPDF_StreamContentParser::Handle_SetColorSpace_Fill() {
- CFX_ByteString csname = GetString(0);
- CPDF_ColorSpace* pCS = FindColorSpace(csname);
- if (!pCS) {
+ CPDF_ColorSpace* pCS = FindColorSpace(GetString(0));
+ if (!pCS)
return;
- }
- m_pCurStates->m_ColorState.GetPrivateCopy()->m_FillColor.SetColorSpace(pCS);
+
+ m_pCurStates->m_ColorState.GetMutableFillColor()->SetColorSpace(pCS);
}
void CPDF_StreamContentParser::Handle_SetColorSpace_Stroke() {
- CFX_ByteString csname = GetString(0);
- CPDF_ColorSpace* pCS = FindColorSpace(csname);
- if (!pCS) {
+ CPDF_ColorSpace* pCS = FindColorSpace(GetString(0));
+ if (!pCS)
return;
- }
- m_pCurStates->m_ColorState.GetPrivateCopy()->m_StrokeColor.SetColorSpace(pCS);
+
+ m_pCurStates->m_ColorState.GetMutableStrokeColor()->SetColorSpace(pCS);
}
void CPDF_StreamContentParser::Handle_SetDash() {