summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdftext.cpp5
-rw-r--r--fpdfsdk/fxedit/fxet_edit.cpp8
-rw-r--r--fpdfsdk/fxedit/fxet_pageobjs.cpp3
3 files changed, 9 insertions, 7 deletions
diff --git a/fpdfsdk/fpdftext.cpp b/fpdfsdk/fpdftext.cpp
index 4d521da8ed..1596fd2584 100644
--- a/fpdfsdk/fpdftext.cpp
+++ b/fpdfsdk/fpdftext.cpp
@@ -53,8 +53,9 @@ DLLEXPORT FPDF_TEXTPAGE STDCALL FPDFText_LoadPage(FPDF_PAGE page) {
CPDF_ViewerPreferences viewRef(pPDFPage->m_pDocument);
#endif // PDF_ENABLE_XFA
- CPDF_TextPage* textpage =
- new CPDF_TextPage(pPDFPage, viewRef.IsDirectionR2L());
+ CPDF_TextPage* textpage = new CPDF_TextPage(
+ pPDFPage, viewRef.IsDirectionR2L() ? FPDFText_Direction::Right
+ : FPDFText_Direction::Left);
textpage->ParseTextPage();
return textpage;
}
diff --git a/fpdfsdk/fxedit/fxet_edit.cpp b/fpdfsdk/fxedit/fxet_edit.cpp
index bdd2c75325..f2ff300452 100644
--- a/fpdfsdk/fxedit/fxet_edit.cpp
+++ b/fpdfsdk/fxedit/fxet_edit.cpp
@@ -13,7 +13,11 @@
#include "core/fpdfdoc/include/cpvt_word.h"
#include "core/fpdfdoc/include/ipvt_fontmap.h"
-#define FX_EDIT_UNDO_MAXITEM 10000
+namespace {
+
+const int kEditUndoMaxItems = 10000;
+
+} // namespace
CFX_Edit_Iterator::CFX_Edit_Iterator(CFX_Edit* pEdit,
CPDF_VariableText::Iterator* pVTIterator)
@@ -755,7 +759,7 @@ CFX_Edit::CFX_Edit(CPDF_VariableText* pVT)
m_bEnableScroll(FALSE),
m_pIterator(NULL),
m_ptCaret(0.0f, 0.0f),
- m_Undo(FX_EDIT_UNDO_MAXITEM),
+ m_Undo(kEditUndoMaxItems),
m_nAlignment(0),
m_bNotifyFlag(FALSE),
m_bEnableOverflow(FALSE),
diff --git a/fpdfsdk/fxedit/fxet_pageobjs.cpp b/fpdfsdk/fxedit/fxet_pageobjs.cpp
index b28cf84efd..b862e7396d 100644
--- a/fpdfsdk/fxedit/fxet_pageobjs.cpp
+++ b/fpdfsdk/fxedit/fxet_pageobjs.cpp
@@ -17,9 +17,6 @@
#include "fpdfsdk/fxedit/include/fx_edit.h"
#include "fpdfsdk/fxedit/include/fxet_edit.h"
-#define FX_EDIT_UNDERLINEHALFWIDTH 0.5f
-#define FX_EDIT_CROSSOUTHALFWIDTH 0.5f
-
CFX_FloatRect GetUnderLineRect(const CPVT_Word& word) {
return CFX_FloatRect(word.ptWord.x, word.ptWord.y + word.fDescent * 0.5f,
word.ptWord.x + word.fWidth,