Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
fpdf_text_embeddertest.cpp File Reference

(0ccf980226462398d5097987466bcffd8236e1e9)

#include <algorithm>
#include <array>
#include <utility>
#include <vector>
#include "build/build_config.h"
#include "core/fxcrt/compiler_specific.h"
#include "core/fxcrt/stl_util.h"
#include "core/fxge/fx_font.h"
#include "public/cpp/fpdf_scopers.h"
#include "public/fpdf_doc.h"
#include "public/fpdf_text.h"
#include "public/fpdf_transformpage.h"
#include "public/fpdfview.h"
#include "testing/embedder_test.h"
#include "testing/fx_string_testhelpers.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
Include dependency graph for fpdf_text_embeddertest.cpp:

Go to the source code of this file.

Classes

class  FPDFTextEmbedderTest

Macros

#define MAYBE_TextSearchLatinExtended   TextSearchLatinExtended

Functions

 TEST_F (FPDFTextEmbedderTest, Text)
 TEST_F (FPDFTextEmbedderTest, TextVertical)
 TEST_F (FPDFTextEmbedderTest, TextHebrewMirrored)
 TEST_F (FPDFTextEmbedderTest, TextSearch)
 TEST_F (FPDFTextEmbedderTest, TextSearchConsecutive)
 TEST_F (FPDFTextEmbedderTest, TextSearchTermAtEnd)
 TEST_F (FPDFTextEmbedderTest, TextSearchLeadingSpace)
 TEST_F (FPDFTextEmbedderTest, TextSearchTrailingSpace)
 TEST_F (FPDFTextEmbedderTest, TextSearchSpaceInSearchTerm)
 TEST_F (FPDFTextEmbedderTest, MAYBE_TextSearchLatinExtended)
 TEST_F (FPDFTextEmbedderTest, StreamLengthPastEndOfFile)
 TEST_F (FPDFTextEmbedderTest, WebLinks)
 TEST_F (FPDFTextEmbedderTest, WebLinksAcrossLines)
 TEST_F (FPDFTextEmbedderTest, WebLinksAcrossLinesBug)
 TEST_F (FPDFTextEmbedderTest, WebLinksCharRanges)
 TEST_F (FPDFTextEmbedderTest, AnnotLinks)
 TEST_F (FPDFTextEmbedderTest, GetFontSize)
 TEST_F (FPDFTextEmbedderTest, GetFontInfo)
 TEST_F (FPDFTextEmbedderTest, ToUnicode)
 TEST_F (FPDFTextEmbedderTest, IsGenerated)
 TEST_F (FPDFTextEmbedderTest, IsHyphen)
 TEST_F (FPDFTextEmbedderTest, IsInvalidUnicode)
 TEST_F (FPDFTextEmbedderTest, Bug921)
 TEST_F (FPDFTextEmbedderTest, GetTextWithHyphen)
 TEST_F (FPDFTextEmbedderTest, Bug782596)
 TEST_F (FPDFTextEmbedderTest, ControlCharacters)
 TEST_F (FPDFTextEmbedderTest, Bug1029)
 TEST_F (FPDFTextEmbedderTest, CountRects)
 TEST_F (FPDFTextEmbedderTest, GetText)
 TEST_F (FPDFTextEmbedderTest, CroppedText)
 TEST_F (FPDFTextEmbedderTest, Bug1139)
 TEST_F (FPDFTextEmbedderTest, Bug642)
 TEST_F (FPDFTextEmbedderTest, GetCharAngle)
 TEST_F (FPDFTextEmbedderTest, GetFontWeight)
 TEST_F (FPDFTextEmbedderTest, GetTextRenderMode)
 TEST_F (FPDFTextEmbedderTest, GetFillColor)
 TEST_F (FPDFTextEmbedderTest, GetStrokeColor)
 TEST_F (FPDFTextEmbedderTest, GetMatrix)
 TEST_F (FPDFTextEmbedderTest, CharBox)
 TEST_F (FPDFTextEmbedderTest, SmallType3Glyph)
 TEST_F (FPDFTextEmbedderTest, BigtableTextExtraction)
 TEST_F (FPDFTextEmbedderTest, Bug1769)

Macro Definition Documentation

◆ MAYBE_TextSearchLatinExtended

#define MAYBE_TextSearchLatinExtended   TextSearchLatinExtended

Definition at line 599 of file fpdf_text_embeddertest.cpp.

Function Documentation

