| Index: core/src/fxcrt/extension.h
|
| diff --git a/core/src/fxcrt/extension.h b/core/src/fxcrt/extension.h
|
| index a23eab5c58274effa2a9044691bcc3483e53a232..42cebdf60575d8d9856e99f88ebb782d6771e1b3 100644
|
| --- a/core/src/fxcrt/extension.h
|
| +++ b/core/src/fxcrt/extension.h
|
| @@ -31,6 +31,40 @@ class IFXCRT_FileAccess {
|
| };
|
| IFXCRT_FileAccess* FXCRT_FileAccess_Create();
|
|
|
| +#ifdef PDF_ENABLE_XFA
|
| +class CFX_CRTFileAccess : public IFX_FileAccess {
|
| + public:
|
| + CFX_CRTFileAccess() : m_RefCount(0) {}
|
| +
|
| + // IFX_FileAccess
|
| + void Release() override {
|
| + if (--m_RefCount == 0)
|
| + delete this;
|
| + }
|
| +
|
| + IFX_FileAccess* Retain() override {
|
| + m_RefCount++;
|
| + return (IFX_FileAccess*)this;
|
| + }
|
| +
|
| + void GetPath(CFX_WideString& wsPath) override { wsPath = m_path; }
|
| +
|
| + IFX_FileStream* CreateFileStream(FX_DWORD dwModes) override {
|
| + return FX_CreateFileStream(m_path, dwModes);
|
| + }
|
| +
|
| + FX_BOOL Init(const CFX_WideStringC& wsPath) {
|
| + m_path = wsPath;
|
| + m_RefCount = 1;
|
| + return TRUE;
|
| + }
|
| +
|
| + protected:
|
| + CFX_WideString m_path;
|
| + FX_DWORD m_RefCount;
|
| +};
|
| +
|
| +#endif
|
| class CFX_CRTFileStream final : public IFX_FileStream {
|
| public:
|
| CFX_CRTFileStream(IFXCRT_FileAccess* pFA) : m_pFile(pFA), m_dwCount(1) {}
|
|
|