summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/cpdfsdk_widget.cpp10
-rw-r--r--fpdfsdk/cpdfsdk_widget.h4
-rw-r--r--fpdfsdk/pwl/cpwl_appstream.cpp2
3 files changed, 4 insertions, 12 deletions
diff --git a/fpdfsdk/cpdfsdk_widget.cpp b/fpdfsdk/cpdfsdk_widget.cpp
index cd863bda2c..f9fdef829b 100644
--- a/fpdfsdk/cpdfsdk_widget.cpp
+++ b/fpdfsdk/cpdfsdk_widget.cpp
@@ -456,17 +456,13 @@ int CPDFSDK_Widget::GetSelectedIndex(int nIndex) const {
return pFormField->GetSelectedIndex(nIndex);
}
+WideString CPDFSDK_Widget::GetValue() const {
#ifdef PDF_ENABLE_XFA
-WideString CPDFSDK_Widget::GetValue(bool bDisplay) const {
if (CXFA_FFWidget* hWidget = GetMixXFAWidget()) {
CXFA_Node* node = hWidget->GetNode();
- if (node->IsWidgetReady()) {
- return node->GetValue(bDisplay ? XFA_VALUEPICTURE_Display
- : XFA_VALUEPICTURE_Edit);
- }
+ if (node->IsWidgetReady())
+ return node->GetValue(XFA_VALUEPICTURE_Display);
}
-#else // PDF_ENABLE_XFA
-WideString CPDFSDK_Widget::GetValue() const {
#endif // PDF_ENABLE_XFA
CPDF_FormField* pFormField = GetFormField();
return pFormField->GetValue();
diff --git a/fpdfsdk/cpdfsdk_widget.h b/fpdfsdk/cpdfsdk_widget.h
index 4d85facb7d..97971c8342 100644
--- a/fpdfsdk/cpdfsdk_widget.h
+++ b/fpdfsdk/cpdfsdk_widget.h
@@ -70,11 +70,7 @@ class CPDFSDK_Widget : public CPDFSDK_BAAnnot {
float GetFontSize() const;
int GetSelectedIndex(int nIndex) const;
-#ifdef PDF_ENABLE_XFA
- WideString GetValue(bool bDisplay = true) const;
-#else // PDF_ENABLE_XFA
WideString GetValue() const;
-#endif // PDF_ENABLE_XFA
WideString GetDefaultValue() const;
WideString GetOptionLabel(int nIndex) const;
int CountOptions() const;
diff --git a/fpdfsdk/pwl/cpwl_appstream.cpp b/fpdfsdk/pwl/cpwl_appstream.cpp
index 01ef48a298..aa612f0c07 100644
--- a/fpdfsdk/pwl/cpwl_appstream.cpp
+++ b/fpdfsdk/pwl/cpwl_appstream.cpp
@@ -1781,7 +1781,7 @@ void CPWL_AppStream::SetAsTextField(const WideString* sValue) {
#ifdef PDF_ENABLE_XFA
WideString sValueTmp;
if (!sValue && widget_->GetMixXFAWidget()) {
- sValueTmp = widget_->GetValue(true);
+ sValueTmp = widget_->GetValue();
sValue = &sValueTmp;
}
#endif // PDF_ENABLE_XFA