diff -Naur sd/inc/drawdoc.hxx sd_new/inc/drawdoc.hxx --- sd/inc/drawdoc.hxx 2009-09-16 22:55:36.305490000 +0800 +++ sd_new/inc/drawdoc.hxx 2010-02-04 15:11:33.560401000 +0800 @@ -371,7 +371,8 @@ const sd::PresentationSettings& getPresentationSettings() const { return maPresentationSettings; } sd::PresentationSettings& getPresentationSettings() { return maPresentationSettings; } - + BOOL IsCustomShow(){ return maPresentationSettings.mbCustomShow;}//add by yujinliang + BOOL IsCanStartCustomShow();//add by yujinliang const ::com::sun::star::uno::Reference< ::com::sun::star::presentation::XPresentation2 >& getPresentation() const; void SetSummationOfParagraphs( BOOL bOn = TRUE ) { mbSummationOfParagraphs = bOn; } diff -Naur sd/source/core/drawdoc.cxx sd_new/source/core/drawdoc.cxx --- sd/source/core/drawdoc.cxx 2009-09-17 20:26:03.415253000 +0800 +++ sd_new/source/core/drawdoc.cxx 2010-02-04 16:44:45.809819000 +0800 @@ -382,7 +382,38 @@ } +//add by yujinliang +BOOL SdDrawDocument::IsCanStartCustomShow() +{ + if( !IsCustomShow() ) return FALSE; + SdCustomShow* pCustomShow = NULL; + List* pCustomShowList = GetCustomShowList(); + + if ( pCustomShowList ) + { + pCustomShow = (SdCustomShow*)pCustomShowList->GetCurObject(); + void* pCustomSlide = NULL; + if( pCustomShow ) + { + for( pCustomSlide = pCustomShow->First(); pCustomSlide; pCustomSlide = pCustomShow->Next()) + { + if( ((SdPage*)pCustomSlide)->IsExcluded() ) return FALSE; + } + } + else + { + return FALSE; + } + + } + else + { + return FALSE; + } + return TRUE; + +} /************************************************************************* |* |* Destruktor diff -Naur sd/source/ui/slidesorter/controller/SlsSlotManager.cxx sd_new/source/ui/slidesorter/controller/SlsSlotManager.cxx --- sd/source/ui/slidesorter/controller/SlsSlotManager.cxx 2009-09-18 19:15:03.661735000 +0800 +++ sd_new/source/ui/slidesorter/controller/SlsSlotManager.cxx 2010-02-04 15:34:16.325604000 +0800 @@ -645,6 +645,9 @@ if( !pPage->IsExcluded() ) bDisable = FALSE; } + //add by yujinliang + SdDrawDocument* pSdDoc = mrSlideSorter.GetModel().GetDocument(); + if( pSdDoc && pSdDoc->IsCustomShow() && !pSdDoc->IsCanStartCustomShow() ) bDisable = TRUE; if( bDisable || pDocShell->IsPreview()) { rSet.DisableItem( SID_PRESENTATION ); diff -Naur sd/source/ui/view/drviews7.cxx sd_new/source/ui/view/drviews7.cxx --- sd/source/ui/view/drviews7.cxx 2009-09-18 19:15:03.661735000 +0800 +++ sd_new/source/ui/view/drviews7.cxx 2010-02-04 15:47:58.715899000 +0800 @@ -371,7 +371,8 @@ if( !pPage->IsExcluded() ) bDisable = FALSE; } - + //add by yujinliang + if( GetDoc()->IsCustomShow() && !GetDoc()->IsCanStartCustomShow() ) bDisable = TRUE; if( bDisable || GetDocSh()->IsPreview()) { rSet.DisableItem( SID_PRESENTATION ); diff -Naur sd/source/ui/view/outlnvsh.cxx sd_new/source/ui/view/outlnvsh.cxx --- sd/source/ui/view/outlnvsh.cxx 2009-09-18 19:15:03.661735000 +0800 +++ sd_new/source/ui/view/outlnvsh.cxx 2010-02-04 15:52:56.019899000 +0800 @@ -1120,6 +1120,8 @@ if( !pPage->IsExcluded() ) bDisable = FALSE; } + //add by yujinliang + if( GetDoc()->IsCustomShow() && !GetDoc()->IsCanStartCustomShow() ) bDisable = TRUE; if( bDisable || GetDocSh()->IsPreview()) { rSet.DisableItem( SID_PRESENTATION );