diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-07-27 12:08:12 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-07-27 12:08:12 -0700 |
commit | 8d2aae7ee320da3a8ffe01c57e38b3f98443257d (patch) | |
tree | e694c6f82ec72fa46e6172b4475996b30d3f6a3a /fpdfsdk/src/fpdfsave.cpp | |
parent | ff46aaf499edcf153ee2f57c7016587aa96dcfa0 (diff) | |
download | pdfium-8d2aae7ee320da3a8ffe01c57e38b3f98443257d.tar.xz |
Revert "FX Bool considered harmful, part 3"
This reverts commit ff46aaf499edcf153ee2f57c7016587aa96dcfa0.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1255293002 .
Diffstat (limited to 'fpdfsdk/src/fpdfsave.cpp')
-rw-r--r-- | fpdfsdk/src/fpdfsave.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/fpdfsdk/src/fpdfsave.cpp b/fpdfsdk/src/fpdfsave.cpp index 8e5e476ca2..ddd6f6e90e 100644 --- a/fpdfsdk/src/fpdfsave.cpp +++ b/fpdfsdk/src/fpdfsave.cpp @@ -19,8 +19,8 @@ class CFX_IFileWrite final : public IFX_StreamWrite public: CFX_IFileWrite(); - bool Init( FPDF_FILEWRITE * pFileWriteStruct ); - virtual bool WriteBlock(const void* pData, size_t size) override; + FX_BOOL Init( FPDF_FILEWRITE * pFileWriteStruct ); + virtual FX_BOOL WriteBlock(const void* pData, size_t size) override; virtual void Release() override {} protected: @@ -32,22 +32,22 @@ CFX_IFileWrite::CFX_IFileWrite() m_pFileWriteStruct = NULL; } -bool CFX_IFileWrite::Init( FPDF_FILEWRITE * pFileWriteStruct ) +FX_BOOL CFX_IFileWrite::Init( FPDF_FILEWRITE * pFileWriteStruct ) { if (!pFileWriteStruct) - return false; + return FALSE; m_pFileWriteStruct = pFileWriteStruct; - return true; + return TRUE; } -bool CFX_IFileWrite::WriteBlock(const void* pData, size_t size) +FX_BOOL CFX_IFileWrite::WriteBlock(const void* pData, size_t size) { if (!m_pFileWriteStruct) - return false; + return FALSE; m_pFileWriteStruct->WriteBlock( m_pFileWriteStruct, pData, size ); - return true; + return TRUE; } FPDF_BOOL _FPDF_Doc_Save(FPDF_DOCUMENT document,FPDF_FILEWRITE * pFileWrite,FPDF_DWORD flags, FPDF_BOOL bSetVersion, @@ -71,7 +71,7 @@ FPDF_BOOL _FPDF_Doc_Save(FPDF_DOCUMENT document,FPDF_FILEWRITE * pFileWrite,FPDF FileMaker.RemoveSecurity(); } CFX_IFileWrite* pStreamWrite = NULL; - bool bRet; + FX_BOOL bRet; pStreamWrite = new CFX_IFileWrite; pStreamWrite->Init( pFileWrite ); bRet = FileMaker.Create(pStreamWrite, flags); @@ -82,12 +82,12 @@ FPDF_BOOL _FPDF_Doc_Save(FPDF_DOCUMENT document,FPDF_FILEWRITE * pFileWrite,FPDF DLLEXPORT FPDF_BOOL STDCALL FPDF_SaveAsCopy( FPDF_DOCUMENT document,FPDF_FILEWRITE * pFileWrite, FPDF_DWORD flags ) { - return _FPDF_Doc_Save(document, pFileWrite, flags, false , 0); + return _FPDF_Doc_Save(document, pFileWrite, flags, FALSE , 0); } DLLEXPORT FPDF_BOOL STDCALL FPDF_SaveWithVersion( FPDF_DOCUMENT document,FPDF_FILEWRITE * pFileWrite, FPDF_DWORD flags, int fileVersion) { - return _FPDF_Doc_Save(document, pFileWrite, flags, true , fileVersion); + return _FPDF_Doc_Save(document, pFileWrite, flags, TRUE , fileVersion); } |