summaryrefslogtreecommitdiff
path: root/xfa/src/fxfa
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2016-03-01 12:46:41 -0500
committerDan Sinclair <dsinclair@chromium.org>2016-03-01 12:46:41 -0500
commitc441552aa9776b9fbdecf3e17d20ba096512f388 (patch)
tree88d1728fc6f6210ef26484326f50b17064cfa6f8 /xfa/src/fxfa
parent3fc97fff14c1496f1fa57240b1391dec42eb13d6 (diff)
downloadpdfium-c441552aa9776b9fbdecf3e17d20ba096512f388.tar.xz
Remove _XFA_EMB
The _XFA_EMB flag is never defined, remove conditionals. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1751033002 .
Diffstat (limited to 'xfa/src/fxfa')
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffchoicelist.cpp19
-rw-r--r--xfa/src/fxfa/src/app/xfa_fffield.cpp40
-rw-r--r--xfa/src/fxfa/src/app/xfa_fftextedit.cpp18
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffwidget.cpp13
-rw-r--r--xfa/src/fxfa/src/app/xfa_fwladapter.cpp19
5 files changed, 32 insertions, 77 deletions
diff --git a/xfa/src/fxfa/src/app/xfa_ffchoicelist.cpp b/xfa/src/fxfa/src/app/xfa_ffchoicelist.cpp
index d61b6df79c..e3ac41aa65 100644
--- a/xfa/src/fxfa/src/app/xfa_ffchoicelist.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffchoicelist.cpp
@@ -199,30 +199,21 @@ FWL_ERR CXFA_FFListBox::OnDrawWidget(CFX_Graphics* pGraphics,
const CFX_Matrix* pMatrix) {
return m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix);
}
+
CXFA_FFComboBox::CXFA_FFComboBox(CXFA_FFPageView* pPageView,
CXFA_WidgetAcc* pDataAcc)
: CXFA_FFField(pPageView, pDataAcc), m_pOldDelegate(NULL) {}
+
CXFA_FFComboBox::~CXFA_FFComboBox() {}
+
FX_BOOL CXFA_FFComboBox::GetBBox(CFX_RectF& rtBox,
FX_DWORD dwStatus,
FX_BOOL bDrawFocus) {
- if (bDrawFocus) {
+ if (bDrawFocus)
return FALSE;
- }
-#ifndef _XFA_EMB
return CXFA_FFWidget::GetBBox(rtBox, dwStatus);
-#endif
- GetRectWithoutRotate(rtBox);
- if (m_pNormalWidget) {
- CFX_RectF rtWidget;
- ((CFWL_ComboBox*)m_pNormalWidget)->GetBBox(rtWidget);
- rtBox.Union(rtWidget);
- }
- CFX_Matrix mt;
- GetRotateMatrix(mt);
- mt.TransformRect(rtBox);
- return TRUE;
}
+
FX_BOOL CXFA_FFComboBox::PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) {
if (!m_pNormalWidget) {
return FALSE;
diff --git a/xfa/src/fxfa/src/app/xfa_fffield.cpp b/xfa/src/fxfa/src/app/xfa_fffield.cpp
index 106256d91f..53039e34c0 100644
--- a/xfa/src/fxfa/src/app/xfa_fffield.cpp
+++ b/xfa/src/fxfa/src/app/xfa_fffield.cpp
@@ -26,36 +26,26 @@ CXFA_FFField::CXFA_FFField(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc)
CXFA_FFField::~CXFA_FFField() {
CXFA_FFField::UnloadWidget();
}
+
FX_BOOL CXFA_FFField::GetBBox(CFX_RectF& rtBox,
FX_DWORD dwStatus,
FX_BOOL bDrawFocus) {
- if (bDrawFocus) {
- XFA_ELEMENT type = (XFA_ELEMENT)m_pDataAcc->GetUIType();
- if (type == XFA_ELEMENT_Button || type == XFA_ELEMENT_CheckButton ||
- type == XFA_ELEMENT_ImageEdit || type == XFA_ELEMENT_Signature ||
- type == XFA_ELEMENT_ChoiceList) {
- rtBox = m_rtUI;
- CFX_Matrix mt;
- GetRotateMatrix(mt);
- mt.TransformRect(rtBox);
- return TRUE;
- }
- return FALSE;
- }
-#ifndef _XFA_EMB
- return CXFA_FFWidget::GetBBox(rtBox, dwStatus);
-#endif
- GetRectWithoutRotate(rtBox);
- if (m_pNormalWidget) {
- CFX_RectF rtWidget;
- m_pNormalWidget->GetWidgetRect(rtWidget);
- rtBox.Union(rtWidget);
+ if (!bDrawFocus)
+ return CXFA_FFWidget::GetBBox(rtBox, dwStatus);
+
+ XFA_ELEMENT type = (XFA_ELEMENT)m_pDataAcc->GetUIType();
+ if (type == XFA_ELEMENT_Button || type == XFA_ELEMENT_CheckButton ||
+ type == XFA_ELEMENT_ImageEdit || type == XFA_ELEMENT_Signature ||
+ type == XFA_ELEMENT_ChoiceList) {
+ rtBox = m_rtUI;
+ CFX_Matrix mt;
+ GetRotateMatrix(mt);
+ mt.TransformRect(rtBox);
+ return TRUE;
}
- CFX_Matrix mt;
- GetRotateMatrix(mt);
- mt.TransformRect(rtBox);
- return TRUE;
+ return FALSE;
}
+
void CXFA_FFField::RenderWidget(CFX_Graphics* pGS,
CFX_Matrix* pMatrix,
FX_DWORD dwStatus,
diff --git a/xfa/src/fxfa/src/app/xfa_fftextedit.cpp b/xfa/src/fxfa/src/app/xfa_fftextedit.cpp
index c1982ce24f..bdee996b5f 100644
--- a/xfa/src/fxfa/src/app/xfa_fftextedit.cpp
+++ b/xfa/src/fxfa/src/app/xfa_fftextedit.cpp
@@ -555,27 +555,17 @@ void CXFA_FFPasswordEdit::UpdateWidgetProperty() {
CXFA_FFDateTimeEdit::CXFA_FFDateTimeEdit(CXFA_FFPageView* pPageView,
CXFA_WidgetAcc* pDataAcc)
: CXFA_FFTextEdit(pPageView, pDataAcc) {}
+
CXFA_FFDateTimeEdit::~CXFA_FFDateTimeEdit() {}
+
FX_BOOL CXFA_FFDateTimeEdit::GetBBox(CFX_RectF& rtBox,
FX_DWORD dwStatus,
FX_BOOL bDrawFocus) {
- if (bDrawFocus) {
+ if (bDrawFocus)
return FALSE;
- }
-#ifndef _XFA_EMB
return CXFA_FFWidget::GetBBox(rtBox, dwStatus);
-#endif
- GetRectWithoutRotate(rtBox);
- if (m_pNormalWidget) {
- CFX_RectF rtWidget;
- ((CFWL_DateTimePicker*)m_pNormalWidget)->GetBBox(rtWidget);
- rtBox.Union(rtWidget);
- }
- CFX_Matrix mt;
- GetRotateMatrix(mt);
- mt.TransformRect(rtBox);
- return TRUE;
}
+
FX_BOOL CXFA_FFDateTimeEdit::PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) {
if (!m_pNormalWidget) {
return FALSE;
diff --git a/xfa/src/fxfa/src/app/xfa_ffwidget.cpp b/xfa/src/fxfa/src/app/xfa_ffwidget.cpp
index 30569ef4a3..e8138397e0 100644
--- a/xfa/src/fxfa/src/app/xfa_ffwidget.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffwidget.cpp
@@ -68,24 +68,21 @@ void CXFA_FFWidget::GetRectWithoutRotate(CFX_RectF& rtWidget) {
FX_DWORD CXFA_FFWidget::GetStatus() {
return m_dwStatus;
}
+
void CXFA_FFWidget::ModifyStatus(FX_DWORD dwAdded, FX_DWORD dwRemoved) {
m_dwStatus = (m_dwStatus & ~dwRemoved) | dwAdded;
}
+
FX_BOOL CXFA_FFWidget::GetBBox(CFX_RectF& rtBox,
FX_DWORD dwStatus,
FX_BOOL bDrawFocus) {
- if (bDrawFocus) {
+ if (bDrawFocus)
return FALSE;
- }
-#ifndef _XFA_EMB
- if (m_pPageView) {
+ if (m_pPageView)
m_pPageView->GetPageViewRect(rtBox);
- }
- return TRUE;
-#endif
- GetWidgetRect(rtBox);
return TRUE;
}
+
CXFA_WidgetAcc* CXFA_FFWidget::GetDataAcc() {
return m_pDataAcc;
}
diff --git a/xfa/src/fxfa/src/app/xfa_fwladapter.cpp b/xfa/src/fxfa/src/app/xfa_fwladapter.cpp
index 174e31d8ca..1ac480bf7f 100644
--- a/xfa/src/fxfa/src/app/xfa_fwladapter.cpp
+++ b/xfa/src/fxfa/src/app/xfa_fwladapter.cpp
@@ -33,6 +33,7 @@ FX_BOOL FWL_ShowCaret(IFWL_Widget* pWidget,
pDocProvider->DisplayCaret(pXFAWidget, bVisible, pRtAnchor);
return TRUE;
}
+
FWL_ERR CXFA_FWLAdapterWidgetMgr::RepaintWidget(IFWL_Widget* pWidget,
const CFX_RectF* pRect) {
if (!pWidget)
@@ -40,24 +41,10 @@ FWL_ERR CXFA_FWLAdapterWidgetMgr::RepaintWidget(IFWL_Widget* pWidget,
CXFA_FFField* pField = (CXFA_FFField*)pWidget->GetPrivateData(pWidget);
if (!pField)
return FWL_ERR_Indefinite;
-#ifdef _XFA_EMB
- CFX_RectF rtInvalidate;
- pWidget->GetWidgetRect(rtInvalidate);
- if (pRect) {
- rtInvalidate.left += pRect->left;
- rtInvalidate.top += pRect->top;
- rtInvalidate.width = pRect->width;
- rtInvalidate.height = pRect->height;
- }
- CFX_Matrix mt;
- pField->GetRotateMatrix(mt);
- mt.TransformRect(rtInvalidate);
- pField->AddInvalidateRect(&rtInvalidate);
-#else
- pField->AddInvalidateRect(NULL);
-#endif
+ pField->AddInvalidateRect(nullptr);
return FWL_ERR_Succeeded;
}
+
FX_BOOL CXFA_FWLAdapterWidgetMgr::GetPopupPos(IFWL_Widget* pWidget,
FX_FLOAT fMinHeight,
FX_FLOAT fMaxHeight,