Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Side by Side Diff: xfa/src/fxfa/app/xfa_ffwidget.cpp

Issue 1773733002: Review and cleanup lint warnings. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/src/fxfa/app/xfa_fftextedit.cpp ('k') | xfa/src/fxfa/app/xfa_ffwidgethandler.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/src/fxfa/app/xfa_ffwidget.h" 7 #include "xfa/src/fxfa/app/xfa_ffwidget.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 mtImage.Concat(rtFit.width, 0, 0, rtFit.height, rtFit.left, rtFit.top); 818 mtImage.Concat(rtFit.width, 0, 0, rtFit.height, rtFit.left, rtFit.top);
819 mtImage.Concat(*pMatrix); 819 mtImage.Concat(*pMatrix);
820 CXFA_ImageRenderer imageRender; 820 CXFA_ImageRenderer imageRender;
821 FX_BOOL bRet = imageRender.Start(pRenderDevice, pDIBitmap, 0, 255, &mtImage, 821 FX_BOOL bRet = imageRender.Start(pRenderDevice, pDIBitmap, 0, 255, &mtImage,
822 FXDIB_INTERPOL); 822 FXDIB_INTERPOL);
823 while (bRet) { 823 while (bRet) {
824 bRet = imageRender.Continue(NULL); 824 bRet = imageRender.Continue(NULL);
825 } 825 }
826 pRenderDevice->RestoreState(); 826 pRenderDevice->RestoreState();
827 } 827 }
828 const static uint8_t g_inv_base64[128] = { 828
829 static const uint8_t g_inv_base64[128] = {
829 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 830 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
830 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 831 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
831 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 62, 255, 832 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 62, 255,
832 255, 255, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 255, 255, 833 255, 255, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 255, 255,
833 255, 255, 255, 255, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 834 255, 255, 255, 255, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
834 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 835 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
835 25, 255, 255, 255, 255, 255, 255, 26, 27, 28, 29, 30, 31, 32, 33, 836 25, 255, 255, 255, 255, 255, 255, 26, 27, 28, 29, 30, 31, 32, 33,
836 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 837 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
837 49, 50, 51, 255, 255, 255, 255, 255, 838 49, 50, 51, 255, 255, 255, 255, 255,
838 }; 839 };
840
839 static uint8_t* XFA_RemoveBase64Whitespace(const uint8_t* pStr, int32_t iLen) { 841 static uint8_t* XFA_RemoveBase64Whitespace(const uint8_t* pStr, int32_t iLen) {
840 uint8_t* pCP; 842 uint8_t* pCP;
841 int32_t i = 0, j = 0; 843 int32_t i = 0, j = 0;
842 if (iLen == 0) { 844 if (iLen == 0) {
843 iLen = FXSYS_strlen((FX_CHAR*)pStr); 845 iLen = FXSYS_strlen((FX_CHAR*)pStr);
844 } 846 }
845 pCP = FX_Alloc(uint8_t, iLen + 1); 847 pCP = FX_Alloc(uint8_t, iLen + 1);
846 for (; i < iLen; i++) { 848 for (; i < iLen; i++) {
847 if ((pStr[i] & 128) == 0) { 849 if ((pStr[i] & 128) == 0) {
848 if (g_inv_base64[pStr[i]] != 0xFF || pStr[i] == '=') { 850 if (g_inv_base64[pStr[i]] != 0xFF || pStr[i] == '=') {
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1950 iType != XFA_ELEMENT_Rectangle) { 1952 iType != XFA_ELEMENT_Rectangle) {
1951 return; 1953 return;
1952 } 1954 }
1953 CXFA_StrokeArray strokes; 1955 CXFA_StrokeArray strokes;
1954 if (!(dwFlags & XFA_DRAWBOX_ForceRound) && iType != XFA_ELEMENT_Arc) { 1956 if (!(dwFlags & XFA_DRAWBOX_ForceRound) && iType != XFA_ELEMENT_Arc) {
1955 box.GetStrokes(strokes); 1957 box.GetStrokes(strokes);
1956 } 1958 }
1957 XFA_BOX_Fill(box, strokes, pGS, rtWidget, pMatrix, dwFlags); 1959 XFA_BOX_Fill(box, strokes, pGS, rtWidget, pMatrix, dwFlags);
1958 XFA_BOX_Stroke(box, strokes, pGS, rtWidget, pMatrix, dwFlags); 1960 XFA_BOX_Stroke(box, strokes, pGS, rtWidget, pMatrix, dwFlags);
1959 } 1961 }
OLDNEW
« no previous file with comments | « xfa/src/fxfa/app/xfa_fftextedit.cpp ('k') | xfa/src/fxfa/app/xfa_ffwidgethandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698