summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_textobject.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-27 18:37:46 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-27 18:37:46 +0000
commit4f1c7f33f765b7cf5d8770d725054f74073bab39 (patch)
treeffa459a98d5fae60ffa524aa71b22d6e49301eca /core/fpdfapi/page/cpdf_textobject.h
parent2d950563beb291441c0e1c90cfde8227f7025327 (diff)
downloadpdfium-4f1c7f33f765b7cf5d8770d725054f74073bab39.tar.xz
Convert CPDF_TextObject to not use CollectionSize
This CL updates various methods in CPDF_TextObject to return or received size_t values. Callers have been updated as needed. Bug: pdfium:774 Change-Id: Id72511bc74637c6261add39f5414c9a4b8390b82 Reviewed-on: https://pdfium-review.googlesource.com/19430 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_textobject.h')
-rw-r--r--core/fpdfapi/page/cpdf_textobject.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/core/fpdfapi/page/cpdf_textobject.h b/core/fpdfapi/page/cpdf_textobject.h
index 02653dc2aa..a6fc62369c 100644
--- a/core/fpdfapi/page/cpdf_textobject.h
+++ b/core/fpdfapi/page/cpdf_textobject.h
@@ -36,12 +36,15 @@ class CPDF_TextObject : public CPDF_PageObject {
const CPDF_TextObject* AsText() const override;
std::unique_ptr<CPDF_TextObject> Clone() const;
- int CountItems() const;
- void GetItemInfo(int index, CPDF_TextObjectItem* pInfo) const;
- int CountChars() const;
- void GetCharInfo(int index, uint32_t* charcode, float* kerning) const;
- void GetCharInfo(int index, CPDF_TextObjectItem* pInfo) const;
+
+ size_t CountItems() const;
+ void GetItemInfo(size_t index, CPDF_TextObjectItem* pInfo) const;
+
+ size_t CountChars() const;
+ void GetCharInfo(size_t index, uint32_t* charcode, float* kerning) const;
+ void GetCharInfo(size_t index, CPDF_TextObjectItem* pInfo) const;
float GetCharWidth(uint32_t charcode) const;
+
CFX_PointF GetPos() const { return m_Pos; }
CFX_Matrix GetTextMatrix() const;
CPDF_Font* GetFont() const;