diff options
author | tsepez <tsepez@chromium.org> | 2016-11-18 14:48:21 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-18 14:48:21 -0800 |
commit | 430ab8363e77c48b2c2435af4d289f85e2be1b96 (patch) | |
tree | c0a9bff16a5b56d607d75c9f415dfc2cce7eb3fd /core/fpdfapi/parser/cpdf_stream.cpp | |
parent | 9053f19d78b6215570029d896c1d62bbb0ce5f7d (diff) | |
download | pdfium-430ab8363e77c48b2c2435af4d289f85e2be1b96.tar.xz |
Add unit test for CXFA_FileRead.
The FileRead's return convention is being modified at
https://codereview.chromium.org/2430743003/, so first provide
a test of the old behaviour.
Fix some issues with null dictionaries as provided by the
CPDF_Stream default ctor along the way.
Review-Url: https://codereview.chromium.org/2517513003
Diffstat (limited to 'core/fpdfapi/parser/cpdf_stream.cpp')
-rw-r--r-- | core/fpdfapi/parser/cpdf_stream.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/fpdfapi/parser/cpdf_stream.cpp b/core/fpdfapi/parser/cpdf_stream.cpp index e8ee022940..64261b14d3 100644 --- a/core/fpdfapi/parser/cpdf_stream.cpp +++ b/core/fpdfapi/parser/cpdf_stream.cpp @@ -113,6 +113,10 @@ bool CPDF_Stream::ReadRawData(FX_FILESIZE offset, return true; } +bool CPDF_Stream::HasFilter() const { + return m_pDict && m_pDict->KeyExist("Filter"); +} + CFX_WideString CPDF_Stream::GetUnicodeText() const { CPDF_StreamAcc stream; stream.LoadAllData(this, false); |