Index: fpdfsdk/src/fxedit/fxet_edit.cpp |
diff --git a/fpdfsdk/src/fxedit/fxet_edit.cpp b/fpdfsdk/src/fxedit/fxet_edit.cpp |
index c7abbf44bb10e4f62e8a32edd2f95432be78ff22..0e66b0e3b57a8424484f28c2e63c361e8c5e5c1a 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(); |