summaryrefslogtreecommitdiff
path: root/xfa/fde/cfde_txtedtengine.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-08-15 10:31:17 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-15 15:22:12 +0000
commit22fcbeaa80c54bef3bb6fd4180ba5519fab30962 (patch)
treeb1642f91b36d45b11b76d02c59547186dc6c524b /xfa/fde/cfde_txtedtengine.h
parenta0377dc31bccf0e3427bd94fab5fed17c1283098 (diff)
downloadpdfium-22fcbeaa80c54bef3bb6fd4180ba5519fab30962.tar.xz
Hide the undo/redo record classes inside the engine
This CL moves the implementation of the records which handle undo/redo in the text edit engine into an anonymous namespace in the engine. Change-Id: I299b9738b72e3eccbbec972fd3ea956c491859fa Reviewed-on: https://pdfium-review.googlesource.com/11010 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fde/cfde_txtedtengine.h')
-rw-r--r--xfa/fde/cfde_txtedtengine.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/xfa/fde/cfde_txtedtengine.h b/xfa/fde/cfde_txtedtengine.h
index 0bbbbcee89..71a07413a0 100644
--- a/xfa/fde/cfde_txtedtengine.h
+++ b/xfa/fde/cfde_txtedtengine.h
@@ -153,9 +153,23 @@ class CFDE_TxtEdtEngine {
int32_t& nStartLine) const;
wchar_t GetAliasChar() const { return m_wcAliasChar; }
+ bool IsSelect();
+ void Inner_DeleteRange(int32_t nStart, int32_t nCount);
+ void Inner_Insert(int32_t nStart, const wchar_t* lpText, int32_t nLength);
+ const FDE_TXTEDTPARAMS* GetParams() const { return &m_Param; }
+ FDE_TXTEDT_TEXTCHANGE_INFO* GetChangeInfo() { return &m_ChangeInfo; }
+
+ void UpdateChangeInfoInsert(int32_t type, const CFX_WideString& insertValue) {
+ m_ChangeInfo.nChangeType = type;
+ m_ChangeInfo.wsInsert = insertValue;
+ }
+
+ void UpdateChangeInfoDelete(int32_t type, const CFX_WideString& deleteValue) {
+ m_ChangeInfo.nChangeType = type;
+ m_ChangeInfo.wsDelete = deleteValue;
+ }
+
private:
- friend class CFDE_TxtEdtDoRecord_Insert;
- friend class CFDE_TxtEdtDoRecord_DeleteRange;
friend class CFDE_TxtEdtPage;
struct FDE_TXTEDTSELRANGE {
@@ -168,7 +182,6 @@ class CFDE_TxtEdtEngine {
int32_t nCharIndex;
};
- void Inner_Insert(int32_t nStart, const wchar_t* lpText, int32_t nLength);
CFX_WideString GetPreDeleteText(int32_t nIndex, int32_t nLength);
CFX_WideString GetPreInsertText(int32_t nIndex,
const wchar_t* lpText,
@@ -178,7 +191,6 @@ class CFDE_TxtEdtEngine {
const wchar_t* lpText,
int32_t nLength);
- void Inner_DeleteRange(int32_t nStart, int32_t nCount);
void DeleteRange_DoRecord(int32_t nStart, int32_t nCount, bool bSel);
void ResetEngine();
void RebuildParagraphs();
@@ -208,7 +220,6 @@ class CFDE_TxtEdtEngine {
bool bBefore);
void UpdateCaretIndex(const CFX_PointF& ptCaret);
- bool IsSelect();
void DeleteSelect();
std::unique_ptr<CFDE_TxtEdtBuf> m_pTxtBuf;