Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Unified Diff: xfa/fde/cfde_txtedtbuf.h

Issue 2614383003: Add CFDE_TxtEdtBuf tests (Closed)
Patch Set: Review feedback Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « BUILD.gn ('k') | xfa/fde/cfde_txtedtbuf.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fde/cfde_txtedtbuf.h
diff --git a/xfa/fde/cfde_txtedtbuf.h b/xfa/fde/cfde_txtedtbuf.h
index ac25a080e5c7a7e5e1c37e69c04f8f9b1e255d28..63edbf6167f5d908274f90003c02487e43e51c01 100644
--- a/xfa/fde/cfde_txtedtbuf.h
+++ b/xfa/fde/cfde_txtedtbuf.h
@@ -25,16 +25,15 @@ class CFDE_TxtEdtBuf {
void SetText(const CFX_WideString& wsText);
CFX_WideString GetText() const;
FX_WCHAR GetCharByIndex(int32_t nIndex) const;
- CFX_WideString GetRange(int32_t nBegin, int32_t nCount = -1) const;
+ CFX_WideString GetRange(int32_t nBegin, int32_t nCount) 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(bool bRelease = true);
-
- bool Optimize(IFX_Pause* pPause = nullptr);
+ void Insert(int32_t nPos, const FX_WCHAR* lpText, int32_t nLength);
+ void Delete(int32_t nIndex, int32_t nLength);
+ void Clear(bool bRelease);
private:
friend class CFDE_TxtEdtBufIter;
+ friend class CFDE_TxtEdtBufTest;
struct FDE_CHUNKHEADER {
int32_t nUsed;
@@ -50,6 +49,8 @@ class CFDE_TxtEdtBuf {
int32_t CP2Index(const FDE_CHUNKPLACE& cp) const;
void Index2CP(int32_t nIndex, FDE_CHUNKPLACE& cp) const;
+ void SetChunkSizeForTesting(size_t size);
+
int32_t m_nChunkSize;
int32_t m_nTotal;
« no previous file with comments | « BUILD.gn ('k') | xfa/fde/cfde_txtedtbuf.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698