diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2011-02-28 17:12:48 +0100 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2011-02-28 17:12:48 +0100 |
commit | 973d2ca14b29d856023ea1c7b49e6bddd3ca2bc7 (patch) | |
tree | f0550da7abf84599799b5dab66f45cc8eee7ab21 /slideshow/source | |
parent | a0e99ecace0b744ae75c9f2fbcde9990a2b6faa4 (diff) | |
parent | 086ff12951769a2fadfc0f92f57c2e4f41108b72 (diff) |
CWS-TOOLING: integrate CWS impress195
Diffstat (limited to 'slideshow/source')
-rw-r--r-- | slideshow/source/engine/shapes/gdimtftools.cxx | 5 | ||||
-rw-r--r-- | slideshow/source/engine/transitions/randomwipe.cxx | 10 |
2 files changed, 7 insertions, 8 deletions
diff --git a/slideshow/source/engine/shapes/gdimtftools.cxx b/slideshow/source/engine/shapes/gdimtftools.cxx index 35daf49863d8..8d2af73817d2 100644 --- a/slideshow/source/engine/shapes/gdimtftools.cxx +++ b/slideshow/source/engine/shapes/gdimtftools.cxx @@ -491,9 +491,10 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames& o_rFrames, nWaitTime100thSeconds = 100 * 60 * 60 * 24; } - // There are animated GIFs with no WaitTime set. Take 1 sec, then. + // There are animated GIFs with no WaitTime set. Take 0.1 sec, the + // same duration that is used by the edit view. if( nWaitTime100thSeconds == 0 ) - nWaitTime100thSeconds = 100; + nWaitTime100thSeconds = 10; o_rFrames.push_back( MtfAnimationFrame( pMtf, nWaitTime100thSeconds / 100.0 ) ); diff --git a/slideshow/source/engine/transitions/randomwipe.cxx b/slideshow/source/engine/transitions/randomwipe.cxx index 22c51e38852e..d8ac4a3da687 100644 --- a/slideshow/source/engine/transitions/randomwipe.cxx +++ b/slideshow/source/engine/transitions/randomwipe.cxx @@ -68,13 +68,11 @@ RandomWipe::RandomWipe( sal_Int32 nElements, bool randomBars ) m_rect.transform( aTransform ); // mix up: - for ( sal_Int32 i = (nElements / 2); i--; ) + for (sal_Int32 nIndex=0; nIndex<nElements; ++nIndex) { - const sal_Int32 pos1 = getRandomOrdinal(nElements); - const sal_Int32 pos2 = getRandomOrdinal(nElements); - const ::basegfx::B2DPoint point( m_positions[ pos1 ] ); - m_positions[ pos1 ] = m_positions[ pos2 ]; - m_positions[ pos2 ] = point; + const sal_Int32 nOtherIndex (getRandomOrdinal(nElements)); + OSL_ASSERT(nOtherIndex>=0 && nOtherIndex<nElements); + ::std::swap(m_positions[nIndex], m_positions[nOtherIndex]); } } |