summaryrefslogtreecommitdiffstats
path: root/filters/kword/pdf/diffs/xpdf_TextOutputDev.diff
blob: 693ecb556e8b38aa232a3cf26b4e7c560783c6d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
diff -u /home/azhyd/xpdf-2.00/xpdf/TextOutputDev.cpp xpdf/TextOutputDev.cpp
--- /home/azhyd/xpdf-2.00/xpdf/TextOutputDev.cpp	Thu Nov 14 04:41:00 2002
+++ xpdf/TextOutputDev.cpp	Sat Nov 23 21:01:14 2002
@@ -46,26 +46,6 @@
 // TextBlock
 //------------------------------------------------------------------------
 
-class TextBlock {
-public:
-
-  TextBlock();
-  ~TextBlock();
-
-  double xMin, xMax;
-  double yMin, yMax;
-  TextString *strings;		// list of strings in the block
-  TextBlock *next;		// next block in line
-  TextBlock *xyNext;		// next block on xyBlocks list
-  Unicode *text;		// Unicode text of the block, including
-				//   spaces between strings
-  double *xRight;		// right-hand x coord of each char
-  int len;			// total number of Unicode characters
-  int convertedLen;		// total number of converted characters
-  int *col;			// starting column number for each
-				//   Unicode character
-};
-
 TextBlock::TextBlock() {
   strings = NULL;
   next = NULL;
@@ -90,17 +70,6 @@
 //------------------------------------------------------------------------
 // TextLine
 //------------------------------------------------------------------------
-
-class TextLine {
-public:
-
-  TextLine();
-  ~TextLine();
-
-  TextBlock *blocks;
-  TextLine *next;
-  double yMin, yMax;
-};
 
 TextLine::TextLine() {
   blocks = NULL;
diff -u /home/azhyd/xpdf-2.00/xpdf/TextOutputDev.h xpdf/TextOutputDev.h
--- /home/azhyd/xpdf-2.00/xpdf/TextOutputDev.h	Sun Nov  3 23:15:37 2002
+++ xpdf/TextOutputDev.h	Sat Nov 23 20:59:43 2002
@@ -24,6 +24,7 @@
 class GString;
 class TextBlock;
 class TextLine;
+class FilterPage;
 
 #undef TEXTOUT_DO_SYMBOLS
 
@@ -45,7 +46,7 @@
 
 
   // Destructor.
-  ~TextString();
+  virtual ~TextString();
 
   // Add a character to the string.
   void addChar(GfxState *state, double x, double y,
@@ -67,6 +68,47 @@
 
   friend class TextPage;
   friend class TextBlock;
+  friend class FilterPage;
+};
+
+
+//------------------------------------------------------------------------
+// TextBlock
+//------------------------------------------------------------------------
+
+class TextBlock {
+public:
+
+  TextBlock();
+  ~TextBlock();
+
+  double xMin, xMax;
+  double yMin, yMax;
+  TextString *strings;		// list of strings in the block
+  TextBlock *next;		// next block in line
+  TextBlock *xyNext;		// next block on xyBlocks list
+  Unicode *text;		// Unicode text of the block, including
+				//   spaces between strings
+  double *xRight;		// right-hand x coord of each char
+  int len;			// total number of Unicode characters
+  int convertedLen;		// total number of converted characters
+  int *col;			// starting column number for each
+				//   Unicode character
+};
+
+//------------------------------------------------------------------------
+// TextLine
+//------------------------------------------------------------------------
+
+class TextLine {
+public:
+
+  TextLine();
+  ~TextLine();
+
+  TextBlock *blocks;
+  TextLine *next;
+  double yMin, yMax;
 };
 
 //------------------------------------------------------------------------
@@ -80,14 +122,14 @@
   TextPage(GBool rawOrderA);
 
   // Destructor.
-  ~TextPage();
+  virtual ~TextPage();
 
   // Update the current font.
   void updateFont(GfxState *state);
 
 
   // Begin a new string.
-  void beginString(GfxState *state, double x0, double y0);
+  virtual void beginString(GfxState *state, double x0, double y0);
 
   // Add a character to the current string.
   void addChar(GfxState *state, double x, double y,
@@ -144,6 +186,7 @@
 
   int nTinyChars;		// number of "tiny" chars seen so far
 
+  friend class FilterPage;
 };
 
 //------------------------------------------------------------------------