diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-01-03 12:15:53 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-03 18:22:31 +0000 |
commit | fa50df5605a14ca4c9ba440506685981f1c8b04b (patch) | |
tree | 993f3af23213e8c86c62314b502f6144ce13688b /xfa/fxfa/cxfa_ffcheckbutton.cpp | |
parent | 39628b04bc86461426f2dcf5a568f5e9e70ad997 (diff) | |
download | pdfium-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_ffcheckbutton.cpp')
-rw-r--r-- | xfa/fxfa/cxfa_ffcheckbutton.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/xfa/fxfa/cxfa_ffcheckbutton.cpp b/xfa/fxfa/cxfa_ffcheckbutton.cpp index 9083a254a1..d82deb3dd0 100644 --- a/xfa/fxfa/cxfa_ffcheckbutton.cpp +++ b/xfa/fxfa/cxfa_ffcheckbutton.cpp @@ -20,6 +20,7 @@ #include "xfa/fxfa/cxfa_ffpageview.h" #include "xfa/fxfa/cxfa_ffwidget.h" #include "xfa/fxfa/parser/cxfa_border.h" +#include "xfa/fxfa/parser/cxfa_caption.h" #include "xfa/fxfa/parser/cxfa_para.h" CXFA_FFCheckButton::CXFA_FFCheckButton(CXFA_WidgetAcc* pDataAcc) @@ -97,11 +98,11 @@ bool CXFA_FFCheckButton::PerformLayout() { XFA_AttributeEnum iCapPlacement = XFA_AttributeEnum::Unknown; float fCapReserve = 0; - CXFA_CaptionData captionData = m_pDataAcc->GetCaptionData(); - if (captionData.HasValidNode() && captionData.IsVisible()) { + CXFA_Caption* caption = m_pDataAcc->GetCaption(); + if (caption && caption->IsVisible()) { m_rtCaption = rtWidget; - iCapPlacement = captionData.GetPlacementType(); - fCapReserve = captionData.GetReserve(); + iCapPlacement = caption->GetPlacementType(); + fCapReserve = caption->GetReserve(); if (fCapReserve <= 0) { if (iCapPlacement == XFA_AttributeEnum::Top || iCapPlacement == XFA_AttributeEnum::Bottom) { @@ -121,7 +122,7 @@ bool CXFA_FFCheckButton::PerformLayout() { } m_rtUI = rtWidget; - CXFA_Margin* captionMargin = captionData.GetMargin(); + CXFA_Margin* captionMargin = caption->GetMargin(); switch (iCapPlacement) { case XFA_AttributeEnum::Left: { m_rtCaption.width = fCapReserve; |