summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fxedit/fxet_edit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/fxedit/fxet_edit.cpp')
-rw-r--r--fpdfsdk/src/fxedit/fxet_edit.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/fpdfsdk/src/fxedit/fxet_edit.cpp b/fpdfsdk/src/fxedit/fxet_edit.cpp
index c7abbf44bb..0e66b0e3b5 100644
--- a/fpdfsdk/src/fxedit/fxet_edit.cpp
+++ b/fpdfsdk/src/fxedit/fxet_edit.cpp
@@ -6,6 +6,8 @@
#include "fpdfsdk/include/fxedit/fxet_edit.h"
+#include <algorithm>
+
#include "core/include/fpdfapi/fpdf_resource.h"
#define FX_EDIT_UNDO_MAXITEM 10000
@@ -176,8 +178,7 @@ void CFX_Edit_Refresh::Analyse(int32_t nAlignment) {
CPDF_Rect rcResult;
FX_FLOAT fWidthDiff;
- int32_t szMax =
- FX_EDIT_MAX(m_OldLineRects.GetSize(), m_NewLineRects.GetSize());
+ int32_t szMax = std::max(m_OldLineRects.GetSize(), m_NewLineRects.GetSize());
int32_t i = 0;
while (i < szMax) {
@@ -1726,7 +1727,7 @@ void CFX_Edit::SetContentChanged() {
void CFX_Edit::SelectAll() {
if (m_pVT->IsValid()) {
- m_SelState = GetWholeWordRange();
+ m_SelState = CFX_Edit_Select(GetWholeWordRange());
SetCaret(m_SelState.EndPos);
ScrollToCaret();