Summary: | Postscript pages list shows only one page | ||
---|---|---|---|
Product: | [Unmaintained] kghostview | Reporter: | peter |
Component: | general | Assignee: | Wilco Greven <greven> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | lomov |
Priority: | NOR | ||
Version: | 0.13.1 | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
peter
2002-07-08 00:10:24 UTC
*** This bug has been marked as a duplicate of 45450 *** I don't know if this really is a duplicate of http://bugs.kde.org/show_bug.cgi?id=45450 . Here the problem is that kghostview thinks that there is only one page and only one page is shown in the "page selection" list on the left. Both 45450 and 47225 (another duplicate) speak of "the left selection list" being correct. However, without a test case it is difficult to be sure whether the problems are related. The following patch fixes the problem for the given file. It is a patch against CVS HEAD ( 18 Fev 2003 ). The issue is in KDE's DSC error handling function which changes the default error handling strategy. I also added two explaining comments. Can anyone review this? HTH, Luis Pedro Coelho PATCH: Index: kdscerrordialog.cpp =================================================================== RCS file: /cvs/kde/kdegraphics/kghostview/kdscerrordialog.cpp,v retrieving revision 1.6 diff -u -3 -p -r1.6 kdscerrordialog.cpp --- kdscerrordialog.cpp 9 Jan 2003 12:56:03 -0000 1.6 +++ kdscerrordialog.cpp 18 Feb 2003 13:12:45 -0000 @@ -39,7 +39,9 @@ KDSCErrorHandler::Response KDSCErrorThre if( _errorHandler != 0 && err.severity() >= _threshold ) return _errorHandler->error( err ); else - return Ok; + return Cancel; + // Cancel is the default handling strategy for dsc_error_fn, so we keep it. + // This cancels error handling and *not* document parsing! } KDSCErrorDialog::KDSCErrorDialog( QWidget* parent ) : Index: kgvdocument.cpp =================================================================== RCS file: /cvs/kde/kdegraphics/kghostview/kgvdocument.cpp,v retrieving revision 1.2 diff -u -3 -p -r1.2 kgvdocument.cpp --- kgvdocument.cpp 7 Feb 2003 00:29:16 -0000 1.2 +++ kgvdocument.cpp 18 Feb 2003 13:12:45 -0000 @@ -277,7 +277,9 @@ void KGVDocument::scanDSC() _dsc = new KDSC(); KDSCErrorDialog errorDialog; - KDSCErrorThreshold errorHandler( 3, &errorDialog ); + KDSCErrorThreshold errorHandler( KDSCError::Error + 1 , &errorDialog ); + // Disable errorDialog for now while KDSCErrorDialog isn't fully + // implemented _dsc->setErrorHandler( &errorHandler ); char buf[4096]; Reopening because this bug is more descriptive than the bug this one is marked is a duplicate. *** Bug 45450 has been marked as a duplicate of this bug. *** Subject: Re: Postscript pages list shows only one page Hello, On Tuesday 18 February 2003 14:14, you wrote: > Here the problem is that kghostview thinks that there is only one page and > only one page is shown in the "page selection" list on the left. Both 45450 > and 47225 (another duplicate) speak of "the left selection list" being > correct. However, without a test case it is difficult to be sure whether > the problems are related. > > The following patch fixes the problem for the given file. It is a patch > against CVS HEAD ( 18 Fev 2003 ). > > The issue is in KDE's DSC error handling function which changes the default > error handling strategy. I also added two explaining comments. Can anyone > review this? Thanks, I'll apply the patch. The reason I originally choose to return Ok by default is tha GSView handles it that way. I'll completely disable the use of the errorhandler for now and use the parsers default error handling. Greetings, Wilco *** Bug has been marked as fixed ***. |