diff options
Diffstat (limited to 'sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx')
-rw-r--r-- | sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx index 601525951231..3575c24e5656 100644 --- a/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx +++ b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx @@ -79,19 +79,26 @@ void DeviceCopy ( void ForAllRectangles (const Region& rRegion, ::boost::function<void(const Rectangle&)> aFunction) { OSL_ASSERT(aFunction); + RectangleVector aRectangles; + rRegion.GetRegionRectangles(aRectangles); - if (rRegion.GetRectCount() <= 1) + if(0 == aRectangles.size()) { - aFunction(rRegion.GetBoundRect()); + aFunction(Rectangle()); } else { - Region aMutableRegionCopy (rRegion); - RegionHandle aHandle(aMutableRegionCopy.BeginEnumRects()); - Rectangle aBox; - while (aMutableRegionCopy.GetNextEnumRect(aHandle, aBox)) - aFunction(aBox); - aMutableRegionCopy.EndEnumRects(aHandle); + for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); aRectIter++) + { + aFunction(*aRectIter); + } + + //Region aMutableRegionCopy (rRegion); + //RegionHandle aHandle(aMutableRegionCopy.BeginEnumRects()); + //Rectangle aBox; + //while (aMutableRegionCopy.GetEnumRects(aHandle, aBox)) + // aFunction(aBox); + //aMutableRegionCopy.EndEnumRects(aHandle); } } |