summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-03-21 13:37:06 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-03-21 13:37:06 +0000
commit4f7479ad5bd977eff1d08c65c44cb8d3950a2d77 (patch)
treecc6d1cae52603b508fe68c0fb326050032f3ec09 /fpdfsdk
parent78faa4365445f69890dc990e4d07a68e68e89ae4 (diff)
downloadpdfium-4f7479ad5bd977eff1d08c65c44cb8d3950a2d77.tar.xz
Change FXSYS_RGB() to FXSYS_BGR().
Also change it from a macro to a constexpr function. Change-Id: I8b2bb42c45a23da6db136abdaee24132db4471c6 Reviewed-on: https://pdfium-review.googlesource.com/28579 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/cpdfsdk_interform.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/fpdfsdk/cpdfsdk_interform.cpp b/fpdfsdk/cpdfsdk_interform.cpp
index f4e22d7744..9231951d33 100644
--- a/fpdfsdk/cpdfsdk_interform.cpp
+++ b/fpdfsdk/cpdfsdk_interform.cpp
@@ -46,6 +46,8 @@
namespace {
+constexpr uint32_t kWhiteBGR = FXSYS_BGR(255, 255, 255);
+
bool IsFormFieldTypeComboOrText(FormFieldType fieldType) {
switch (fieldType) {
case FormFieldType::kComboBox:
@@ -699,7 +701,7 @@ bool CPDFSDK_InterForm::IsNeedHighLight(FormFieldType fieldType) {
void CPDFSDK_InterForm::RemoveAllHighLights() {
std::fill(m_HighlightColor, m_HighlightColor + kFormFieldTypeCount,
- FXSYS_RGB(255, 255, 255));
+ kWhiteBGR);
std::fill(m_NeedsHighlight, m_NeedsHighlight + kFormFieldTypeCount, false);
}
@@ -721,7 +723,7 @@ void CPDFSDK_InterForm::SetAllHighlightColors(FX_COLORREF clr) {
FX_COLORREF CPDFSDK_InterForm::GetHighlightColor(FormFieldType fieldType) {
if (fieldType == FormFieldType::kUnknown)
- return FXSYS_RGB(255, 255, 255);
+ return kWhiteBGR;
#ifdef PDF_ENABLE_XFA
// For the XFA fields, we need to return the specific field type highlight