[poppler] poppler/qt: poppler-page.cc,1.16,1.17
Albert Astals Cid
aacid at kemper.freedesktop.org
Wed Aug 16 07:35:16 PDT 2006
Update of /cvs/poppler/poppler/qt
In directory kemper:/tmp/cvs-serv16899/qt
Modified Files:
poppler-page.cc
Log Message:
* qt/poppler-page.cc: Report correct page size. Backport from Qt4
frontend. Patch by Wilfried Huss
Index: poppler-page.cc
===================================================================
RCS file: /cvs/poppler/poppler/qt/poppler-page.cc,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- poppler-page.cc 25 Jun 2006 10:29:22 -0000 1.16
+++ poppler-page.cc 16 Aug 2006 14:35:14 -0000 1.17
@@ -186,8 +186,14 @@
QSize Page::pageSize() const
{
- ::Page *p = data->doc->data->doc.getCatalog()->getPage(data->index + 1);
- return QSize( (int)p->getMediaWidth(), (int)p->getMediaHeight() );
+ ::Page *p;
+
+ p = data->doc->data->doc.getCatalog()->getPage(data->index + 1);
+ if ( ( Page::Landscape == orientation() ) || (Page::Seascape == orientation() ) ) {
+ return QSize( (int)p->getCropHeight(), (int)p->getCropWidth() );
+ } else {
+ return QSize( (int)p->getCropWidth(), (int)p->getCropHeight() );
+ }
}
Page::Orientation Page::orientation() const
More information about the poppler
mailing list