summaryrefslogtreecommitdiff
path: root/xfa/fee/fde_txtedtparag.h
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-05-02 06:49:58 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-02 06:49:58 -0700
commitb696f7d616ef397a01af1d6bd01c061922a259f7 (patch)
tree62d36b02b1c59320461235da8ee68009a6f544de /xfa/fee/fde_txtedtparag.h
parent038bf0b129e56212a6de0989dca1ae023bb17c5d (diff)
downloadpdfium-b696f7d616ef397a01af1d6bd01c061922a259f7.tar.xz
Remove IFDE_TxtEdt interfaces where possible.
This CL removes the following and uses the only instance instead. * IFDE_TxtEdtParag * IFDE_TxtEdtEventSink * IFDE_TxtEdtEngine * IFDE_TxtEdtBuf Review-Url: https://codereview.chromium.org/1927973003
Diffstat (limited to 'xfa/fee/fde_txtedtparag.h')
-rw-r--r--xfa/fee/fde_txtedtparag.h26
1 files changed, 16 insertions, 10 deletions
diff --git a/xfa/fee/fde_txtedtparag.h b/xfa/fee/fde_txtedtparag.h
index 39921d5ef7..24ecbc7bf0 100644
--- a/xfa/fee/fde_txtedtparag.h
+++ b/xfa/fee/fde_txtedtparag.h
@@ -7,29 +7,35 @@
#ifndef XFA_FEE_FDE_TXTEDTPARAG_H_
#define XFA_FEE_FDE_TXTEDTPARAG_H_
-#include "xfa/fee/ifde_txtedtengine.h"
+#include <stdint.h>
class CFDE_TxtEdtEngine;
-class CFDE_TxtEdtParag : public IFDE_TxtEdtParag {
+class CFDE_TxtEdtParag {
public:
explicit CFDE_TxtEdtParag(CFDE_TxtEdtEngine* pEngine);
~CFDE_TxtEdtParag();
- virtual int32_t GetTextLength() const { return m_nCharCount; }
- virtual int32_t GetStartIndex() const { return m_nCharStart; }
- virtual int32_t CountLines() const { return m_nLineCount; }
- virtual void GetLineRange(int32_t nLineIndex,
- int32_t& nStart,
- int32_t& nCount) const;
+ int32_t GetTextLength() const { return m_nCharCount; }
+ int32_t GetStartIndex() const { return m_nCharStart; }
+ int32_t GetLineCount() const { return m_nLineCount; }
+
+ void SetTextLength(int32_t len) { m_nCharCount = len; }
+ void IncrementTextLength(int32_t len) { m_nCharCount += len; }
+ void SetStartIndex(int32_t idx) { m_nCharStart = idx; }
+ void IncrementStartIndex(int32_t val) { m_nCharStart += val; }
+ void DecrementStartIndex(int32_t val) { m_nCharStart -= val; }
+ void SetLineCount(int32_t count) { m_nLineCount = count; }
+
+ void GetLineRange(int32_t nLineIndex, int32_t& nStart, int32_t& nCount) const;
void LoadParag();
void UnloadParag();
void CalcLines();
+
+ private:
int32_t m_nCharStart;
int32_t m_nCharCount;
int32_t m_nLineCount;
-
- private:
void* m_lpData;
CFDE_TxtEdtEngine* m_pEngine;
};