Related: rhbz#684477 make sure this is thread safe

f41
Caolán McNamara 14 years ago
parent 6de3f62caf
commit 8d6d761b7a

@ -0,0 +1,69 @@
From fca3e47954fe36687989328ac90cbc6747e4bc4e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Mon, 14 Mar 2011 10:20:12 +0000
Subject: [PATCH] Related: rhbz#684477 make sure this is thread safe
---
basegfx/source/polygon/b2dpolygontools.cxx | 36 +++++++++++++++++----------
1 files changed, 23 insertions(+), 13 deletions(-)
diff --git a/basegfx/source/polygon/b2dpolygontools.cxx b/basegfx/source/polygon/b2dpolygontools.cxx
index 1967e6e..3271314 100644
--- a/basegfx/source/polygon/b2dpolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolygontools.cxx
@@ -32,6 +32,7 @@
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <osl/diagnose.h>
#include <rtl/math.hxx>
+#include <rtl/instance.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <basegfx/range/b2drange.hxx>
@@ -1836,22 +1837,31 @@ namespace basegfx
return aRetval;
}
- B2DPolygon createUnitPolygon()
+ namespace
{
- static B2DPolygon aRetval;
-
- if(!aRetval.count())
+ struct theUnitPolygon :
+ public rtl::StaticWithInit<B2DPolygon, theUnitPolygon>
{
- aRetval.append( B2DPoint( 0.0, 0.0 ) );
- aRetval.append( B2DPoint( 1.0, 0.0 ) );
- aRetval.append( B2DPoint( 1.0, 1.0 ) );
- aRetval.append( B2DPoint( 0.0, 1.0 ) );
+ B2DPolygon operator () ()
+ {
+ B2DPolygon aRetval;
- // close
- aRetval.setClosed( true );
- }
-
- return aRetval;
+ aRetval.append( B2DPoint( 0.0, 0.0 ) );
+ aRetval.append( B2DPoint( 1.0, 0.0 ) );
+ aRetval.append( B2DPoint( 1.0, 1.0 ) );
+ aRetval.append( B2DPoint( 0.0, 1.0 ) );
+
+ // close
+ aRetval.setClosed( true );
+
+ return aRetval;
+ }
+ };
+ }
+
+ B2DPolygon createUnitPolygon()
+ {
+ return theUnitPolygon::get();
}
B2DPolygon createPolygonFromCircle( const B2DPoint& rCenter, double fRadius )
--
1.7.4.1

@ -28,7 +28,7 @@
Summary: Free Software Productivity Suite
Name: libreoffice
Version: 3.3.1.2
Release: 7%{?dist}
Release: 8%{?dist}
License: LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and (CDDL or GPLv2) and Public Domain
Group: Applications/Productivity
URL: http://www.documentfoundation.org/develop
@ -121,6 +121,7 @@ Patch33: 0001-valgrind-don-t-leave-an-evil-thread-running-after-ma.patch
Patch34: 0001-install-high-resolution-icons.patch
Patch35: 0001-Resolves-rhbz-682716-pa-IN-isn-t-handled-by-fontconf.patch
Patch36: 0001-Resolves-rhbz-682621-better-resizing-of-overtall-gly.patch
Patch37: 0001-Related-rhbz-684477-make-sure-this-is-thread-safe.patch
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%define instdir %{_libdir}
@ -760,6 +761,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc
%patch34 -p1 -b .install-high-resolution-icons.patch
%patch35 -p1 -b .rhbz682716-pa-IN-isn-t-handled-by-fontconf.patch
%patch36 -p1 -b .rhbz682621-better-resizing-of-overtall-gly.patch
%patch37 -p1 -b .rhbz684477-make-sure-this-is-thread-safe.patch
touch scripting/source/pyprov/delzip
touch scripting/util/provider/beanshell/delzip
touch scripting/util/provider/javascript/delzip
@ -2105,6 +2107,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%{basisinstdir}/program/kde-open-url
%changelog
* Mon Mar 14 2011 Caolán McNamara <caolanm@redhat.com> 3.3.1.2-8
- Related: rhbz#684477 make sure this is thread safe
* Sun Mar 13 2011 Marek Kasik <mkasik@redhat.com> 3.3.1.2-7
- Rebuild (poppler-0.16.3)

Loading…
Cancel
Save