Lines Matching refs:textpage
48 FPDF_TEXTPAGE textpage = FPDFText_LoadPage(page); in TEST_F() local
49 ASSERT_TRUE(textpage); in TEST_F()
55 EXPECT_EQ(0, FPDFText_GetText(textpage, 0, 128, nullptr)); in TEST_F()
56 EXPECT_EQ(0, FPDFText_GetText(textpage, -1, 128, buffer)); in TEST_F()
57 EXPECT_EQ(0, FPDFText_GetText(textpage, 0, -1, buffer)); in TEST_F()
58 EXPECT_EQ(1, FPDFText_GetText(textpage, 0, 0, buffer)); in TEST_F()
63 EXPECT_EQ(2, FPDFText_GetText(textpage, 0, 1, buffer)); in TEST_F()
68 int num_chars = FPDFText_GetText(textpage, 0, 128, buffer); in TEST_F()
74 EXPECT_EQ(kHelloGoodbyeTextSize - 1, FPDFText_CountChars(textpage)); in TEST_F()
77 FPDFText_GetUnicode(textpage, i)) in TEST_F()
87 EXPECT_EQ(6, FPDFText_GetText(textpage, 0, 5, small_buffer)); in TEST_F()
91 EXPECT_EQ(12.0, FPDFText_GetFontSize(textpage, 0)); in TEST_F()
92 EXPECT_EQ(16.0, FPDFText_GetFontSize(textpage, 15)); in TEST_F()
103 EXPECT_FALSE(FPDFText_GetCharBox(textpage, -1, &left, &right, &bottom, &top)); in TEST_F()
108 EXPECT_FALSE(FPDFText_GetCharBox(textpage, 55, &left, &right, &bottom, &top)); in TEST_F()
114 FPDFText_GetCharBox(textpage, 4, nullptr, &right, &bottom, &top)); in TEST_F()
115 EXPECT_FALSE(FPDFText_GetCharBox(textpage, 4, &left, nullptr, &bottom, &top)); in TEST_F()
116 EXPECT_FALSE(FPDFText_GetCharBox(textpage, 4, &left, &right, nullptr, &top)); in TEST_F()
118 FPDFText_GetCharBox(textpage, 4, &left, &right, &bottom, nullptr)); in TEST_F()
120 FPDFText_GetCharBox(textpage, 4, nullptr, nullptr, nullptr, nullptr)); in TEST_F()
122 EXPECT_TRUE(FPDFText_GetCharBox(textpage, 4, &left, &right, &bottom, &top)); in TEST_F()
134 EXPECT_FALSE(FPDFText_GetLooseCharBox(textpage, -1, &rect)); in TEST_F()
139 EXPECT_FALSE(FPDFText_GetLooseCharBox(textpage, 55, &rect)); in TEST_F()
144 EXPECT_FALSE(FPDFText_GetLooseCharBox(textpage, 4, nullptr)); in TEST_F()
146 EXPECT_TRUE(FPDFText_GetLooseCharBox(textpage, 4, &rect)); in TEST_F()
154 EXPECT_TRUE(FPDFText_GetCharOrigin(textpage, 4, &x, &y)); in TEST_F()
158 EXPECT_EQ(4, FPDFText_GetCharIndexAtPos(textpage, 42.0, 50.0, 1.0, 1.0)); in TEST_F()
159 EXPECT_EQ(-1, FPDFText_GetCharIndexAtPos(textpage, 0.0, 0.0, 1.0, 1.0)); in TEST_F()
160 EXPECT_EQ(-1, FPDFText_GetCharIndexAtPos(textpage, 199.0, 199.0, 1.0, 1.0)); in TEST_F()
164 FPDFText_GetCharIndexAtPos(textpage, 42.0, 10000000.0, 1.0, 1.0)); in TEST_F()
165 EXPECT_EQ(-1, FPDFText_GetCharIndexAtPos(textpage, -1.0, 50.0, 1.0, 1.0)); in TEST_F()
168 EXPECT_EQ(2, FPDFText_CountRects(textpage, 0, kHelloGoodbyeTextSize - 1)); in TEST_F()
174 EXPECT_TRUE(FPDFText_GetRect(textpage, 1, &left, &top, &right, &bottom)); in TEST_F()
185 EXPECT_FALSE(FPDFText_GetRect(textpage, -1, &left, &top, &right, &bottom)); in TEST_F()
195 EXPECT_FALSE(FPDFText_GetRect(textpage, 2, &left, &top, &right, &bottom)); in TEST_F()
202 9, FPDFText_GetBoundedText(textpage, 41.0, 56.0, 82.0, 48.0, nullptr, 0)); in TEST_F()
207 1, FPDFText_GetBoundedText(textpage, 41.0, 56.0, 82.0, 48.0, buffer, 1)); in TEST_F()
213 9, FPDFText_GetBoundedText(textpage, 41.0, 56.0, 82.0, 48.0, buffer, 9)); in TEST_F()
218 EXPECT_EQ(10, FPDFText_GetBoundedText(textpage, 41.0, 56.0, 82.0, 48.0, in TEST_F()
224 FPDFText_ClosePage(textpage); in TEST_F()
233 FPDF_TEXTPAGE textpage = FPDFText_LoadPage(page); in TEST_F() local
234 ASSERT_TRUE(textpage); in TEST_F()
236 EXPECT_EQ(12.0, FPDFText_GetFontSize(textpage, 0)); in TEST_F()
240 EXPECT_TRUE(FPDFText_GetCharOrigin(textpage, 1, &x, &y)); in TEST_F()
244 EXPECT_TRUE(FPDFText_GetCharOrigin(textpage, 2, &x, &y)); in TEST_F()
249 EXPECT_TRUE(FPDFText_GetLooseCharBox(textpage, 1, &rect)); in TEST_F()
255 EXPECT_TRUE(FPDFText_GetLooseCharBox(textpage, 2, &rect)); in TEST_F()
261 FPDFText_ClosePage(textpage); in TEST_F()
270 FPDF_TEXTPAGE textpage = FPDFText_LoadPage(page); in TEST_F() local
271 ASSERT_TRUE(textpage); in TEST_F()
280 ScopedFPDFTextFind search(FPDFText_FindStart(textpage, nope.get(), 0, 0)); in TEST_F()
298 ScopedFPDFTextFind search(FPDFText_FindStart(textpage, world.get(), 0, 2)); in TEST_F()
334 textpage, world.get(), FPDF_MATCHCASE | FPDF_MATCHWHOLEWORD, 0)); in TEST_F()
344 FPDFText_FindStart(textpage, world_caps.get(), 0, 0)); in TEST_F()
354 FPDFText_FindStart(textpage, world_caps.get(), FPDF_MATCHCASE, 0)); in TEST_F()
363 FPDFText_FindStart(textpage, world_substr.get(), 0, 0)); in TEST_F()
371 ScopedFPDFTextFind search(FPDFText_FindStart(textpage, world_substr.get(), in TEST_F()
377 FPDFText_ClosePage(textpage); in TEST_F()
386 FPDF_TEXTPAGE textpage = FPDFText_LoadPage(page); in TEST_F() local
387 ASSERT_TRUE(textpage); in TEST_F()
393 ScopedFPDFTextFind search(FPDFText_FindStart(textpage, aaaa.get(), 0, 0)); in TEST_F()
430 FPDFText_FindStart(textpage, aaaa.get(), FPDF_CONSECUTIVE, 0)); in TEST_F()
461 FPDFText_ClosePage(textpage); in TEST_F()
476 FPDF_TEXTPAGE textpage = FPDFText_LoadPage(page); in TEST_F() local
477 ASSERT_TRUE(textpage); in TEST_F()
484 ScopedFPDFTextFind search(FPDFText_FindStart(textpage, needle, 0, 0)); in TEST_F()
500 FPDFText_ClosePage(textpage); in TEST_F()
510 FPDF_TEXTPAGE textpage = FPDFText_LoadPage(page); in TEST_F() local
511 ASSERT_TRUE(textpage); in TEST_F()
512 EXPECT_EQ(13, FPDFText_CountChars(textpage)); in TEST_F()
514 FPDFText_ClosePage(textpage); in TEST_F()
523 FPDF_TEXTPAGE textpage = FPDFText_LoadPage(page); in TEST_F() local
524 ASSERT_TRUE(textpage); in TEST_F()
527 ScopedFPDFPageLink pagelink(FPDFLink_LoadWebLinks(textpage)); in TEST_F()
539 FPDF_PAGELINK pagelink = FPDFLink_LoadWebLinks(textpage); in TEST_F()
624 FPDFText_ClosePage(textpage); in TEST_F()
633 FPDF_TEXTPAGE textpage = FPDFText_LoadPage(page); in TEST_F() local
634 ASSERT_TRUE(textpage); in TEST_F()
636 FPDF_PAGELINK pagelink = FPDFLink_LoadWebLinks(textpage); in TEST_F()
664 FPDFText_ClosePage(textpage); in TEST_F()
673 FPDF_TEXTPAGE textpage = FPDFText_LoadPage(page); in TEST_F() local
674 ASSERT_TRUE(textpage); in TEST_F()
676 FPDF_PAGELINK pagelink = FPDFLink_LoadWebLinks(textpage); in TEST_F()
691 FPDFText_ClosePage(textpage); in TEST_F()
813 FPDF_TEXTPAGE textpage = FPDFText_LoadPage(page); in TEST_F() local
814 ASSERT_TRUE(textpage); in TEST_F()
820 int count = FPDFText_CountChars(textpage); in TEST_F()
823 EXPECT_EQ(kExpectedFontsSizes[i], FPDFText_GetFontSize(textpage, i)) << i; in TEST_F()
825 FPDFText_ClosePage(textpage); in TEST_F()
834 FPDF_TEXTPAGE textpage = FPDFText_LoadPage(page); in TEST_F() local
835 ASSERT_TRUE(textpage); in TEST_F()
843 FPDFText_GetFontInfo(textpage, i, nullptr, 0, &flags); in TEST_F()
851 FPDFText_GetFontInfo(textpage, i, font_name.data(), in TEST_F()
861 FPDFText_GetFontInfo(textpage, 0, font_name.data(), in TEST_F()
868 EXPECT_EQ(0u, FPDFText_GetFontInfo(textpage, num_chars1, font_name.data(), in TEST_F()
870 EXPECT_EQ(0u, FPDFText_GetFontInfo(textpage, num_chars1 + 1, font_name.data(), in TEST_F()
878 FPDFText_GetFontInfo(textpage, i, nullptr, 0, &flags); in TEST_F()
886 FPDFText_GetFontInfo(textpage, i, font_name.data(), in TEST_F()
899 FPDFText_GetFontInfo(textpage, 0, nullptr, 0, nullptr)); in TEST_F()
901 EXPECT_EQ(0u, FPDFText_GetFontInfo(textpage, -1, font_name.data(), in TEST_F()
904 EXPECT_EQ(0u, FPDFText_GetFontInfo(textpage, 1000, font_name.data(), in TEST_F()
907 FPDFText_ClosePage(textpage); in TEST_F()
916 FPDF_TEXTPAGE textpage = FPDFText_LoadPage(page); in TEST_F() local
917 ASSERT_TRUE(textpage); in TEST_F()
919 ASSERT_EQ(1, FPDFText_CountChars(textpage)); in TEST_F()
920 EXPECT_EQ(0U, FPDFText_GetUnicode(textpage, 0)); in TEST_F()
922 FPDFText_ClosePage(textpage); in TEST_F()
931 FPDF_TEXTPAGE textpage = FPDFText_LoadPage(page); in TEST_F() local
932 ASSERT_TRUE(textpage); in TEST_F()
939 ASSERT_EQ(268, FPDFText_CountChars(textpage)); in TEST_F()
941 EXPECT_EQ(kData[i], FPDFText_GetUnicode(textpage, kStartIndex + i)); in TEST_F()
946 FPDFText_GetText(textpage, kStartIndex, FX_ArraySize(kData), buffer); in TEST_F()
953 FPDFText_ClosePage(textpage); in TEST_F()
962 FPDF_TEXTPAGE textpage = FPDFText_LoadPage(page); in TEST_F() local
963 ASSERT_TRUE(textpage); in TEST_F()
977 EXPECT_EQ(count + 1, FPDFText_GetText(textpage, 0, count, buffer)); in TEST_F()
995 EXPECT_EQ(count + 1, FPDFText_GetText(textpage, offset, count, buffer)); in TEST_F()
1000 FPDFText_ClosePage(textpage); in TEST_F()
1009 FPDF_TEXTPAGE textpage = FPDFText_LoadPage(page); in TEST_F() local
1010 ASSERT_TRUE(textpage); in TEST_F()
1011 FPDFText_ClosePage(textpage); in TEST_F()
1020 FPDF_TEXTPAGE textpage = FPDFText_LoadPage(page); in TEST_F() local
1021 ASSERT_TRUE(textpage); in TEST_F()
1026 int num_chars = FPDFText_GetText(textpage, 0, 128, buffer); in TEST_F()
1037 num_chars = FPDFText_GetText(textpage, offset, 128, buffer); in TEST_F()
1044 FPDFText_ClosePage(textpage); in TEST_F()
1055 FPDF_TEXTPAGE textpage = FPDFText_LoadPage(page); in TEST_F() local
1056 ASSERT_TRUE(textpage); in TEST_F()
1079 FPDFText_CountChars(textpage)); in TEST_F()
1083 FPDFText_GetUnicode(textpage, page_range_offset + i)); in TEST_F()
1086 FPDFText_ClosePage(textpage); in TEST_F()
1095 FPDF_TEXTPAGE textpage = FPDFText_LoadPage(page); in TEST_F() local
1096 ASSERT_TRUE(textpage); in TEST_F()
1102 int num_chars = FPDFText_GetText(textpage, 0, 128, buffer); in TEST_F()
1114 EXPECT_EQ(2, FPDFText_CountRects(textpage, start, -1)); in TEST_F()
1117 EXPECT_EQ(0, FPDFText_CountRects(textpage, start, 0)); in TEST_F()
1120 EXPECT_EQ(1, FPDFText_CountRects(textpage, start, 1)); in TEST_F()
1126 FPDFText_CountRects(textpage, start, kGoodbyeWorldStart)); in TEST_F()
1130 EXPECT_EQ(2, FPDFText_CountRects(textpage, start, 500)); in TEST_F()
1135 EXPECT_EQ(2, FPDFText_CountRects(textpage, start, -100)); in TEST_F()
1136 EXPECT_EQ(2, FPDFText_CountRects(textpage, start, -2)); in TEST_F()
1142 EXPECT_EQ(1, FPDFText_CountRects(textpage, start, -1)); in TEST_F()
1143 EXPECT_EQ(0, FPDFText_CountRects(textpage, start, 0)); in TEST_F()
1144 EXPECT_EQ(1, FPDFText_CountRects(textpage, start, 1)); in TEST_F()
1145 EXPECT_EQ(1, FPDFText_CountRects(textpage, start, 2)); in TEST_F()
1146 EXPECT_EQ(1, FPDFText_CountRects(textpage, start, 500)); in TEST_F()
1151 EXPECT_EQ(0, FPDFText_CountRects(textpage, start, -1)); in TEST_F()
1152 EXPECT_EQ(0, FPDFText_CountRects(textpage, start, 0)); in TEST_F()
1153 EXPECT_EQ(0, FPDFText_CountRects(textpage, start, 1)); in TEST_F()
1154 EXPECT_EQ(0, FPDFText_CountRects(textpage, start, 2)); in TEST_F()
1155 EXPECT_EQ(0, FPDFText_CountRects(textpage, start, 500)); in TEST_F()
1158 FPDFText_ClosePage(textpage); in TEST_F()
1236 ScopedFPDFTextPage textpage(FPDFText_LoadPage(page)); in TEST_F() local
1237 ASSERT_TRUE(textpage); in TEST_F()
1241 int num_chars = FPDFText_GetText(textpage.get(), 0, 128, buffer); in TEST_F()
1248 FPDFText_GetBoundedText(textpage.get(), box.left, box.top, in TEST_F()
1253 FPDFText_GetBoundedText(textpage.get(), box.left, box.top, in TEST_F()