◆ TEST_F() [1/42]

TEST_F ( FPDFTextEmbedderTest ,
AnnotLinks  )

Definition at line 872 of file fpdf_text_embeddertest.cpp.

References FPDFLink_CountQuadPoints(), FPDFLink_Enumerate(), FPDFLink_GetAnnotRect(), FPDFLink_GetQuadPoints(), FPDFPage_GetAnnot(), and FPDFPage_GetAnnotCount().

Here is the call graph for this function:

◆ TEST_F() [2/42]

TEST_F ( FPDFTextEmbedderTest ,
BigtableTextExtraction  )

Definition at line 1823 of file fpdf_text_embeddertest.cpp.

◆ TEST_F() [3/42]

TEST_F ( FPDFTextEmbedderTest ,
Bug1029  )

Definition at line 1258 of file fpdf_text_embeddertest.cpp.

References FPDFText_ClosePage(), FPDFText_CountChars(), FPDFText_GetUnicode(), and FPDFText_LoadPage().

Here is the call graph for this function:

◆ TEST_F() [4/42]

TEST_F ( FPDFTextEmbedderTest ,
Bug1139  )

Definition at line 1468 of file fpdf_text_embeddertest.cpp.

References FPDFText_ClosePage(), FPDFText_CountChars(), FPDFText_GetText(), and FPDFText_LoadPage().

Here is the call graph for this function:

◆ TEST_F() [5/42]

TEST_F ( FPDFTextEmbedderTest ,
Bug1769  )

Definition at line 1844 of file fpdf_text_embeddertest.cpp.

◆ TEST_F() [6/42]

TEST_F ( FPDFTextEmbedderTest ,
Bug642  )

Definition at line 1491 of file fpdf_text_embeddertest.cpp.

◆ TEST_F() [7/42]

TEST_F ( FPDFTextEmbedderTest ,
Bug782596  )

Definition at line 1212 of file fpdf_text_embeddertest.cpp.

References FPDFText_ClosePage(), and FPDFText_LoadPage().

Here is the call graph for this function:

◆ TEST_F() [8/42]

TEST_F ( FPDFTextEmbedderTest ,
Bug921  )

Definition at line 1135 of file fpdf_text_embeddertest.cpp.

References FPDFText_ClosePage(), FPDFText_CountChars(), and FPDFText_LoadPage().

Here is the call graph for this function:

◆ TEST_F() [9/42]

TEST_F ( FPDFTextEmbedderTest ,
CharBox  )

Definition at line 1726 of file fpdf_text_embeddertest.cpp.

◆ TEST_F() [10/42]

TEST_F ( FPDFTextEmbedderTest ,
ControlCharacters  )

Definition at line 1223 of file fpdf_text_embeddertest.cpp.

References FPDFText_ClosePage(), FPDFText_GetText(), and FPDFText_LoadPage().

Here is the call graph for this function:

◆ TEST_F() [11/42]

TEST_F ( FPDFTextEmbedderTest ,
CountRects  )

Definition at line 1299 of file fpdf_text_embeddertest.cpp.

References FPDFText_ClosePage(), FPDFText_CountRects(), FPDFText_GetText(), and FPDFText_LoadPage().

Here is the call graph for this function:

◆ TEST_F() [12/42]

TEST_F ( FPDFTextEmbedderTest ,
CroppedText  )

Definition at line 1415 of file fpdf_text_embeddertest.cpp.

◆ TEST_F() [13/42]

TEST_F ( FPDFTextEmbedderTest ,
GetCharAngle  )

Definition at line 1512 of file fpdf_text_embeddertest.cpp.

References FPDFText_ClosePage(), FPDFText_CountChars(), FPDFText_GetCharAngle(), and FPDFText_LoadPage().

Here is the call graph for this function:

◆ TEST_F() [14/42]

TEST_F ( FPDFTextEmbedderTest ,
GetFillColor  )

Definition at line 1604 of file fpdf_text_embeddertest.cpp.

References FPDFText_ClosePage(), FPDFText_CountChars(), FPDFText_GetFillColor(), and FPDFText_LoadPage().

Here is the call graph for this function:

◆ TEST_F() [15/42]

TEST_F ( FPDFTextEmbedderTest ,
GetFontInfo  )

Definition at line 958 of file fpdf_text_embeddertest.cpp.

References FPDFText_ClosePage(), FPDFText_GetFontInfo(), and FPDFText_LoadPage().

