summaryrefslogtreecommitdiffstats
path: root/cppu
diff options
context:
space:
mode:
authorDaniel Boelzle <dbo@openoffice.org>2002-03-13 08:47:37 +0000
committerDaniel Boelzle <dbo@openoffice.org>2002-03-13 08:47:37 +0000
commit0c7c93ea6161fe8377bd67dbd1b09ecf0a722131 (patch)
tree19ca35c01d1409c2aec1ebfdaf1e1546eb2f6950 /cppu
parentDisable mapfiles on FreeBSD (diff)
downloadcore-0c7c93ea6161fe8377bd67dbd1b09ecf0a722131.tar.gz
core-0c7c93ea6161fe8377bd67dbd1b09ecf0a722131.zip
#98040# fixed exception spec
Diffstat (limited to 'cppu')
-rw-r--r--cppu/inc/com/sun/star/uno/Reference.hxx23
1 files changed, 17 insertions, 6 deletions
diff --git a/cppu/inc/com/sun/star/uno/Reference.hxx b/cppu/inc/com/sun/star/uno/Reference.hxx
index c9d4fdb0c1ec..45907f36fbbc 100644
--- a/cppu/inc/com/sun/star/uno/Reference.hxx
+++ b/cppu/inc/com/sun/star/uno/Reference.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Reference.hxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: dbo $ $Date: 2001-11-09 09:14:30 $
+ * last change: $Author: dbo $ $Date: 2002-03-13 09:45:34 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -85,10 +85,21 @@ inline sal_Bool BaseReference::operator == ( XInterface * pInterface ) const SAL
{
if (_pInterface == pInterface)
return sal_True;
- // only the query to XInterface must return the same pointer if they belong to same objects
- Reference< XInterface > x1( _pInterface, UNO_QUERY );
- Reference< XInterface > x2( pInterface, UNO_QUERY );
- return (x1._pInterface == x2._pInterface);
+#ifndef EXCEPTIONS_OFF
+ try
+ {
+#endif
+ // only the query to XInterface must return the same pointer if they belong to same objects
+ Reference< XInterface > x1( _pInterface, UNO_QUERY );
+ Reference< XInterface > x2( pInterface, UNO_QUERY );
+ return (x1._pInterface == x2._pInterface);
+#ifndef EXCEPTIONS_OFF
+ }
+ catch (RuntimeException &)
+ {
+ return sal_False;
+ }
+#endif
}
//__________________________________________________________________________________________________
inline sal_Bool BaseReference::operator != ( XInterface * pInterface ) const SAL_THROW( () )