summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
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