summaryrefslogtreecommitdiff
path: root/cppuhelper/source
diff options
context:
space:
mode:
Diffstat (limited to 'cppuhelper/source')
-rw-r--r--cppuhelper/source/access_control.cxx5
-rw-r--r--cppuhelper/source/bootstrap.cxx5
-rwxr-xr-xcppuhelper/source/cc5_solaris_sparc.map7
-rw-r--r--cppuhelper/source/component.cxx9
-rw-r--r--cppuhelper/source/component_context.cxx5
-rw-r--r--cppuhelper/source/exc_thrower.cxx5
-rw-r--r--cppuhelper/source/factory.cxx5
-rw-r--r--cppuhelper/source/findsofficepath.c5
-rw-r--r--cppuhelper/source/gcc3.map8
-rw-r--r--cppuhelper/source/implbase.cxx9
-rw-r--r--cppuhelper/source/implbase_ex.cxx5
-rw-r--r--cppuhelper/source/implementationentry.cxx5
-rw-r--r--cppuhelper/source/interfacecontainer.cxx12
-rw-r--r--cppuhelper/source/macro_expander.cxx5
-rw-r--r--cppuhelper/source/macro_expander.hxx5
-rw-r--r--cppuhelper/source/makefile.mk6
-rw-r--r--cppuhelper/source/msvc_win32_intel.map6
-rw-r--r--cppuhelper/source/propertysetmixin.cxx5
-rw-r--r--cppuhelper/source/propshlp.cxx5
-rw-r--r--cppuhelper/source/servicefactory.cxx5
-rw-r--r--cppuhelper/source/shlib.cxx5
-rw-r--r--cppuhelper/source/stdidlclass.cxx5
-rw-r--r--cppuhelper/source/tdmgr.cxx17
-rw-r--r--cppuhelper/source/typeprovider.cxx5
-rw-r--r--cppuhelper/source/unorc6
-rw-r--r--cppuhelper/source/unourl.cxx5
-rw-r--r--cppuhelper/source/weak.cxx84
27 files changed, 107 insertions, 142 deletions
diff --git a/cppuhelper/source/access_control.cxx b/cppuhelper/source/access_control.cxx
index 0e64670faf67..f3ef9f81fc0d 100644
--- a/cppuhelper/source/access_control.cxx
+++ b/cppuhelper/source/access_control.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: access_control.cxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cppuhelper/source/bootstrap.cxx b/cppuhelper/source/bootstrap.cxx
index a416995193f1..5575c118420e 100644
--- a/cppuhelper/source/bootstrap.cxx
+++ b/cppuhelper/source/bootstrap.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: bootstrap.cxx,v $
- * $Revision: 1.33 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cppuhelper/source/cc5_solaris_sparc.map b/cppuhelper/source/cc5_solaris_sparc.map
index 0c3f1c556d64..941465519a08 100755
--- a/cppuhelper/source/cc5_solaris_sparc.map
+++ b/cppuhelper/source/cc5_solaris_sparc.map
@@ -379,3 +379,10 @@ UDK_3.6 { # OOo 3.0
__1cEcppuSOPropertySetHelper2t5B6Mrn0ATOBroadcastHelperVar4n0AbIOMultiTypeInterfaceContainerHelper_nDcomDsunEstarDunoEType___pn0AWIEventNotificationHook_b_v_;
__1cEcppuSOPropertySetHelper2t6Mrn0ATOBroadcastHelperVar4n0AbIOMultiTypeInterfaceContainerHelper_nDcomDsunEstarDunoEType___pn0AWIEventNotificationHook_b_v_;
} UDK_3.5;
+
+UDK_3.7 { # OOo 3.3
+ global:
+ __1cEcppuLOWeakObjectbAdisposeWeakConnectionPoint6M_v_;
+ __1cDcomDsunEstarDunoTWeakReferenceHelper2G6Mrkn0DJReference4n0DKXInterface____r4_;
+ __1cDcomDsunEstarDunoTWeakReferenceHelperFclear6M_v_;
+} UDK_3.6;
diff --git a/cppuhelper/source/component.cxx b/cppuhelper/source/component.cxx
index d94614703be5..b152a8f13f49 100644
--- a/cppuhelper/source/component.cxx
+++ b/cppuhelper/source/component.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: component.cxx,v $
- * $Revision: 1.15 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -90,6 +87,10 @@ void OComponentHelper::release() throw()
{
if (! rBHelper.bDisposed)
{
+ // *before* again incrementing our ref count, ensure that our weak connection point
+ // will not create references to us anymore (via XAdapter::queryAdapted)
+ disposeWeakConnectionPoint();
+
Reference<XInterface > xHoldAlive( *this );
// First dispose
try
diff --git a/cppuhelper/source/component_context.cxx b/cppuhelper/source/component_context.cxx
index 50103466b4a2..05b4f30205ef 100644
--- a/cppuhelper/source/component_context.cxx
+++ b/cppuhelper/source/component_context.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: component_context.cxx,v $
- * $Revision: 1.33 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cppuhelper/source/exc_thrower.cxx b/cppuhelper/source/exc_thrower.cxx
index a46b87235da0..c23873bda831 100644
--- a/cppuhelper/source/exc_thrower.cxx
+++ b/cppuhelper/source/exc_thrower.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: exc_thrower.cxx,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx
index bfa0eef0ca25..b1d473c061af 100644
--- a/cppuhelper/source/factory.cxx
+++ b/cppuhelper/source/factory.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: factory.cxx,v $
- * $Revision: 1.28.22.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cppuhelper/source/findsofficepath.c b/cppuhelper/source/findsofficepath.c
index d50fad066b36..e325f077711b 100644
--- a/cppuhelper/source/findsofficepath.c
+++ b/cppuhelper/source/findsofficepath.c
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: findsofficepath.c,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cppuhelper/source/gcc3.map b/cppuhelper/source/gcc3.map
index 819c3e046b30..099373b2e220 100644
--- a/cppuhelper/source/gcc3.map
+++ b/cppuhelper/source/gcc3.map
@@ -373,3 +373,11 @@ UDK_3.5 { # OOo 3.0
_ZN4cppu18OPropertySetHelperC1ERNS_19OBroadcastHelperVarINS_34OMultiTypeInterfaceContainerHelperEN3com3sun4star3uno4TypeEEEPNS_22IEventNotificationHookEb;
_ZN4cppu18OPropertySetHelperC2ERNS_19OBroadcastHelperVarINS_34OMultiTypeInterfaceContainerHelperEN3com3sun4star3uno4TypeEEEPNS_22IEventNotificationHookEb;
} UDK_3.4;
+
+UDK_3.6 { # OOo 3.3
+ global:
+ _ZN4cppu11OWeakObject26disposeWeakConnectionPointEv;
+ _ZN3com3sun4star3uno19WeakReferenceHelperaSERKNS2_9ReferenceINS2_10XInterfaceEEE;
+ _ZN3com3sun4star3uno19WeakReferenceHelper5clearEv;
+} UDK_3.5;
+
diff --git a/cppuhelper/source/implbase.cxx b/cppuhelper/source/implbase.cxx
index 9caa4ca93615..0c25a082cb27 100644
--- a/cppuhelper/source/implbase.cxx
+++ b/cppuhelper/source/implbase.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: implbase.cxx,v $
- * $Revision: 1.19 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -247,6 +244,8 @@ void WeakComponentImplHelperBase::release()
throw ()
{
if (osl_decrementInterlockedCount( &m_refCount ) == 0) {
+ // ensure no other references are created, via the weak connection point, from now on
+ disposeWeakConnectionPoint();
// restore reference count:
osl_incrementInterlockedCount( &m_refCount );
if (! rBHelper.bDisposed) {
@@ -381,6 +380,8 @@ void WeakAggComponentImplHelperBase::release()
OWeakAggObject::release();
}
else if (osl_decrementInterlockedCount( &m_refCount ) == 0) {
+ // ensure no other references are created, via the weak connection point, from now on
+ disposeWeakConnectionPoint();
// restore reference count:
osl_incrementInterlockedCount( &m_refCount );
if (! rBHelper.bDisposed) {
diff --git a/cppuhelper/source/implbase_ex.cxx b/cppuhelper/source/implbase_ex.cxx
index c1c80a280895..6d89bca96d6e 100644
--- a/cppuhelper/source/implbase_ex.cxx
+++ b/cppuhelper/source/implbase_ex.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: implbase_ex.cxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cppuhelper/source/implementationentry.cxx b/cppuhelper/source/implementationentry.cxx
index ac63ba0c5772..967a1095fce4 100644
--- a/cppuhelper/source/implementationentry.cxx
+++ b/cppuhelper/source/implementationentry.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: implementationentry.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cppuhelper/source/interfacecontainer.cxx b/cppuhelper/source/interfacecontainer.cxx
index 88f25e192e49..3053193d5ee6 100644
--- a/cppuhelper/source/interfacecontainer.cxx
+++ b/cppuhelper/source/interfacecontainer.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: interfacecontainer.cxx,v $
- * $Revision: 1.19 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -40,13 +37,6 @@
#include <hash_map>
-#if OSL_DEBUG_LEVEL == 0
-# ifndef NDEBUG
-# define NDEBUG
-# endif
-#endif
-#include <assert.h>
-
#include <com/sun/star/lang/XEventListener.hpp>
diff --git a/cppuhelper/source/macro_expander.cxx b/cppuhelper/source/macro_expander.cxx
index ac732de1536e..936487618ace 100644
--- a/cppuhelper/source/macro_expander.cxx
+++ b/cppuhelper/source/macro_expander.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: macro_expander.cxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cppuhelper/source/macro_expander.hxx b/cppuhelper/source/macro_expander.hxx
index bc08254eac43..a692f63abc39 100644
--- a/cppuhelper/source/macro_expander.hxx
+++ b/cppuhelper/source/macro_expander.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: macro_expander.hxx,v $
- * $Revision: 1.3 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cppuhelper/source/makefile.mk b/cppuhelper/source/makefile.mk
index 17dad41fae22..5755ed77631c 100644
--- a/cppuhelper/source/makefile.mk
+++ b/cppuhelper/source/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.54 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cppuhelper/source/msvc_win32_intel.map b/cppuhelper/source/msvc_win32_intel.map
index a90ec88f3ca3..6bc10cb175c2 100644
--- a/cppuhelper/source/msvc_win32_intel.map
+++ b/cppuhelper/source/msvc_win32_intel.map
@@ -271,3 +271,9 @@ UDK_3.5 { # OOo 3.0
global:
??0OPropertySetHelper@cppu@@QAE@AAU?$OBroadcastHelperVar@VOMultiTypeInterfaceContainerHelper@cppu@@VType@uno@star@sun@com@@@1@PAVIEventNotificationHook@1@_N@Z;
} UDK_3.4;
+
+UDK_3.6 { # OOo 3.3
+ global:
+ ?disposeWeakConnectionPoint@OWeakObject@cppu@@IAEXXZ;
+ ?clear@WeakReferenceHelper@uno@star@sun@com@@QAAXXZ;
+} UDK_3.5;
diff --git a/cppuhelper/source/propertysetmixin.cxx b/cppuhelper/source/propertysetmixin.cxx
index 422f4c1f90f8..d12fd408f035 100644
--- a/cppuhelper/source/propertysetmixin.cxx
+++ b/cppuhelper/source/propertysetmixin.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: propertysetmixin.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cppuhelper/source/propshlp.cxx b/cppuhelper/source/propshlp.cxx
index 9847ba2979c3..fe455781a1a7 100644
--- a/cppuhelper/source/propshlp.cxx
+++ b/cppuhelper/source/propshlp.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: propshlp.cxx,v $
- * $Revision: 1.20 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cppuhelper/source/servicefactory.cxx b/cppuhelper/source/servicefactory.cxx
index e66844bd3025..57eae9a51087 100644
--- a/cppuhelper/source/servicefactory.cxx
+++ b/cppuhelper/source/servicefactory.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: servicefactory.cxx,v $
- * $Revision: 1.41 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx
index 2008d27f5310..d9cf79396090 100644
--- a/cppuhelper/source/shlib.cxx
+++ b/cppuhelper/source/shlib.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: shlib.cxx,v $
- * $Revision: 1.30 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cppuhelper/source/stdidlclass.cxx b/cppuhelper/source/stdidlclass.cxx
index c83dfaf9d118..fdfc9bc34a65 100644
--- a/cppuhelper/source/stdidlclass.cxx
+++ b/cppuhelper/source/stdidlclass.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: stdidlclass.cxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cppuhelper/source/tdmgr.cxx b/cppuhelper/source/tdmgr.cxx
index 306ace09d592..1174c1822fb6 100644
--- a/cppuhelper/source/tdmgr.cxx
+++ b/cppuhelper/source/tdmgr.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: tdmgr.cxx,v $
- * $Revision: 1.15 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -688,17 +685,17 @@ static void SAL_CALL typelib_callback(
catch (container::NoSuchElementException & exc)
{
(void) exc; // avoid warning about unused variable
- OSL_ENSURE(
- 0, OUStringToOString(
- OUString( RTL_CONSTASCII_USTRINGPARAM(
- "typelibrary type not available: ") ) +
+ OSL_TRACE(
+ "typelibrary type not available: %s",
+ OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
catch (Exception & exc)
{
(void) exc; // avoid warning about unused variable
- OSL_ENSURE(
- 0, OUStringToOString(
+ OSL_TRACE(
+ "%s",
+ OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
}
diff --git a/cppuhelper/source/typeprovider.cxx b/cppuhelper/source/typeprovider.cxx
index 90bef8d405c1..1df32079b052 100644
--- a/cppuhelper/source/typeprovider.cxx
+++ b/cppuhelper/source/typeprovider.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: typeprovider.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cppuhelper/source/unorc b/cppuhelper/source/unorc
index 432c3c364848..c5af031bd4cd 100644
--- a/cppuhelper/source/unorc
+++ b/cppuhelper/source/unorc
@@ -1,8 +1,10 @@
=*************************************************************************
=
-= $RCSfile: unorc,v $
+= DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+=
+= Copyright 2000, 2010 Oracle and/or its affiliates.
=
-= $Revision: 1.3 $
+= OpenOffice.org - a multi-platform office productivity suite
=
= This file is part of OpenOffice.org.
=
diff --git a/cppuhelper/source/unourl.cxx b/cppuhelper/source/unourl.cxx
index 8820b38c1144..6abf86d29845 100644
--- a/cppuhelper/source/unourl.cxx
+++ b/cppuhelper/source/unourl.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: unourl.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx
index c4055eba4f8a..27b94f6a4c34 100644
--- a/cppuhelper/source/weak.cxx
+++ b/cppuhelper/source/weak.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: weak.cxx,v $
- * $Revision: 1.15 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -216,25 +213,31 @@ void SAL_CALL OWeakObject::release() throw()
if (osl_decrementInterlockedCount( &m_refCount ) == 0) {
// notify/clear all weak-refs before object's dtor is executed
// (which may check weak-refs to this object):
- if (m_pWeakConnectionPoint != 0) {
- OWeakConnectionPoint * const p = m_pWeakConnectionPoint;
- m_pWeakConnectionPoint = 0;
- try {
- p->dispose();
- }
- catch (RuntimeException const& exc) {
- OSL_ENSURE(
- false, OUStringToOString(
- exc.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
- static_cast<void>(exc);
- }
- p->release();
- }
+ disposeWeakConnectionPoint();
// destroy object:
delete this;
}
}
+void OWeakObject::disposeWeakConnectionPoint()
+{
+ OSL_PRECOND( m_refCount == 0, "OWeakObject::disposeWeakConnectionPoint: only to be called with a ref count of 0!" );
+ if (m_pWeakConnectionPoint != 0) {
+ OWeakConnectionPoint * const p = m_pWeakConnectionPoint;
+ m_pWeakConnectionPoint = 0;
+ try {
+ p->dispose();
+ }
+ catch (RuntimeException const& exc) {
+ OSL_ENSURE(
+ false, OUStringToOString(
+ exc.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
+ static_cast<void>(exc);
+ }
+ p->release();
+ }
+}
+
OWeakObject::~OWeakObject() SAL_THROW( (RuntimeException) )
{
}
@@ -473,50 +476,55 @@ WeakReferenceHelper::WeakReferenceHelper(const WeakReferenceHelper& rWeakRef) SA
}
}
-WeakReferenceHelper& WeakReferenceHelper::operator=(const WeakReferenceHelper& rWeakRef) SAL_THROW( () )
+void WeakReferenceHelper::clear() SAL_THROW( () )
{
try
{
- if (this != &rWeakRef)
- {
- Reference< XInterface > xInt( rWeakRef.get() );
if (m_pImpl)
{
if (m_pImpl->m_XWeakConnectionPoint.is())
{
- m_pImpl->m_XWeakConnectionPoint->removeReference((XReference*)m_pImpl);
+ m_pImpl->m_XWeakConnectionPoint->removeReference(
+ (XReference*)m_pImpl);
m_pImpl->m_XWeakConnectionPoint.clear();
}
m_pImpl->release();
m_pImpl = 0;
}
+ }
+ catch (RuntimeException &) { OSL_ASSERT( 0 ); } // assert here, but no unexpected()
+}
+
+WeakReferenceHelper& WeakReferenceHelper::operator=(const WeakReferenceHelper& rWeakRef) SAL_THROW( () )
+{
+ if (this == &rWeakRef)
+ {
+ return *this;
+ }
+ Reference< XInterface > xInt( rWeakRef.get() );
+ return operator = ( xInt );
+}
+
+WeakReferenceHelper & SAL_CALL
+WeakReferenceHelper::operator= (const Reference< XInterface > & xInt)
+SAL_THROW( () )
+{
+ try
+ {
+ clear();
if (xInt.is())
{
m_pImpl = new OWeakRefListener(xInt);
m_pImpl->acquire();
}
}
- }
catch (RuntimeException &) { OSL_ASSERT( 0 ); } // assert here, but no unexpected()
return *this;
}
WeakReferenceHelper::~WeakReferenceHelper() SAL_THROW( () )
{
- try
- {
- if (m_pImpl)
- {
- if (m_pImpl->m_XWeakConnectionPoint.is())
- {
- m_pImpl->m_XWeakConnectionPoint->removeReference((XReference*)m_pImpl);
- m_pImpl->m_XWeakConnectionPoint.clear();
- }
- m_pImpl->release();
- m_pImpl = 0; // for safety
- }
- }
- catch (RuntimeException &) { OSL_ASSERT( 0 ); } // assert here, but no unexpected()
+ clear();
}
Reference< XInterface > WeakReferenceHelper::get() const SAL_THROW( () )