From 275e260a6cd4a8e506ba974feb85ebcd926c1739 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Mon, 18 Sep 2017 14:23:18 -0400 Subject: Convert string class names Automated using git grep & sed. Replace StringC classes with StringView classes. Remove the CFX_ prefix and put string classes in fxcrt namespace. Change AsStringC() to AsStringView(). Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*, Foo). Couple of tests needed to have their names regularlized. BUG=pdfium:894 Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d Reviewed-on: https://pdfium-review.googlesource.com/14151 Reviewed-by: Tom Sepez Commit-Queue: Ryan Harrison --- core/fpdfapi/page/cpdf_generalstate.cpp | 44 ++++++++++++++++----------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'core/fpdfapi/page/cpdf_generalstate.cpp') diff --git a/core/fpdfapi/page/cpdf_generalstate.cpp b/core/fpdfapi/page/cpdf_generalstate.cpp index 540707447e..c5c259f051 100644 --- a/core/fpdfapi/page/cpdf_generalstate.cpp +++ b/core/fpdfapi/page/cpdf_generalstate.cpp @@ -13,7 +13,7 @@ namespace { -int RI_StringToId(const CFX_ByteString& ri) { +int RI_StringToId(const ByteString& ri) { uint32_t id = ri.GetID(); if (id == FXBSTR_ID('A', 'b', 's', 'o')) return 1; @@ -27,7 +27,7 @@ int RI_StringToId(const CFX_ByteString& ri) { return 0; } -int GetBlendTypeInternal(const CFX_ByteString& mode) { +int GetBlendTypeInternal(const ByteString& mode) { switch (mode.GetID()) { case FXBSTR_ID('N', 'o', 'r', 'm'): case FXBSTR_ID('C', 'o', 'm', 'p'): @@ -75,45 +75,45 @@ CPDF_GeneralState::CPDF_GeneralState(const CPDF_GeneralState& that) CPDF_GeneralState::~CPDF_GeneralState() {} -void CPDF_GeneralState::SetRenderIntent(const CFX_ByteString& ri) { +void CPDF_GeneralState::SetRenderIntent(const ByteString& ri) { m_Ref.GetPrivateCopy()->m_RenderIntent = RI_StringToId(ri); } -CFX_ByteString CPDF_GeneralState::GetBlendMode() const { +ByteString CPDF_GeneralState::GetBlendMode() const { switch (GetBlendType()) { case FXDIB_BLEND_NORMAL: - return CFX_ByteString("Normal"); + return ByteString("Normal"); case FXDIB_BLEND_MULTIPLY: - return CFX_ByteString("Multiply"); + return ByteString("Multiply"); case FXDIB_BLEND_SCREEN: - return CFX_ByteString("Screen"); + return ByteString("Screen"); case FXDIB_BLEND_OVERLAY: - return CFX_ByteString("Overlay"); + return ByteString("Overlay"); case FXDIB_BLEND_DARKEN: - return CFX_ByteString("Darken"); + return ByteString("Darken"); case FXDIB_BLEND_LIGHTEN: - return CFX_ByteString("Lighten"); + return ByteString("Lighten"); case FXDIB_BLEND_COLORDODGE: - return CFX_ByteString("ColorDodge"); + return ByteString("ColorDodge"); case FXDIB_BLEND_COLORBURN: - return CFX_ByteString("ColorBurn"); + return ByteString("ColorBurn"); case FXDIB_BLEND_HARDLIGHT: - return CFX_ByteString("HardLight"); + return ByteString("HardLight"); case FXDIB_BLEND_SOFTLIGHT: - return CFX_ByteString("SoftLight"); + return ByteString("SoftLight"); case FXDIB_BLEND_DIFFERENCE: - return CFX_ByteString("Difference"); + return ByteString("Difference"); case FXDIB_BLEND_EXCLUSION: - return CFX_ByteString("Exclusion"); + return ByteString("Exclusion"); case FXDIB_BLEND_HUE: - return CFX_ByteString("Hue"); + return ByteString("Hue"); case FXDIB_BLEND_SATURATION: - return CFX_ByteString("Saturation"); + return ByteString("Saturation"); case FXDIB_BLEND_COLOR: - return CFX_ByteString("Color"); + return ByteString("Color"); case FXDIB_BLEND_LUMINOSITY: - return CFX_ByteString("Luminosity"); + return ByteString("Luminosity"); } - return CFX_ByteString("Normal"); + return ByteString("Normal"); } int CPDF_GeneralState::GetBlendType() const { @@ -171,7 +171,7 @@ void CPDF_GeneralState::SetTransferFunc( m_Ref.GetPrivateCopy()->m_pTransferFunc = pFunc; } -void CPDF_GeneralState::SetBlendMode(const CFX_ByteString& mode) { +void CPDF_GeneralState::SetBlendMode(const ByteString& mode) { StateData* pData = m_Ref.GetPrivateCopy(); pData->m_BlendMode = mode; pData->m_BlendType = GetBlendTypeInternal(mode); -- cgit v1.2.3