summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffpushbutton.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-03 12:15:53 -0500
committerChromium commit bot <commit-bot@chromium.org>2018-01-03 18:22:31 +0000
commitfa50df5605a14ca4c9ba440506685981f1c8b04b (patch)
tree993f3af23213e8c86c62314b502f6144ce13688b /xfa/fxfa/cxfa_ffpushbutton.cpp
parent39628b04bc86461426f2dcf5a568f5e9e70ad997 (diff)
downloadpdfium-fa50df5605a14ca4c9ba440506685981f1c8b04b.tar.xz
Fold CXFA_CaptionData into CXFA_Caption
This CL folds the CXFA_CaptionData wrapper class into CXFA_Caption. Change-Id: I65302656a89985dec4d0ec1f42b5eaa95d22aae2 Reviewed-on: https://pdfium-review.googlesource.com/22150 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffpushbutton.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffpushbutton.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/xfa/fxfa/cxfa_ffpushbutton.cpp b/xfa/fxfa/cxfa_ffpushbutton.cpp
index 8358ba0dac..9db0c25bbc 100644
--- a/xfa/fxfa/cxfa_ffpushbutton.cpp
+++ b/xfa/fxfa/cxfa_ffpushbutton.cpp
@@ -19,6 +19,7 @@
#include "xfa/fxfa/cxfa_textlayout.h"
#include "xfa/fxfa/cxfa_textprovider.h"
#include "xfa/fxfa/parser/cxfa_border.h"
+#include "xfa/fxfa/parser/cxfa_caption.h"
#include "xfa/fxgraphics/cxfa_gecolor.h"
#include "xfa/fxgraphics/cxfa_gepath.h"
@@ -102,9 +103,9 @@ bool CXFA_FFPushButton::PerformLayout() {
if (margin)
XFA_RectWidthoutMargin(rtWidget, margin);
- CXFA_CaptionData captionData = m_pDataAcc->GetCaptionData();
+ CXFA_Caption* caption = m_pDataAcc->GetCaption();
m_rtCaption = rtWidget;
- CXFA_Margin* captionMargin = captionData.GetMargin();
+ CXFA_Margin* captionMargin = caption->GetMargin();
if (captionMargin)
XFA_RectWidthoutMargin(m_rtCaption, captionMargin);
@@ -131,8 +132,8 @@ FX_ARGB CXFA_FFPushButton::GetFillColor() {
}
void CXFA_FFPushButton::LoadHighlightCaption() {
- CXFA_CaptionData captionData = m_pDataAcc->GetCaptionData();
- if (!captionData.HasValidNode() || captionData.IsHidden())
+ CXFA_Caption* caption = m_pDataAcc->GetCaption();
+ if (!caption || caption->IsHidden())
return;
if (m_pDataAcc->HasButtonRollover()) {
@@ -166,8 +167,8 @@ void CXFA_FFPushButton::LayoutHighlightCaption() {
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.IsVisible())
+ CXFA_Caption* caption = m_pDataAcc->GetCaption();
+ if (!caption || !caption->IsVisible())
return;
CFX_RenderDevice* pRenderDevice = pGS->GetRenderDevice();