summaryrefslogtreecommitdiff
path: root/noncore/unsupported/qpdf
Unidiff
Diffstat (limited to 'noncore/unsupported/qpdf') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/qpdf/QOutputDev.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/noncore/unsupported/qpdf/QOutputDev.cpp b/noncore/unsupported/qpdf/QOutputDev.cpp
index 15a58b1..f587a33 100644
--- a/noncore/unsupported/qpdf/QOutputDev.cpp
+++ b/noncore/unsupported/qpdf/QOutputDev.cpp
@@ -160,50 +160,48 @@ QFont QOutputDev::matchFont ( GfxFont *gfxFont, fp_t m11, fp_t m12, fp_t m21, fp
160 f. setWeight ( QFont::DemiBold ); 160 f. setWeight ( QFont::DemiBold );
161 if ( fname. contains ( "Light" )) 161 if ( fname. contains ( "Light" ))
162 f. setWeight ( QFont::Light ); 162 f. setWeight ( QFont::Light );
163 if ( fname. contains ( "Black" )) 163 if ( fname. contains ( "Black" ))
164 f. setWeight ( QFont::Black ); 164 f. setWeight ( QFont::Black );
165 } 165 }
166 // Treat x-sheared fonts as italic 166 // Treat x-sheared fonts as italic
167 if (( m12 > -0.1 ) && ( m12 < 0.1 ) && ((( m21 > -5.0 ) && ( m21 < -0.1 )) || (( m21 > 0.1 ) && ( m21 < 5.0 )))) { 167 if (( m12 > -0.1 ) && ( m12 < 0.1 ) && ((( m21 > -5.0 ) && ( m21 < -0.1 )) || (( m21 > 0.1 ) && ( m21 < 5.0 )))) {
168 f. setItalic ( true ); 168 f. setItalic ( true );
169 } 169 }
170 return f; 170 return f;
171} 171}
172 172
173 173
174 174
175//------------------------------------------------------------------------ 175//------------------------------------------------------------------------
176// QOutputDev 176// QOutputDev
177//------------------------------------------------------------------------ 177//------------------------------------------------------------------------
178 178
179QOutputDev::QOutputDev ( QWidget *parent, const char *name, int flags ) : QScrollView ( parent, name, WRepaintNoErase | WResizeNoErase | flags ) 179QOutputDev::QOutputDev ( QWidget *parent, const char *name, int flags ) : QScrollView ( parent, name, WRepaintNoErase | WResizeNoErase | flags )
180{ 180{
181 m_pixmap = 0; 181 m_pixmap = 0;
182 m_painter = 0; 182 m_painter = 0;
183 183
184 m_use_string = true;
185
186 // create text object 184 // create text object
187 m_text = new TextPage ( gFalse ); 185 m_text = new TextPage ( gFalse );
188} 186}
189 187
190QOutputDev::~QOutputDev ( ) 188QOutputDev::~QOutputDev ( )
191{ 189{
192 delete m_painter; 190 delete m_painter;
193 delete m_pixmap; 191 delete m_pixmap;
194 delete m_text; 192 delete m_text;
195} 193}
196 194
197 195
198void QOutputDev::startPage ( int /*pageNum*/, GfxState *state ) 196void QOutputDev::startPage ( int /*pageNum*/, GfxState *state )
199{ 197{
200 delete m_pixmap; 198 delete m_pixmap;
201 delete m_painter; 199 delete m_painter;
202 200
203 m_pixmap = new QPixmap ( lrint ( state-> getPageWidth ( )), lrint ( state-> getPageHeight ( ))); 201 m_pixmap = new QPixmap ( lrint ( state-> getPageWidth ( )), lrint ( state-> getPageHeight ( )));
204 m_painter = new QPainter ( m_pixmap ); 202 m_painter = new QPainter ( m_pixmap );
205 203
206 QPDFDBG( printf ( "NEW PIXMAP (%ld x %ld)\n", lrint ( state-> getPageWidth ( )), lrint ( state-> getPageHeight ( )))); 204 QPDFDBG( printf ( "NEW PIXMAP (%ld x %ld)\n", lrint ( state-> getPageWidth ( )), lrint ( state-> getPageHeight ( ))));
207 205
208 resizeContents ( m_pixmap-> width ( ), m_pixmap-> height ( )); 206 resizeContents ( m_pixmap-> width ( ), m_pixmap-> height ( ));
209 setContentsPos ( 0, 0 ); 207 setContentsPos ( 0, 0 );