summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2015-08-06 14:38:03 -0700
committerNico Weber <thakis@chromium.org>2015-08-06 14:38:03 -0700
commit4684c83a4e9114a63c64744064dd190e4d459c6f (patch)
treee34d3d36735db7d1692d1da95aa732f3241d9906
parent905cc10ecd06bcacfefb747cc3370c72772f0e15 (diff)
downloadpdfium-4684c83a4e9114a63c64744064dd190e4d459c6f.tar.xz
clang-format all pdfium code, again.
Also add a presubmit that checks for this so I don't have to keep doing it. 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 BUG=none R=thestig@chromium.org Review URL: https://codereview.chromium.org/1272653005 .
-rw-r--r--PRESUBMIT.py14
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp37
-rw-r--r--core/src/fxcrt/extension.h21
-rw-r--r--core/src/fxge/ge/text_int.h6
-rw-r--r--fpdfsdk/include/fsdk_baseform.h22
-rw-r--r--fpdfsdk/include/fxedit/fxet_list.h8
-rw-r--r--fpdfsdk/include/javascript/JS_Define.h6
-rw-r--r--fpdfsdk/include/javascript/app.h86
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Wnd.h42
-rw-r--r--fpdfsdk/src/fpdfview.cpp1
-rw-r--r--fpdfsdk/src/fsdk_baseform.cpp17
-rw-r--r--fpdfsdk/src/fxedit/fxet_ap.cpp5
-rw-r--r--fpdfsdk/src/javascript/app.cpp4
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_ListBox.cpp2
-rw-r--r--public/fpdf_formfill.h1
15 files changed, 88 insertions, 184 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
new file mode 100644
index 0000000000..1ad3a5ea3e
--- /dev/null
+++ b/PRESUBMIT.py
@@ -0,0 +1,14 @@
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Presubmit script for pdfium.
+
+See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
+for more details about the presubmit API built into depot_tools.
+"""
+
+def CheckChangeOnUpload(input_api, output_api):
+ results = []
+ results += input_api.canned_checks.CheckPatchFormatted(input_api, output_api)
+ return results
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
index f14d7d5c37..23efb52596 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
@@ -2434,7 +2434,7 @@ unsigned int CPDF_SyntaxParser::ReadEOLMarkers(FX_FILESIZE pos) {
unsigned char byte1 = 0;
unsigned char byte2 = 0;
GetCharAt(pos, byte1);
- GetCharAt(pos+1, byte2);
+ GetCharAt(pos + 1, byte2);
unsigned int markers = 0;
if (byte1 == '\r' && byte2 == '\n') {
markers = 2;
@@ -2454,7 +2454,7 @@ CPDF_Stream* CPDF_SyntaxParser::ReadStream(CPDF_Dictionary* pDict,
((CPDF_Reference*)pLenObj)->GetRefObjNum() != objnum))) {
len = pLenObj->GetInteger();
}
- //Check whether end of line markers follow the keyword 'stream'.
+ // Check whether end of line markers follow the keyword 'stream'.
unsigned int numMarkers = ReadEOLMarkers(m_Pos);
m_Pos += numMarkers;
FX_FILESIZE streamStartPos = m_Pos;
@@ -2463,7 +2463,8 @@ CPDF_Stream* CPDF_SyntaxParser::ReadStream(CPDF_Dictionary* pDict,
}
const unsigned int ENDSTREAM_LEN = sizeof("endstream") - 1;
const unsigned int ENDOBJ_LEN = sizeof("endobj") - 1;
- CPDF_CryptoHandler* pCryptoHandler = objnum == (FX_DWORD)m_MetadataObjnum ? nullptr : m_pCryptoHandler;
+ CPDF_CryptoHandler* pCryptoHandler =
+ objnum == (FX_DWORD)m_MetadataObjnum ? nullptr : m_pCryptoHandler;
if (!pCryptoHandler) {
FX_BOOL bSearchForKeyword = TRUE;
unsigned int prevMarkers = 0;
@@ -2483,27 +2484,28 @@ CPDF_Stream* CPDF_SyntaxParser::ReadStream(CPDF_Dictionary* pDict,
}
}
if (bSearchForKeyword) {
- //If len is not available, len needs to be calculated
- //by searching the keywords "endstream" or "endobj".
+ // If len is not available, len needs to be calculated
+ // by searching the keywords "endstream" or "endobj".
m_Pos = streamStartPos;
FX_FILESIZE endStreamOffset = 0;
while (endStreamOffset >= 0) {
endStreamOffset = FindTag(FX_BSTRC("endstream"), 0);
if (endStreamOffset < 0) {
- //Can't find any "endstream".
+ // Can't find any "endstream".
break;
}
prevMarkers = ReadEOLMarkers(streamStartPos + endStreamOffset - 1);
- nextMarkers = ReadEOLMarkers(streamStartPos + endStreamOffset + ENDSTREAM_LEN);
+ nextMarkers =
+ ReadEOLMarkers(streamStartPos + endStreamOffset + ENDSTREAM_LEN);
if (prevMarkers != 0 && nextMarkers != 0) {
- //Stop searching when the keyword "endstream" is found.
+ // Stop searching when the keyword "endstream" is found.
break;
} else {
unsigned char ch = 0x00;
GetCharAt(streamStartPos + endStreamOffset + ENDSTREAM_LEN, ch);
if (ch == 0x09 || ch == 0x20) {
//"endstream" is treated as a keyword
- //when it is followed by a tab or whitespace
+ // when it is followed by a tab or whitespace
break;
}
}
@@ -2514,26 +2516,27 @@ CPDF_Stream* CPDF_SyntaxParser::ReadStream(CPDF_Dictionary* pDict,
while (endObjOffset >= 0) {
endObjOffset = FindTag(FX_BSTRC("endobj"), 0);
if (endObjOffset < 0) {
- //Can't find any "endobj".
+ // Can't find any "endobj".
break;
}
prevMarkers = ReadEOLMarkers(streamStartPos + endObjOffset - 1);
- nextMarkers = ReadEOLMarkers(streamStartPos + endObjOffset + ENDOBJ_LEN);
+ nextMarkers =
+ ReadEOLMarkers(streamStartPos + endObjOffset + ENDOBJ_LEN);
if (prevMarkers != 0 && nextMarkers != 0) {
- //Stop searching when the keyword "endobj" is found.
+ // Stop searching when the keyword "endobj" is found.
break;
}
m_Pos += ENDOBJ_LEN;
}
if (endStreamOffset < 0 && endObjOffset < 0) {
- //Can't find "endstream" or "endobj".
+ // Can't find "endstream" or "endobj".
return nullptr;
}
if (endStreamOffset < 0 && endObjOffset >= 0) {
- //Correct the position of end stream.
+ // Correct the position of end stream.
endStreamOffset = endObjOffset;
} else if (endStreamOffset >= 0 && endObjOffset < 0) {
- //Correct the position of end obj.
+ // Correct the position of end obj.
endObjOffset = endStreamOffset;
} else if (endStreamOffset > endObjOffset) {
endStreamOffset = endObjOffset;
@@ -2578,8 +2581,8 @@ CPDF_Stream* CPDF_SyntaxParser::ReadStream(CPDF_Dictionary* pDict,
streamStartPos = m_Pos;
GetNextWord();
numMarkers = ReadEOLMarkers(m_Pos);
- if (m_WordSize == ENDOBJ_LEN && numMarkers != 0 &&
- FXSYS_memcmp(m_WordBuffer, "endobj", ENDOBJ_LEN) == 0) {
+ if (m_WordSize == ENDOBJ_LEN && numMarkers != 0 &&
+ FXSYS_memcmp(m_WordBuffer, "endobj", ENDOBJ_LEN) == 0) {
m_Pos = streamStartPos;
}
return pStream;
diff --git a/core/src/fxcrt/extension.h b/core/src/fxcrt/extension.h
index 1750c5aae9..7d14cb0b9a 100644
--- a/core/src/fxcrt/extension.h
+++ b/core/src/fxcrt/extension.h
@@ -32,10 +32,7 @@ class IFXCRT_FileAccess {
IFXCRT_FileAccess* FXCRT_FileAccess_Create();
class CFX_CRTFileStream final : public IFX_FileStream {
public:
- CFX_CRTFileStream(IFXCRT_FileAccess* pFA)
- : m_pFile(pFA),
- m_dwCount(1) {
- }
+ CFX_CRTFileStream(IFXCRT_FileAccess* pFA) : m_pFile(pFA), m_dwCount(1) {}
~CFX_CRTFileStream() {
if (m_pFile) {
m_pFile->Release();
@@ -51,13 +48,9 @@ class CFX_CRTFileStream final : public IFX_FileStream {
delete this;
}
}
- virtual FX_FILESIZE GetSize() override {
- return m_pFile->GetSize();
- }
+ virtual FX_FILESIZE GetSize() override { return m_pFile->GetSize(); }
virtual FX_BOOL IsEOF() override { return GetPosition() >= GetSize(); }
- virtual FX_FILESIZE GetPosition() override {
- return m_pFile->GetPosition();
- }
+ virtual FX_FILESIZE GetPosition() override { return m_pFile->GetPosition(); }
virtual FX_BOOL ReadBlock(void* buffer,
FX_FILESIZE offset,
size_t size) override {
@@ -120,13 +113,9 @@ class CFX_MemoryStream final : public IFX_MemoryStream {
}
delete this;
}
- virtual FX_FILESIZE GetSize() override {
- return (FX_FILESIZE)m_nCurSize;
- }
+ virtual FX_FILESIZE GetSize() override { return (FX_FILESIZE)m_nCurSize; }
virtual FX_BOOL IsEOF() override { return m_nCurPos >= (size_t)GetSize(); }
- virtual FX_FILESIZE GetPosition() override {
- return (FX_FILESIZE)m_nCurPos;
- }
+ virtual FX_FILESIZE GetPosition() override { return (FX_FILESIZE)m_nCurPos; }
virtual FX_BOOL ReadBlock(void* buffer,
FX_FILESIZE offset,
size_t size) override {
diff --git a/core/src/fxge/ge/text_int.h b/core/src/fxge/ge/text_int.h
index efa134d5de..e9f81b3ca7 100644
--- a/core/src/fxge/ge/text_int.h
+++ b/core/src/fxge/ge/text_int.h
@@ -67,8 +67,10 @@ class CFX_UnicodeEncoding : public IFX_FontEncoding {
class CFX_FontFaceInfo {
public:
- CFX_FontFaceInfo(CFX_ByteString filePath, CFX_ByteString faceName,
- CFX_ByteString fontTables, FX_DWORD fontOffset,
+ CFX_FontFaceInfo(CFX_ByteString filePath,
+ CFX_ByteString faceName,
+ CFX_ByteString fontTables,
+ FX_DWORD fontOffset,
FX_DWORD fileSize)
: m_FilePath(filePath),
m_FaceName(faceName),
diff --git a/fpdfsdk/include/fsdk_baseform.h b/fpdfsdk/include/fsdk_baseform.h
index b685ae6a8e..7b69e5d7fa 100644
--- a/fpdfsdk/include/fsdk_baseform.h
+++ b/fpdfsdk/include/fsdk_baseform.h
@@ -43,18 +43,18 @@ typedef struct _PDFSDK_FieldAction {
bRC = TRUE;
}
- FX_BOOL bModifier; // in
- FX_BOOL bShift; // in
- int nCommitKey; // in
- CFX_WideString sChange; // in[out]
+ FX_BOOL bModifier; // in
+ FX_BOOL bShift; // in
+ int nCommitKey; // in
+ CFX_WideString sChange; // in[out]
CFX_WideString sChangeEx; // in
- FX_BOOL bKeyDown; // in
- int nSelEnd; // in[out]
- int nSelStart; // in[out]
- CFX_WideString sValue; // in[out]
- FX_BOOL bWillCommit; // in
- FX_BOOL bFieldFull; // in
- FX_BOOL bRC; // in[out]
+ FX_BOOL bKeyDown; // in
+ int nSelEnd; // in[out]
+ int nSelStart; // in[out]
+ CFX_WideString sValue; // in[out]
+ FX_BOOL bWillCommit; // in
+ FX_BOOL bFieldFull; // in
+ FX_BOOL bRC; // in[out]
} PDFSDK_FieldAction;
class CPDFSDK_Widget : public CPDFSDK_Annot {
public:
diff --git a/fpdfsdk/include/fxedit/fxet_list.h b/fpdfsdk/include/fxedit/fxet_list.h
index 4aa35684cf..8c5584a118 100644
--- a/fpdfsdk/include/fxedit/fxet_list.h
+++ b/fpdfsdk/include/fxedit/fxet_list.h
@@ -339,10 +339,10 @@ class CFX_ListCtrl : public CFX_List {
FX_BOOL m_bNotifyFlag;
CPDF_Point m_ptScrollPos;
CPLST_Select m_aSelItems; // for multiple
- int32_t m_nSelItem; // for single
- int32_t m_nFootIndex; // for multiple
- FX_BOOL m_bCtrlSel; // for multiple
- int32_t m_nCaretIndex; // for multiple
+ int32_t m_nSelItem; // for single
+ int32_t m_nFootIndex; // for multiple
+ FX_BOOL m_bCtrlSel; // for multiple
+ int32_t m_nCaretIndex; // for multiple
};
#endif // FPDFSDK_INCLUDE_FXEDIT_FXET_LIST_H_
diff --git a/fpdfsdk/include/javascript/JS_Define.h b/fpdfsdk/include/javascript/JS_Define.h
index 7c3afd7359..db4b1c360d 100644
--- a/fpdfsdk/include/javascript/JS_Define.h
+++ b/fpdfsdk/include/javascript/JS_Define.h
@@ -37,10 +37,10 @@ struct JSMethodSpec {
#define BEGIN_JS_STATIC_CONST(js_class_name) \
JSConstSpec js_class_name::JS_Class_Consts[] = {
#define JS_STATIC_CONST_ENTRY_NUMBER(const_name, pValue) \
- { const_name, pValue, L"", 0 } \
+ { const_name, pValue, L"", 0 } \
,
-#define JS_STATIC_CONST_ENTRY_STRING(const_name, pValue) \
- { const_name, 0, pValue, 1 } \
+#define JS_STATIC_CONST_ENTRY_STRING(const_name, pValue) \
+ { const_name, 0, pValue, 1 } \
,
#define END_JS_STATIC_CONST() \
{ 0, 0, 0, 0 } \
diff --git a/fpdfsdk/include/javascript/app.h b/fpdfsdk/include/javascript/app.h
index 221a7c1d89..b13121323b 100644
--- a/fpdfsdk/include/javascript/app.h
+++ b/fpdfsdk/include/javascript/app.h
@@ -36,71 +36,6 @@ class CJS_TimerObj : public CJS_Object {
DECLARE_JS_CLASS(CJS_TimerObj);
};
-// struct APP_MENUITEM_ARRAY;
-//
-// struct APP_MENUITEM
-// {
-// APP_MENUITEM() : oSubMenu(NULL), cName(L""), cReturn(L""),
-// bMarked(false), bEnabled(true)
-// {
-// }
-// CFX_WideString cName;
-// CFX_WideString cReturn;
-// APP_MENUITEM_ARRAY* oSubMenu;
-// bool bMarked;
-// bool bEnabled;
-// };
-
-// struct APP_MENUITEM_ARRAY
-// {
-// APP_MENUITEM_ARRAY() : m_hMenu(NULL), pContents(NULL), nSize(0)
-// {
-//
-// }
-// APP_MENUITEM * pContents;
-// HMENU m_hMenu;
-// int nSize;
-// };
-
-// struct APP_MENU;
-// struct APP_MENU_ARRAY
-// {
-// APP_MENU_ARRAY():
-// pContent(NULL)
-// {
-// }
-//
-// APP_MENU* pContent;
-// };
-
-// struct APP_MENU
-// {
-// APP_MENU():bSubMenu(false),
-// SubMenuItems(NULL),
-// cwMenuItemName(L""),
-// hMenu(NULL),
-// iSize(0)
-// {
-//
-// }
-//
-// APP_MENU(CFX_WideString &cwName):
-// cwMenuItemName(cwName),
-// bSubMenu(false),
-// SubMenuItems(NULL),
-// hMenu(NULL),
-// iSize(0)
-// {
-//
-// }
-//
-// CFX_WideString cwMenuItemName;
-// bool bSubMenu;
-// APP_MENU_ARRAY* SubMenuItems;
-// int iSize;
-// HMENU hMenu;
-// };
-
class app : public CJS_EmbedObj {
public:
app(CJS_Object* pJSObject);
@@ -226,25 +161,8 @@ class app : public CJS_EmbedObj {
CFX_WideString& sError);
private:
- // FX_DWORD AppGetTickCount();
void TimerProc(CJS_Timer* pTimer);
void RunJsScript(CJS_Runtime* pRuntime, const CFX_WideString& wsScript);
- // void ParsePopupMenuObj(APP_MENUITEM *
- //ppMenuItem,JSObject * pObj);
- // void DeleteMenuItems(APP_MENUITEM_ARRAY *
- //pMenuItems);
- // void AddMenuItem(APP_MENUITEM_ARRAY * pMenuItems, HMENU
- // hMenu, MENUITEMINFO MenuItemInfo);
- // void InitMenuItemInfo(MENUITEMINFO&
- // MenuItemInfo);
- // void DestroyPopUpMenu();
-
- // void ParserMenuItem(APP_MENU* pHead, const
- // CJS_Parameters&params);
- // void AddItemToMenu(APP_MENU* pHead, HMENU hMenu,
- // MENUITEMINFO MenuItemInfo);
- // void DestroyMenuItems(APP_MENU*
- // pHead);
public:
static CFX_WideString SysPathToPDFPath(const CFX_WideString& sOldPath);
@@ -254,10 +172,6 @@ class app : public CJS_EmbedObj {
bool m_bRuntimeHighLight;
CFX_ArrayTemplate<CJS_Timer*> m_aTimer;
- // APP_MENU* m_pMenuHead;
-
- public:
- // static CReader_App* s_App;
};
class CJS_App : public CJS_Object {
diff --git a/fpdfsdk/include/pdfwindow/PWL_Wnd.h b/fpdfsdk/include/pdfwindow/PWL_Wnd.h
index 63fd28b6d1..0845bb17d1 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Wnd.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Wnd.h
@@ -226,28 +226,28 @@ struct PWL_CREATEPARAM {
eCursorType(FXCT_ARROW),
mtChild(1, 0, 0, 1, 0, 0) {}
- CPDF_Rect rcRectWnd; // required
+ CPDF_Rect rcRectWnd; // required
IFX_SystemHandler* pSystemHandler; // required
- IFX_Edit_FontMap* pFontMap; // required for text window
- IPWL_Provider* pProvider; // required for self coordinate
- IPWL_FocusHandler* pFocusHandler; // optional
- FX_DWORD dwFlags; // optional
- CPWL_Color sBackgroundColor; // optional
- FX_HWND hAttachedWnd; // required for no-reader framework
- IPWL_SpellCheck* pSpellCheck; // required for spellchecking
- int32_t nBorderStyle; // optional
- int32_t dwBorderWidth; // optional
- CPWL_Color sBorderColor; // optional
- CPWL_Color sTextColor; // optional
- CPWL_Color sTextStrokeColor; // optional
- int32_t nTransparency; // optional
- FX_FLOAT fFontSize; // optional
- CPWL_Dash sDash; // optional
- void* pAttachedData; // optional
- CPWL_Wnd* pParentWnd; // ignore
- CPWL_MsgControl* pMsgControl; // ignore
- int32_t eCursorType; // ignore
- CPDF_Matrix mtChild; // ignore
+ IFX_Edit_FontMap* pFontMap; // required for text window
+ IPWL_Provider* pProvider; // required for self coordinate
+ IPWL_FocusHandler* pFocusHandler; // optional
+ FX_DWORD dwFlags; // optional
+ CPWL_Color sBackgroundColor; // optional
+ FX_HWND hAttachedWnd; // required for no-reader framework
+ IPWL_SpellCheck* pSpellCheck; // required for spellchecking
+ int32_t nBorderStyle; // optional
+ int32_t dwBorderWidth; // optional
+ CPWL_Color sBorderColor; // optional
+ CPWL_Color sTextColor; // optional
+ CPWL_Color sTextStrokeColor; // optional
+ int32_t nTransparency; // optional
+ FX_FLOAT fFontSize; // optional
+ CPWL_Dash sDash; // optional
+ void* pAttachedData; // optional
+ CPWL_Wnd* pParentWnd; // ignore
+ CPWL_MsgControl* pMsgControl; // ignore
+ int32_t eCursorType; // ignore
+ CPDF_Matrix mtChild; // ignore
};
class CPWL_Timer {
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp
index 8895dce076..9ad3384803 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/src/fpdfview.cpp
@@ -155,7 +155,6 @@ DLLEXPORT void STDCALL FPDF_SetSandBoxPolicy(FPDF_DWORD policy,
return FSDK_SetSandBoxPolicy(policy, enable);
}
-
DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadDocument(FPDF_STRING file_path,
FPDF_BYTESTRING password) {
// NOTE: the creation of the file needs to be by the embedder on the
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index bc041fd05f..ca0c29efa4 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -396,8 +396,6 @@ void CPDFSDK_Widget::DrawShadow(CFX_RenderDevice* pDevice,
int nFieldType = GetFieldType();
if (m_pInterForm->IsNeedHighLight(nFieldType)) {
- // if (nFieldType != FIELDTYPE_PUSHBUTTON)
- // {
CPDF_Rect rc = GetRect();
FX_COLORREF color = m_pInterForm->GetHighlightColor(nFieldType);
uint8_t alpha = m_pInterForm->GetHighlightAlpha();
@@ -411,10 +409,6 @@ void CPDFSDK_Widget::DrawShadow(CFX_RenderDevice* pDevice,
pPageView->GetCurrentMatrix(page2device);
page2device.Transform(((FX_FLOAT)rc.left), ((FX_FLOAT)rc.bottom),
rcDevice.left, rcDevice.bottom);
- // pEnv->FFI_PageToDevice(m_pPageView->GetPDFPage(), rc.left,
- // rc.bottom, &rcDevice.left, &rcDevice.bottom);
- // pEnv->FFI_PageToDevice(m_pPageView->GetPDFPage(), rc.right,
- // rc.top, &rcDevice.right, &rcDevice.top);
page2device.Transform(((FX_FLOAT)rc.right), ((FX_FLOAT)rc.top),
rcDevice.right, rcDevice.top);
@@ -424,7 +418,6 @@ void CPDFSDK_Widget::DrawShadow(CFX_RenderDevice* pDevice,
FX_RECT rcDev((int)rcDevice.left, (int)rcDevice.top, (int)rcDevice.right,
(int)rcDevice.bottom);
pDevice->FillRect(&rcDev, argb);
- /* }*/
}
}
@@ -573,10 +566,7 @@ void CPDFSDK_Widget::ResetAppearance_PushButton() {
ASSERT(pDoc != NULL);
CPDFDoc_Environment* pEnv = pDoc->GetEnv();
- CBA_FontMap FontMap(
- this,
- pEnv->GetSysHandler()); //,
- //ISystemHandle::GetSystemHandler(m_pBaseForm->GetEnv()));
+ CBA_FontMap FontMap(this, pEnv->GetSysHandler());
FontMap.Initial();
FontMap.SetAPType("N");
@@ -1136,10 +1126,7 @@ void CPDFSDK_Widget::ResetAppearance_TextField(const FX_WCHAR* sValue) {
ASSERT(pDoc != NULL);
CPDFDoc_Environment* pEnv = pDoc->GetEnv();
- CBA_FontMap FontMap(
- this,
- pEnv->GetSysHandler()); //,
- //ISystemHandle::GetSystemHandler(m_pBaseForm->GetEnv()));
+ CBA_FontMap FontMap(this, pEnv->GetSysHandler());
FontMap.Initial();
pEdit->SetFontMap(&FontMap);
diff --git a/fpdfsdk/src/fxedit/fxet_ap.cpp b/fpdfsdk/src/fxedit/fxet_ap.cpp
index b9900d899b..4e92099417 100644
--- a/fpdfsdk/src/fxedit/fxet_ap.cpp
+++ b/fpdfsdk/src/fxedit/fxet_ap.cpp
@@ -196,11 +196,6 @@ CFX_ByteString IFX_Edit::GetSelectAppearanceStream(
CPVT_Word word;
CPVT_Line line;
if (pIterator->GetWord(word) && pIterator->GetLine(line)) {
- // CPDF_Rect rcWordSel = CPDF_Rect(word.ptWord.x,line.ptLine.y +
- // line.fLineDescent,
- // word.ptWord.x+word.fWidth,line.ptLine.y +
- //line.fLineAscent);
-
sRet << word.ptWord.x + ptOffset.x << " "
<< line.ptLine.y + line.fLineDescent << " " << word.fWidth << " "
<< line.fLineAscent - line.fLineDescent << " re\nf\n";
diff --git a/fpdfsdk/src/javascript/app.cpp b/fpdfsdk/src/javascript/app.cpp
index 29007a4a2a..24f00ca262 100644
--- a/fpdfsdk/src/javascript/app.cpp
+++ b/fpdfsdk/src/javascript/app.cpp
@@ -302,10 +302,10 @@ FX_BOOL app::alert(IFXJS_Context* cc,
CJS_Value* pValue = new CJS_Value(isolate);
// if (iLenth == 1)
// pValue = new
- //CJS_Value(isolate);
+ // CJS_Value(isolate);
// else if (iLenth > 1)
// pValue = new
- //CJS_Value[iLenth];
+ // CJS_Value[iLenth];
for (int i = 0; i < iLenth; i++) {
carray.GetElement(i, *pValue);
diff --git a/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp b/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp
index ba75e55fdf..b252bffb8e 100644
--- a/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp
@@ -183,7 +183,7 @@ void CPWL_ListBox::DrawThisAppearance(CFX_RenderDevice* pDevice,
if (m_pList->IsItemSelected(i)) {
// CPWL_Utils::DrawFillRect(pDevice, pUser2Device, rcItem,
- //ArgbEncode(255,0,51,113));
+ // ArgbEncode(255,0,51,113));
IFX_SystemHandler* pSysHandler = GetSystemHandler();
if (pSysHandler && pSysHandler->IsSelectionImplemented()) {
IFX_Edit::DrawEdit(
diff --git a/public/fpdf_formfill.h b/public/fpdf_formfill.h
index 90c8b26853..625a2b63e9 100644
--- a/public/fpdf_formfill.h
+++ b/public/fpdf_formfill.h
@@ -767,6 +767,7 @@ DLLEXPORT void STDCALL FORM_DoDocumentOpenAction(FPDF_FORMHANDLE hHandle);
0x13 // WP, before printing document, JavaScript action.
#define FPDFDOC_AACTION_DP \
0x14 // DP, after printing document, JavaScript action.
+
/**
* Function: FORM_DoDocumentAAction
* This method is required for performing the document's