summaryrefslogtreecommitdiff
path: root/xfa/fee/fde_txtedtbuf.h
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-05-18 11:09:47 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-18 11:09:47 -0700
commit653951828cf934afb48b57989089a99b38620d02 (patch)
tree8a91b6f3ffac3d992e47e5d6fd4da31245597ff9 /xfa/fee/fde_txtedtbuf.h
parent3b093630d55ad97807bcc710227b03819944605b (diff)
downloadpdfium-653951828cf934afb48b57989089a99b38620d02.tar.xz
Split xfa/fee files into individual class files.
This CL splits the xfa/fee files into individual class files and moves them into the xfa/fde directory where they belong. Review-Url: https://codereview.chromium.org/1994693002
Diffstat (limited to 'xfa/fee/fde_txtedtbuf.h')
-rw-r--r--xfa/fee/fde_txtedtbuf.h84
1 files changed, 0 insertions, 84 deletions
diff --git a/xfa/fee/fde_txtedtbuf.h b/xfa/fee/fde_txtedtbuf.h
deleted file mode 100644
index bcfb66a0a1..0000000000
--- a/xfa/fee/fde_txtedtbuf.h
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifndef XFA_FEE_FDE_TXTEDTBUF_H_
-#define XFA_FEE_FDE_TXTEDTBUF_H_
-
-#include "xfa/fee/ifde_txtedtengine.h"
-#include "xfa/fgas/crt/fgas_memory.h"
-
-class CFDE_TxtEdtBuf;
-
-class CFDE_TxtEdtBufIter : public IFX_CharIter {
- public:
- CFDE_TxtEdtBufIter(CFDE_TxtEdtBuf* pBuf, FX_WCHAR wcAlias = 0);
- ~CFDE_TxtEdtBufIter() override;
-
- FX_BOOL Next(FX_BOOL bPrev = FALSE) override;
- FX_WCHAR GetChar() override;
- void SetAt(int32_t nIndex) override;
- int32_t GetAt() const override;
- FX_BOOL IsEOF(FX_BOOL bTail = TRUE) const override;
- IFX_CharIter* Clone() override;
-
- private:
- CFDE_TxtEdtBuf* m_pBuf;
- int32_t m_nCurChunk;
- int32_t m_nCurIndex;
- int32_t m_nIndex;
- FX_WCHAR m_Alias;
-};
-
-class CFDE_TxtEdtBuf {
- public:
- CFDE_TxtEdtBuf();
-
- void Release();
- FX_BOOL SetChunkSize(int32_t nChunkSize);
- int32_t GetChunkSize() const;
- int32_t GetTextLength() const;
- void SetText(const CFX_WideString& wsText);
- void GetText(CFX_WideString& wsText) const;
- FX_WCHAR GetCharByIndex(int32_t nIndex) const;
- void GetRange(CFX_WideString& wsText,
- int32_t nBegin,
- int32_t nCount = -1) const;
-
- void Insert(int32_t nPos, const FX_WCHAR* lpText, int32_t nLength = 1);
- void Delete(int32_t nIndex, int32_t nLength = 1);
- void Clear(FX_BOOL bRelease = TRUE);
-
- FX_BOOL Optimize(IFX_Pause* pPause = nullptr);
-
- protected:
- ~CFDE_TxtEdtBuf();
-
- private:
- friend class CFDE_TxtEdtBufIter;
-
- struct FDE_CHUNKHEADER {
- int32_t nUsed;
- FX_WCHAR wChars[1];
- };
-
- struct FDE_CHUNKPLACE {
- int32_t nChunkIndex;
- int32_t nCharIndex;
- };
-
- void ResetChunkBuffer(int32_t nDefChunkCount, int32_t nChunkSize);
- int32_t CP2Index(const FDE_CHUNKPLACE& cp) const;
- void Index2CP(int32_t nIndex, FDE_CHUNKPLACE& cp) const;
-
- int32_t m_nChunkSize;
-
- int32_t m_nTotal;
- FX_BOOL m_bChanged;
- CFX_ArrayTemplate<FDE_CHUNKHEADER*> m_Chunks;
- IFX_MemoryAllocator* m_pAllocator;
-};
-
-#endif // XFA_FEE_FDE_TXTEDTBUF_H_