summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fsdk_baseform.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-24 21:07:28 -0800
committerLei Zhang <thestig@chromium.org>2015-12-24 21:07:28 -0800
commitfcfa3b828b92013a45c6bc6d44b04f42a912eff7 (patch)
treef0172a20fc1eb9a49abbc62a125b87a8d2c79cd3 /fpdfsdk/src/fsdk_baseform.cpp
parentaa8bf7e42b8c73a9bc07ed6781364ba05f5a9776 (diff)
downloadpdfium-fcfa3b828b92013a45c6bc6d44b04f42a912eff7.tar.xz
Merge to XFA: Fix a bad virtual keyword removal from commit 0f6b51c.
BUG=546744 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1542373002 . (cherry picked from commit ae58ed8bccc56dd78c12d89972b19d58de94f790) Review URL: https://codereview.chromium.org/1548093002 .
Diffstat (limited to 'fpdfsdk/src/fsdk_baseform.cpp')
-rw-r--r--fpdfsdk/src/fsdk_baseform.cpp35
1 files changed, 15 insertions, 20 deletions
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index 12faea2bef..d27ac00606 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -1015,10 +1015,8 @@ void CPDFSDK_Widget::ResetAppearance_PushButton() {
CPDFSDK_Document* pDoc = m_pInterForm->GetDocument();
CPDFDoc_Environment* pEnv = pDoc->GetEnv();
- CBA_FontMap FontMap(this, pEnv->GetSysHandler());
- FontMap.Initial();
-
- FontMap.SetAPType("N");
+ CBA_FontMap font_map(this, pEnv->GetSysHandler());
+ font_map.SetAPType("N");
CFX_ByteString csAP =
CPWL_Utils::GetRectFillAppStream(rcWindow, crBackground) +
@@ -1026,7 +1024,7 @@ void CPDFSDK_Widget::ResetAppearance_PushButton() {
crLeftTop, crRightBottom, nBorderStyle,
dsBorder) +
CPWL_Utils::GetPushButtonAppStream(
- iconFit.GetFittingBounds() ? rcWindow : rcClient, &FontMap,
+ iconFit.GetFittingBounds() ? rcWindow : rcClient, &font_map,
pNormalIcon, iconFit, csNormalCaption, crText, fFontSize, nLayout);
WriteAppearance("N", GetRotatedRect(), GetMatrix(), csAP);
@@ -1040,14 +1038,14 @@ void CPDFSDK_Widget::ResetAppearance_PushButton() {
pRolloverIcon = pNormalIcon;
}
- FontMap.SetAPType("R");
+ font_map.SetAPType("R");
csAP = CPWL_Utils::GetRectFillAppStream(rcWindow, crBackground) +
CPWL_Utils::GetBorderAppStream(rcWindow, fBorderWidth, crBorder,
crLeftTop, crRightBottom,
nBorderStyle, dsBorder) +
CPWL_Utils::GetPushButtonAppStream(
- iconFit.GetFittingBounds() ? rcWindow : rcClient, &FontMap,
+ iconFit.GetFittingBounds() ? rcWindow : rcClient, &font_map,
pRolloverIcon, iconFit, csRolloverCaption, crText, fFontSize,
nLayout);
@@ -1072,7 +1070,7 @@ void CPDFSDK_Widget::ResetAppearance_PushButton() {
break;
}
- FontMap.SetAPType("D");
+ font_map.SetAPType("D");
csAP = CPWL_Utils::GetRectFillAppStream(
rcWindow, CPWL_Utils::SubstractColor(crBackground, 0.25f)) +
@@ -1080,7 +1078,7 @@ void CPDFSDK_Widget::ResetAppearance_PushButton() {
crLeftTop, crRightBottom,
nBorderStyle, dsBorder) +
CPWL_Utils::GetPushButtonAppStream(
- iconFit.GetFittingBounds() ? rcWindow : rcClient, &FontMap,
+ iconFit.GetFittingBounds() ? rcWindow : rcClient, &font_map,
pDownIcon, iconFit, csDownCaption, crText, fFontSize, nLayout);
WriteAppearance("D", GetRotatedRect(), GetMatrix(), csAP);
@@ -1396,9 +1394,8 @@ void CPDFSDK_Widget::ResetAppearance_ComboBox(const FX_WCHAR* sValue) {
CPDFSDK_Document* pDoc = m_pInterForm->GetDocument();
CPDFDoc_Environment* pEnv = pDoc->GetEnv();
- CBA_FontMap FontMap(this, pEnv->GetSysHandler());
- FontMap.Initial();
- pEdit->SetFontMap(&FontMap);
+ CBA_FontMap font_map(this, pEnv->GetSysHandler());
+ pEdit->SetFontMap(&font_map);
CPDF_Rect rcEdit = rcClient;
rcEdit.right = rcButton.left;
@@ -1468,9 +1465,8 @@ void CPDFSDK_Widget::ResetAppearance_ListBox() {
CPDFSDK_Document* pDoc = m_pInterForm->GetDocument();
CPDFDoc_Environment* pEnv = pDoc->GetEnv();
- CBA_FontMap FontMap(this, pEnv->GetSysHandler());
- FontMap.Initial();
- pEdit->SetFontMap(&FontMap);
+ CBA_FontMap font_map(this, pEnv->GetSysHandler());
+ pEdit->SetFontMap(&font_map);
pEdit->SetPlateRect(CPDF_Rect(rcClient.left, 0.0f, rcClient.right, 0.0f));
@@ -1556,9 +1552,8 @@ void CPDFSDK_Widget::ResetAppearance_TextField(const FX_WCHAR* sValue) {
CPDFSDK_Document* pDoc = m_pInterForm->GetDocument();
CPDFDoc_Environment* pEnv = pDoc->GetEnv();
- CBA_FontMap FontMap(this, pEnv->GetSysHandler());
- FontMap.Initial();
- pEdit->SetFontMap(&FontMap);
+ CBA_FontMap font_map(this, pEnv->GetSysHandler());
+ pEdit->SetFontMap(&font_map);
CPDF_Rect rcClient = GetClientRect();
pEdit->SetPlateRect(rcClient);
@@ -1597,8 +1592,8 @@ void CPDFSDK_Widget::ResetAppearance_TextField(const FX_WCHAR* sValue) {
pEdit->SetCharArray(nMaxLen);
if (IsFloatZero(fFontSize)) {
- fFontSize = CPWL_Edit::GetCharArrayAutoFontSize(FontMap.GetPDFFont(0),
- rcClient, nMaxLen);
+ fFontSize = CPWL_Edit::GetCharArrayAutoFontSize(
+ font_map.GetPDFFont(0), rcClient, nMaxLen);
}
} else {
if (sValue)