Tag: cws_src680_odbmacros2
User: fs      
Date: 2007-12-18 21:20:43+0000
Modified:
   dba/dbaccess/inc/genericcontroller.hxx
   dba/dbaccess/inc/singledoccontroller.hxx

Log:
 #i49133# some re-factoring

File Changes:

Directory: /dba/dbaccess/inc/
=============================

File [changed]: genericcontroller.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/inc/genericcontroller.hxx?r1=1.5.82.1&r2=1.5.82.2
Delta lines:  +26 -31
---------------------
--- genericcontroller.hxx       2007-12-13 11:19:22+0000        1.5.82.1
+++ genericcontroller.hxx       2007-12-18 21:20:41+0000        1.5.82.2
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: genericcontroller.hxx,v $
  *
- *  $Revision: 1.5.82.1 $
+ *  $Revision: 1.5.82.2 $
  *
- *  last change: $Author: fs $ $Date: 2007/12/13 11:19:22 $
+ *  last change: $Author: fs $ $Date: 2007/12/18 21:20:41 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -58,14 +58,14 @@
 #include <com/sun/star/util/XModifyListener.hpp>
 #include <com/sun/star/util/XURLTransformer.hpp>
 #include <com/sun/star/view/XSelectionSupplier.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
 /** === end UNO includes === **/
 
 #include <comphelper/broadcasthelper.hxx>
 #include <comphelper/namedvaluecollection.hxx>
 #include <comphelper/stl_types.hxx>
 #include <connectivity/dbexception.hxx>
-#include <cppuhelper/compbase1.hxx>
-#include <cppuhelper/compbase8.hxx>
+#include <cppuhelper/compbase9.hxx>
 #include <cppuhelper/interfacecontainer.h>
 
 #include <boost/optional.hpp>
@@ -76,21 +76,6 @@
 {
        class ODataView;
 
-       typedef ::comphelper::OBaseMutex        OGenericUnoController_MBASE;
-
-       typedef ::cppu::WeakComponentImplHelper8        <       
::com::sun::star::frame::XDispatch
-                                                                               
                ,       ::com::sun::star::frame::XDispatchProviderInterceptor
-                                                                               
                ,       ::com::sun::star::util::XModifyListener
-                                                ,      
::com::sun::star::view::XSelectionSupplier
-                                                                               
                ,       ::com::sun::star::frame::XFrameActionListener
-                                                                               
                ,       ::com::sun::star::lang::XInitialization
-                                                                               
                ,       ::com::sun::star::lang::XServiceInfo
-                                                                               
                ,       ::com::sun::star::frame::XDispatchInformationProvider
-                                                                               
                >       OGenericUnoController_COMPBASE;
-
-       typedef ::cppu::ImplHelper1     <       
::com::sun::star::frame::XController
-                                                               >       
OGenericUnoController_CTRBASE;
-
        // ====================================================================
        // = optional
        // ====================================================================
@@ -197,10 +182,23 @@
                }
        };
 
+       typedef ::comphelper::OBaseMutex        OGenericUnoController_MBASE;
+
+    typedef ::cppu::WeakComponentImplHelper9    <   
::com::sun::star::frame::XDispatch
+                                                ,   
::com::sun::star::frame::XDispatchProviderInterceptor
+                                                ,   
::com::sun::star::util::XModifyListener
+                                                ,   
::com::sun::star::view::XSelectionSupplier
+                                                ,   
::com::sun::star::frame::XFrameActionListener
+                                                ,   
::com::sun::star::lang::XInitialization
+                                                ,   
::com::sun::star::lang::XServiceInfo
+                                                ,   
::com::sun::star::frame::XDispatchInformationProvider
+                                                ,   
::com::sun::star::frame::XController
+                                                >   OGenericUnoController_Base;
+
        // ====================================================================
-       class DBACCESS_DLLPUBLIC OGenericUnoController  :public 
OGenericUnoController_MBASE
-                                                               ,public 
OGenericUnoController_COMPBASE
-                                                               ,public 
OGenericUnoController_CTRBASE
+       class DBACCESS_DLLPUBLIC OGenericUnoController
+                                :public OGenericUnoController_MBASE
+                                                               ,public 
OGenericUnoController_Base
                                                                ,public 
