summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_streamcontentparser.h
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2017-09-18 14:23:18 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-18 18:40:16 +0000
commit275e260a6cd4a8e506ba974feb85ebcd926c1739 (patch)
tree2029b9158ec044764ceff122fe5fb5d0a3f123d1 /core/fpdfapi/page/cpdf_streamcontentparser.h
parent450fbeaaabf1ab340c1018de2e58f1950657517e (diff)
downloadpdfium-275e260a6cd4a8e506ba974feb85ebcd926c1739.tar.xz
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 <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_streamcontentparser.h')
-rw-r--r--core/fpdfapi/page/cpdf_streamcontentparser.h29
1 files changed, 14 insertions, 15 deletions
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.h b/core/fpdfapi/page/cpdf_streamcontentparser.h
index a027129c31..c30c6b7d3c 100644
--- a/core/fpdfapi/page/cpdf_streamcontentparser.h
+++ b/core/fpdfapi/page/cpdf_streamcontentparser.h
@@ -50,12 +50,12 @@ class CPDF_StreamContentParser {
CPDF_AllStates* GetCurStates() const { return m_pCurStates.get(); }
bool IsColored() const { return m_bColored; }
const float* GetType3Data() const { return m_Type3Data; }
- CPDF_Font* FindFont(const CFX_ByteString& name);
+ CPDF_Font* FindFont(const ByteString& name);
- static CFX_ByteStringC FindKeyAbbreviationForTesting(
- const CFX_ByteStringC& abbr);
- static CFX_ByteStringC FindValueAbbreviationForTesting(
- const CFX_ByteStringC& abbr);
+ static ByteStringView FindKeyAbbreviationForTesting(
+ const ByteStringView& abbr);
+ static ByteStringView FindValueAbbreviationForTesting(
+ const ByteStringView& abbr);
private:
struct ContentParam {
@@ -84,17 +84,17 @@ class CPDF_StreamContentParser {
using OpCodes = std::map<uint32_t, void (CPDF_StreamContentParser::*)()>;
static OpCodes InitializeOpCodes();
- void AddNameParam(const CFX_ByteStringC& str);
- void AddNumberParam(const CFX_ByteStringC& str);
+ void AddNameParam(const ByteStringView& str);
+ void AddNumberParam(const ByteStringView& str);
void AddObjectParam(std::unique_ptr<CPDF_Object> pObj);
int GetNextParamPos();
void ClearAllParams();
CPDF_Object* GetObject(uint32_t index);
- CFX_ByteString GetString(uint32_t index);
+ ByteString GetString(uint32_t index);
float GetNumber(uint32_t index);
int GetInteger(uint32_t index) { return (int32_t)(GetNumber(index)); }
- void OnOperator(const CFX_ByteStringC& op);
- void AddTextObject(CFX_ByteString* pText,
+ void OnOperator(const ByteStringView& op);
+ void AddTextObject(ByteString* pText,
float fInitKerning,
float* pKerning,
int count);
@@ -113,10 +113,9 @@ class CPDF_StreamContentParser {
bool bColor,
bool bText,
bool bGraph);
- CPDF_ColorSpace* FindColorSpace(const CFX_ByteString& name);
- CPDF_Pattern* FindPattern(const CFX_ByteString& name, bool bShading);
- CPDF_Object* FindResourceObj(const CFX_ByteString& type,
- const CFX_ByteString& name);
+ CPDF_ColorSpace* FindColorSpace(const ByteString& name);
+ CPDF_Pattern* FindPattern(const ByteString& name, bool bShading);
+ CPDF_Object* FindResourceObj(const ByteString& type, const ByteString& name);
// Takes ownership of |pImageObj|, returns unowned pointer to it.
CPDF_ImageObject* AddImageObject(std::unique_ptr<CPDF_ImageObject> pImageObj);
@@ -217,7 +216,7 @@ class CPDF_StreamContentParser {
float m_PathCurrentX;
float m_PathCurrentY;
uint8_t m_PathClipType;
- CFX_ByteString m_LastImageName;
+ ByteString m_LastImageName;
CFX_RetainPtr<CPDF_Image> m_pLastImage;
bool m_bColored;
float m_Type3Data[6];