summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/formfiller/FFL_FormFiller.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-06-13 00:48:38 -0700
committerLei Zhang <thestig@chromium.org>2015-06-13 00:48:38 -0700
commita6d9f0edce07194f551db4c38bb427fbf7d550cf (patch)
tree5ab405c2afde59f7c78c0298992b25fe8566de3b /fpdfsdk/src/formfiller/FFL_FormFiller.cpp
parentbef3c6d1fe83c0d1a84ace5c501932ed39651a74 (diff)
downloadpdfium-a6d9f0edce07194f551db4c38bb427fbf7d550cf.tar.xz
Remove trailing whitespaces in fpdfsdk, XFA edition.
Review URL: https://codereview.chromium.org/1185843005.
Diffstat (limited to 'fpdfsdk/src/formfiller/FFL_FormFiller.cpp')
-rw-r--r--fpdfsdk/src/formfiller/FFL_FormFiller.cpp92
1 files changed, 46 insertions, 46 deletions
diff --git a/fpdfsdk/src/formfiller/FFL_FormFiller.cpp b/fpdfsdk/src/formfiller/FFL_FormFiller.cpp
index 1148c78a5f..540619692b 100644
--- a/fpdfsdk/src/formfiller/FFL_FormFiller.cpp
+++ b/fpdfsdk/src/formfiller/FFL_FormFiller.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
@@ -22,7 +22,7 @@ CFFL_FormFiller::CFFL_FormFiller(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnno
m_pAnnot(pAnnot),
m_bValid(FALSE),
m_ptOldPos(0,0)
-{
+{
m_pWidget = (CPDFSDK_Widget*) pAnnot;
}
@@ -89,7 +89,7 @@ FX_RECT CFFL_FormFiller::GetViewBBox(CPDFSDK_PageView *pPageView, CPDFSDK_Annot*
return rect.GetOutterRect();
}
-void CFFL_FormFiller::OnDraw(CPDFSDK_PageView *pPageView, /*HDC hDC,*/ CPDFSDK_Annot* pAnnot,
+void CFFL_FormFiller::OnDraw(CPDFSDK_PageView *pPageView, /*HDC hDC,*/ CPDFSDK_Annot* pAnnot,
CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,
/*const CRect& rcWindow,*/ FX_DWORD dwFlags)
{
@@ -109,14 +109,14 @@ void CFFL_FormFiller::OnDraw(CPDFSDK_PageView *pPageView, /*HDC hDC,*/ CPDFSDK_A
}
}
-void CFFL_FormFiller::OnDrawDeactive(CPDFSDK_PageView *pPageView, /*HDC hDC,*/ CPDFSDK_Annot* pAnnot,
+void CFFL_FormFiller::OnDrawDeactive(CPDFSDK_PageView *pPageView, /*HDC hDC,*/ CPDFSDK_Annot* pAnnot,
CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,
/*const CRect& rcWindow,*/ FX_DWORD dwFlags)
{
ASSERT(pAnnot != NULL);
-
+
CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
-
+
pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL);
}
@@ -146,7 +146,7 @@ void CFFL_FormFiller::OnMouseExit(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pA
FX_BOOL CFFL_FormFiller::OnLButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, TRUE))
- {
+ {
m_bValid = TRUE;
FX_RECT rect = GetViewBBox(pPageView,pAnnot);
InvalidateRect(rect.left, rect.top, rect.right, rect.bottom);
@@ -163,7 +163,7 @@ FX_BOOL CFFL_FormFiller::OnLButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Anno
FX_BOOL CFFL_FormFiller::OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, FALSE))
- {
+ {
FX_RECT rcFFL = GetViewBBox(pPageView, pAnnot);
InvalidateRect(rcFFL.left, rcFFL.top, rcFFL.right, rcFFL.bottom);
pWnd->OnLButtonUp(WndtoPWL(pPageView, point),nFlags);
@@ -176,7 +176,7 @@ FX_BOOL CFFL_FormFiller::OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot*
FX_BOOL CFFL_FormFiller::OnLButtonDblClk(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, FALSE))
- {
+ {
pWnd->OnLButtonDblClk(WndtoPWL(pPageView, point),nFlags);
return TRUE;
}
@@ -192,7 +192,7 @@ FX_BOOL CFFL_FormFiller::OnMouseMove(CPDFSDK_PageView *pPageView, CPDFSDK_Annot*
}
if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, FALSE))
- {
+ {
pWnd->OnMouseMove(WndtoPWL(pPageView, point),nFlags);
return TRUE;
}
@@ -205,7 +205,7 @@ FX_BOOL CFFL_FormFiller::OnMouseWheel(CPDFSDK_PageView *pPageView, CPDFSDK_Annot
if (!IsValid()) return FALSE;
if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, TRUE))
- {
+ {
return pWnd->OnMouseWheel(zDelta, WndtoPWL(pPageView, point),nFlags);
}
@@ -215,7 +215,7 @@ FX_BOOL CFFL_FormFiller::OnMouseWheel(CPDFSDK_PageView *pPageView, CPDFSDK_Annot
FX_BOOL CFFL_FormFiller::OnRButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, TRUE))
- {
+ {
pWnd->OnRButtonDown(WndtoPWL(pPageView, point),nFlags);
return TRUE;
}
@@ -226,7 +226,7 @@ FX_BOOL CFFL_FormFiller::OnRButtonDown(CPDFSDK_PageView *pPageView, CPDFSDK_Anno
FX_BOOL CFFL_FormFiller::OnRButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, FALSE))
- {
+ {
pWnd->OnRButtonUp(WndtoPWL(pPageView, point),nFlags);
return TRUE;
}
@@ -237,7 +237,7 @@ FX_BOOL CFFL_FormFiller::OnRButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot*
FX_BOOL CFFL_FormFiller::OnRButtonDblClk(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
{
if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, FALSE))
- {
+ {
pWnd->OnRButtonDblClk(WndtoPWL(pPageView, point),nFlags);
return TRUE;
}
@@ -253,7 +253,7 @@ FX_BOOL CFFL_FormFiller::OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_U
ASSERT(pPageView != NULL);
if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, FALSE))
- {
+ {
return pWnd->OnKeyDown(nKeyCode,nFlags);
}
}
@@ -269,7 +269,7 @@ FX_BOOL CFFL_FormFiller::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nF
ASSERT(pPageView != NULL);
if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, FALSE))
- {
+ {
return pWnd->OnChar(nChar,nFlags);
}
}
@@ -296,23 +296,23 @@ FX_BOOL CFFL_FormFiller::OnSetFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag)
CPDFSDK_PageView* pPageView = pDoc->GetPageView(pPage);
ASSERT(pPageView != NULL);
-
+
CPWL_Wnd * pWnd = NULL;
if ( (pWnd = GetPDFWindow(pPageView, TRUE)))
- {
+ {
pWnd->SetFocus();
}
m_bValid = TRUE;
-
-
-
+
+
+
m_bValid = TRUE;
FX_RECT rcRect = GetViewBBox(pPageView,pAnnot);
InvalidateRect(rcRect.left, rcRect.top, rcRect.right, rcRect.bottom);
-
+
return TRUE;
}
@@ -326,10 +326,10 @@ FX_BOOL CFFL_FormFiller::OnKillFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag)
CommitData(pPageView, nFlag);
if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE))
- {
+ {
pWnd->KillFocus();
}
-
+
switch (m_pWidget->GetFieldType())
{
case FIELDTYPE_PUSHBUTTON:
@@ -357,10 +357,10 @@ PWL_CREATEPARAM CFFL_FormFiller::GetCreateParam()
PWL_CREATEPARAM cp;
- cp.pParentWnd = NULL;
+ cp.pParentWnd = NULL;
cp.pProvider = this;
cp.rcRectWnd = GetPDFWindowRect();
-
+
FX_DWORD dwCreateFlags = PWS_BORDER | PWS_BACKGROUND | PWS_VISIBLE;
ASSERT(m_pWidget != NULL);
@@ -369,7 +369,7 @@ PWL_CREATEPARAM CFFL_FormFiller::GetCreateParam()
FX_DWORD dwFieldFlag = m_pWidget->GetFieldFlags();
if (dwFieldFlag & FIELDFLAG_READONLY)
- {
+ {
dwCreateFlags |= PWS_READONLY;
}
@@ -393,7 +393,7 @@ PWL_CREATEPARAM CFFL_FormFiller::GetCreateParam()
cp.fFontSize = m_pWidget->GetFontSize();
cp.dwBorderWidth = m_pWidget->GetBorderWidth();
-
+
int nBorderStyle = m_pWidget->GetBorderStyle();
switch (nBorderStyle)
@@ -403,7 +403,7 @@ PWL_CREATEPARAM CFFL_FormFiller::GetCreateParam()
break;
case BBS_DASH:
cp.nBorderStyle = PBS_DASH;
- cp.sDash = CPWL_Dash(3,3,0);
+ cp.sDash = CPWL_Dash(3,3,0);
break;
case BBS_BEVELED:
cp.nBorderStyle = PBS_BEVELED;
@@ -500,7 +500,7 @@ CPDF_Matrix CFFL_FormFiller::GetWindowMatrix(void* pAttachedData)
pPrivateData->pPageView->GetCurrentMatrix(mtPageView);
CPDF_Matrix mt = GetCurMatrix();
mt.Concat(mtPageView);
-
+
return mt;
}
}
@@ -520,7 +520,7 @@ CPDF_Matrix CFFL_FormFiller::GetCurMatrix()
switch (m_pWidget->GetRotate())
{
default:
- case 0:
+ case 0:
mt = CPDF_Matrix(1,0,0,1,0,0);
break;
case 90:
@@ -578,7 +578,7 @@ CPDFSDK_PageView* CFFL_FormFiller::GetCurPageView()
CPDF_Rect CFFL_FormFiller::GetFocusBox(CPDFSDK_PageView* pPageView)
{
if (CPWL_Wnd * pWnd = GetPDFWindow(pPageView, FALSE))
- {
+ {
CPDF_Rect rcFocus = FFLtoWnd(pPageView, PWLtoFFL(pWnd->GetFocusRect()));
ASSERT(pPageView);
CPDF_Rect rcPage = pPageView->GetPDFPage()->GetPageBBox();
@@ -594,7 +594,7 @@ CPDF_Rect CFFL_FormFiller::FFLtoPWL(const CPDF_Rect& rect)
{
CPDF_Matrix mt;
mt.SetReverse(GetCurMatrix());
-
+
CPDF_Rect temp = rect;
mt.TransformRect(temp);
@@ -604,7 +604,7 @@ CPDF_Rect CFFL_FormFiller::FFLtoPWL(const CPDF_Rect& rect)
CPDF_Rect CFFL_FormFiller::PWLtoFFL(const CPDF_Rect& rect)
{
CPDF_Matrix mt = GetCurMatrix();
-
+
CPDF_Rect temp = rect;
mt.TransformRect(temp);
@@ -635,10 +635,10 @@ CPDF_Point CFFL_FormFiller::PWLtoFFL(const CPDF_Point & point)
CPDF_Point CFFL_FormFiller::WndtoPWL(CPDFSDK_PageView* pPageView, const CPDF_Point& pt)
{
// ASSERT(pPageView != NULL);
-//
+//
// CPDF_Point point(0.0f, 0.0f);
// pPageView->WindowToDoc(pt.x, pt.y, point.x, point.y);
-//
+//
return FFLtoPWL(pt);
// return CPDF_Point(0, 0);
}
@@ -646,10 +646,10 @@ CPDF_Point CFFL_FormFiller::WndtoPWL(CPDFSDK_PageView* pPageView, const CPDF_Poi
CPDF_Rect CFFL_FormFiller::FFLtoWnd(CPDFSDK_PageView* pPageView, const CPDF_Rect & rect)
{
// FX_RECT rcRet(0,0,0,0);
-//
-// ASSERT(pPageView != NULL);
+//
+// ASSERT(pPageView != NULL);
// pPageView->DocToWindow(rect, rcRet);
-//
+//
return rect;
}
@@ -728,12 +728,12 @@ void CFFL_FormFiller::GetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::A
fa.sValue = m_pWidget->GetValue();
}
-void CFFL_FormFiller::SetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AActionType type,
+void CFFL_FormFiller::SetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AActionType type,
const PDFSDK_FieldAction& fa)
{
}
-FX_BOOL CFFL_FormFiller::IsActionDataChanged(CPDF_AAction::AActionType type, const PDFSDK_FieldAction& faOld,
+FX_BOOL CFFL_FormFiller::IsActionDataChanged(CPDF_AAction::AActionType type, const PDFSDK_FieldAction& faOld,
const PDFSDK_FieldAction& faNew)
{
return FALSE;
@@ -749,7 +749,7 @@ void CFFL_FormFiller::RestoreState(CPDFSDK_PageView* pPageView)
CPWL_Wnd* CFFL_FormFiller::ResetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bRestoreValue)
{
- return GetPDFWindow(pPageView, FALSE);
+ return GetPDFWindow(pPageView, FALSE);
}
void CFFL_FormFiller::TimerProc()
@@ -770,7 +770,7 @@ void CFFL_FormFiller::OnKeyStroke(FX_BOOL bKeyDown)
void CFFL_FormFiller::EscapeFiller(CPDFSDK_PageView* pPageView, FX_BOOL bDestroyPDFWindow)
{
m_bValid = FALSE;
-
+
FX_RECT rcRect = GetViewBBox(pPageView, m_pWidget);
InvalidateRect(rcRect.left, rcRect.top, rcRect.right, rcRect.bottom);
@@ -862,7 +862,7 @@ FX_BOOL CFFL_Button::OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAn
m_bMouseDown = FALSE;
m_pWidget->GetPDFPage();
-
+
FX_RECT rect = GetViewBBox(pPageView, pAnnot);
InvalidateRect(rect.left, rect.top, rect.right, rect.bottom);
@@ -876,7 +876,7 @@ FX_BOOL CFFL_Button::OnMouseMove(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAn
return TRUE;
}
-void CFFL_Button::OnDraw(CPDFSDK_PageView *pPageView, /*HDC hDC,*/ CPDFSDK_Annot* pAnnot,
+void CFFL_Button::OnDraw(CPDFSDK_PageView *pPageView, /*HDC hDC,*/ CPDFSDK_Annot* pAnnot,
CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,
/*const CRect& rcWindow,*/ FX_DWORD dwFlags)
{
@@ -916,7 +916,7 @@ void CFFL_Button::OnDraw(CPDFSDK_PageView *pPageView, /*HDC hDC,*/ CPDFSDK_Annot
}
-void CFFL_Button::OnDrawDeactive(CPDFSDK_PageView *pPageView, /*HDC hDC,*/ CPDFSDK_Annot* pAnnot,
+void CFFL_Button::OnDrawDeactive(CPDFSDK_PageView *pPageView, /*HDC hDC,*/ CPDFSDK_Annot* pAnnot,
CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,
/*const CRect& rcWindow, */FX_DWORD dwFlags)
{