summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/cpdfsdk_widget.cpp7
-rw-r--r--fpdfsdk/cpdfsdk_widget.h1
-rw-r--r--fpdfsdk/pwl/cpwl_appstream.cpp6
3 files changed, 7 insertions, 7 deletions
diff --git a/fpdfsdk/cpdfsdk_widget.cpp b/fpdfsdk/cpdfsdk_widget.cpp
index 3a49f9c6a0..f7aae09933 100644
--- a/fpdfsdk/cpdfsdk_widget.cpp
+++ b/fpdfsdk/cpdfsdk_widget.cpp
@@ -435,8 +435,8 @@ bool CPDFSDK_Widget::GetTextColor(FX_COLORREF& color) const {
return false;
FX_ARGB argb;
- int iColorType = CFX_Color::kTransparent;
- da.GetColor(argb, iColorType);
+ int iColorType;
+ std::tie(iColorType, argb) = da.GetColor();
color = ArgbToColorRef(argb);
return iColorType != CFX_Color::kTransparent;
}
@@ -780,9 +780,8 @@ CFX_Color CPDFSDK_Widget::GetTextPWLColor() const {
CPDF_FormControl* pFormCtrl = GetFormControl();
CPDF_DefaultAppearance da = pFormCtrl->GetDefaultAppearance();
if (da.HasColor()) {
- int32_t iColorType;
float fc[4];
- da.GetColor(iColorType, fc);
+ int iColorType = da.GetColor(fc);
crText = CFX_Color(iColorType, fc[0], fc[1], fc[2], fc[3]);
}
diff --git a/fpdfsdk/cpdfsdk_widget.h b/fpdfsdk/cpdfsdk_widget.h
index 81d87376f9..e480fc921a 100644
--- a/fpdfsdk/cpdfsdk_widget.h
+++ b/fpdfsdk/cpdfsdk_widget.h
@@ -12,6 +12,7 @@
#include "core/fpdfdoc/cpdf_aaction.h"
#include "core/fpdfdoc/cpdf_action.h"
#include "core/fpdfdoc/cpdf_annot.h"
+#include "core/fpdfdoc/cpdf_formfield.h"
#include "core/fxcrt/fx_coordinates.h"
#include "core/fxcrt/fx_string.h"
#include "core/fxcrt/unowned_ptr.h"
diff --git a/fpdfsdk/pwl/cpwl_appstream.cpp b/fpdfsdk/pwl/cpwl_appstream.cpp
index 38144d1735..0731398ae2 100644
--- a/fpdfsdk/pwl/cpwl_appstream.cpp
+++ b/fpdfsdk/pwl/cpwl_appstream.cpp
@@ -1181,7 +1181,7 @@ void CPWL_AppStream::SetAsPushButton() {
ByteString csNameTag;
CPDF_DefaultAppearance da = pControl->GetDefaultAppearance();
if (da.HasColor()) {
- da.GetColor(iColorType, fc);
+ iColorType = da.GetColor(fc);
crText = CFX_Color(iColorType, fc[0], fc[1], fc[2], fc[3]);
}
float fFontSize = 12.0f;
@@ -1355,7 +1355,7 @@ void CPWL_AppStream::SetAsCheckBox() {
CFX_FloatRect rcClient = rcWindow.GetDeflated(fBorderWidth, fBorderWidth);
CPDF_DefaultAppearance da = pControl->GetDefaultAppearance();
if (da.HasColor()) {
- da.GetColor(iColorType, fc);
+ iColorType = da.GetColor(fc);
crText = CFX_Color(iColorType, fc[0], fc[1], fc[2], fc[3]);
}
@@ -1471,7 +1471,7 @@ void CPWL_AppStream::SetAsRadioButton() {
CFX_FloatRect rcClient = rcWindow.GetDeflated(fBorderWidth, fBorderWidth);
CPDF_DefaultAppearance da = pControl->GetDefaultAppearance();
if (da.HasColor()) {
- da.GetColor(iColorType, fc);
+ iColorType = da.GetColor(fc);
crText = CFX_Color(iColorType, fc[0], fc[1], fc[2], fc[3]);
}