summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/cxfa_ffcombobox.cpp3
-rw-r--r--xfa/fxfa/cxfa_ffdatetimeedit.cpp2
-rw-r--r--xfa/fxfa/cxfa_ffnumericedit.cpp3
-rw-r--r--xfa/fxfa/cxfa_ffpasswordedit.cpp6
-rw-r--r--xfa/fxfa/cxfa_fftextedit.cpp17
5 files changed, 14 insertions, 17 deletions
diff --git a/xfa/fxfa/cxfa_ffcombobox.cpp b/xfa/fxfa/cxfa_ffcombobox.cpp
index 0c8c80c290..950cab5daf 100644
--- a/xfa/fxfa/cxfa_ffcombobox.cpp
+++ b/xfa/fxfa/cxfa_ffcombobox.cpp
@@ -74,8 +74,7 @@ void CXFA_FFComboBox::UpdateWidgetProperty() {
return;
uint32_t dwExtendedStyle = 0;
- uint32_t dwEditStyles =
- FWL_STYLEEXT_EDT_ReadOnly | FWL_STYLEEXT_EDT_LastLineHeight;
+ uint32_t dwEditStyles = FWL_STYLEEXT_EDT_ReadOnly;
dwExtendedStyle |= UpdateUIProperty();
if (m_pDataAcc->IsChoiceListAllowTextEntry()) {
dwEditStyles &= ~FWL_STYLEEXT_EDT_ReadOnly;
diff --git a/xfa/fxfa/cxfa_ffdatetimeedit.cpp b/xfa/fxfa/cxfa_ffdatetimeedit.cpp
index b47175aa84..cfef664039 100644
--- a/xfa/fxfa/cxfa_ffdatetimeedit.cpp
+++ b/xfa/fxfa/cxfa_ffdatetimeedit.cpp
@@ -77,7 +77,7 @@ void CXFA_FFDateTimeEdit::UpdateWidgetProperty() {
dwExtendedStyle |= UpdateUIProperty();
dwExtendedStyle |= GetAlignment();
m_pNormalWidget->ModifyStylesEx(dwExtendedStyle, 0xFFFFFFFF);
- uint32_t dwEditStyles = FWL_STYLEEXT_EDT_LastLineHeight;
+ uint32_t dwEditStyles = 0;
int32_t iNumCells = m_pDataAcc->GetNumberOfCells();
if (iNumCells > 0) {
dwEditStyles |= FWL_STYLEEXT_EDT_CombText;
diff --git a/xfa/fxfa/cxfa_ffnumericedit.cpp b/xfa/fxfa/cxfa_ffnumericedit.cpp
index b397753c7e..4da98ac7fd 100644
--- a/xfa/fxfa/cxfa_ffnumericedit.cpp
+++ b/xfa/fxfa/cxfa_ffnumericedit.cpp
@@ -48,8 +48,7 @@ void CXFA_FFNumericEdit::UpdateWidgetProperty() {
uint32_t dwExtendedStyle =
FWL_STYLEEXT_EDT_ShowScrollbarFocus | FWL_STYLEEXT_EDT_OuterScrollbar |
- FWL_STYLEEXT_EDT_Validate | FWL_STYLEEXT_EDT_Number |
- FWL_STYLEEXT_EDT_LastLineHeight;
+ FWL_STYLEEXT_EDT_Validate | FWL_STYLEEXT_EDT_Number;
dwExtendedStyle |= UpdateUIProperty();
if (m_pDataAcc->GetHorizontalScrollPolicy() != XFA_ATTRIBUTEENUM_Off)
dwExtendedStyle |= FWL_STYLEEXT_EDT_AutoHScroll;
diff --git a/xfa/fxfa/cxfa_ffpasswordedit.cpp b/xfa/fxfa/cxfa_ffpasswordedit.cpp
index df2ea99cde..46105f135b 100644
--- a/xfa/fxfa/cxfa_ffpasswordedit.cpp
+++ b/xfa/fxfa/cxfa_ffpasswordedit.cpp
@@ -44,9 +44,9 @@ void CXFA_FFPasswordEdit::UpdateWidgetProperty() {
if (!pWidget)
return;
- uint32_t dwExtendedStyle =
- FWL_STYLEEXT_EDT_ShowScrollbarFocus | FWL_STYLEEXT_EDT_OuterScrollbar |
- FWL_STYLEEXT_EDT_Password | FWL_STYLEEXT_EDT_LastLineHeight;
+ uint32_t dwExtendedStyle = FWL_STYLEEXT_EDT_ShowScrollbarFocus |
+ FWL_STYLEEXT_EDT_OuterScrollbar |
+ FWL_STYLEEXT_EDT_Password;
dwExtendedStyle |= UpdateUIProperty();
CFX_WideString wsPassWord;
diff --git a/xfa/fxfa/cxfa_fftextedit.cpp b/xfa/fxfa/cxfa_fftextedit.cpp
index dfa4c41309..35c20fab6f 100644
--- a/xfa/fxfa/cxfa_fftextedit.cpp
+++ b/xfa/fxfa/cxfa_fftextedit.cpp
@@ -60,9 +60,8 @@ void CXFA_FFTextEdit::UpdateWidgetProperty() {
return;
uint32_t dwStyle = 0;
- uint32_t dwExtendedStyle = FWL_STYLEEXT_EDT_ShowScrollbarFocus |
- FWL_STYLEEXT_EDT_OuterScrollbar |
- FWL_STYLEEXT_EDT_LastLineHeight;
+ uint32_t dwExtendedStyle =
+ FWL_STYLEEXT_EDT_ShowScrollbarFocus | FWL_STYLEEXT_EDT_OuterScrollbar;
dwExtendedStyle |= UpdateUIProperty();
if (m_pDataAcc->IsMultiLine()) {
dwExtendedStyle |= FWL_STYLEEXT_EDT_MultiLine | FWL_STYLEEXT_EDT_WantReturn;
@@ -300,14 +299,14 @@ void CXFA_FFTextEdit::OnTextChanged(CFWL_Widget* pWidget,
if (m_pDataAcc->GetUIType() == XFA_Element::DateTimeEdit) {
CFWL_DateTimePicker* pDateTime = (CFWL_DateTimePicker*)pEdit;
eParam.m_wsNewText = pDateTime->GetEditText();
- int32_t iSels = pDateTime->CountSelRanges();
- if (iSels)
- eParam.m_iSelEnd = pDateTime->GetSelRange(0, &eParam.m_iSelStart);
+ if (pDateTime->HasSelection()) {
+ std::tie(eParam.m_iSelStart, eParam.m_iSelEnd) =
+ pDateTime->GetSelection();
+ }
} else {
eParam.m_wsNewText = pEdit->GetText();
- int32_t iSels = pEdit->CountSelRanges();
- if (iSels)
- eParam.m_iSelEnd = pEdit->GetSelRange(0, &eParam.m_iSelStart);
+ if (pEdit->HasSelection())
+ std::tie(eParam.m_iSelStart, eParam.m_iSelEnd) = pEdit->GetSelection();
}
m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Change, &eParam);
}