diff options
author | Armin Le Grand <alg@apache.org> | 2012-10-23 12:46:28 +0000 |
---|---|---|
committer | Armin Le Grand <alg@apache.org> | 2012-10-23 12:46:28 +0000 |
commit | cab10eeb7878edf224a004fd7640bd4adf8d3c51 (patch) | |
tree | ca8c7780822a571f0ade4ab1b90fc89d2c245b63 /sd/source | |
parent | 498926039ce717631eda046b1aa256efd24dfdf6 (diff) |
#121237# Rework/Cleanup of Region code due to missing complete support for B2DPolygon class
Notes
Notes:
merged as: e717d1dcce7f8906311c5ccdbb2326b61a702630
Diffstat (limited to 'sd/source')
-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 89d750449cf2..de560b64f77d 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); } } |