due to a small bug in poppler-qt4, we cannot trust the document render hints

so, store ourselves the flags

svn path=/trunk/KDE/kdegraphics/okular/; revision=757637
This commit is contained in:
Pino Toscano 2008-01-05 15:30:31 +00:00
parent c06deaf9fc
commit 7e35a9c0cf

View file

@ -1023,13 +1023,17 @@ bool PDFGenerator::setAAOptions()
{
bool changed = false;
#ifdef HAVE_POPPLER_0_6
Poppler::Document::RenderHints oldhints = pdfdoc->renderHints();
static Poppler::Document::RenderHints oldhints = 0;
#define SET_HINT(hintname, hintdefvalue, hintflag) \
{ \
bool newhint = documentMetaData(hintname, hintdefvalue).toBool(); \
if (newhint != (oldhints & hintflag)) \
{ \
pdfdoc->setRenderHint(hintflag); \
pdfdoc->setRenderHint(hintflag, newhint); \
if (newhint) \
oldhints |= hintflag; \
else \
oldhints &= ~(int)hintflag; \
changed = true; \
} \
}