diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-05-03 12:37:07 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-05-03 19:50:58 +0000 |
commit | 0578244a1a68b413e0843b0ecb9c434bd7b6c8af (patch) | |
tree | 624b1b24759a825e72fc7bf94996d068d86ae497 /core/fpdfapi/parser/cpdf_syntax_parser.h | |
parent | 746babded81e9de3fc132fd670386382c031fa74 (diff) | |
download | pdfium-0578244a1a68b413e0843b0ecb9c434bd7b6c8af.tar.xz |
CPDF_SyntaxParser::SearchWord() is always backwards and for whole-words
Change-Id: Ic31d9cda5e919a754162e14e69cb63671a3fe8b9
Reviewed-on: https://pdfium-review.googlesource.com/4794
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser/cpdf_syntax_parser.h')
-rw-r--r-- | core/fpdfapi/parser/cpdf_syntax_parser.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.h b/core/fpdfapi/parser/cpdf_syntax_parser.h index f9a9bd9a8a..4c5e252978 100644 --- a/core/fpdfapi/parser/cpdf_syntax_parser.h +++ b/core/fpdfapi/parser/cpdf_syntax_parser.h @@ -46,11 +46,7 @@ class CPDF_SyntaxParser { CFX_ByteString GetKeyword(); void ToNextLine(); void ToNextWord(); - bool SearchWord(const CFX_ByteStringC& word, - bool bWholeWord, - bool bForward, - FX_FILESIZE limit); - + bool BackwardsSearchToWord(const CFX_ByteStringC& word, FX_FILESIZE limit); FX_FILESIZE FindTag(const CFX_ByteStringC& tag, FX_FILESIZE limit); void SetEncrypt(const CFX_RetainPtr<CPDF_CryptoHandler>& pCryptoHandler); bool ReadBlock(uint8_t* pBuf, uint32_t size); @@ -68,7 +64,7 @@ class CPDF_SyntaxParser { uint32_t GetDirectNum(); bool ReadChar(FX_FILESIZE read_pos, uint32_t read_size); bool GetNextChar(uint8_t& ch); - bool GetCharAtBackward(FX_FILESIZE pos, uint8_t& ch); + bool GetCharAtBackward(FX_FILESIZE pos, uint8_t* ch); void GetNextWordInternal(bool* bIsNumber); bool IsWholeWord(FX_FILESIZE startpos, FX_FILESIZE limit, |