summaryrefslogtreecommitdiff
path: root/cppu
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-04-14 10:54:07 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-04-14 10:54:07 +0000
commitf854a1c9c167ba3a110566b255f40bd4f410fe60 (patch)
tree9e807931292928a39823ce5a521882bd14539f4c /cppu
parent3ef557a682ba2bc796a898ade30e8c1fd7c0d267 (diff)
INTEGRATION: CWS unopkg1 (1.17.2); FILE MERGED
2004/03/02 14:52:17 dbo 1.17.2.2: RESYNC: (1.17-1.18); FILE MERGED 2003/12/01 15:38:30 dbo 1.17.2.1: #112920# fixing operator <
Diffstat (limited to 'cppu')
-rw-r--r--cppu/inc/com/sun/star/uno/Reference.hxx28
1 files changed, 26 insertions, 2 deletions
diff --git a/cppu/inc/com/sun/star/uno/Reference.hxx b/cppu/inc/com/sun/star/uno/Reference.hxx
index 6ce30b26083e..a34f4942cb3d 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.19 $
+ * $Revision: 1.20 $
*
- * last change: $Author: rt $ $Date: 2004-03-30 16:57:54 $
+ * last change: $Author: hr $ $Date: 2004-04-14 11:54:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -383,6 +383,30 @@ inline sal_Bool BaseReference::operator == ( XInterface * pInterface ) const SAL
}
#endif
}
+
+//______________________________________________________________________________
+inline sal_Bool BaseReference::operator < (
+ const BaseReference & rRef ) const SAL_THROW( () )
+{
+ if (_pInterface == rRef._pInterface)
+ return sal_False;
+#if ! defined EXCEPTIONS_OFF
+ try
+ {
+#endif
+ // only the query to XInterface must return the same pointer:
+ Reference< XInterface > x1( _pInterface, UNO_QUERY );
+ Reference< XInterface > x2( rRef, UNO_QUERY );
+ return (x1._pInterface < x2._pInterface);
+#if ! defined EXCEPTIONS_OFF
+ }
+ catch (RuntimeException &)
+ {
+ return sal_False;
+ }
+#endif
+}
+
//__________________________________________________________________________________________________
inline sal_Bool BaseReference::operator != ( XInterface * pInterface ) const SAL_THROW( () )
{