summaryrefslogtreecommitdiff
path: root/basegfx/inc/basegfx/polygon/b3dpolygon.hxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2006-07-13 08:55:05 +0000
committerOliver Bolte <obo@openoffice.org>2006-07-13 08:55:05 +0000
commit535096077028db776b709ab784517149efd75f16 (patch)
tree06ac80f9c64b69ad4beeecd608ddd26a20e76c32 /basegfx/inc/basegfx/polygon/b3dpolygon.hxx
parentf0580e54e08cbb1004cd353f927a828e0210de93 (diff)
INTEGRATION: CWS cowfixes01 (1.5.20); FILE MERGED
2006/03/21 13:36:26 thb 1.5.20.2: #i63310# Removed silly self-referentiality for the static default objects (causing infinite loops) 2006/03/17 23:16:35 thb 1.5.20.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)
Diffstat (limited to 'basegfx/inc/basegfx/polygon/b3dpolygon.hxx')
-rw-r--r--basegfx/inc/basegfx/polygon/b3dpolygon.hxx20
1 files changed, 13 insertions, 7 deletions
diff --git a/basegfx/inc/basegfx/polygon/b3dpolygon.hxx b/basegfx/inc/basegfx/polygon/b3dpolygon.hxx
index 88a4def680da..abeebce3f9c2 100644
--- a/basegfx/inc/basegfx/polygon/b3dpolygon.hxx
+++ b/basegfx/inc/basegfx/polygon/b3dpolygon.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: b3dpolygon.hxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: rt $ $Date: 2005-09-07 20:30:18 $
+ * last change: $Author: obo $ $Date: 2006-07-13 09:55:05 $
*
* 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 ImplB3DPolygon;
@@ -57,13 +61,12 @@ namespace basegfx
{
class B3DPolygon
{
+ public:
+ typedef o3tl::cow_wrapper< ImplB3DPolygon > ImplType;
+
private:
// internal data.
- ImplB3DPolygon* mpPolygon;
-
- // internal method to force a ref-counted instance to be copied
- // to a modifyable unique copy.
- void implForceUniqueCopy();
+ ImplType mpPolygon;
public:
B3DPolygon();
@@ -74,6 +77,9 @@ namespace basegfx
// assignment operator
B3DPolygon& operator=(const B3DPolygon& rPolygon);
+ /// unshare this polygon with all internally shared instances
+ void makeUnique();
+
// compare operators
bool operator==(const B3DPolygon& rPolygon) const;
bool operator!=(const B3DPolygon& rPolygon) const;