summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffpushbutton.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-23 17:02:23 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-23 17:02:23 +0000
commit6aec70bc09cb65b169fe6ca1af65e8929aeea43a (patch)
tree34d55cf15cba0fe71e87a896184ecdc891d4752f /xfa/fxfa/cxfa_ffpushbutton.cpp
parentd49254bc9323883deba14d27026ec2bb9af096fa (diff)
downloadpdfium-6aec70bc09cb65b169fe6ca1af65e8929aeea43a.tar.xz
Cleanup CXFA_WidgetDatachromium/3277
This CL cleans up return values, out-params and changes simple methods to boolean checks where possible in CXFA_WidgetData. Change-Id: I29daa67993730f3e9d61cb6fdf918a886cc9120e Reviewed-on: https://pdfium-review.googlesource.com/19230 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffpushbutton.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffpushbutton.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/xfa/fxfa/cxfa_ffpushbutton.cpp b/xfa/fxfa/cxfa_ffpushbutton.cpp
index 9a799cd2ce..8745c7a1c1 100644
--- a/xfa/fxfa/cxfa_ffpushbutton.cpp
+++ b/xfa/fxfa/cxfa_ffpushbutton.cpp
@@ -134,14 +134,10 @@ FX_ARGB CXFA_FFPushButton::GetFillColor() {
void CXFA_FFPushButton::LoadHighlightCaption() {
CXFA_CaptionData captionData = m_pDataAcc->GetCaptionData();
- if (!captionData.HasValidNode() ||
- captionData.GetPresence() == XFA_ATTRIBUTEENUM_Hidden) {
+ if (!captionData.HasValidNode() || captionData.IsHidden())
return;
- }
- bool bRichText;
- WideString wsRollover;
- if (m_pDataAcc->GetButtonRollover(wsRollover, bRichText)) {
+ if (m_pDataAcc->HasButtonRollover()) {
if (!m_pRollProvider) {
m_pRollProvider = pdfium::MakeUnique<CXFA_TextProvider>(
m_pDataAcc.Get(), XFA_TEXTPROVIDERTYPE_Rollover);
@@ -149,8 +145,8 @@ void CXFA_FFPushButton::LoadHighlightCaption() {
m_pRolloverTextLayout =
pdfium::MakeUnique<CXFA_TextLayout>(m_pRollProvider.get());
}
- WideString wsDown;
- if (m_pDataAcc->GetButtonDown(wsDown, bRichText)) {
+
+ if (m_pDataAcc->HasButtonDown()) {
if (!m_pDownProvider) {
m_pDownProvider = pdfium::MakeUnique<CXFA_TextProvider>(
m_pDataAcc.Get(), XFA_TEXTPROVIDERTYPE_Down);
@@ -173,10 +169,8 @@ void CXFA_FFPushButton::RenderHighlightCaption(CXFA_Graphics* pGS,
CFX_Matrix* pMatrix) {
CXFA_TextLayout* pCapTextLayout = m_pDataAcc->GetCaptionTextLayout();
CXFA_CaptionData captionData = m_pDataAcc->GetCaptionData();
- if (!captionData.HasValidNode() ||
- captionData.GetPresence() != XFA_ATTRIBUTEENUM_Visible) {
+ if (!captionData.HasValidNode() || !captionData.IsVisible())
return;
- }
CFX_RenderDevice* pRenderDevice = pGS->GetRenderDevice();
CFX_RectF rtClip = m_rtCaption;