[ooo-build-commit] .: binfilter/bf_svx
Michael Meeks
mmeeks at kemper.freedesktop.org
Fri Oct 1 06:49:03 PDT 2010
binfilter/bf_svx/source/unodraw/svx_unoprov.cxx | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
New commits:
commit b82a4a5ad4366e8d7c84629f4e8393cd60e63d2d
Author: Michael Meeks <michael.meeks at novell.com>
Date: Fri Oct 1 11:15:59 2010 +0100
clean up lifecycle
diff --git a/binfilter/bf_svx/source/unodraw/svx_unoprov.cxx b/binfilter/bf_svx/source/unodraw/svx_unoprov.cxx
index f6ad636..628ef21 100644
--- a/binfilter/bf_svx/source/unodraw/svx_unoprov.cxx
+++ b/binfilter/bf_svx/source/unodraw/svx_unoprov.cxx
@@ -677,15 +677,13 @@ comphelper::PropertyMapEntry* ImplGetSvxDrawingDefaultsPropertyMap()
***********************************************************************/
typedef ::std::hash_map< rtl::OUString, sal_uInt32, rtl::OUStringHash > UHashMapImpl;
-// obsoleting these guys:
-// extern UHashMapEntry pSdrShapeIdentifierMap[];
-// extern UHashMap aSdrShapeIdentifierMap;
namespace {
static const UHashMapImpl &GetUHashImpl()
{
- static UHashMapImpl *pImpl = NULL;
- if (!pImpl) {
+ static UHashMapImpl aImpl(63);
+ static bool bInited = false;
+ if (!bInited) {
struct { const char *name; sal_Int32 length; sal_uInt32 id; } aInit[] = {
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.RectangleShape"), OBJ_RECT },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.EllipseShape"), OBJ_CIRC },
@@ -717,11 +715,11 @@ namespace {
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DExtrudeObject"), E3D_EXTRUDEOBJ_ID | E3D_INVENTOR_FLAG },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DPolygonObject"), E3D_POLYGONOBJ_ID | E3D_INVENTOR_FLAG }
};
- pImpl = new UHashMapImpl(32);
for (sal_uInt32 i = 0; i < sizeof(aInit)/sizeof(aInit[0]); i++)
- (*pImpl)[rtl::OUString( aInit[i].name, aInit[i].length, RTL_TEXTENCODING_ASCII_US ) ] = aInit[i].id;
+ aImpl[rtl::OUString( aInit[i].name, aInit[i].length, RTL_TEXTENCODING_ASCII_US ) ] = aInit[i].id;
+ bInited = true;
}
- return *pImpl;
+ return aImpl;
}
}
More information about the ooo-build-commit
mailing list