diff options
author | Oliver Bolte <obo@openoffice.org> | 2006-07-13 08:55:24 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2006-07-13 08:55:24 +0000 |
commit | 4840ffc53274e71415f0c0386dc9406193955aa9 (patch) | |
tree | 8ea3e409a99c7ccebd00eb237c60a7f0a5f70648 | |
parent | 535096077028db776b709ab784517149efd75f16 (diff) |
INTEGRATION: CWS cowfixes01 (1.6.12); FILE MERGED
2006/03/21 13:36:26 thb 1.6.12.2: #i63310# Removed silly self-referentiality for the static default objects (causing infinite loops)
2006/03/17 23:16:35 thb 1.6.12.1: #i63310# Moved BxD(Poly)Polygon to cow_wrapper; added makeUnique() to all classes using COW internally (to at least facilitate deliberate unsharing in multi-threaded uses)
-rw-r--r-- | basegfx/inc/basegfx/polygon/b3dpolypolygon.hxx | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/basegfx/inc/basegfx/polygon/b3dpolypolygon.hxx b/basegfx/inc/basegfx/polygon/b3dpolypolygon.hxx index b28590b3ef0a..e1ad28529978 100644 --- a/basegfx/inc/basegfx/polygon/b3dpolypolygon.hxx +++ b/basegfx/inc/basegfx/polygon/b3dpolypolygon.hxx @@ -4,9 +4,9 @@ * * $RCSfile: b3dpolypolygon.hxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: kz $ $Date: 2005-11-02 13:54:19 $ + * last change: $Author: obo $ $Date: 2006-07-13 09:55:24 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -40,6 +40,10 @@ #include <sal/types.h> #endif +#ifndef INCLUDED_O3TL_COW_WRAPPER_HXX +#include <o3tl/cow_wrapper.hxx> +#endif + // predeclarations class ImplB3DPolyPolygon; @@ -55,12 +59,11 @@ namespace basegfx { class B3DPolyPolygon { - private: - ImplB3DPolyPolygon* mpPolyPolygon; + public: + typedef o3tl::cow_wrapper< ImplB3DPolyPolygon > ImplType; - // internal method to force a ref-counted instance to be copied - // to a modifyable unique copy. - void implForceUniqueCopy(); + private: + ImplType mpPolyPolygon; public: B3DPolyPolygon(); @@ -71,6 +74,9 @@ namespace basegfx // assignment operator B3DPolyPolygon& operator=(const B3DPolyPolygon& rPolyPolygon); + /// unshare this poly-polygon (and all included polygons) with all internally shared instances + void makeUnique(); + // compare operators bool operator==(const B3DPolyPolygon& rPolyPolygon) const; bool operator!=(const B3DPolyPolygon& rPolyPolygon) const; |