summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/cpdfsdk_formfillenvironment.cpp2
-rw-r--r--fpdfsdk/cpdfsdk_widget.cpp18
-rw-r--r--fpdfsdk/fpdfview.cpp2
-rw-r--r--fpdfsdk/javascript/Field.cpp8
4 files changed, 12 insertions, 18 deletions
diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.cpp b/fpdfsdk/cpdfsdk_formfillenvironment.cpp
index 680cd252b7..6c6e3673e8 100644
--- a/fpdfsdk/cpdfsdk_formfillenvironment.cpp
+++ b/fpdfsdk/cpdfsdk_formfillenvironment.cpp
@@ -609,7 +609,7 @@ void CPDFSDK_FormFillEnvironment::ProcJavascriptFun() {
return;
for (int i = 0; i < iCount; i++) {
CFX_ByteString csJSName;
- CPDF_Action jsAction = docJS.GetJSAction(i, csJSName);
+ CPDF_Action jsAction = docJS.GetJSActionAndName(i, &csJSName);
if (GetActionHander()) {
GetActionHander()->DoAction_JavaScript(
jsAction, CFX_WideString::FromLocal(csJSName.AsStringC()), this);
diff --git a/fpdfsdk/cpdfsdk_widget.cpp b/fpdfsdk/cpdfsdk_widget.cpp
index e65a94b2b3..5f0bf1dc17 100644
--- a/fpdfsdk/cpdfsdk_widget.cpp
+++ b/fpdfsdk/cpdfsdk_widget.cpp
@@ -588,10 +588,8 @@ bool CPDFSDK_Widget::GetTextColor(FX_COLORREF& color) const {
float CPDFSDK_Widget::GetFontSize() const {
CPDF_FormControl* pFormCtrl = GetFormControl();
CPDF_DefaultAppearance pDa = pFormCtrl->GetDefaultAppearance();
- CFX_ByteString csFont = "";
- float fFontSize = 0.0f;
- pDa.GetFont(csFont, fFontSize);
-
+ float fFontSize;
+ pDa.GetFont(&fFontSize);
return fFontSize;
}
@@ -930,21 +928,20 @@ void CPDFSDK_Widget::ResetAppearance_PushButton() {
CPWL_Color crText(COLORTYPE_GRAY, 0);
- float fFontSize = 12.0f;
CFX_ByteString csNameTag;
-
CPDF_DefaultAppearance da = pControl->GetDefaultAppearance();
if (da.HasColor()) {
da.GetColor(iColorType, fc);
crText = CPWL_Color(iColorType, fc[0], fc[1], fc[2], fc[3]);
}
-
+ float fFontSize = 12.0f;
if (da.HasFont())
- da.GetFont(csNameTag, fFontSize);
+ csNameTag = da.GetFont(&fFontSize);
CFX_WideString csWCaption;
- CFX_WideString csNormalCaption, csRolloverCaption, csDownCaption;
-
+ CFX_WideString csNormalCaption;
+ CFX_WideString csRolloverCaption;
+ CFX_WideString csDownCaption;
if (pControl->HasMKEntry("CA"))
csNormalCaption = pControl->GetNormalCaption();
@@ -957,7 +954,6 @@ void CPDFSDK_Widget::ResetAppearance_PushButton() {
CPDF_Stream* pNormalIcon = nullptr;
CPDF_Stream* pRolloverIcon = nullptr;
CPDF_Stream* pDownIcon = nullptr;
-
if (pControl->HasMKEntry("I"))
pNormalIcon = pControl->GetNormalIcon();
diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp
index 454f80f680..5010c17ceb 100644
--- a/fpdfsdk/fpdfview.cpp
+++ b/fpdfsdk/fpdfview.cpp
@@ -1249,7 +1249,7 @@ DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDest(FPDF_DOCUMENT document,
i++;
}
} else {
- pDestObj = nameTree.LookupValue(index, bsName);
+ pDestObj = nameTree.LookupValueAndName(index, &bsName);
}
if (!pDestObj)
return nullptr;
diff --git a/fpdfsdk/javascript/Field.cpp b/fpdfsdk/javascript/Field.cpp
index 12c3508597..c7dc2608ca 100644
--- a/fpdfsdk/javascript/Field.cpp
+++ b/fpdfsdk/javascript/Field.cpp
@@ -2482,12 +2482,10 @@ bool Field::textSize(CJS_Runtime* pRuntime,
if (!pFormControl)
return false;
- CPDF_DefaultAppearance FieldAppearance = pFormControl->GetDefaultAppearance();
-
- CFX_ByteString csFontNameTag;
float fFontSize;
- FieldAppearance.GetFont(csFontNameTag, fFontSize);
- vp << (int)fFontSize;
+ CPDF_DefaultAppearance FieldAppearance = pFormControl->GetDefaultAppearance();
+ FieldAppearance.GetFont(&fFontSize);
+ vp << static_cast<int>(fFontSize);
return true;
}