From koffice-devel Fri May 31 16:11:51 2002 From: Harald Fernengel Date: Fri, 31 May 2002 16:11:51 +0000 To: koffice-devel Subject: lousy patch for KPresenter X-MARC-Message: https://marc.info/?l=koffice-devel&m=102294093305748 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary-00=_HD698D+Nfzy3ZTt" --Boundary-00=_HD698D+Nfzy3ZTt Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, sorry for this hectic mail but I have to make a presentation for a stupid=20 university course and I'm already running out of time... This patch fixes a 0x0 crash in sidebar.cc when you remove a page from your= =20 presentation. The sidebar is still messed up but it works for me ;) Better code follows when the course is over ;) Best regards, Harry --Boundary-00=_HD698D+Nfzy3ZTt Content-Type: text/x-diff; charset="iso-8859-15"; name="kpresenter.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kpresenter.patch" Index: sidebar.cc =================================================================== RCS file: /home/kde/koffice/kpresenter/sidebar.cc,v retrieving revision 1.33 diff -u -3 -p -r1.33 sidebar.cc --- sidebar.cc 2002/05/25 17:35:13 1.33 +++ sidebar.cc 2002/05/31 16:08:27 @@ -501,7 +501,10 @@ void Outline::removeItem( int pos ) updatePageNum = true; } if ( updatePageNum ) { - QString title = doc->pageList().at(page)->pageTitle( i18n( "Slide %1" ).arg( page + 1 ) ); + QString title; + KPrPage* pg = doc->pageList().at(page); + if ( pg ) + title = pg->pageTitle( i18n( "Slide %1" ).arg( page + 1 ) ); if (title.length() > 12) // restrict to a maximum of 12 characters it.current()->setText( 0, title.left(5) + "..." + title.right(4)); else --Boundary-00=_HD698D+Nfzy3ZTt-- _______________________________________________ koffice-devel mailing list koffice-devel@mail.kde.org http://mail.kde.org/mailman/listinfo/koffice-devel