Issue 108926 - can add a page which has been hidden to Custom Show List, if Play it then program crash
Summary: can add a page which has been hidden to Custom Show List, if Play it then pro...
Status: CONFIRMED
Alias: None
Product: Impress
Classification: Application
Component: code (show other issues)
Version: OOO320m9
Hardware: All All
: P2 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-04 03:21 UTC by yujinliang
Modified: 2017-05-20 11:08 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
a patch file for fix bug (906 bytes, text/plain)
2010-02-04 03:24 UTC, yujinliang
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description yujinliang 2010-02-04 03:21:08 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.
Comment 1 yujinliang 2010-02-04 03:24:01 UTC
Created attachment 67592 [details]
a patch file for fix bug
Comment 2 yujinliang 2010-02-04 03:25:12 UTC
create patch file based on http://svn.services.openoffice.org/ooo/trunk
version:277955
Comment 3 yujinliang 2010-02-04 03:28:50 UTC
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"
Comment 4 yujinliang 2010-02-04 12:28:39 UTC
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 );
Comment 5 yujinliang 2010-04-29 07:58:01 UTC
please ooo sd project check it 
Comment 6 wolframgarten 2010-04-29 08:09:48 UTC
Please assign common issues to 'graphicsneedsconfirm'. Thanks.
Reproducible. Reassigned. 
Comment 7 yujinliang 2010-04-30 08:37:11 UTC
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。
Comment 8 Marcus 2017-05-20 11:08:27 UTC
Reset assigne to the default "issues@openoffice.apache.org".