Apache OpenOffice (AOO) Bugzilla – Issue 108926
can add a page which has been hidden to Custom Show List, if Play it then program crash
Last modified: 2017-05-20 11:08:27 UTC
[Steps] 1. Create a new impress document, in which create some pages. 2. In the thumbnail selected in which one or more pages, right-click menu - hidden slides. 3. Select Menu: Presentation - Custom Show, in the pop-up "Custom Show dialog", click the "New button", pop-up "Define Custom Show dialog". 4. Select the page has been hidden and found that you can click "Double Arrow button" added to the "custom show list", which is obviously wrong. [result] if you play the "custom show list" then the program to crash.
Created attachment 67592 [details] a patch file for fix bug
create patch file based on http://svn.services.openoffice.org/ooo/trunk version:277955
diff -Naur sd/source/ui/dlg/custsdlg.cxx sd/source/ui/dlg/custsdlg.cxx.new > yujinliang_fixbug3.patch why crash , because of play a hidden pages, it is obviously wrong! so ,if the page has been hidden , then disable add to "Custom Show list"
I have fixed it my code: --- sd/source/ui/dlg/custsdlg.cxx 2010-02-04 10:47:13.576798163 +0800 +++ sd/source/ui/dlg/custsdlg.cxx.new 2010-02-04 10:40:27.903900089 +0800 @@ -402,6 +402,34 @@ //BOOL bCSPages = aLbCustomPages.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND; BOOL bCSPages = aLbCustomPages.FirstSelected() != NULL; BOOL bCount = aLbCustomPages.GetEntryCount() > 0; + //check Sdpage Exclude attribute, + USHORT nCount = aLbPages.GetSelectEntryCount(); + if( bPages && nCount > 0 ) + { + + + for( USHORT i = 0; i < nCount; i++ ) + { + + SdPage* pPage = rDoc.GetSdPage( (USHORT) aLbPages. + GetSelectEntryPos( i ), PK_STANDARD ); + if( bPages && pPage ) + { + if ( pPage->IsExcluded() ) + { + bPages = FALSE;//disable add button while SdPage::IsExcluded() is TRUE; + } + } + else + { + bPages = FALSE; + } + + + } + + } + aBtnOK.Enable( bCount ); aBtnAdd.Enable( bPages );
please ooo sd project check it
Please assign common issues to 'graphicsneedsconfirm'. Thanks. Reproducible. Reassigned.
I think ,if there are some ExCluded Pages , then should disable Add Button ,that is ,assign FALSE to bPages and break the loop! so if bPages is FALSE then should break the loop! This will improve efficiency。
Reset assigne to the default "issues@openoffice.apache.org".