diff options
Diffstat (limited to 'slideshow/source/engine/transitions/randomwipe.cxx')
-rw-r--r-- | slideshow/source/engine/transitions/randomwipe.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/slideshow/source/engine/transitions/randomwipe.cxx b/slideshow/source/engine/transitions/randomwipe.cxx index 22c51e38852e..dbd9680f3960 100644 --- a/slideshow/source/engine/transitions/randomwipe.cxx +++ b/slideshow/source/engine/transitions/randomwipe.cxx @@ -68,10 +68,9 @@ RandomWipe::RandomWipe( sal_Int32 nElements, bool randomBars ) m_rect.transform( aTransform ); // mix up: - for ( sal_Int32 i = (nElements / 2); i--; ) + for ( sal_Int32 pos1 = nElements ; i-- ; ) { - const sal_Int32 pos1 = getRandomOrdinal(nElements); - const sal_Int32 pos2 = getRandomOrdinal(nElements); + const sal_Int32 pos2 = getRandomOrdinal(pos1+1); const ::basegfx::B2DPoint point( m_positions[ pos1 ] ); m_positions[ pos1 ] = m_positions[ pos2 ]; m_positions[ pos2 ] = point; |