summaryrefslogtreecommitdiff
path: root/Build/source/libs/xpdf/xpdf-src/xpdf/TextOutputDev.h
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/xpdf/xpdf-src/xpdf/TextOutputDev.h')
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/TextOutputDev.h35
1 files changed, 28 insertions, 7 deletions
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/TextOutputDev.h b/Build/source/libs/xpdf/xpdf-src/xpdf/TextOutputDev.h
index 302975cd5f1..fc7bcb616dd 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/TextOutputDev.h
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/TextOutputDev.h
@@ -11,10 +11,6 @@
#include <aconf.h>
-#ifdef USE_GCC_PRAGMAS
-#pragma interface
-#endif
-
#include <stdio.h>
#include "gtypes.h"
#include "GfxFont.h"
@@ -122,6 +118,9 @@ public:
// Get the width of the 'm' character, if available.
double getMWidth() { return mWidth; }
+ double getAscent() { return ascent; }
+ double getDescent() { return descent; }
+
Ref getFontID() { return fontID; }
private:
@@ -474,10 +473,18 @@ public:
TextWordList *makeWordListForRect(double xMin, double yMin,
double xMax, double yMax);
+ // Get the primary rotation of text on the page.
+ int getPrimaryRotation() { return primaryRot; }
+
// Returns true if the primary character direction is left-to-right,
// false if it is right-to-left.
GBool primaryDirectionIsLR();
+ // Get the counter values.
+ int getNumVisibleChars() { return nVisibleChars; }
+ int getNumInvisibleChars() { return nInvisibleChars; }
+ int getNumRemovedDupChars() { return nRemovedDupChars; }
+
// Returns true if any of the fonts used on this page are likely to
// be problematic when converting text to Unicode.
GBool problematicForUnicode() { return problematic; }
@@ -557,7 +564,7 @@ private:
GList *separateOverlappingText(GList *charsA);
TextColumn *buildOverlappingTextColumn(GList *overlappingChars);
TextBlock *splitChars(GList *charsA);
- TextBlock *split(GList *charsA, int rot, GBool vertOnly);
+ TextBlock *split(GList *charsA, int rot);
GList *getChars(GList *charsA, double xMin, double yMin,
double xMax, double yMax);
void findGaps(GList *charsA, int rot,
@@ -571,7 +578,9 @@ private:
void insertLargeChars(GList *largeChars, TextBlock *blk);
void insertLargeCharsInFirstLeaf(GList *largeChars, TextBlock *blk);
void insertLargeCharInLeaf(TextChar *ch, TextBlock *blk);
- void insertIntoTree(TextBlock *subtree, TextBlock *primaryTree);
+ void insertIntoTree(TextBlock *subtree, TextBlock *primaryTree,
+ GBool doReorder);
+ void reorderBlocks(TextBlock *blk);
void insertColumnIntoTree(TextBlock *column, TextBlock *tree);
void insertClippedChars(GList *clippedChars, TextBlock *tree);
TextBlock *findClippedCharLeaf(TextChar *ch, TextBlock *tree);
@@ -589,6 +598,7 @@ private:
double xMin, double yMin, double xMax, double yMax);
void getLineChars(TextBlock *blk, GList *charsA);
double computeWordSpacingThreshold(GList *charsA, int rot);
+ void adjustCombiningChars(GList *charsA, int rot);
int getCharDirection(TextChar *ch);
int getCharDirection(TextChar *ch, TextChar *left, TextChar *right);
int assignPhysLayoutPositions(GList *columns);
@@ -640,10 +650,15 @@ private:
GList *chars; // [TextChar]
GList *fonts; // all font info objects used on this
// page [TextFontInfo]
+ int primaryRot; // primary rotation
GList *underlines; // [TextUnderline]
GList *links; // [TextLink]
+ int nVisibleChars; // number of visible chars on the page
+ int nInvisibleChars; // number of invisible chars on the page
+ int nRemovedDupChars; // number of duplicate chars removed
+
GList *findCols; // text used by the findText**/findPoint**
// functions [TextColumn]
double lastFindXMin, // coordinates of the last "find" result
@@ -725,7 +740,8 @@ public:
virtual void drawChar(GfxState *state, double x, double y,
double dx, double dy,
double originX, double originY,
- CharCode c, int nBytes, Unicode *u, int uLen);
+ CharCode c, int nBytes, Unicode *u, int uLen,
+ GBool fill, GBool stroke, GBool makePath);
virtual void incCharCount(int nChars);
virtual void beginActualText(GfxState *state, Unicode *u, int uLen);
virtual void endActualText(GfxState *state);
@@ -784,6 +800,11 @@ public:
// Turn extra processing for HTML conversion on or off.
void enableHTMLExtras(GBool html) { control.html = html; }
+ // Get the counter values.
+ int getNumVisibleChars() { return text->nVisibleChars; }
+ int getNumInvisibleChars() { return text->nInvisibleChars; }
+ int getNumRemovedDupChars() { return text->nRemovedDupChars; }
+
private:
void generateBOM();