Tag: cws_src680_qiq
User: fs      
Date: 06/05/24 07:54:23

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

Log:
 #i51143# be an XContainerApproveListener at the command definition container, 
to prevent somebody inserting a command definition with a name conflicting with 
a table (in case tables and queries share the same namespace)

File Changes:

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

File [changed]: querycontainer.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/inc/querycontainer.hxx?r1=1.13.4.1&r2=1.13.4.2
Delta lines:  +25 -17
---------------------
--- querycontainer.hxx  24 May 2006 09:09:44 -0000      1.13.4.1
+++ querycontainer.hxx  24 May 2006 14:54:20 -0000      1.13.4.2
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: querycontainer.hxx,v $
  *
- *  $Revision: 1.13.4.1 $
+ *  $Revision: 1.13.4.2 $
  *
- *  last change: $Author: fs $ $Date: 2006/05/24 09:09:44 $
+ *  last change: $Author: fs $ $Date: 2006/05/24 14:54:20 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -36,8 +36,8 @@
 #ifndef _DBA_CORE_QUERYCONTAINER_HXX_
 #define _DBA_CORE_QUERYCONTAINER_HXX_
 
-#ifndef _CPPUHELPER_IMPLBASE4_HXX_
-#include <cppuhelper/implbase4.hxx>
+#ifndef _CPPUHELPER_IMPLBASE5_HXX_
+#include <cppuhelper/implbase5.hxx>
 #endif
 #ifndef _COMPHELPER_STLTYPES_HXX_
 #include <comphelper/stl_types.hxx>
@@ -45,6 +45,8 @@
 #ifndef _CPPUHELPER_INTERFACECONTAINER_HXX_
 #include <cppuhelper/interfacecontainer.hxx>
 #endif
+
+/** === begin UNO includes == **/
 #ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
 #include <com/sun/star/beans/XPropertySet.hpp>
 #endif
@@ -93,31 +95,35 @@
 #ifndef _COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HPP_
 #include <com/sun/star/beans/XPropertyChangeListener.hpp>
 #endif
+#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINERAPPROVELISTENER_HPP_
+#include <com/sun/star/container/XContainerApproveListener.hpp>
+#endif
+/** === end UNO includes === **/
+
 #ifndef _DBA_CORE_DEFINITIONCONTAINER_HXX_
 #include "definitioncontainer.hxx"
 #endif
 #ifndef _DBASHARED_APITOOLS_HXX_
 #include "apitools.hxx"
 #endif
-#ifndef DBA_CONTAINERLISTENER_HXX
-#include "ContainerListener.hxx"
-#endif
 
 //........................................................................
 namespace dbaccess
 {
 //........................................................................
 
-       typedef ::cppu::ImplHelper4<     
::com::sun::star::container::XContainerListener,
-                                                                        
::com::sun::star::sdbcx::XDataDescriptorFactory,
-                                                                        
::com::sun::star::sdbcx::XAppend,
-                                                                        
::com::sun::star::sdbcx::XDrop> OQueryContainer_Base;
+       typedef ::cppu::ImplHelper5 <   
::com::sun::star::container::XContainerListener
+                                ,   
::com::sun::star::container::XContainerApproveListener
+                                ,   
::com::sun::star::sdbcx::XDataDescriptorFactory
+                                ,   ::com::sun::star::sdbcx::XAppend
+                                ,   ::com::sun::star::sdbcx::XDrop
+                                >   OQueryContainer_Base;
 
        
//==========================================================================
        //= OQueryContainer
        
//==========================================================================
        class OQueryContainer;
-       typedef OContainerListener<OQueryContainer>     OCommandsListener;
+    class OContainerListener;
        class OQuery;
        class IWarningsContainer;
        class OQueryContainer   : public ODefinitionContainer
@@ -133,7 +139,8 @@
                enum AGGREGATE_ACTION { NONE, INSERTING, FLUSHING };
                AGGREGATE_ACTION                m_eDoingCurrently;
 
-               OCommandsListener*                      m_pCommandsListener;
+               OContainerListener*     m_pCommandsListener;
+
                // 
------------------------------------------------------------------------
                /** a class which automatically resets m_eDoingCurrently in 
it's destructor
                */
@@ -182,6 +189,11 @@
                virtual void SAL_CALL elementRemoved( const 
::com::sun::star::container::ContainerEvent& Event ) 
throw(::com::sun::star::uno::RuntimeException);
                virtual void SAL_CALL elementReplaced( const 
::com::sun::star::container::ContainerEvent& Event ) 
throw(::com::sun::star::uno::RuntimeException);
 
+        // XContainerApproveListener
+        virtual void SAL_CALL approveInsertElement( const 
::com::sun::star::container::ContainerEvent& Event ) throw 
(::com::sun::star::lang::WrappedTargetException, 
::com::sun::star::uno::RuntimeException);
+        virtual void SAL_CALL approveReplaceElement( const 
::com::sun::star::container::ContainerEvent& Event ) throw 
(::com::sun::star::lang::WrappedTargetException, 
::com::sun::star::uno::RuntimeException);
+        virtual void SAL_CALL approveRemoveElement( const 
::com::sun::star::container::ContainerEvent& Event ) throw 
(::com::sun::star::lang::WrappedTargetException, 
::com::sun::star::uno::RuntimeException);
+
        // ::com::sun::star::lang::XEventListener
                virtual void SAL_CALL disposing( const 
::com::sun::star::lang::EventObject& Source ) 
throw(::com::sun::star::uno::RuntimeException);
 
@@ -201,10 +213,6 @@
                virtual sal_Int32 SAL_CALL getCount(  ) 
throw(::com::sun::star::uno::RuntimeException);
        // ::com::sun::star::container::XNameAccess
                virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > 
SAL_CALL getElementNames(  ) throw(::com::sun::star::uno::RuntimeException);
-
-    protected:
-        // ODefinitioncontainer overridables
-           virtual void approveNewObject(const ::rtl::OUString& _sName,const 
::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent >& _rxObject) 
const;
 
        private:
                // helper




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

Reply via email to