summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdfformfill.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/fpdfformfill.cpp')
-rw-r--r--fpdfsdk/src/fpdfformfill.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/fpdfsdk/src/fpdfformfill.cpp b/fpdfsdk/src/fpdfformfill.cpp
index e4b7de4426..9e89ea002b 100644
--- a/fpdfsdk/src/fpdfformfill.cpp
+++ b/fpdfsdk/src/fpdfformfill.cpp
@@ -1,7 +1,7 @@
// Copyright 2014 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-
+
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "../../public/fpdf_formfill.h"
@@ -46,7 +46,7 @@ DLLEXPORT int STDCALL FPDPage_HasFormFieldAtPoint(FPDF_FORMHANDLE hHandle, FPDF_
}
IXFA_PageView* pPageView = ((CPDFXFA_Page*)page)->GetXFAPageView();
- if (pPageView)
+ if (pPageView)
{
IXFA_WidgetHandler* pWidgetHandler = NULL;
IXFA_DocView* pDocView = pPageView->GetDocView();
@@ -81,7 +81,7 @@ DLLEXPORT int STDCALL FPDPage_HasFormFieldAtPoint(FPDF_FORMHANDLE hHandle, FPDF_
pWidgetIterator->Release();
}
-
+
return -1;
}
@@ -121,7 +121,7 @@ DLLEXPORT void STDCALL FPDFDOC_ExitFormFillEnvironment(FPDF_FORMHANDLE hHandle)
}
DLLEXPORT FPDF_BOOL STDCALL FORM_OnMouseMove(FPDF_FORMHANDLE hHandle, FPDF_PAGE page, int modifier, double page_x, double page_y)
-{
+{
if (!hHandle || !page)
return FALSE;
// CPDF_Page * pPage = (CPDF_Page*) page;
@@ -133,7 +133,7 @@ DLLEXPORT FPDF_BOOL STDCALL FORM_OnMouseMove(FPDF_FORMHANDLE hHandle, FPDF_PAGE
CPDFSDK_PageView* pPageView = pFXDoc->GetPageView((CPDFXFA_Page*)page);
if(!pPageView)
return FALSE;
-
+
// double page_x = 0;
// double page_y = 0;
// pEnv->FFI_DeviceToPage(page, point_x, point_y, &page_x, &page_y);
@@ -217,8 +217,8 @@ DLLEXPORT FPDF_BOOL STDCALL FORM_OnKeyDown(FPDF_FORMHANDLE hHandle, FPDF_PAGE pa
CPDFSDK_PageView* pPageView = pFXDoc->GetPageView((CPDFXFA_Page*)page);
if(!pPageView)
return FALSE;
-
-
+
+
return pPageView->OnKeyDown(nKeyCode, modifier);
}
@@ -232,8 +232,8 @@ DLLEXPORT FPDF_BOOL STDCALL FORM_OnKeyUp(FPDF_FORMHANDLE hHandle, FPDF_PAGE page
CPDFSDK_PageView* pPageView = pFXDoc->GetPageView((CPDFXFA_Page*)page);
if(!pPageView)
return FALSE;
-
-
+
+
return pPageView->OnKeyUp(nKeyCode, modifier);
}
@@ -259,16 +259,16 @@ DLLEXPORT FPDF_BOOL STDCALL FORM_ForceToKillFocus(FPDF_FORMHANDLE hHandle)
CPDFSDK_Document* pSDKDoc = ((CPDFDoc_Environment*)hHandle)->GetCurrentDoc();
if(!pSDKDoc)
return FALSE;
- //Kill the current focus.
+ //Kill the current focus.
return pSDKDoc->KillFocusAnnot(0);
}
-DLLEXPORT void STDCALL FPDF_FFLDraw(FPDF_FORMHANDLE hHandle, FPDF_BITMAP bitmap, FPDF_PAGE page, int start_x, int start_y,
+DLLEXPORT void STDCALL FPDF_FFLDraw(FPDF_FORMHANDLE hHandle, FPDF_BITMAP bitmap, FPDF_PAGE page, int start_x, int start_y,
int size_x, int size_y, int rotate, int flags)
{
if (!hHandle || !page)
return ;
-
+
CPDFXFA_Page* pPage = (CPDFXFA_Page*)page;
CPDFXFA_Document* pDocument = pPage->GetDocument();
if (!pDocument)
@@ -281,10 +281,10 @@ DLLEXPORT void STDCALL FPDF_FFLDraw(FPDF_FORMHANDLE hHandle, FPDF_BITMAP bitmap,
CPDFSDK_Document* pFXDoc = pEnv->GetCurrentDoc();
if (!pFXDoc)
return;
-
+
CFX_AffineMatrix matrix;
- pPage->GetDisplayMatrix(matrix, start_x, start_y, size_x, size_y, rotate);
-
+ pPage->GetDisplayMatrix(matrix, start_x, start_y, size_x, size_y, rotate);
+
FX_RECT clip;
clip.left = start_x;
clip.right = start_x + size_x;
@@ -303,7 +303,7 @@ DLLEXPORT void STDCALL FPDF_FFLDraw(FPDF_FORMHANDLE hHandle, FPDF_BITMAP bitmap,
pDevice->Attach((CFX_DIBitmap*)bitmap);
pDevice->SaveState();
pDevice->SetClip_Rect(&clip);
-
+
CPDF_RenderOptions options;
if (flags & FPDF_LCD_TEXT)
options.m_Flags |= RENDER_CLEARTYPE;
@@ -526,7 +526,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDF_StringHandleGetStringByIndex(FPDF_STRINGHANDLE
*size = len;
return TRUE;
}
-
+
int real_size = len < *size ? len : *size;
if (real_size > 0)
FXSYS_memcpy((void*)bsText, (const FX_CHAR*)(sSuggestWords[index]), real_size);
@@ -546,7 +546,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDF_StringHandleAddString(FPDF_STRINGHANDLE stringH
{
if (stringHandle == NULL || bsText == NULL || size <= 0)
return FALSE;
-
+
CFX_ByteStringArray* stringArr = (CFX_ByteStringArray*)stringHandle;
CFX_ByteString bsStr(bsText, size);
@@ -566,7 +566,7 @@ DLLEXPORT void STDCALL FPDF_SetFormFieldHighlightColor(FPDF_FORMHANDLE hHandle,
{
pInterForm->SetHighlightColor(color, fieldType);
}
-
+
}
}
@@ -607,7 +607,7 @@ DLLEXPORT void STDCALL FORM_OnAfterLoadPage(FPDF_PAGE page, FPDF_FORMHANDLE hHan
if(pPageView)
{
pPageView->SetValid(TRUE);
- }
+ }
}
DLLEXPORT void STDCALL FORM_OnBeforeClosePage(FPDF_PAGE page, FPDF_FORMHANDLE hHandle)
@@ -633,7 +633,7 @@ DLLEXPORT void STDCALL FORM_DoDocumentJSAction(FPDF_FORMHANDLE hHandle)
pSDKDoc->InitPageView();
if(((CPDFDoc_Environment*)hHandle)->IsJSInitiated())
pSDKDoc->ProcJavascriptFun();
- }
+ }
}
DLLEXPORT void STDCALL FORM_DoDocumentOpenAction(FPDF_FORMHANDLE hHandle)
@@ -658,7 +658,7 @@ DLLEXPORT void STDCALL FORM_DoDocumentAAction(FPDF_FORMHANDLE hHandle, int aaTyp
if (!pDic)
return;
CPDF_AAction aa = pDic->GetDict(FX_BSTRC("AA"));
-
+
if(aa.ActionExist((CPDF_AAction::AActionType)aaType))
{
CPDF_Action action = aa.GetAction((CPDF_AAction::AActionType)aaType);
@@ -679,15 +679,15 @@ DLLEXPORT void STDCALL FORM_DoPageAAction(FPDF_PAGE page, FPDF_FORMHANDLE hHandl
{
CPDFDoc_Environment *pEnv = pSDKDoc->GetEnv();
ASSERT(pEnv != NULL);
-
+
CPDFSDK_ActionHandler *pActionHandler = pEnv->GetActionHander();
ASSERT(pActionHandler != NULL);
-
+
if (!pPage->GetPDFPage())
return;
CPDF_Dictionary *pPageDict = pPage->GetPDFPage()->m_pFormDict;
ASSERT(pPageDict != NULL);
-
+
CPDF_AAction aa = pPageDict->GetDict(FX_BSTRC("AA"));
FX_BOOL bExistOAAction = FALSE;