IController
        {
     private:
@@ -256,11 +254,11 @@
         // ----------------------------------------------------------------
         // attribute access
                ::osl::Mutex&                           getMutex( )             
                { return OGenericUnoController_MBASE::m_aMutex; }
-               ::cppu::OBroadcastHelper&       getBroadcastHelper()    { 
return OGenericUnoController_COMPBASE::rBHelper; }
+               ::cppu::OBroadcastHelper&       getBroadcastHelper()    { 
return OGenericUnoController_Base::rBHelper; }
 
         // ----------------------------------------------------------------
         // methods
-        OGenericUnoController(const ::com::sun::star::uno::Reference< 
::com::sun::star::lang::XMultiServiceFactory >& _rM);
+        OGenericUnoController( const ::com::sun::star::uno::Reference< 
::com::sun::star::lang::XMultiServiceFactory >& _rM );
         const ::comphelper::NamedValueCollection&
                                     getInitParams() const   { return 
m_aInitParameters; }
 
@@ -433,7 +431,7 @@
                virtual sal_Bool isCommandEnabled(sal_uInt16 _nCommandId) const;
         virtual sal_Bool isCommandEnabled(const ::rtl::OUString& 
_rCompleteCommandURL) const;
                virtual sal_Bool isDataSourceReadOnly() const;
-               virtual ::com::sun::star::uno::Reference< 
::com::sun::star::frame::XModel > getAssociatedModel() const;
+               virtual ::com::sun::star::uno::Reference< 
::com::sun::star::frame::XController > SAL_CALL getXController();
 
         // misc
         virtual sal_Bool isCommandChecked(sal_uInt16 _nCommandId) const;
@@ -445,14 +443,9 @@
                virtual void SAL_CALL modified(const 
::com::sun::star::lang::EventObject& aEvent) throw( 
::com::sun::star::uno::RuntimeException );
 
                // XInterface
-               virtual ::com::sun::star::uno::Any      SAL_CALL 
queryInterface(const ::com::sun::star::uno::Type& _rType) throw 
(::com::sun::star::uno::RuntimeException);
                virtual void SAL_CALL acquire(  ) throw ();
                virtual void SAL_CALL release(  ) throw ();
 
-               // XTypeProvider
-               virtual ::com::sun::star::uno::Sequence< 
::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw 
(::com::sun::star::uno::RuntimeException);
-               virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL 
getImplementationId(  ) throw (::com::sun::star::uno::RuntimeException);
-
                // ::com::sun::star::frame::XController
                virtual void SAL_CALL attachFrame(const 
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & xFrame) 
throw( ::com::sun::star::uno::RuntimeException );
                virtual sal_Bool SAL_CALL attachModel(const 
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xModel) 
throw( ::com::sun::star::uno::RuntimeException );
@@ -503,6 +496,8 @@
         virtual ::com::sun::star::uno::Sequence< ::sal_Int16 > SAL_CALL 
getSupportedCommandGroups() throw (::com::sun::star::uno::RuntimeException);
         virtual ::com::sun::star::uno::Sequence< 
::com::sun::star::frame::DispatchInformation > SAL_CALL 
getConfigurableDispatchInformation( ::sal_Int16 ) throw 
(::com::sun::star::uno::RuntimeException);
 
+    protected:
+        OGenericUnoController();    // never implemented
        };
 }
 

File [changed]: singledoccontroller.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/inc/singledoccontroller.hxx?r1=1.2.98.1&r2=1.2.98.2
Delta lines:  +25 -43
---------------------
--- singledoccontroller.hxx     2007-12-13 11:19:36+0000        1.2.98.1
+++ singledoccontroller.hxx     2007-12-18 21:20:41+0000        1.2.98.2
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: singledoccontroller.hxx,v $
  *
- *  $Revision: 1.2.98.1 $
+ *  $Revision: 1.2.98.2 $
  *
- *  last change: $Author: fs $ $Date: 2007/12/13 11:19:36 $
+ *  last change: $Author: fs $ $Date: 2007/12/18 21:20:41 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -36,42 +36,24 @@
 #ifndef DBAUI_SINGLEDOCCONTROLLER_HXX
 #define DBAUI_SINGLEDOCCONTROLLER_HXX
 
