summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/region.cxx
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2006-02-09 13:00:12 +0000
committerRüdiger Timm <rt@openoffice.org>2006-02-09 13:00:12 +0000
commit1abcec9f6b863d4f85016fd5fc7b2f62c7925f07 (patch)
treeb61d814ac513e345e3181fba371f0ed1886543e7 /vcl/source/gdi/region.cxx
parenteffb97f3ea267cdee46f7ee0c2bac8d0427ec4e9 (diff)
INTEGRATION: CWS rtfpp2 (1.9.134); FILE MERGED
2006/01/03 13:58:26 thb 1.9.134.1: #127431# Make Region unique, before modifying it
Diffstat (limited to 'vcl/source/gdi/region.cxx')
-rw-r--r--vcl/source/gdi/region.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index 2cf3eac78291..5436084e9285 100644
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: region.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: rt $ $Date: 2005-09-09 12:10:53 $
+ * last change: $Author: rt $ $Date: 2006-02-09 14:00:12 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -1117,7 +1117,14 @@ BOOL Region::Intersect( const Rectangle& rRect )
// #103137# Avoid banding for special cases
if ( mpImplRegion->mpPolyPoly )
{
- // use the PolyPolygon:Clip method for rectangles, this is
+ // #127431# make ImplRegion unique, if not already.
+ if( mpImplRegion->mnRefCount > 1 )
+ {
+ mpImplRegion->mnRefCount--;
+ mpImplRegion = new ImplRegion( *mpImplRegion->mpPolyPoly );
+ }
+
+ // use the PolyPolygon::Clip method for rectangles, this is
// fairly simple (does not even use GPC) and saves us from
// unnecessary banding
mpImplRegion->mpPolyPoly->Clip( rRect );