[PATCH] fdo#59071 Slideshow: allow automatic transitions with sub-se...
Cao Cuong Ngo (via Code Review)
gerrit at gerrit.libreoffice.org
Tue Apr 2 09:38:48 PDT 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/3176
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/76/3176/1
fdo#59071 Slideshow: allow automatic transitions with sub-second
Enable slide transition each 0.25 second instead of whole second.
Change-Id: I1907a1baf30cede91a0438d021e003204ea06651
---
M sd/inc/sdpage.hxx
M sd/source/core/sdpage.cxx
M sd/source/filter/html/htmlex.cxx
M sd/source/filter/html/htmlex.hxx
M sd/source/filter/ppt/pptin.cxx
M sd/source/ui/animations/SlideTransitionPane.cxx
M sd/source/ui/animations/SlideTransitionPane.src
M sd/source/ui/dlg/dlgass.cxx
M sd/source/ui/unoidl/unopage.cxx
9 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx
index 18b58a3..631e215 100644
--- a/sd/inc/sdpage.hxx
+++ b/sd/inc/sdpage.hxx
@@ -115,7 +115,7 @@
sd::ScopeLock maLockAutoLayoutArrangement;
sal_Bool mbSelected; ///< selection identifier
PresChange mePresChange; ///< manual / automatic / semi automatic
- sal_uInt32 mnTime; ///< Display time in seconds
+ double mnTime; ///< 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 @@
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 nNewTime) { mnTime = nNewTime; }
+ double GetTime() const { return mnTime; }
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 499af50..67ea394 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -88,7 +88,7 @@
, meAutoLayout(AUTOLAYOUT_NONE)
, mbSelected(sal_False)
, mePresChange(PRESCHANGE_MANUAL)
-, mnTime(1)
+, mnTime(1.0)
, mbSoundOn(sal_False)
, mbExcluded(sal_False)
, mbLoopSound(sal_False)
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 706b199..d121452 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -584,7 +584,7 @@
}
else if ( pParams->Name == "KioskSlideDuration" )
{
- sal_Int32 temp = sal_False;
+ double temp = sal_False;
pParams->Value >>= temp;
mnSlideDuration = temp;
mbAutoSlide = true;
@@ -1521,7 +1521,7 @@
pPage = maPages[ nSdPage ];
if( meMode == PUBLISH_KIOSK )
{
- sal_uLong nSecs = 0;
+ double nSecs = 0;
bool bEndless = false;
if( !mbAutoSlide )
{
diff --git a/sd/source/filter/html/htmlex.hxx b/sd/source/filter/html/htmlex.hxx
index 6ef80ed..5c0d857 100644
--- a/sd/source/filter/html/htmlex.hxx
+++ b/sd/source/filter/html/htmlex.hxx
@@ -114,7 +114,7 @@
bool mbDownload;
bool mbAutoSlide;
- sal_uInt32 mnSlideDuration;
+ double mnSlideDuration;
bool mbSlideSound;
bool mbHiddenSlides;
bool mbEndless;
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 308979d..9dc25d8 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -1757,7 +1757,7 @@
if ( nBuildFlags & 0x400 ) // slidechange by time
{ // time to show (in Ticks)
pPage->SetPresChange( PRESCHANGE_AUTO );
- pPage->SetTime( nSlideTime / 1000 );
+ pPage->SetTime( nSlideTime / 1000.0 );
}
else
pPage->SetPresChange( mePresChange );
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index 10eb311..b73ec5f 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -119,7 +119,7 @@
void init()
{
mfDuration = 2.0;
- mnTime = 0;
+ mnTime = 1.0;
mePresChange = PRESCHANGE_MANUAL;
mbSoundOn = sal_False;
mbLoopSound = sal_False;
@@ -217,7 +217,7 @@
// other settings
double mfDuration;
- sal_uLong mnTime;
+ double mnTime;
PresChange mePresChange;
sal_Bool mbSoundOn;
String maSound;
@@ -859,7 +859,7 @@
{
maRB_ADVANCE_ON_MOUSE.Check( aEffect.mePresChange == PRESCHANGE_MANUAL );
maRB_ADVANCE_AUTO.Check( aEffect.mePresChange == PRESCHANGE_AUTO );
- maMF_ADVANCE_AUTO_AFTER.SetValue( aEffect.mnTime );
+ maMF_ADVANCE_AUTO_AFTER.SetValue( aEffect.mnTime * 100.0);
}
SdOptions* pOptions = SD_MOD()->GetSdOptions(DOCUMENT_TYPE_IMPRESS);
@@ -1026,7 +1026,7 @@
aResult.mePresChange = PRESCHANGE_AUTO;
if( maMF_ADVANCE_AUTO_AFTER.IsEnabled())
{
- aResult.mnTime = static_cast<long>(maMF_ADVANCE_AUTO_AFTER.GetValue());
+ aResult.mnTime = static_cast<double>(maMF_ADVANCE_AUTO_AFTER.GetValue() ) / 100.0 ;
aResult.mbTimeAmbiguous = false;
}
}
diff --git a/sd/source/ui/animations/SlideTransitionPane.src b/sd/source/ui/animations/SlideTransitionPane.src
index d2017de8..d78f0a0 100644
--- a/sd/source/ui/animations/SlideTransitionPane.src
+++ b/sd/source/ui/animations/SlideTransitionPane.src
@@ -142,11 +142,11 @@
Repeat = TRUE ;
Spin = TRUE ;
Minimum = 0 ;
- Maximum = 999 ;
- // decimal digits should be 1, but for now the model only supports whole seconds
- DecimalDigits = 0 ;
- // spin size (increment value) should be 5 if digits are 1
- SpinSize = 1 ;
+ Maximum = 9999 ;
+ // fdo#59071, enable slide auto transition of 0.25 second
+ DecimalDigits = 2 ;
+ // spin size (increment value), each 0.25 second
+ SpinSize = 25 ;
Unit = FUNIT_CUSTOM ;
CustomUnitText [ en-US ] = "sec";
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx
index ebb88e4..a9ca41c 100644
--- a/sd/source/ui/dlg/dlgass.cxx
+++ b/sd/source/ui/dlg/dlgass.cxx
@@ -1036,7 +1036,7 @@
{
const sal_uInt16 nPageCount = pDoc->GetSdPageCount(PK_STANDARD);
sal_Bool bKiosk = mpPage3PresTypeKioskRB->IsChecked();
- sal_uInt32 nNewTime = (sal_uInt32)mpPage3PresTimeTMF->GetTime().GetMSFromTime() / 1000;
+ double nNewTime = (double)mpPage3PresTimeTMF->GetTime().GetMSFromTime() / 1000.0;
if(bKiosk)
{
PresentationSettings& rSettings = pDoc->getPresentationSettings();
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 03b11bd..0f47b02 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -123,7 +123,7 @@
{ MAP_CHAR_LEN(UNO_NAME_PAGE_RIGHT), WID_PAGE_RIGHT, &::getCppuType((const sal_Int32*)0), 0, 0},
{ MAP_CHAR_LEN(UNO_NAME_PAGE_TOP), WID_PAGE_TOP, &::getCppuType((const sal_Int32*)0), 0, 0},
{ MAP_CHAR_LEN(UNO_NAME_PAGE_CHANGE), WID_PAGE_CHANGE, &::getCppuType((const sal_Int32*)0), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_PAGE_DURATION), WID_PAGE_DURATION, &::getCppuType((const sal_Int32*)0), 0, 0},
+ { MAP_CHAR_LEN(UNO_NAME_PAGE_DURATION), WID_PAGE_DURATION, &::getCppuType((const double*)0), 0, 0},
{ MAP_CHAR_LEN(UNO_NAME_PAGE_EFFECT), WID_PAGE_EFFECT, &::getCppuType((const presentation::FadeEffect*)0), 0, 0},
{ MAP_CHAR_LEN(UNO_NAME_PAGE_HEIGHT), WID_PAGE_HEIGHT, &::getCppuType((const sal_Int32*)0), 0, 0},
{ MAP_CHAR_LEN(UNO_NAME_PAGE_LAYOUT), WID_PAGE_LAYOUT, &::getCppuType((const sal_Int16*)0), 0, 0},
@@ -612,7 +612,7 @@
GetPage()->SetAutoLayout( (AutoLayout)nValue, sal_True );
break;
case WID_PAGE_DURATION:
- GetPage()->SetTime((sal_uInt32)nValue);
+ GetPage()->SetTime((double)nValue);
break;
}
break;
@@ -1033,7 +1033,7 @@
}
break;
case WID_PAGE_DURATION:
- aAny <<= (sal_Int32)(GetPage()->GetTime());
+ aAny <<= (GetPage()->GetTime());
break;
case WID_PAGE_LDNAME:
{
--
To view, visit https://gerrit.libreoffice.org/3176
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1907a1baf30cede91a0438d021e003204ea06651
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Cao Cuong Ngo <cao.cuong.ngo at gmail.com>
More information about the LibreOffice
mailing list