summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-12-07 17:23:28 -0800
committerCommit bot <commit-bot@chromium.org>2016-12-07 17:23:28 -0800
commit7fa190dbda7b3a5f46b8108aa7984b2fcc23d45c (patch)
tree334c92bc076724892ca6cfe96767f0e5ed841ca1 /xfa/fxfa
parent919c0842b74d382e7ae60c85ff16642b646afbb9 (diff)
downloadpdfium-7fa190dbda7b3a5f46b8108aa7984b2fcc23d45c.tar.xz
Cleanup default FWL params part I
This Cl removes some of the default FWL parameters. Review-Url: https://codereview.chromium.org/2533623002
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/app/xfa_ffbarcode.cpp2
-rw-r--r--xfa/fxfa/app/xfa_ffcheckbutton.cpp8
-rw-r--r--xfa/fxfa/app/xfa_fffield.cpp6
-rw-r--r--xfa/fxfa/app/xfa_ffimageedit.cpp2
-rw-r--r--xfa/fxfa/app/xfa_ffpushbutton.cpp4
5 files changed, 12 insertions, 10 deletions
diff --git a/xfa/fxfa/app/xfa_ffbarcode.cpp b/xfa/fxfa/app/xfa_ffbarcode.cpp
index f89f846a01..8c42bcf774 100644
--- a/xfa/fxfa/app/xfa_ffbarcode.cpp
+++ b/xfa/fxfa/app/xfa_ffbarcode.cpp
@@ -158,7 +158,7 @@ void CXFA_FFBarcode::RenderWidget(CFX_Graphics* pGS,
DrawBorder(pGS, borderUI, m_rtUI, &mtRotate);
RenderCaption(pGS, &mtRotate);
CFX_RectF rtWidget;
- m_pNormalWidget->GetWidgetRect(rtWidget);
+ m_pNormalWidget->GetWidgetRect(rtWidget, false);
CFX_Matrix mt;
mt.Set(1, 0, 0, 1, rtWidget.left, rtWidget.top);
mt.Concat(mtRotate);
diff --git a/xfa/fxfa/app/xfa_ffcheckbutton.cpp b/xfa/fxfa/app/xfa_ffcheckbutton.cpp
index dab6b2cde0..47b628cdec 100644
--- a/xfa/fxfa/app/xfa_ffcheckbutton.cpp
+++ b/xfa/fxfa/app/xfa_ffcheckbutton.cpp
@@ -277,10 +277,12 @@ bool CXFA_FFCheckButton::IsDataChanged() {
}
void CXFA_FFCheckButton::SetFWLCheckState(XFA_CHECKSTATE eCheckState) {
if (eCheckState == XFA_CHECKSTATE_Neutral) {
- m_pNormalWidget->SetStates(FWL_STATE_CKB_Neutral, true);
+ m_pNormalWidget->SetStates(FWL_STATE_CKB_Neutral);
} else {
- m_pNormalWidget->SetStates(FWL_STATE_CKB_Checked,
- eCheckState == XFA_CHECKSTATE_On);
+ if (eCheckState == XFA_CHECKSTATE_On)
+ m_pNormalWidget->SetStates(FWL_STATE_CKB_Checked);
+ else
+ m_pNormalWidget->RemoveStates(FWL_STATE_CKB_Checked);
}
}
bool CXFA_FFCheckButton::UpdateFWLData() {
diff --git a/xfa/fxfa/app/xfa_fffield.cpp b/xfa/fxfa/app/xfa_fffield.cpp
index 689a0b5469..136a99cb6c 100644
--- a/xfa/fxfa/app/xfa_fffield.cpp
+++ b/xfa/fxfa/app/xfa_fffield.cpp
@@ -70,7 +70,7 @@ void CXFA_FFField::RenderWidget(CFX_Graphics* pGS,
RenderCaption(pGS, &mtRotate);
DrawHighlight(pGS, &mtRotate, dwStatus, false);
CFX_RectF rtWidget;
- m_pNormalWidget->GetWidgetRect(rtWidget);
+ m_pNormalWidget->GetWidgetRect(rtWidget, false);
CFX_Matrix mt;
mt.Set(1, 0, 0, 1, rtWidget.left, rtWidget.top);
mt.Concat(mtRotate);
@@ -368,7 +368,7 @@ void CXFA_FFField::FWLToClient(FX_FLOAT& fx, FX_FLOAT& fy) {
return;
}
CFX_RectF rtWidget;
- m_pNormalWidget->GetWidgetRect(rtWidget);
+ m_pNormalWidget->GetWidgetRect(rtWidget, false);
fx -= rtWidget.left;
fy -= rtWidget.top;
}
@@ -593,7 +593,7 @@ bool CXFA_FFField::PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) {
return false;
}
CFX_RectF rtWidget;
- m_pNormalWidget->GetWidgetRect(rtWidget);
+ m_pNormalWidget->GetWidgetRect(rtWidget, false);
if (rtWidget.Contains(fx, fy)) {
return true;
}
diff --git a/xfa/fxfa/app/xfa_ffimageedit.cpp b/xfa/fxfa/app/xfa_ffimageedit.cpp
index 3506cc9703..e9156bace3 100644
--- a/xfa/fxfa/app/xfa_ffimageedit.cpp
+++ b/xfa/fxfa/app/xfa_ffimageedit.cpp
@@ -62,7 +62,7 @@ void CXFA_FFImageEdit::RenderWidget(CFX_Graphics* pGS,
RenderCaption(pGS, &mtRotate);
if (CFX_DIBitmap* pDIBitmap = m_pDataAcc->GetImageEditImage()) {
CFX_RectF rtImage;
- m_pNormalWidget->GetWidgetRect(rtImage);
+ m_pNormalWidget->GetWidgetRect(rtImage, false);
int32_t iHorzAlign = XFA_ATTRIBUTEENUM_Left;
int32_t iVertAlign = XFA_ATTRIBUTEENUM_Top;
if (CXFA_Para para = m_pDataAcc->GetPara()) {
diff --git a/xfa/fxfa/app/xfa_ffpushbutton.cpp b/xfa/fxfa/app/xfa_ffpushbutton.cpp
index df093a0b30..a26714aac3 100644
--- a/xfa/fxfa/app/xfa_ffpushbutton.cpp
+++ b/xfa/fxfa/app/xfa_ffpushbutton.cpp
@@ -215,7 +215,7 @@ void CXFA_FFPushButton::OnDrawWidget(CFX_Graphics* pGraphics,
if ((m_pNormalWidget->GetStates() & FWL_STATE_PSB_Pressed) &&
(m_pNormalWidget->GetStates() & FWL_STATE_PSB_Hovered)) {
CFX_RectF rtFill;
- m_pNormalWidget->GetWidgetRect(rtFill);
+ m_pNormalWidget->GetWidgetRect(rtFill, false);
rtFill.left = rtFill.top = 0;
FX_FLOAT fLineWith = GetLineWidth();
rtFill.Deflate(fLineWith, fLineWith);
@@ -237,7 +237,7 @@ void CXFA_FFPushButton::OnDrawWidget(CFX_Graphics* pGraphics,
CFX_Path path;
path.Create();
CFX_RectF rect;
- m_pNormalWidget->GetWidgetRect(rect);
+ m_pNormalWidget->GetWidgetRect(rect, false);
path.AddRectangle(0, 0, rect.width, rect.height);
pGraphics->StrokePath(&path, (CFX_Matrix*)pMatrix);
}