-#ifndef DBAUI_GENERICCONTROLLER_HXX
+#include "documentcontroller.hxx"
 #include "genericcontroller.hxx"
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTER_HPP_
-#include <com/sun/star/util/XNumberFormatter.hpp>
-#endif
-#ifndef _COMPHELPER_PROPERTYCONTAINER_HXX_ 
-#include <comphelper/propertycontainer.hxx>
-#endif
-#ifndef _COMPHELPER_PROPERTY_ARRAY_HELPER_HXX_ 
-#include <comphelper/proparrhlp.hxx>
-#endif
-#ifndef _COMPHELPER_BROADCASTHELPER_HXX_
-#include <comphelper/broadcasthelper.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
+#include "IEnvironment.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/document/XScriptInvocationContext.hpp>
 #include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATASOURCE_HPP_
-#include <com/sun/star/sdbc/XDataSource.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_ 
 #include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
-#endif
-#ifndef DBAUI_IENVIRONMENT_HXX
-#include "IEnvironment.hxx"
-#endif
-#ifndef DBACCESS_SOURCE_UI_INC_DOCUMENTCONTROLLER_HXX
-#include "documentcontroller.hxx"
-#endif
-#ifndef CONNECTIVITY_INC_CONNECTIVITY_DBMETADATA_HXX
+#include <com/sun/star/sdbc/XDataSource.hpp>
+#include <com/sun/star/util/XNumberFormatter.hpp>
+/** === end UNO includes === **/
+
+#include <comphelper/broadcasthelper.hxx>
+#include <comphelper/proparrhlp.hxx>
+#include <comphelper/propertycontainer.hxx>
 #include <connectivity/dbmetadata.hxx>
-#endif
-#ifndef _UNDO_HXX
+#include <cppuhelper/implbase1.hxx>
 #include <svtools/undo.hxx>
-#endif
 
 #include <memory>
 
@@ -84,18 +66,19 @@
        //= OSingleDocumentController
        //====================================================================
        class OSingleDocumentController;
-       typedef OGenericUnoController                                   
OSingleDocumentController_CBASE;
+
+    typedef ::cppu::ImplInheritanceHelper1  <   OGenericUnoController
+                                            ,   
::com::sun::star::document::XScriptInvocationContext
+                                            >   OSingleDocumentController_Base;
 
     struct OSingleDocumentControllerImpl;
        class DBACCESS_DLLPUBLIC OSingleDocumentController
-                       :public OSingleDocumentController_CBASE
+                       :public OSingleDocumentController_Base
                        ,public IEnvironment
        {
-               friend class OConnectionChangeBroadcaster;
        private:
         ::std::auto_ptr<OSingleDocumentControllerImpl> m_pImpl;
                
-
        protected:
                SfxUndoManager  m_aUndoManager;
 
@@ -192,8 +175,8 @@
                // ::com::sun::star::frame::XController
                virtual sal_Bool SAL_CALL suspend(sal_Bool bSuspend) throw( 
::com::sun::star::uno::RuntimeException );
 
-        // IController overridables
-               virtual ::com::sun::star::uno::Reference< 
::com::sun::star::frame::XModel > getAssociatedModel() const;
+        // XScriptInvocationContext
+        virtual ::com::sun::star::uno::Reference< 
::com::sun::star::document::XEmbeddedScripts > SAL_CALL getScriptContainer() 
throw (::com::sun::star::uno::RuntimeException);
 
        protected:
                OSingleDocumentController(const 
::com::sun::star::uno::Reference< 
::com::sun::star::lang::XMultiServiceFactory>& _rxORB);
@@ -212,15 +195,14 @@
                virtual sal_Bool Construct(Window* pParent);
 
        protected:
-               // XTypeProvider
-               virtual ::com::sun::star::uno::Sequence< 
::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw 
(::com::sun::star::uno::RuntimeException);
-               virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL 
getImplementationId(  ) throw(::com::sun::star::uno::RuntimeException);
-
                // XEventListener
                virtual void SAL_CALL disposing(const 
::com::sun::star::lang::EventObject& Source) throw( 
::com::sun::star::uno::RuntimeException );
 
                // OComponentHelper
                virtual void SAL_CALL disposing();
+
+    private:
+        OSingleDocumentController();    // never implemented
        };
 
 //........................................................................




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

Reply via email to