diff options
author | Nico Weber <thakis@chromium.org> | 2015-08-04 12:19:10 -0700 |
---|---|---|
committer | Nico Weber <thakis@chromium.org> | 2015-08-04 12:19:10 -0700 |
commit | b048f791a15f2da781a01eba5b09eb9d389f9c11 (patch) | |
tree | 6850a73c18bbc41eaf4b1fdc6b3c96646d45587b /fpdfsdk/include/fsdk_define.h | |
parent | c8eeed31f217d99a706b0cbf5e4ce0bcc12beb64 (diff) | |
download | pdfium-b048f791a15f2da781a01eba5b09eb9d389f9c11.tar.xz |
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 .
Diffstat (limited to 'fpdfsdk/include/fsdk_define.h')
-rw-r--r-- | fpdfsdk/include/fsdk_define.h | 41 |
1 files changed, 26 insertions, 15 deletions
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_ |