Here is the call graph for this function:

◆ TEST_F() [16/42]

TEST_F ( FPDFTextEmbedderTest ,
GetFontSize  )

Definition at line 937 of file fpdf_text_embeddertest.cpp.

References FPDFText_ClosePage(), FPDFText_CountChars(), FPDFText_GetFontSize(), and FPDFText_LoadPage().

Here is the call graph for this function:

◆ TEST_F() [17/42]

TEST_F ( FPDFTextEmbedderTest ,
GetFontWeight  )

Definition at line 1550 of file fpdf_text_embeddertest.cpp.

References FPDFText_ClosePage(), FPDFText_CountChars(), FPDFText_GetFontWeight(), and FPDFText_LoadPage().

Here is the call graph for this function:

◆ TEST_F() [18/42]

TEST_F ( FPDFTextEmbedderTest ,
GetMatrix  )

Definition at line 1670 of file fpdf_text_embeddertest.cpp.

References FPDFText_GetMatrix().

Here is the call graph for this function:

◆ TEST_F() [19/42]

TEST_F ( FPDFTextEmbedderTest ,
GetStrokeColor  )

Definition at line 1637 of file fpdf_text_embeddertest.cpp.

References FPDFText_ClosePage(), FPDFText_CountChars(), FPDFText_GetStrokeColor(), and FPDFText_LoadPage().

Here is the call graph for this function:

◆ TEST_F() [20/42]

TEST_F ( FPDFTextEmbedderTest ,
GetText  )

Definition at line 1371 of file fpdf_text_embeddertest.cpp.

References FPDFPage_CountObjects(), FPDFPage_GetObject(), FPDFText_ClosePage(), FPDFText_LoadPage(), and FPDFTextObj_GetText().

Here is the call graph for this function:

◆ TEST_F() [21/42]

TEST_F ( FPDFTextEmbedderTest ,
GetTextRenderMode  )

Definition at line 1577 of file fpdf_text_embeddertest.cpp.

References FPDFPageObj_GetType(), FPDFText_GetTextObject(), and FPDFTextObj_GetTextRenderMode().

Here is the call graph for this function:

◆ TEST_F() [22/42]

TEST_F ( FPDFTextEmbedderTest ,
GetTextWithHyphen  )

Definition at line 1167 of file fpdf_text_embeddertest.cpp.

References FPDFText_ClosePage(), and FPDFText_LoadPage().

Here is the call graph for this function:

◆ TEST_F() [23/42]

TEST_F ( FPDFTextEmbedderTest ,
IsGenerated  )

Definition at line 1055 of file fpdf_text_embeddertest.cpp.

References FPDFText_IsGenerated().

Here is the call graph for this function:

◆ TEST_F() [24/42]

TEST_F ( FPDFTextEmbedderTest ,
IsHyphen  )

Definition at line 1082 of file fpdf_text_embeddertest.cpp.

References FPDFText_IsHyphen().

Here is the call graph for this function:

◆ TEST_F() [25/42]

TEST_F ( FPDFTextEmbedderTest ,
IsInvalidUnicode  )

Definition at line 1109 of file fpdf_text_embeddertest.cpp.

References FPDFText_HasUnicodeMapError().

Here is the call graph for this function:

◆ TEST_F() [26/42]

Definition at line 601 of file fpdf_text_embeddertest.cpp.

References FPDFText_ClosePage(), and FPDFText_LoadPage().

Here is the call graph for this function:

◆ TEST_F() [27/42]

TEST_F ( FPDFTextEmbedderTest ,
SmallType3Glyph  )

Definition at line 1771 of file fpdf_text_embeddertest.cpp.

◆ TEST_F() [28/42]

TEST_F ( FPDFTextEmbedderTest ,
StreamLengthPastEndOfFile  )

Definition at line 635 of file fpdf_text_embeddertest.cpp.

References FPDFText_ClosePage(), FPDFText_CountChars(), and FPDFText_LoadPage().

Here is the call graph for this function:

◆ TEST_F() [29/42]

TEST_F ( FPDFTextEmbedderTest ,
Text  )

Definition at line 50 of file fpdf_text_embeddertest.cpp.

References FPDFText_ClosePage(), FPDFText_CountChars(), FPDFText_CountRects(), FPDFText_GetBoundedText(), FPDFText_GetCharBox(), FPDFText_GetCharIndexAtPos(), FPDFText_GetCharOrigin(), FPDFText_GetFontSize(), FPDFText_GetLooseCharBox(), FPDFText_GetRect(), FPDFText_GetText(), and FPDFText_LoadPage().

