update dev300-m58
[ooovba.git] / dbaccess / source / ui / inc / exsrcbrw.hxx
blob092c4d05b77556b59fb8658c7f5632deca436782
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: exsrcbrw.hxx,v $
10 * $Revision: 1.9 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _SBA_EXTCTRLR_HXX
32 #define _SBA_EXTCTRLR_HXX
34 #ifndef _SBA_BWRCTRLR_HXX
35 #include "brwctrlr.hxx"
36 #endif
37 #ifndef _COM_SUN_STAR_FORM_XFORMCONTROLLER_HPP_
38 #include <com/sun/star/form/XFormController.hpp>
39 #endif
40 #ifndef _COMPHELPER_UNO3_HXX_
41 #include <comphelper/uno3.hxx>
42 #endif
43 #ifndef _CPPUHELPER_IMPLBASE2_HXX_
44 #include <cppuhelper/implbase2.hxx>
45 #endif
46 //==============================================================================
47 //= SbaExternalSourceBrowser
48 //==============================================================================
50 namespace dbaui
52 class SbaXFormAdapter;
53 class SbaExternalSourceBrowser
54 :public SbaXDataBrowserController
55 ,public ::com::sun::star::util::XModifyBroadcaster
57 ::cppu::OInterfaceContainerHelper m_aModifyListeners;
58 // for multiplexing the modify events
59 SbaXFormAdapter* m_pDataSourceImpl;
60 sal_Bool m_bInQueryDispatch;
61 // our queryDispatch will ask our frame, which first will ask our queryDispatch, so we need to protect against
62 // recursion
64 public:
65 SbaExternalSourceBrowser(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM);
67 static ::rtl::OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException );
68 static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
69 static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
70 SAL_CALL Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
72 // UNO
73 DECLARE_UNO3_DEFAULTS(SbaExternalSourceBrowser, OGenericUnoController);
74 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException);
75 // virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > > getIdlClasses(void);
77 // static ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > getStaticIdlClass();
79 // ::com::sun::star::frame::XDispatch
80 virtual void SAL_CALL dispatch(const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs) throw(::com::sun::star::uno::RuntimeException);
82 // ::com::sun::star::frame::XDispatchProvider
83 virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch(const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( ::com::sun::star::uno::RuntimeException );
85 // ::com::sun::star::util::XModifyListener
86 virtual void SAL_CALL modified(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException );
88 // ::com::sun::star::util::XModifyBroadcaster
89 virtual void SAL_CALL addModifyListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
90 virtual void SAL_CALL removeModifyListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
92 // ::com::sun::star::lang::XComponent
93 virtual void SAL_CALL disposing();
95 // ::com::sun::star::form::XLoadListener
96 virtual void SAL_CALL unloading(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException );
98 // ::com::sun::star::lang::XEventListener
99 virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException );
101 // XServiceInfo
102 virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
103 virtual ::comphelper::StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
105 protected:
106 ~SbaExternalSourceBrowser();
108 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > CreateForm();
109 virtual sal_Bool InitializeForm(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > & xForm);
111 virtual sal_Bool LoadForm();
113 void Attach(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > & xMaster);
115 void ClearView();
117 void startListening();
118 void stopListening();
122 #endif // _SBA_EXTCTRLR_HXX