User: rt      
Date: 06/05/04 01:38:55

Modified:
 /dba/dbaccess/source/core/inc/
  warnings.hxx

Log:
 INTEGRATION: CWS dba203c (1.3.110); FILE MERGED
 2006/04/25 08:45:53 fs 1.3.110.1: #i62646# +WarningsContainer: default 
implementation for mixing own with external warnings

File Changes:

Directory: /dba/dbaccess/source/core/inc/
=========================================

File [changed]: warnings.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/inc/warnings.hxx?r1=1.3&r2=1.4
Delta lines:  +33 -0
--------------------
--- warnings.hxx        8 Sep 2005 13:54:59 -0000       1.3
+++ warnings.hxx        4 May 2006 08:38:53 -0000       1.4
@@ -36,9 +36,14 @@
 #ifndef DBA_CORE_WARNINGS_HXX
 #define DBA_CORE_WARNINGS_HXX
 
+/** ==== begin UNO includes === **/
+#ifndef _COM_SUN_STAR_SDBC_XWARNINGSSUPPLIER_HPP_
+#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
+#endif
 #ifndef _COM_SUN_STAR_SDB_SQLCONTEXT_HPP_
 #include <com/sun/star/sdb/SQLContext.hpp>
 #endif
+/** ==== end UNO includes === **/
 
 //.........................................................................
 namespace dbaccess
@@ -56,6 +61,34 @@
                virtual void appendWarning(const 
::com::sun::star::sdb::SQLContext& _rContext) = 0;
        };
 
+    //====================================================================
+    //= WarningsContainer
+    //====================================================================
+    /** helper class for implementing XWarningsSupplier, which mixes own 
warnings with
+        warnings obtained from an external instance
+    */
+    class WarningsContainer : public IWarningsContainer
+    {
+    private:
+        ::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XWarningsSupplier >   m_xExternalWarnings;
+           ::com::sun::star::uno::Any                                          
            m_aOwnWarnings;
+
+    public:
+        WarningsContainer() { }
+        WarningsContainer( const ::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XWarningsSupplier >& _rxExternalWarnings )
+            :m_xExternalWarnings( _rxExternalWarnings )
+        {
+        }
+
+        // IWarningsContainer
+           virtual void appendWarning(const 
::com::sun::star::sdbc::SQLException& _rWarning);
+           virtual void appendWarning(const 
::com::sun::star::sdbc::SQLWarning& _rWarning);
+           virtual void appendWarning(const ::com::sun::star::sdb::SQLContext& 
_rContext);
+
+        // XWarningsSupplier
+        ::com::sun::star::uno::Any SAL_CALL getWarnings(  ) const;
+        void SAL_CALL clearWarnings(  );
+    };
 
 //.........................................................................
 }      // namespace dbaccess




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to