Here is the call graph for this function:

◆ TEST_F() [30/42]

TEST_F ( FPDFTextEmbedderTest ,
TextHebrewMirrored  )

Definition at line 275 of file fpdf_text_embeddertest.cpp.

◆ TEST_F() [31/42]

TEST_F ( FPDFTextEmbedderTest ,
TextSearch  )

Definition at line 302 of file fpdf_text_embeddertest.cpp.

References FPDFText_ClosePage(), and FPDFText_LoadPage().

Here is the call graph for this function:

◆ TEST_F() [32/42]

TEST_F ( FPDFTextEmbedderTest ,
TextSearchConsecutive  )

Definition at line 418 of file fpdf_text_embeddertest.cpp.

References FPDFText_ClosePage(), and FPDFText_LoadPage().

Here is the call graph for this function:

◆ TEST_F() [33/42]

TEST_F ( FPDFTextEmbedderTest ,
TextSearchLeadingSpace  )

Definition at line 526 of file fpdf_text_embeddertest.cpp.

◆ TEST_F() [34/42]

TEST_F ( FPDFTextEmbedderTest ,
TextSearchSpaceInSearchTerm  )

Definition at line 570 of file fpdf_text_embeddertest.cpp.

◆ TEST_F() [35/42]

TEST_F ( FPDFTextEmbedderTest ,
TextSearchTermAtEnd  )

Definition at line 502 of file fpdf_text_embeddertest.cpp.

◆ TEST_F() [36/42]

TEST_F ( FPDFTextEmbedderTest ,
TextSearchTrailingSpace  )

Definition at line 548 of file fpdf_text_embeddertest.cpp.

◆ TEST_F() [37/42]

TEST_F ( FPDFTextEmbedderTest ,
TextVertical  )

Definition at line 238 of file fpdf_text_embeddertest.cpp.

References FPDFText_ClosePage(), FPDFText_GetCharOrigin(), FPDFText_GetFontSize(), FPDFText_GetLooseCharBox(), and FPDFText_LoadPage().

Here is the call graph for this function:

◆ TEST_F() [38/42]

TEST_F ( FPDFTextEmbedderTest ,
ToUnicode  )

Definition at line 1040 of file fpdf_text_embeddertest.cpp.

References FPDFText_ClosePage(), FPDFText_CountChars(), FPDFText_GetUnicode(), and FPDFText_LoadPage().

Here is the call graph for this function:

◆ TEST_F() [39/42]

TEST_F ( FPDFTextEmbedderTest ,
WebLinks  )

Definition at line 648 of file fpdf_text_embeddertest.cpp.

References FPDFLink_CloseWebLinks(), FPDFLink_CountRects(), FPDFLink_GetRect(), FPDFLink_GetURL(), FPDFLink_LoadWebLinks(), FPDFText_ClosePage(), and FPDFText_LoadPage().

Here is the call graph for this function:

◆ TEST_F() [40/42]

TEST_F ( FPDFTextEmbedderTest ,
WebLinksAcrossLines  )

Definition at line 759 of file fpdf_text_embeddertest.cpp.

References FPDFLink_CloseWebLinks(), FPDFLink_CountWebLinks(), FPDFLink_GetURL(), FPDFLink_LoadWebLinks(), FPDFText_ClosePage(), and FPDFText_LoadPage().

Here is the call graph for this function:

◆ TEST_F() [41/42]

TEST_F ( FPDFTextEmbedderTest ,
WebLinksAcrossLinesBug  )

Definition at line 798 of file fpdf_text_embeddertest.cpp.

References FPDFLink_CloseWebLinks(), FPDFLink_CountWebLinks(), FPDFLink_GetURL(), FPDFLink_LoadWebLinks(), FPDFText_ClosePage(), and FPDFText_LoadPage().

Here is the call graph for this function:

◆ TEST_F() [42/42]

TEST_F ( FPDFTextEmbedderTest ,
WebLinksCharRanges  )

Definition at line 824 of file fpdf_text_embeddertest.cpp.

References FPDFLink_CloseWebLinks(), FPDFLink_GetTextRange(), FPDFLink_LoadWebLinks(), FPDFText_ClosePage(), and FPDFText_LoadPage().

Here is the call graph for this function: