summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_widget.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-03-28 21:10:35 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-03-28 21:10:35 +0000
commita17a0e219d5fcd4b8714cf97e8daf119d4388bee (patch)
tree158f81e700398e3e4fc7cb03111b79746d485fdd /fpdfsdk/cpdfsdk_widget.cpp
parentcbf76e656042e3d9778ccc114983ab6a3c19ff92 (diff)
downloadpdfium-a17a0e219d5fcd4b8714cf97e8daf119d4388bee.tar.xz
Remove CPDF_DefaultAppearance reference params
This CL converts the CPDF_DefaultAppearance::GetColor methods to return instead of using reference parameters. Change-Id: I9ba6bf060a536290a83d3c9ce6e115511f28664c Reviewed-on: https://pdfium-review.googlesource.com/29410 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'fpdfsdk/cpdfsdk_widget.cpp')
-rw-r--r--fpdfsdk/cpdfsdk_widget.cpp7
1 files changed, 3 insertions, 4 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]);
}