Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Unified Diff: fpdfsdk/formfiller/cffl_formfiller.cpp

Issue 1980973002: Convert border style defines to an enum class. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: fpdfsdk/formfiller/cffl_formfiller.cpp
diff --git a/fpdfsdk/formfiller/cffl_formfiller.cpp b/fpdfsdk/formfiller/cffl_formfiller.cpp
index b6f719db9975150904b962e5f466874c25ce46d3..8ee6da387d3975082d9d6282ae00ff92b220a057 100644
--- a/fpdfsdk/formfiller/cffl_formfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_formfiller.cpp
@@ -323,32 +323,23 @@ PWL_CREATEPARAM CFFL_FormFiller::GetCreateParam() {
cp.fFontSize = m_pWidget->GetFontSize();
cp.dwBorderWidth = m_pWidget->GetBorderWidth();
- int nBorderStyle = m_pWidget->GetBorderStyle();
-
- switch (nBorderStyle) {
- case BBS_SOLID:
- cp.nBorderStyle = PBS_SOLID;
- break;
- case BBS_DASH:
- cp.nBorderStyle = PBS_DASH;
+ cp.nBorderStyle = m_pWidget->GetBorderStyle();
+ switch (cp.nBorderStyle) {
+ case BorderStyle::DASH:
cp.sDash = CPWL_Dash(3, 3, 0);
break;
- case BBS_BEVELED:
- cp.nBorderStyle = PBS_BEVELED;
+ case BorderStyle::BEVELED:
cp.dwBorderWidth *= 2;
break;
- case BBS_INSET:
- cp.nBorderStyle = PBS_INSET;
+ case BorderStyle::INSET:
cp.dwBorderWidth *= 2;
break;
- case BBS_UNDERLINE:
- cp.nBorderStyle = PBS_UNDERLINED;
+ default:
break;
}
- if (cp.fFontSize <= 0) {
+ if (cp.fFontSize <= 0)
dwCreateFlags |= PWS_AUTOFONTSIZE;
- }
cp.dwFlags = dwCreateFlags;
cp.pSystemHandler = m_pApp->GetSysHandler();

Powered by Google App Engine
This is Rietveld 408576698