| Index: xfa/src/fee/src/fee/fde_txtedtengine.h
|
| diff --git a/xfa/src/fee/src/fee/fde_txtedtengine.h b/xfa/src/fee/src/fee/fde_txtedtengine.h
|
| index dec152c6304189eb504a37b2db60502eeb8b1604..43a98fa7db0cc600df5bfe986043eeac48ea7184 100644
|
| --- a/xfa/src/fee/src/fee/fde_txtedtengine.h
|
| +++ b/xfa/src/fee/src/fee/fde_txtedtengine.h
|
| @@ -47,14 +47,14 @@ class CFDE_TxtEdtEngine : public IFDE_TxtEdtEngine
|
| friend class CFDE_TxtEdtBlock;
|
| #endif
|
| struct _FDE_TXTEDTSELRANGE {
|
| - FX_INT32 nStart;
|
| - FX_INT32 nCount;
|
| + int32_t nStart;
|
| + int32_t nCount;
|
| };
|
| typedef _FDE_TXTEDTSELRANGE FDE_TXTEDTSELRANGE;
|
| typedef _FDE_TXTEDTSELRANGE * FDE_LPTXTEDTSELRANGE;
|
| struct _FDE_TXTEDTPARAGPOS {
|
| - FX_INT32 nParagIndex;
|
| - FX_INT32 nCharIndex;
|
| + int32_t nParagIndex;
|
| + int32_t nCharIndex;
|
| };
|
| typedef _FDE_TXTEDTPARAGPOS FDE_TXTEDTPARAGPOS;
|
| typedef _FDE_TXTEDTPARAGPOS * FDE_LPTXTEDTPARAGPOS;
|
| @@ -65,65 +65,65 @@ public:
|
| virtual void SetEditParams(const FDE_TXTEDTPARAMS ¶ms);
|
| virtual const FDE_TXTEDTPARAMS* GetEditParams() const;
|
|
|
| - virtual FX_INT32 CountPages() const;
|
| - virtual IFDE_TxtEdtPage* GetPage(FX_INT32 nIndex);
|
| + virtual int32_t CountPages() const;
|
| + virtual IFDE_TxtEdtPage* GetPage(int32_t nIndex);
|
|
|
| - virtual FX_BOOL SetBufChunkSize(FX_INT32 nChunkSize);
|
| + virtual FX_BOOL SetBufChunkSize(int32_t nChunkSize);
|
| virtual void SetTextByStream(IFX_Stream *pStream);
|
| virtual void SetText(const CFX_WideString &wsText);
|
| - virtual FX_INT32 GetTextLength() const;
|
| - virtual void GetText(CFX_WideString &wsText, FX_INT32 nStart, FX_INT32 nCount = -1);
|
| + virtual int32_t GetTextLength() const;
|
| + virtual void GetText(CFX_WideString &wsText, int32_t nStart, int32_t nCount = -1);
|
| virtual void ClearText();
|
|
|
| - virtual FX_INT32 GetCaretRect(CFX_RectF &rtCaret) const;
|
| - virtual FX_INT32 GetCaretPos() const;
|
| - virtual FX_INT32 SetCaretPos(FX_INT32 nIndex, FX_BOOL bBefore);
|
| - virtual FX_INT32 MoveCaretPos(FDE_TXTEDTMOVECARET eMoveCaret, FX_BOOL bShift = FALSE, FX_BOOL bCtrl = FALSE);
|
| + virtual int32_t GetCaretRect(CFX_RectF &rtCaret) const;
|
| + virtual int32_t GetCaretPos() const;
|
| + virtual int32_t SetCaretPos(int32_t nIndex, FX_BOOL bBefore);
|
| + virtual int32_t MoveCaretPos(FDE_TXTEDTMOVECARET eMoveCaret, FX_BOOL bShift = FALSE, FX_BOOL bCtrl = FALSE);
|
| virtual void Lock();
|
| virtual void Unlock();
|
| virtual FX_BOOL IsLocked() const;
|
|
|
| - virtual FX_INT32 Insert(FX_INT32 nStart, FX_LPCWSTR lpText, FX_INT32 nLength);
|
| - virtual FX_INT32 Delete(FX_INT32 nStart, FX_BOOL bBackspace = FALSE);
|
| - virtual FX_INT32 DeleteRange(FX_INT32 nStart, FX_INT32 nCount = -1);
|
| - virtual FX_INT32 Replace(FX_INT32 nStart, FX_INT32 nLength, const CFX_WideString &wsReplace);
|
| + virtual int32_t Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLength);
|
| + virtual int32_t Delete(int32_t nStart, FX_BOOL bBackspace = FALSE);
|
| + virtual int32_t DeleteRange(int32_t nStart, int32_t nCount = -1);
|
| + virtual int32_t Replace(int32_t nStart, int32_t nLength, const CFX_WideString &wsReplace);
|
|
|
| - virtual void SetLimit(FX_INT32 nLimit);
|
| + virtual void SetLimit(int32_t nLimit);
|
| virtual void SetAliasChar(FX_WCHAR wcAlias);
|
| - virtual void SetFormatBlock(FX_INT32 nIndex, const CFX_WideString &wsBlockFormat);
|
| - virtual FX_INT32 CountEditBlocks() const;
|
| - virtual void GetEditBlockText(FX_INT32 nIndex, CFX_WideString &wsBlockText) const;
|
| - virtual FX_INT32 CountEditFields(FX_INT32 nBlockIndex) const;
|
| - virtual void GetEditFieldText(FX_INT32 nBlockIndex, FX_INT32 nFieldIndex, CFX_WideString &wsFieldText) const;
|
| + virtual void SetFormatBlock(int32_t nIndex, const CFX_WideString &wsBlockFormat);
|
| + virtual int32_t CountEditBlocks() const;
|
| + virtual void GetEditBlockText(int32_t nIndex, CFX_WideString &wsBlockText) const;
|
| + virtual int32_t CountEditFields(int32_t nBlockIndex) const;
|
| + virtual void GetEditFieldText(int32_t nBlockIndex, int32_t nFieldIndex, CFX_WideString &wsFieldText) const;
|
| virtual void StartEdit();
|
| virtual void EndEdit();
|
|
|
| - void RemoveSelRange(FX_INT32 nStart, FX_INT32 nCount = -1);
|
| + void RemoveSelRange(int32_t nStart, int32_t nCount = -1);
|
|
|
| - virtual void AddSelRange(FX_INT32 nStart, FX_INT32 nCount = -1);
|
| - virtual FX_INT32 CountSelRanges();
|
| - virtual FX_INT32 GetSelRange(FX_INT32 nIndex, FX_INT32 &nStart);
|
| + virtual void AddSelRange(int32_t nStart, int32_t nCount = -1);
|
| + virtual int32_t CountSelRanges();
|
| + virtual int32_t GetSelRange(int32_t nIndex, int32_t &nStart);
|
| virtual void ClearSelection();
|
|
|
| virtual FX_BOOL Redo(FX_BSTR bsRedo);
|
| virtual FX_BOOL Undo(FX_BSTR bsUndo);
|
|
|
| - virtual FX_INT32 StartLayout();
|
| - virtual FX_INT32 DoLayout(IFX_Pause *pPause);
|
| + virtual int32_t StartLayout();
|
| + virtual int32_t DoLayout(IFX_Pause *pPause);
|
| virtual void EndLayout();
|
|
|
| virtual FX_BOOL Optimize(IFX_Pause * pPause = NULL);
|
| - virtual FX_INT32 CountParags() const;
|
| - virtual IFDE_TxtEdtParag* GetParag(FX_INT32 nParagIndex) const;
|
| + virtual int32_t CountParags() const;
|
| + virtual IFDE_TxtEdtParag* GetParag(int32_t nParagIndex) const;
|
| virtual IFX_CharIter* CreateCharIter();
|
| IFDE_TxtEdtBuf* GetTextBuf() const;
|
| - FX_INT32 GetTextBufLength() const;
|
| + int32_t GetTextBufLength() const;
|
| IFX_TxtBreak* GetTextBreak() const;
|
| - FX_INT32 GetLineCount() const;
|
| - FX_INT32 GetPageLineCount() const;
|
| + int32_t GetLineCount() const;
|
| + int32_t GetPageLineCount() const;
|
|
|
| - FX_INT32 Line2Parag(FX_INT32 nStartParag, FX_INT32 nStartLineofParag,
|
| - FX_INT32 nLineIndex, FX_INT32 &nStartLine) const;
|
| + int32_t Line2Parag(int32_t nStartParag, int32_t nStartLineofParag,
|
| + int32_t nLineIndex, int32_t &nStartLine) const;
|
| FX_WCHAR GetAliasChar() const
|
| {
|
| return m_wcAliasChar;
|
| @@ -132,16 +132,16 @@ public:
|
| protected:
|
| virtual ~CFDE_TxtEdtEngine();
|
| private:
|
| - void Inner_Insert(FX_INT32 nStart, FX_LPCWSTR lpText, FX_INT32 nLength);
|
| + void Inner_Insert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLength);
|
| #ifdef FDE_USEFORMATBLOCK
|
| - void RawInsert(FX_INT32 nStart, FX_LPCWSTR lpText, FX_INT32 nLength);
|
| + void RawInsert(int32_t nStart, FX_LPCWSTR lpText, int32_t nLength);
|
| #endif
|
| - void GetPreDeleteText(CFX_WideString &wsText, FX_INT32 nIndex, FX_INT32 nLength);
|
| - void GetPreInsertText(CFX_WideString &wsText, FX_INT32 nIndex, FX_LPCWSTR lpText, FX_INT32 nLength);
|
| - void GetPreReplaceText(CFX_WideString &wsText, FX_INT32 nIndex, FX_INT32 nOriginLength, FX_LPCWSTR lpText, FX_INT32 nLength);
|
| + void GetPreDeleteText(CFX_WideString &wsText, int32_t nIndex, int32_t nLength);
|
| + void GetPreInsertText(CFX_WideString &wsText, int32_t nIndex, FX_LPCWSTR lpText, int32_t nLength);
|
| + void GetPreReplaceText(CFX_WideString &wsText, int32_t nIndex, int32_t nOriginLength, FX_LPCWSTR lpText, int32_t nLength);
|
|
|
| - void Inner_DeleteRange(FX_INT32 nStart, FX_INT32 nCount = -1);
|
| - void DeleteRange_DoRecord(FX_INT32 nStart, FX_INT32 nCount, FX_BOOL bSel = FALSE);
|
| + void Inner_DeleteRange(int32_t nStart, int32_t nCount = -1);
|
| + void DeleteRange_DoRecord(int32_t nStart, int32_t nCount, FX_BOOL bSel = FALSE);
|
| void ResetEngine();
|
| void RebuildParagraphs();
|
| void RemoveAllParags();
|
| @@ -150,12 +150,12 @@ private:
|
| void UpdatePages();
|
| void UpdateTxtBreak();
|
|
|
| - FX_BOOL ReplaceParagEnd(FX_LPWSTR &lpText, FX_INT32 &nLength, FX_BOOL bPreIsCR = FALSE);
|
| + FX_BOOL ReplaceParagEnd(FX_LPWSTR &lpText, int32_t &nLength, FX_BOOL bPreIsCR = FALSE);
|
| void RecoverParagEnd(CFX_WideString &wsText);
|
| - FX_INT32 MovePage2Char(FX_INT32 nIndex);
|
| - void TextPos2ParagPos(FX_INT32 nIndex, FDE_TXTEDTPARAGPOS &ParagPos) const;
|
| - FX_INT32 MoveForward(FX_BOOL &bBefore);
|
| - FX_INT32 MoveBackward(FX_BOOL &bBefore);
|
| + int32_t MovePage2Char(int32_t nIndex);
|
| + void TextPos2ParagPos(int32_t nIndex, FDE_TXTEDTPARAGPOS &ParagPos) const;
|
| + int32_t MoveForward(FX_BOOL &bBefore);
|
| + int32_t MoveBackward(FX_BOOL &bBefore);
|
| FX_BOOL MoveUp(CFX_PointF &ptCaret);
|
| FX_BOOL MoveDown(CFX_PointF &ptCaret);
|
| FX_BOOL MoveLineStart();
|
| @@ -165,8 +165,8 @@ private:
|
| FX_BOOL MoveHome();
|
| FX_BOOL MoveEnd();
|
| FX_BOOL IsFitArea(CFX_WideString &wsText);
|
| - void UpdateCaretRect(FX_INT32 nIndex, FX_BOOL bBefore = TRUE);
|
| - void GetCaretRect(CFX_RectF &rtCaret, FX_INT32 nPageIndex, FX_INT32 nCaret, FX_BOOL bBefore = TRUE);
|
| + void UpdateCaretRect(int32_t nIndex, FX_BOOL bBefore = TRUE);
|
| + void GetCaretRect(CFX_RectF &rtCaret, int32_t nPageIndex, int32_t nCaret, FX_BOOL bBefore = TRUE);
|
| void UpdateCaretIndex(const CFX_PointF & ptCaret);
|
|
|
| FX_BOOL IsSelect();
|
| @@ -177,21 +177,21 @@ private:
|
| CFX_ArrayTemplate<IFDE_TxtEdtPage*> m_PagePtrArray;
|
| CFX_ArrayTemplate<CFDE_TxtEdtParag*> m_ParagPtrArray;
|
| CFX_ArrayTemplate<FDE_LPTXTEDTSELRANGE> m_SelRangePtrArr;
|
| - FX_INT32 m_nPageLineCount;
|
| - FX_INT32 m_nLineCount;
|
| - FX_INT32 m_nAnchorPos;
|
| - FX_INT32 m_nLayoutPos;
|
| + int32_t m_nPageLineCount;
|
| + int32_t m_nLineCount;
|
| + int32_t m_nAnchorPos;
|
| + int32_t m_nLayoutPos;
|
| FX_FLOAT m_fCaretPosReserve;
|
| - FX_INT32 m_nCaret;
|
| + int32_t m_nCaret;
|
| FX_BOOL m_bBefore;
|
| - FX_INT32 m_nCaretPage;
|
| + int32_t m_nCaretPage;
|
| CFX_RectF m_rtCaret;
|
| FX_DWORD m_dwFindFlags;
|
|
|
| FX_BOOL m_bLock;
|
| - FX_INT32 m_nLimit;
|
| + int32_t m_nLimit;
|
| FX_WCHAR m_wcAliasChar;
|
| - FX_INT32 m_nFirstLineEnd;
|
| + int32_t m_nFirstLineEnd;
|
| FX_BOOL m_bAutoLineEnd;
|
| FX_WCHAR m_wLineEnd;
|
|
|
| @@ -202,9 +202,9 @@ class CFDE_TxtEdtDoRecord_Insert : public IFDE_TxtEdtDoRecord
|
| public:
|
| CFDE_TxtEdtDoRecord_Insert(FX_BSTR bsDoRecord);
|
| CFDE_TxtEdtDoRecord_Insert( CFDE_TxtEdtEngine * pEngine,
|
| - FX_INT32 nCaret,
|
| + int32_t nCaret,
|
| FX_LPCWSTR lpText,
|
| - FX_INT32 nLength);
|
| + int32_t nLength);
|
| virtual void Release();
|
| virtual FX_BOOL Undo();
|
| virtual FX_BOOL Redo();
|
| @@ -214,7 +214,7 @@ protected:
|
| void Deserialize(FX_BSTR bsDoRecord);
|
| private:
|
| CFDE_TxtEdtEngine * m_pEngine;
|
| - FX_INT32 m_nCaret;
|
| + int32_t m_nCaret;
|
| CFX_WideString m_wsInsert;
|
| };
|
| class CFDE_TxtEdtDoRecord_DeleteRange : public IFDE_TxtEdtDoRecord
|
| @@ -222,8 +222,8 @@ class CFDE_TxtEdtDoRecord_DeleteRange : public IFDE_TxtEdtDoRecord
|
| public:
|
| CFDE_TxtEdtDoRecord_DeleteRange(FX_BSTR bsDoRecord);
|
| CFDE_TxtEdtDoRecord_DeleteRange(CFDE_TxtEdtEngine * pEngine,
|
| - FX_INT32 nIndex,
|
| - FX_INT32 nCaret,
|
| + int32_t nIndex,
|
| + int32_t nCaret,
|
| const CFX_WideString &wsRange,
|
| FX_BOOL bSel = FALSE);
|
| virtual void Release();
|
| @@ -236,8 +236,8 @@ protected:
|
| private:
|
| CFDE_TxtEdtEngine * m_pEngine;
|
| FX_BOOL m_bSel;
|
| - FX_INT32 m_nIndex;
|
| - FX_INT32 m_nCaret;
|
| + int32_t m_nIndex;
|
| + int32_t m_nCaret;
|
| CFX_WideString m_wsRange;
|
| };
|
| #ifdef FDE_USEFORMATBLOCK
|
| @@ -246,12 +246,12 @@ class CFDE_TxtEdtDoRecord_FieldInsert : public IFDE_TxtEdtDoRecord
|
| public:
|
| CFDE_TxtEdtDoRecord_FieldInsert(FX_BSTR bsDoRecord);
|
| CFDE_TxtEdtDoRecord_FieldInsert(CFDE_TxtEdtEngine * pEngine,
|
| - FX_INT32 nCaret,
|
| + int32_t nCaret,
|
| CFDE_TxtEdtField * pField,
|
| - FX_INT32 nIndexInField,
|
| - FX_INT32 nFieldBgn,
|
| - FX_INT32 nOldFieldLength,
|
| - FX_INT32 nNewFieldLength,
|
| + int32_t nIndexInField,
|
| + int32_t nFieldBgn,
|
| + int32_t nOldFieldLength,
|
| + int32_t nNewFieldLength,
|
| const CFX_WideString &wsIns,
|
| FX_BOOL bSel = FALSE);
|
| virtual void Release();
|
| @@ -264,12 +264,12 @@ protected:
|
|
|
| private:
|
| CFDE_TxtEdtEngine * m_pEngine;
|
| - FX_INT32 m_nCaret;
|
| + int32_t m_nCaret;
|
| CFDE_TxtEdtField * m_pField;
|
| - FX_INT32 m_nIndexInField;
|
| - FX_INT32 m_nFieldBgn;
|
| - FX_INT32 m_nOldFieldLength;
|
| - FX_INT32 m_nNewFieldLength;
|
| + int32_t m_nIndexInField;
|
| + int32_t m_nFieldBgn;
|
| + int32_t m_nOldFieldLength;
|
| + int32_t m_nNewFieldLength;
|
| CFX_WideString m_wsIns;
|
| FX_BOOL m_bSel;
|
| };
|
| @@ -278,12 +278,12 @@ class CFDE_TxtEdtDoRecord_FieldDelete : public IFDE_TxtEdtDoRecord
|
| public:
|
| CFDE_TxtEdtDoRecord_FieldDelete(FX_BSTR bsDoRecord);
|
| CFDE_TxtEdtDoRecord_FieldDelete(CFDE_TxtEdtEngine * pEngine,
|
| - FX_INT32 nCaret,
|
| + int32_t nCaret,
|
| CFDE_TxtEdtField * pField,
|
| - FX_INT32 nIndexInField,
|
| - FX_INT32 nFieldBgn,
|
| - FX_INT32 nOldLength,
|
| - FX_INT32 nNewLength,
|
| + int32_t nIndexInField,
|
| + int32_t nFieldBgn,
|
| + int32_t nOldLength,
|
| + int32_t nNewLength,
|
| const CFX_WideString &wsDel,
|
| FX_BOOL bSel = FALSE);
|
| virtual void Release();
|
| @@ -295,12 +295,12 @@ protected:
|
| void Deserialize(FX_BSTR bsDoRecord);
|
| private:
|
| CFDE_TxtEdtEngine * m_pEngine;
|
| - FX_INT32 m_nCaret;
|
| + int32_t m_nCaret;
|
| CFDE_TxtEdtField * m_pField;
|
| - FX_INT32 m_nIndexInField;
|
| - FX_INT32 m_nFieldBgn;
|
| - FX_INT32 m_nOldFieldLength;
|
| - FX_INT32 m_nNewFieldLength;
|
| + int32_t m_nIndexInField;
|
| + int32_t m_nFieldBgn;
|
| + int32_t m_nOldFieldLength;
|
| + int32_t m_nNewFieldLength;
|
| CFX_WideString m_wsDel;
|
| FX_BOOL m_bSel;
|
| };
|
| @@ -309,12 +309,12 @@ class CFDE_TxtEdtDoRecord_FieldReplace : public IFDE_TxtEdtDoRecord
|
| public:
|
| CFDE_TxtEdtDoRecord_FieldReplace(FX_BSTR bsDoRecord);
|
| CFDE_TxtEdtDoRecord_FieldReplace( CFDE_TxtEdtEngine * pEngine,
|
| - FX_INT32 nCaret,
|
| - FX_INT32 nNewCaret,
|
| + int32_t nCaret,
|
| + int32_t nNewCaret,
|
| CFDE_TxtEdtField * pField,
|
| - FX_INT32 nIndexInField,
|
| - FX_INT32 nFieldBgn,
|
| - FX_INT32 nFieldNewLength,
|
| + int32_t nIndexInField,
|
| + int32_t nFieldBgn,
|
| + int32_t nFieldNewLength,
|
| const CFX_WideString &wsDel,
|
| const CFX_WideString &wsIns,
|
| FX_BOOL bSel);
|
| @@ -327,12 +327,12 @@ protected:
|
| void Deserialize(FX_BSTR bsDoRecord);
|
| private:
|
| CFDE_TxtEdtEngine * m_pEngine;
|
| - FX_INT32 m_nCaret;
|
| - FX_INT32 m_nNewCaret;
|
| + int32_t m_nCaret;
|
| + int32_t m_nNewCaret;
|
| CFDE_TxtEdtField * m_pField;
|
| - FX_INT32 m_nIndexInField;
|
| - FX_INT32 m_nFieldBgn;
|
| - FX_INT32 m_nFieldNewLength;
|
| + int32_t m_nIndexInField;
|
| + int32_t m_nFieldBgn;
|
| + int32_t m_nFieldNewLength;
|
| CFX_WideString m_wsDel;
|
| CFX_WideString m_wsIns;
|
| FX_BOOL m_bSel;
|
|
|