diff options
Diffstat (limited to 'xfa/fde/css/cfde_csstextbuf.h')
-rw-r--r-- | xfa/fde/css/cfde_csstextbuf.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/xfa/fde/css/cfde_csstextbuf.h b/xfa/fde/css/cfde_csstextbuf.h index eaeb085971..be6800fe3a 100644 --- a/xfa/fde/css/cfde_csstextbuf.h +++ b/xfa/fde/css/cfde_csstextbuf.h @@ -29,20 +29,22 @@ class CFDE_CSSTextBuf { void Subtract(int32_t iStart, int32_t iLength); bool IsEOF() const { return m_iDatPos >= m_iDatLen; } - wchar_t GetAt(int32_t index) const { return m_pBuffer[index]; } - wchar_t GetChar() const { return m_pBuffer[m_iDatPos]; } + wchar_t GetAt(int32_t index) const { return GetBuffer()[index]; } + wchar_t GetChar() const { return GetBuffer()[m_iDatPos]; } wchar_t GetNextChar() const { - return (m_iDatPos + 1 >= m_iDatLen) ? 0 : m_pBuffer[m_iDatPos + 1]; + return (m_iDatPos + 1 >= m_iDatLen) ? 0 : GetBuffer()[m_iDatPos + 1]; } void MoveNext() { m_iDatPos++; } int32_t GetLength() const { return m_iDatLen; } - const wchar_t* GetBuffer() const { return m_pBuffer; } + const wchar_t* GetBuffer() const; protected: bool ExpandBuf(int32_t iDesiredSize); + bool m_bExtBuf; + const wchar_t* m_pExtBuffer; wchar_t* m_pBuffer; int32_t m_iBufLen; int32_t m_iDatLen; |