From 2c82e5d304b56c1dd95d0f3dcafc9a36ce02b5f4 Mon Sep 17 00:00:00 2001 From: Cao Cuong Ngo Date: Tue, 2 Apr 2013 18:37:00 +0200 Subject: fdo#59071 Slideshow: allow automatic transitions with sub-second Enable slide transition each 0.25 second instead of whole second. Change-Id: I1907a1baf30cede91a0438d021e003204ea06651 --- sd/inc/sdpage.hxx | 6 +++--- sd/source/core/sdpage.cxx | 2 +- sd/source/core/sdpage2.cxx | 2 +- sd/source/filter/html/htmlex.cxx | 14 +++++++------- sd/source/filter/html/htmlex.hxx | 2 +- sd/source/filter/ppt/pptin.cxx | 2 +- sd/source/ui/animations/SlideTransitionPane.cxx | 14 +++++++------- sd/source/ui/animations/SlideTransitionPane.src | 10 +++++----- sd/source/ui/dlg/dlgass.cxx | 4 ++-- sd/source/ui/unoidl/unopage.cxx | 19 ++++++++++++++++--- 10 files changed, 44 insertions(+), 31 deletions(-) (limited to 'sd') diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx index 18b58a315a1c..0b5d631b24a5 100644 --- a/sd/inc/sdpage.hxx +++ b/sd/inc/sdpage.hxx @@ -115,7 +115,7 @@ protected: sd::ScopeLock maLockAutoLayoutArrangement; sal_Bool mbSelected; ///< selection identifier PresChange mePresChange; ///< manual / automatic / semi automatic - sal_uInt32 mnTime; ///< Display time in seconds + double mfTime; ///< Display time in seconds sal_Bool mbSoundOn; ///< with / without sound. sal_Bool mbExcluded; ///< will (not) be displayed during show. OUString maLayoutName; ///< Name of the layout @@ -223,8 +223,8 @@ public: void SetPresChange(PresChange eChange) { mePresChange = eChange; } PresChange GetPresChange() const { return mePresChange; } - void SetTime(sal_uInt32 nNewTime) { mnTime = nNewTime; } - sal_uInt32 GetTime() const { return mnTime; } + void SetTime(double fNewTime) { mfTime = fNewTime; } + double GetTime() const { return mfTime; } void SetSound(sal_Bool bNewSoundOn) { mbSoundOn = bNewSoundOn; } sal_Bool IsSoundOn() const { return mbSoundOn; } diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 499af5031cb1..9057a4f68c73 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -88,7 +88,7 @@ SdPage::SdPage(SdDrawDocument& rNewDoc, StarBASIC* pBasic, sal_Bool bMasterPage) , meAutoLayout(AUTOLAYOUT_NONE) , mbSelected(sal_False) , mePresChange(PRESCHANGE_MANUAL) -, mnTime(1) +, mfTime(1.0) , mbSoundOn(sal_False) , mbExcluded(sal_False) , mbLoopSound(sal_False) diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx index c446f05876e1..7007bf5fae69 100644 --- a/sd/source/core/sdpage2.cxx +++ b/sd/source/core/sdpage2.cxx @@ -390,7 +390,7 @@ SdPage::SdPage(const SdPage& rSrcPage) mnTransitionFadeColor = rSrcPage.mnTransitionFadeColor; mfTransitionDuration = rSrcPage.mfTransitionDuration; mePresChange = rSrcPage.mePresChange; - mnTime = rSrcPage.mnTime; + mfTime = rSrcPage.mfTime; mbSoundOn = rSrcPage.mbSoundOn; mbExcluded = rSrcPage.mbExcluded; diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index 706b199745bb..5cc1a4f1baf3 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -584,9 +584,9 @@ void HtmlExport::InitExportParameters( const Sequence< PropertyValue >& rParams } else if ( pParams->Name == "KioskSlideDuration" ) { - sal_Int32 temp = sal_False; + double temp = 0.0; pParams->Value >>= temp; - mnSlideDuration = temp; + mfSlideDuration = temp; mbAutoSlide = true; } else if ( pParams->Name == "KioskEndless" ) @@ -1521,28 +1521,28 @@ bool HtmlExport::CreateHtmlForPresPages() pPage = maPages[ nSdPage ]; if( meMode == PUBLISH_KIOSK ) { - sal_uLong nSecs = 0; + double fSecs = 0; bool bEndless = false; if( !mbAutoSlide ) { if( pPage->GetPresChange() != PRESCHANGE_MANUAL ) { - nSecs = pPage->GetTime(); + fSecs = pPage->GetTime(); bEndless = mpDoc->getPresentationSettings().mbEndless; } } else { - nSecs = mnSlideDuration; + fSecs = mfSlideDuration; bEndless = mbEndless; } - if( nSecs != 0 ) + if( fSecs != 0 ) { if( nSdPage < (mnSdPageCount-1) || bEndless ) { aStr.AppendAscii( "GetSdPageCount(PK_STANDARD); sal_Bool bKiosk = mpPage3PresTypeKioskRB->IsChecked(); - sal_uInt32 nNewTime = (sal_uInt32)mpPage3PresTimeTMF->GetTime().GetMSFromTime() / 1000; + double fNewTime = (double)mpPage3PresTimeTMF->GetTime().GetMSFromTime() / 1000.0; if(bKiosk) { PresentationSettings& rSettings = pDoc->getPresentationSettings(); @@ -1058,7 +1058,7 @@ SfxObjectShellLock AssistentDlgImpl::GetDocument() if(bKiosk) { pPage->SetPresChange( PRESCHANGE_AUTO ); - pPage->SetTime(nNewTime); + pPage->SetTime(fNewTime); } nPgRelNum++; } diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 03b11bd7c2c0..a5c237b05cf0 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -92,7 +92,7 @@ enum WID_PAGE { WID_PAGE_LEFT, WID_PAGE_RIGHT, WID_PAGE_TOP, WID_PAGE_BOTTOM, WID_PAGE_WIDTH, WID_PAGE_HEIGHT, WID_PAGE_EFFECT, WID_PAGE_CHANGE, WID_PAGE_SPEED, WID_PAGE_NUMBER, - WID_PAGE_ORIENT, WID_PAGE_LAYOUT, WID_PAGE_DURATION, WID_PAGE_LDNAME, WID_PAGE_LDBITMAP, + WID_PAGE_ORIENT, WID_PAGE_LAYOUT, WID_PAGE_DURATION, WID_PAGE_HIGHRESDURATION, WID_PAGE_LDNAME, WID_PAGE_LDBITMAP, WID_PAGE_BACK, WID_PAGE_PREVIEW, WID_PAGE_PREVIEWBITMAP, WID_PAGE_VISIBLE, WID_PAGE_SOUNDFILE, WID_PAGE_BACKFULL, WID_PAGE_BACKVIS, WID_PAGE_BACKOBJVIS, WID_PAGE_USERATTRIBS, WID_PAGE_BOOKMARK, WID_PAGE_ISDARK, WID_PAGE_HEADERVISIBLE, WID_PAGE_HEADERTEXT, WID_PAGE_FOOTERVISIBLE, WID_PAGE_FOOTERTEXT, @@ -141,6 +141,7 @@ const SvxItemPropertySet* ImplGetDrawPagePropertySet( sal_Bool bImpress, PageKin { MAP_CHAR_LEN(sUNO_Prop_IsBackgroundObjectsVisible), WID_PAGE_BACKOBJVIS, &::getBooleanCppuType(), 0, 0}, { MAP_CHAR_LEN(sUNO_Prop_UserDefinedAttributes),WID_PAGE_USERATTRIBS, &::getCppuType((const Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, { MAP_CHAR_LEN(sUNO_Prop_BookmarkURL), WID_PAGE_BOOKMARK, &::getCppuType((const OUString*)0), 0, 0}, + { MAP_CHAR_LEN("HighResDuration"), WID_PAGE_HIGHRESDURATION, &::getCppuType((const double*)0), 0, 0}, { MAP_CHAR_LEN("IsBackgroundDark" ), WID_PAGE_ISDARK, &::getBooleanCppuType(), beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN("IsFooterVisible"), WID_PAGE_FOOTERVISIBLE, &::getBooleanCppuType(), 0, 0}, { MAP_CHAR_LEN("FooterText"), WID_PAGE_FOOTERTEXT, &::getCppuType((const OUString*)0), 0, 0}, @@ -612,11 +613,20 @@ void SAL_CALL SdGenericDrawPage::setPropertyValue( const OUString& aPropertyName GetPage()->SetAutoLayout( (AutoLayout)nValue, sal_True ); break; case WID_PAGE_DURATION: - GetPage()->SetTime((sal_uInt32)nValue); + GetPage()->SetTime((sal_Int32)nValue); break; } break; } + case WID_PAGE_HIGHRESDURATION: + { + double fValue = 0; + if(!(aValue >>= fValue)) + throw lang::IllegalArgumentException(); + + GetPage()->SetTime(fValue); + break; + } case WID_PAGE_WIDTH: { sal_Int32 nWidth = 0; @@ -1033,7 +1043,10 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName ) } break; case WID_PAGE_DURATION: - aAny <<= (sal_Int32)(GetPage()->GetTime()); + aAny <<= (sal_Int32)( GetPage()->GetTime() + .5 ); + break; + case WID_PAGE_HIGHRESDURATION: + aAny <<= (double)( GetPage()->GetTime() ); break; case WID_PAGE_LDNAME: { -- cgit