From d8897e96db8b9c75a30d48c33b41fddf105b8df1 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 24 Jun 2005 08:11:00 +0000 Subject: Enable rotation, require poppler cvs. Fix a leak. 2005-06-24 Marco Pesenti Gritti * pdf/ev-poppler.cc: Enable rotation, require poppler cvs. Fix a leak. --- (limited to 'pdf') diff --git a/pdf/ev-poppler.cc b/pdf/ev-poppler.cc index 8916ae1..e5444f6 100644 --- a/pdf/ev-poppler.cc +++ b/pdf/ev-poppler.cc @@ -179,20 +179,19 @@ pdf_document_save (EvDocument *document, static PopplerOrientation get_document_orientation (PdfDocument *pdf_document) { -#ifdef POPPLER_ORIENTATION + PopplerOrientation orientation; PopplerPage *page; /* Should prolly be smarter here and check more than first page */ page = poppler_document_get_page (pdf_document->document, 0); if (page) { - return poppler_page_get_orientation (page); + orientation = poppler_page_get_orientation (page); } else { - return POPPLER_ORIENTATION_PORTRAIT; + orientation = POPPLER_ORIENTATION_PORTRAIT; } g_object_unref (page); -#else - return POPPLER_ORIENTATION_PORTRAIT; -#endif + + return orientation; } static gboolean -- cgit v0.9.1