diff options
author | Hans-Joachim Lankenau <hjs@openoffice.org> | 2004-06-25 16:17:42 +0000 |
---|---|---|
committer | Hans-Joachim Lankenau <hjs@openoffice.org> | 2004-06-25 16:17:42 +0000 |
commit | fc59a824ea41aa0c644ed52a0e49cad257f58207 (patch) | |
tree | 64d3327a189ea44ffbdfe6b2dd10d589284c9a79 /basegfx | |
parent | 7c16d5830f3bd35e28e837db948853f991de2e57 (diff) |
INTEGRATION: CWS tune04 (1.9.26); FILE MERGED
2004/06/15 07:23:33 cmc 1.9.26.1: #i29636# turn global objects into local static data protected with swishy double-locked templated template
Diffstat (limited to 'basegfx')
-rw-r--r-- | basegfx/source/polygon/b2dpolygon.cxx | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/basegfx/source/polygon/b2dpolygon.cxx b/basegfx/source/polygon/b2dpolygon.cxx index 381e5b75d5ea..2f2ba9b022ef 100644 --- a/basegfx/source/polygon/b2dpolygon.cxx +++ b/basegfx/source/polygon/b2dpolygon.cxx @@ -2,9 +2,9 @@ * * $RCSfile: b2dpolygon.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: aw $ $Date: 2004-02-12 17:11:42 $ + * last change: $Author: hjs $ $Date: 2004-06-25 17:17:42 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -78,6 +78,9 @@ #ifndef _BGFX_MATRIX_B2DHOMMATRIX_HXX #include <basegfx/matrix/b2dhommatrix.hxx> #endif +#ifndef INCLUDED_RTL_INSTANCE_HXX +#include <rtl/instance.hxx> +#endif #include <vector> #include <algorithm> @@ -984,11 +987,10 @@ public: ////////////////////////////////////////////////////////////////////////////// +namespace { struct DefaultPolygon: public rtl::Static<ImplB2DPolygon, DefaultPolygon> {}; } + namespace basegfx { - // init static default Polygon - static ImplB2DPolygon maStaticDefaultPolygon; - void B2DPolygon::implForceUniqueCopy() { if(mpPolygon->getRefCount()) @@ -999,7 +1001,7 @@ namespace basegfx } B2DPolygon::B2DPolygon() - : mpPolygon(&maStaticDefaultPolygon) + : mpPolygon(&DefaultPolygon::get()) { mpPolygon->incRefCount(); } @@ -1273,7 +1275,7 @@ namespace basegfx delete mpPolygon; } - mpPolygon = &maStaticDefaultPolygon; + mpPolygon = &DefaultPolygon::get(); mpPolygon->incRefCount(); } |