diff options
author | Cao Cuong Ngo <cao.cuong.ngo@gmail.com> | 2013-04-02 18:37:00 +0200 |
---|---|---|
committer | Thorsten Behrens <tbehrens@suse.com> | 2013-04-05 13:05:42 +0200 |
commit | 2c82e5d304b56c1dd95d0f3dcafc9a36ce02b5f4 (patch) | |
tree | 4d60d1a686085ae4cfb0a415defdb35402a65db8 /xmloff | |
parent | 21d6c1022aa528836d20ae1b8be9ea1b84bd61aa (diff) |
fdo#59071 Slideshow: allow automatic transitions with sub-second
Enable slide transition each 0.25 second instead of whole second.
Change-Id: I1907a1baf30cede91a0438d021e003204ea06651
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/draw/propimp0.cxx | 9 | ||||
-rw-r--r-- | xmloff/source/draw/sdpropls.cxx | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/xmloff/source/draw/propimp0.cxx b/xmloff/source/draw/propimp0.cxx index 75d8b93aa461..3d6dc4a59d83 100644 --- a/xmloff/source/draw/propimp0.cxx +++ b/xmloff/source/draw/propimp0.cxx @@ -56,9 +56,9 @@ sal_Bool XMLDurationPropertyHdl::importXML( util::Duration aDuration; ::sax::Converter::convertDuration(aDuration, rStrImpValue); - const sal_Int32 nSeconds = ((aDuration.Days * 24 + aDuration.Hours) * 60 - + aDuration.Minutes) * 60 + aDuration.Seconds; - rValue <<= nSeconds; + const double fSeconds = ((aDuration.Days * 24 + aDuration.Hours) * 60 + + aDuration.Minutes) * 60 + aDuration.Seconds + aDuration.MilliSeconds / 1000.0; + rValue <<= fSeconds; return sal_True; } @@ -68,12 +68,13 @@ sal_Bool XMLDurationPropertyHdl::exportXML( const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& ) const { - sal_Int32 nVal = 0; + double nVal = 0; if(rValue >>= nVal) { util::Duration aDuration; aDuration.Seconds = static_cast<sal_uInt16>(nVal); + aDuration.MilliSeconds = static_cast<sal_uInt32>(nVal * 1000.0) % 1000 ; OUStringBuffer aOut; ::sax::Converter::convertDuration(aOut, aDuration); diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx index 1bf5b277538d..273517bccb0a 100644 --- a/xmloff/source/draw/sdpropls.cxx +++ b/xmloff/source/draw/sdpropls.cxx @@ -304,7 +304,7 @@ const XMLPropertyMapEntry aXMLSDPresPageProps[] = DPMAP( "Change", XML_NAMESPACE_PRESENTATION, XML_TRANSITION_TYPE, XML_SD_TYPE_PRESPAGE_TYPE, CTF_PAGE_TRANS_TYPE ), DPMAP( "Effect", XML_NAMESPACE_PRESENTATION, XML_TRANSITION_STYLE, XML_SD_TYPE_PRESPAGE_STYLE, CTF_PAGE_TRANS_STYLE ), DPMAP( "Speed", XML_NAMESPACE_PRESENTATION, XML_TRANSITION_SPEED, XML_SD_TYPE_PRESPAGE_SPEED, CTF_PAGE_TRANS_SPEED ), - DPMAP( "Duration", XML_NAMESPACE_PRESENTATION, XML_DURATION, XML_SD_TYPE_PRESPAGE_DURATION, CTF_PAGE_TRANS_DURATION ), + DPMAP( "HighResDuration", XML_NAMESPACE_PRESENTATION, XML_DURATION, XML_SD_TYPE_PRESPAGE_DURATION, CTF_PAGE_TRANS_DURATION ), DPMAP( "Visible", XML_NAMESPACE_PRESENTATION, XML_VISIBILITY, XML_SD_TYPE_PRESPAGE_VISIBILITY, CTF_PAGE_VISIBLE ), DPMAP( "Sound", XML_NAMESPACE_PRESENTATION, XML_SOUND, XML_TYPE_STRING|MID_FLAG_ELEMENT_ITEM, CTF_PAGE_SOUND_URL ), DPMAP( "BackgroundFullSize", XML_NAMESPACE_DRAW, XML_BACKGROUND_SIZE, XML_SD_TYPE_PRESPAGE_BACKSIZE, CTF_PAGE_BACKSIZE ), |