diff options
Diffstat (limited to 'core/include/fpdfapi')
-rw-r--r-- | core/include/fpdfapi/fpdf_objects.h | 78 | ||||
-rw-r--r-- | core/include/fpdfapi/fpdf_page.h | 2 | ||||
-rw-r--r-- | core/include/fpdfapi/fpdf_pageobj.h | 6 | ||||
-rw-r--r-- | core/include/fpdfapi/fpdf_parser.h | 18 | ||||
-rw-r--r-- | core/include/fpdfapi/fpdf_resource.h | 2 |
5 files changed, 53 insertions, 53 deletions
diff --git a/core/include/fpdfapi/fpdf_objects.h b/core/include/fpdfapi/fpdf_objects.h index 39a05c64f9..5a30c8b45c 100644 --- a/core/include/fpdfapi/fpdf_objects.h +++ b/core/include/fpdfapi/fpdf_objects.h @@ -144,7 +144,7 @@ public: return new CPDF_Number(value); } - static CPDF_Number* Create(FX_BSTR str) + static CPDF_Number* Create(const CFX_ByteStringC& str) { return new CPDF_Number(str); } @@ -162,13 +162,13 @@ public: CPDF_Number(FX_FLOAT value); - CPDF_Number(FX_BSTR str); + CPDF_Number(const CFX_ByteStringC& str); FX_BOOL Identical(CPDF_Number* pOther) const; CFX_ByteString GetString() const; - void SetString(FX_BSTR str); + void SetString(const CFX_ByteStringC& str); FX_BOOL IsInteger() const { @@ -260,7 +260,7 @@ public: return new CPDF_Name(str); } - static CPDF_Name* Create(FX_BSTR str) + static CPDF_Name* Create(const CFX_ByteStringC& str) { return new CPDF_Name(str); } @@ -271,7 +271,7 @@ public: } CPDF_Name(const CFX_ByteString& str) : CPDF_Object(PDFOBJ_NAME), m_Name(str) { } - CPDF_Name(FX_BSTR str) : CPDF_Object(PDFOBJ_NAME), m_Name(str) { } + CPDF_Name(const CFX_ByteStringC& str) : CPDF_Object(PDFOBJ_NAME), m_Name(str) { } CPDF_Name(const FX_CHAR* str) : CPDF_Object(PDFOBJ_NAME), m_Name(str) { } CFX_ByteString& GetString() @@ -396,95 +396,95 @@ public: CPDF_Dictionary() : CPDF_Object(PDFOBJ_DICTIONARY) { } - CPDF_Object* GetElement(FX_BSTR key) const; + CPDF_Object* GetElement(const CFX_ByteStringC& key) const; - CPDF_Object* GetElementValue(FX_BSTR key) const; + CPDF_Object* GetElementValue(const CFX_ByteStringC& key) const; - CFX_ByteString GetString(FX_BSTR key) const; + CFX_ByteString GetString(const CFX_ByteStringC& key) const; - CFX_ByteStringC GetConstString(FX_BSTR key) const; + CFX_ByteStringC GetConstString(const CFX_ByteStringC& key) const; - CFX_ByteString GetString(FX_BSTR key, FX_BSTR default_str) const; + CFX_ByteString GetString(const CFX_ByteStringC& key, const CFX_ByteStringC& default_str) const; - CFX_ByteStringC GetConstString(FX_BSTR key, FX_BSTR default_str) const; + CFX_ByteStringC GetConstString(const CFX_ByteStringC& key, const CFX_ByteStringC& default_str) const; - CFX_WideString GetUnicodeText(FX_BSTR key, CFX_CharMap* pCharMap = NULL) const; + CFX_WideString GetUnicodeText(const CFX_ByteStringC& key, CFX_CharMap* pCharMap = NULL) const; - int GetInteger(FX_BSTR key) const; + int GetInteger(const CFX_ByteStringC& key) const; - int GetInteger(FX_BSTR key, int default_int) const; + int GetInteger(const CFX_ByteStringC& key, int default_int) const; - FX_BOOL GetBoolean(FX_BSTR key, FX_BOOL bDefault = FALSE) const; + FX_BOOL GetBoolean(const CFX_ByteStringC& key, FX_BOOL bDefault = FALSE) const; - FX_FLOAT GetNumber(FX_BSTR key) const; + FX_FLOAT GetNumber(const CFX_ByteStringC& key) const; - CPDF_Dictionary* GetDict(FX_BSTR key) const; + CPDF_Dictionary* GetDict(const CFX_ByteStringC& key) const; - CPDF_Stream* GetStream(FX_BSTR key) const; + CPDF_Stream* GetStream(const CFX_ByteStringC& key) const; - CPDF_Array* GetArray(FX_BSTR key) const; + CPDF_Array* GetArray(const CFX_ByteStringC& key) const; - CFX_FloatRect GetRect(FX_BSTR key) const; + CFX_FloatRect GetRect(const CFX_ByteStringC& key) const; - CFX_AffineMatrix GetMatrix(FX_BSTR key) const; + CFX_AffineMatrix GetMatrix(const CFX_ByteStringC& key) const; - FX_FLOAT GetFloat(FX_BSTR key) const + FX_FLOAT GetFloat(const CFX_ByteStringC& key) const { return GetNumber(key); } - FX_BOOL KeyExist(FX_BSTR key) const; + FX_BOOL KeyExist(const CFX_ByteStringC& key) const; FX_POSITION GetStartPos() const; CPDF_Object* GetNextElement(FX_POSITION& pos, CFX_ByteString& key) const; - void SetAt(FX_BSTR key, CPDF_Object* pObj, CPDF_IndirectObjects* pObjs = NULL); + void SetAt(const CFX_ByteStringC& key, CPDF_Object* pObj, CPDF_IndirectObjects* pObjs = NULL); - void SetAtName(FX_BSTR key, const CFX_ByteString& name); + void SetAtName(const CFX_ByteStringC& key, const CFX_ByteString& name); - void SetAtString(FX_BSTR key, const CFX_ByteString& string); + void SetAtString(const CFX_ByteStringC& key, const CFX_ByteString& string); - void SetAtInteger(FX_BSTR key, int i); + void SetAtInteger(const CFX_ByteStringC& key, int i); - void SetAtNumber(FX_BSTR key, FX_FLOAT f); + void SetAtNumber(const CFX_ByteStringC& key, FX_FLOAT f); - void SetAtReference(FX_BSTR key, CPDF_IndirectObjects* pDoc, FX_DWORD objnum); + void SetAtReference(const CFX_ByteStringC& key, CPDF_IndirectObjects* pDoc, FX_DWORD objnum); - void SetAtReference(FX_BSTR key, CPDF_IndirectObjects* pDoc, CPDF_Object* obj) + void SetAtReference(const CFX_ByteStringC& key, CPDF_IndirectObjects* pDoc, CPDF_Object* obj) { SetAtReference(key, pDoc, obj->GetObjNum()); } - void AddReference(FX_BSTR key, CPDF_IndirectObjects* pDoc, FX_DWORD objnum); + void AddReference(const CFX_ByteStringC& key, CPDF_IndirectObjects* pDoc, FX_DWORD objnum); - void AddReference(FX_BSTR key, CPDF_IndirectObjects* pDoc, CPDF_Object* obj) + void AddReference(const CFX_ByteStringC& key, CPDF_IndirectObjects* pDoc, CPDF_Object* obj) { AddReference(key, pDoc, obj->GetObjNum()); } - void SetAtRect(FX_BSTR key, const CFX_FloatRect& rect); + void SetAtRect(const CFX_ByteStringC& key, const CFX_FloatRect& rect); - void SetAtMatrix(FX_BSTR key, const CFX_AffineMatrix& matrix); + void SetAtMatrix(const CFX_ByteStringC& key, const CFX_AffineMatrix& matrix); - void SetAtBoolean(FX_BSTR key, FX_BOOL bValue); + void SetAtBoolean(const CFX_ByteStringC& key, FX_BOOL bValue); - void RemoveAt(FX_BSTR key); + void RemoveAt(const CFX_ByteStringC& key); - void ReplaceKey(FX_BSTR oldkey, FX_BSTR newkey); + void ReplaceKey(const CFX_ByteStringC& oldkey, const CFX_ByteStringC& newkey); FX_BOOL Identical(CPDF_Dictionary* pDict) const; @@ -493,7 +493,7 @@ public: return m_Map.GetCount(); } - void AddValue(FX_BSTR key, CPDF_Object* pObj); + void AddValue(const CFX_ByteStringC& key, CPDF_Object* pObj); protected: ~CPDF_Dictionary(); @@ -622,7 +622,7 @@ protected: uint8_t* m_pSrcData; }; -CFX_DataFilter* FPDF_CreateFilter(FX_BSTR name, const CPDF_Dictionary* pParam, int width = 0, int height = 0); +CFX_DataFilter* FPDF_CreateFilter(const CFX_ByteStringC& name, const CPDF_Dictionary* pParam, int width = 0, int height = 0); #define FPDF_FILTER_BUFFER_SIZE 20480 class CPDF_StreamFilter { diff --git a/core/include/fpdfapi/fpdf_page.h b/core/include/fpdfapi/fpdf_page.h index 867f00208b..959ed1382f 100644 --- a/core/include/fpdfapi/fpdf_page.h +++ b/core/include/fpdfapi/fpdf_page.h @@ -173,7 +173,7 @@ public: return m_PageMatrix; } - CPDF_Object* GetPageAttr(FX_BSTR name) const; + CPDF_Object* GetPageAttr(const CFX_ByteStringC& name) const; diff --git a/core/include/fpdfapi/fpdf_pageobj.h b/core/include/fpdfapi/fpdf_pageobj.h index e09c0456fe..340c8d3b75 100644 --- a/core/include/fpdfapi/fpdf_pageobj.h +++ b/core/include/fpdfapi/fpdf_pageobj.h @@ -274,7 +274,7 @@ public: CPDF_GeneralStateData(const CPDF_GeneralStateData& src); ~CPDF_GeneralStateData(); - void SetBlendMode(FX_BSTR blend_mode); + void SetBlendMode(const CFX_ByteStringC& blend_mode); char m_BlendMode[16]; @@ -422,9 +422,9 @@ public: return m_pObject ? m_pObject->GetMCID() : -1; } - FX_BOOL HasMark(FX_BSTR mark) const; + FX_BOOL HasMark(const CFX_ByteStringC& mark) const; - FX_BOOL LookupMark(FX_BSTR mark, CPDF_Dictionary*& pDict) const; + FX_BOOL LookupMark(const CFX_ByteStringC& mark, CPDF_Dictionary*& pDict) const; }; #define PDFPAGE_TEXT 1 #define PDFPAGE_PATH 2 diff --git a/core/include/fpdfapi/fpdf_parser.h b/core/include/fpdfapi/fpdf_parser.h index cdd7aaaa11..f579527db4 100644 --- a/core/include/fpdfapi/fpdf_parser.h +++ b/core/include/fpdfapi/fpdf_parser.h @@ -204,18 +204,18 @@ public: CPDF_SimpleParser(const uint8_t* pData, FX_DWORD dwSize); - CPDF_SimpleParser(FX_BSTR str); + CPDF_SimpleParser(const CFX_ByteStringC& str); CFX_ByteStringC GetWord(); - FX_BOOL SearchToken(FX_BSTR token); + FX_BOOL SearchToken(const CFX_ByteStringC& token); - FX_BOOL SkipWord(FX_BSTR token); + FX_BOOL SkipWord(const CFX_ByteStringC& token); - FX_BOOL FindTagPair(FX_BSTR start_token, FX_BSTR end_token, + FX_BOOL FindTagPair(const CFX_ByteStringC& start_token, const CFX_ByteStringC& end_token, FX_DWORD& start_pos, FX_DWORD& end_pos); - FX_BOOL FindTagParam(FX_BSTR token, int nParams); + FX_BOOL FindTagParam(const CFX_ByteStringC& token, int nParams); FX_DWORD GetPos() { @@ -275,11 +275,11 @@ public: void ToNextWord(); - FX_BOOL SearchWord(FX_BSTR word, FX_BOOL bWholeWord, FX_BOOL bForward, FX_FILESIZE limit); + FX_BOOL SearchWord(const CFX_ByteStringC& word, FX_BOOL bWholeWord, FX_BOOL bForward, FX_FILESIZE limit); - int SearchMultiWord(FX_BSTR words, FX_BOOL bWholeWord, FX_FILESIZE limit); + int SearchMultiWord(const CFX_ByteStringC& words, FX_BOOL bWholeWord, FX_FILESIZE limit); - FX_FILESIZE FindTag(FX_BSTR tag, FX_FILESIZE limit); + FX_FILESIZE FindTag(const CFX_ByteStringC& tag, FX_FILESIZE limit); void SetEncrypt(CPDF_CryptoHandler* pCryptoHandler) { @@ -756,7 +756,7 @@ public: #define CPDF_Rect CFX_FloatRect #define CPDF_Matrix CFX_AffineMatrix -CFX_ByteString PDF_NameDecode(FX_BSTR orig); +CFX_ByteString PDF_NameDecode(const CFX_ByteStringC& orig); CFX_ByteString PDF_NameDecode(const CFX_ByteString& orig); CFX_ByteString PDF_NameEncode(const CFX_ByteString& orig); CFX_ByteString PDF_EncodeString(const CFX_ByteString& src, FX_BOOL bHex = FALSE); diff --git a/core/include/fpdfapi/fpdf_resource.h b/core/include/fpdfapi/fpdf_resource.h index 501e3be2f0..d49ed4ec5c 100644 --- a/core/include/fpdfapi/fpdf_resource.h +++ b/core/include/fpdfapi/fpdf_resource.h @@ -72,7 +72,7 @@ class CPDF_Font { public: static CPDF_Font* CreateFontF(CPDF_Document* pDoc, CPDF_Dictionary* pFontDict); - static CPDF_Font* GetStockFont(CPDF_Document* pDoc, FX_BSTR fontname); + static CPDF_Font* GetStockFont(CPDF_Document* pDoc, const CFX_ByteStringC& fontname); virtual ~CPDF_Font(); |