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

(9c1f44f67466fea2fb20bb6f31fea388d8c65961)

#include <algorithm>
#include <utility>
#include <vector>
#include "build/build_config.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/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, Bug_921)
 
 TEST_F (FPDFTextEmbedderTest, GetTextWithHyphen)
 
 TEST_F (FPDFTextEmbedderTest, bug_782596)
 
 TEST_F (FPDFTextEmbedderTest, ControlCharacters)
 
 TEST_F (FPDFTextEmbedderTest, bug_1029)
 
 TEST_F (FPDFTextEmbedderTest, CountRects)
 
 TEST_F (FPDFTextEmbedderTest, GetText)
 
 TEST_F (FPDFTextEmbedderTest, CroppedText)
 
 TEST_F (FPDFTextEmbedderTest, Bug_1139)
 
 TEST_F (FPDFTextEmbedderTest, Bug_642)
 
 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 608 of file fpdf_text_embeddertest.cpp.

Function Documentation

◆ TEST_F() [1/42]

TEST_F ( FPDFTextEmbedderTest ,
AnnotLinks  )

Definition at line 881 of file fpdf_text_embeddertest.cpp.

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

+ Here is the call graph for this function:

◆ TEST_F() [2/42]

TEST_F ( FPDFTextEmbedderTest ,
BigtableTextExtraction  )

Definition at line 1861 of file fpdf_text_embeddertest.cpp.

◆ TEST_F() [3/42]

TEST_F ( FPDFTextEmbedderTest ,
Bug1769  )

Definition at line 1886 of file fpdf_text_embeddertest.cpp.

◆ TEST_F() [4/42]

TEST_F ( FPDFTextEmbedderTest ,
bug_1029  )

Definition at line 1279 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() [5/42]

TEST_F ( FPDFTextEmbedderTest ,
Bug_1139  )

Definition at line 1492 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() [6/42]

TEST_F ( FPDFTextEmbedderTest ,
Bug_642  )

Definition at line 1515 of file fpdf_text_embeddertest.cpp.

◆ TEST_F() [7/42]

TEST_F ( FPDFTextEmbedderTest ,
bug_782596  )

Definition at line 1233 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 ,
Bug_921  )

Definition at line 1156 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 1756 of file fpdf_text_embeddertest.cpp.

◆ TEST_F() [10/42]

TEST_F ( FPDFTextEmbedderTest ,
ControlCharacters  )

Definition at line 1244 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 1319 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 1435 of file fpdf_text_embeddertest.cpp.

References FPDF_GetPageBoundingBox().

+ Here is the call graph for this function:

◆ TEST_F() [13/42]

TEST_F ( FPDFTextEmbedderTest ,
GetCharAngle  )

Definition at line 1539 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 1630 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 967 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 946 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 1577 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 1696 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 1663 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 1391 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 1604 of file fpdf_text_embeddertest.cpp.

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

+ Here is the call graph for this function:

◆ TEST_F() [22/42]

TEST_F ( FPDFTextEmbedderTest ,
GetTextWithHyphen  )

Definition at line 1186 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 1064 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 1095 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 1126 of file fpdf_text_embeddertest.cpp.

References FPDFText_HasUnicodeMapError().

+ Here is the call graph for this function:

◆ TEST_F() [26/42]

Definition at line 610 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 1805 of file fpdf_text_embeddertest.cpp.

◆ TEST_F() [28/42]

TEST_F ( FPDFTextEmbedderTest ,
StreamLengthPastEndOfFile  )

Definition at line 644 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 42 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 264 of file fpdf_text_embeddertest.cpp.

◆ TEST_F() [31/42]

TEST_F ( FPDFTextEmbedderTest ,
TextSearch  )

Definition at line 295 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 411 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 523 of file fpdf_text_embeddertest.cpp.

◆ TEST_F() [34/42]

TEST_F ( FPDFTextEmbedderTest ,
TextSearchSpaceInSearchTerm  )

Definition at line 575 of file fpdf_text_embeddertest.cpp.

◆ TEST_F() [35/42]

TEST_F ( FPDFTextEmbedderTest ,
TextSearchTermAtEnd  )

Definition at line 495 of file fpdf_text_embeddertest.cpp.

◆ TEST_F() [36/42]

TEST_F ( FPDFTextEmbedderTest ,
TextSearchTrailingSpace  )

Definition at line 549 of file fpdf_text_embeddertest.cpp.

◆ TEST_F() [37/42]

TEST_F ( FPDFTextEmbedderTest ,
TextVertical  )

Definition at line 227 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 1049 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 657 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 767 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 807 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 833 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: