From b048f791a15f2da781a01eba5b09eb9d389f9c11 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Tue, 4 Aug 2015 12:19:10 -0700 Subject: clang-format all pdfium code. No behavior change. Generated by: find . -name '*.cpp' -o -name '*.h' | \ grep -E -v 'third_party|thirdparties|lpng_v163' | \ xargs ../../buildtools/mac/clang-format -i See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion. BUG=none R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1265503005 . --- fpdfsdk/include/fsdk_define.h | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) (limited to 'fpdfsdk/include/fsdk_define.h') diff --git a/fpdfsdk/include/fsdk_define.h b/fpdfsdk/include/fsdk_define.h index 29b265a428..310fa43bd0 100644 --- a/fpdfsdk/include/fsdk_define.h +++ b/fpdfsdk/include/fsdk_define.h @@ -27,40 +27,51 @@ #ifndef FX_ARGBTOCOLORREF /** @brief Convert a #FX_ARGB to a #FX_COLORREF. */ -#define FX_ARGBTOCOLORREF(argb) ((((FX_DWORD)argb & 0x00FF0000) >> 16)|((FX_DWORD)argb & 0x0000FF00)|(((FX_DWORD)argb & 0x000000FF) << 16)) +#define FX_ARGBTOCOLORREF(argb) \ + ((((FX_DWORD)argb & 0x00FF0000) >> 16) | ((FX_DWORD)argb & 0x0000FF00) | \ + (((FX_DWORD)argb & 0x000000FF) << 16)) #endif #ifndef FX_COLORREFTOARGB /** @brief Convert a #FX_COLORREF to a #FX_ARGB. */ -#define FX_COLORREFTOARGB(rgb) ((FX_DWORD)0xFF000000|(((FX_DWORD)rgb & 0x000000FF) << 16)|((FX_DWORD)rgb & 0x0000FF00)|(((FX_DWORD)rgb & 0x00FF0000) >> 16)) +#define FX_COLORREFTOARGB(rgb) \ + ((FX_DWORD)0xFF000000 | (((FX_DWORD)rgb & 0x000000FF) << 16) | \ + ((FX_DWORD)rgb & 0x0000FF00) | (((FX_DWORD)rgb & 0x00FF0000) >> 16)) #endif typedef unsigned int FX_UINT; class CRenderContext; class IFSDK_PAUSE_Adapter; -class CPDF_CustomAccess final : public IFX_FileRead -{ -public: - CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess); - ~CPDF_CustomAccess() {} +class CPDF_CustomAccess final : public IFX_FileRead { + public: + CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess); + ~CPDF_CustomAccess() {} - virtual FX_FILESIZE GetSize() override { return m_FileAccess.m_FileLen; } + virtual FX_FILESIZE GetSize() override { return m_FileAccess.m_FileLen; } - virtual void Release() override { delete this; } + virtual void Release() override { delete this; } - virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override; + virtual FX_BOOL ReadBlock(void* buffer, + FX_FILESIZE offset, + size_t size) override; -private: - FPDF_FILEACCESS m_FileAccess; + private: + FPDF_FILEACCESS m_FileAccess; }; void DropContext(void* data); void FSDK_SetSandBoxPolicy(FPDF_DWORD policy, FPDF_BOOL enable); FPDF_BOOL FSDK_IsSandBoxPolicyEnabled(FPDF_DWORD policy); -void FPDF_RenderPage_Retail(CRenderContext* pContext, FPDF_PAGE page, - int start_x, int start_y, int size_x, int size_y, - int rotate, int flags, FX_BOOL bNeedToRestore, +void FPDF_RenderPage_Retail(CRenderContext* pContext, + FPDF_PAGE page, + int start_x, + int start_y, + int size_x, + int size_y, + int rotate, + int flags, + FX_BOOL bNeedToRestore, IFSDK_PAUSE_Adapter* pause); #endif // FPDFSDK_INCLUDE_FSDK_DEFINE_H_ -- cgit v1.2.3