Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
5 : : * This Source Code Form is subject to the terms of the Mozilla Public
6 : : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
11 : : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : : * contributor license agreements. See the NOTICE file distributed
13 : : * with this work for additional information regarding copyright
14 : : * ownership. The ASF licenses this file to you under the Apache
15 : : * License, Version 2.0 (the "License"); you may not use this file
16 : : * except in compliance with the License. You may obtain a copy of
17 : : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : : */
19 : :
20 : : #ifndef _SBA_EXTCTRLR_HXX
21 : : #define _SBA_EXTCTRLR_HXX
22 : :
23 : : #include "brwctrlr.hxx"
24 : :
25 : : #include <comphelper/uno3.hxx>
26 : : #include <cppuhelper/implbase2.hxx>
27 : :
28 : : //==============================================================================
29 : : //= SbaExternalSourceBrowser
30 : : //==============================================================================
31 : :
32 : : namespace dbaui
33 : : {
34 : : class SbaXFormAdapter;
35 : : class SbaExternalSourceBrowser
36 : : :public SbaXDataBrowserController
37 : : ,public ::com::sun::star::util::XModifyBroadcaster
38 : : {
39 : : ::cppu::OInterfaceContainerHelper m_aModifyListeners;
40 : : // for multiplexing the modify events
41 : : SbaXFormAdapter* m_pDataSourceImpl;
42 : : sal_Bool m_bInQueryDispatch;
43 : : // our queryDispatch will ask our frame, which first will ask our queryDispatch, so we need to protect against
44 : : // recursion
45 : :
46 : : public:
47 : : SbaExternalSourceBrowser(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM);
48 : :
49 : : static ::rtl::OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException );
50 : : static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
51 : : static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
52 : : SAL_CALL Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
53 : :
54 : : // UNO
55 : 0 : DECLARE_UNO3_DEFAULTS(SbaExternalSourceBrowser, OGenericUnoController);
56 : : virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException);
57 : : // virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > > getIdlClasses(void);
58 : :
59 : : // static ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > getStaticIdlClass();
60 : :
61 : : // ::com::sun::star::frame::XDispatch
62 : : 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);
63 : :
64 : : // ::com::sun::star::frame::XDispatchProvider
65 : : 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 );
66 : :
67 : : // ::com::sun::star::util::XModifyListener
68 : : virtual void SAL_CALL modified(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException );
69 : :
70 : : // ::com::sun::star::util::XModifyBroadcaster
71 : : virtual void SAL_CALL addModifyListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
72 : : virtual void SAL_CALL removeModifyListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
73 : :
74 : : // ::com::sun::star::lang::XComponent
75 : : virtual void SAL_CALL disposing();
76 : :
77 : : // ::com::sun::star::form::XLoadListener
78 : : virtual void SAL_CALL unloading(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException );
79 : :
80 : : // ::com::sun::star::lang::XEventListener
81 : : virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException );
82 : :
83 : : // XServiceInfo
84 : : virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
85 : : virtual ::comphelper::StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
86 : :
87 : : protected:
88 : : ~SbaExternalSourceBrowser();
89 : :
90 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > CreateForm();
91 : : virtual sal_Bool InitializeForm( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& i_formProperties );
92 : :
93 : : virtual sal_Bool LoadForm();
94 : :
95 : : void Attach(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > & xMaster);
96 : :
97 : : void ClearView();
98 : :
99 : : void startListening();
100 : : void stopListening();
101 : : };
102 : : }
103 : :
104 : : #endif // _SBA_EXTCTRLR_HXX
105 : :
106 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|