diff options
Diffstat (limited to 'xfa/fxfa/cxfa_ffpushbutton.cpp')
-rw-r--r-- | xfa/fxfa/cxfa_ffpushbutton.cpp | 16 |
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; |