Bump version to 5.0-14
[LibreOffice.git] / dbaccess / source / ui / inc / exsrcbrw.hxx
bloba3d71cb632866645a431483f10f064e19b5200a5
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_EXSRCBRW_HXX
21 #define INCLUDED_DBACCESS_SOURCE_UI_INC_EXSRCBRW_HXX
23 #include "brwctrlr.hxx"
25 #include <comphelper/uno3.hxx>
26 #include <cppuhelper/implbase2.hxx>
28 // SbaExternalSourceBrowser
30 namespace dbaui
32 class SbaXFormAdapter;
33 class SbaExternalSourceBrowser
34 :public SbaXDataBrowserController
35 ,public ::com::sun::star::util::XModifyBroadcaster
37 ::cppu::OInterfaceContainerHelper m_aModifyListeners;
38 // for multiplexing the modify events
39 SbaXFormAdapter* m_pDataSourceImpl;
40 bool m_bInQueryDispatch;
41 // our queryDispatch will ask our frame, which first will ask our queryDispatch, so we need to protect against
42 // recursion
44 public:
45 SbaExternalSourceBrowser(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rM);
47 static OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException );
48 static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static() throw( ::com::sun::star::uno::RuntimeException );
49 static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
50 SAL_CALL Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
52 // UNO
53 DECLARE_UNO3_DEFAULTS(SbaExternalSourceBrowser, OGenericUnoController)
54 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
55 // virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > > getIdlClasses();
57 // static ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > getStaticIdlClass();
59 // ::com::sun::star::frame::XDispatch
60 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, std::exception) SAL_OVERRIDE;
62 // ::com::sun::star::frame::XDispatchProvider
63 virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch(const ::com::sun::star::util::URL& aURL, const OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
65 // ::com::sun::star::util::XModifyListener
66 virtual void SAL_CALL modified(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
68 // ::com::sun::star::util::XModifyBroadcaster
69 virtual void SAL_CALL addModifyListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > & aListener) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
70 virtual void SAL_CALL removeModifyListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > & aListener) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
72 // ::com::sun::star::lang::XComponent
73 virtual void SAL_CALL disposing() SAL_OVERRIDE;
75 // ::com::sun::star::form::XLoadListener
76 virtual void SAL_CALL unloading(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
78 // ::com::sun::star::lang::XEventListener
79 virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
81 // XServiceInfo
82 virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
83 virtual ::comphelper::StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
85 protected:
86 virtual ~SbaExternalSourceBrowser();
88 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > CreateForm() SAL_OVERRIDE;
89 virtual bool InitializeForm( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& i_formProperties ) SAL_OVERRIDE;
91 virtual bool LoadForm() SAL_OVERRIDE;
93 void Attach(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > & xMaster);
95 void ClearView();
97 void startListening();
98 void stopListening();
102 #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_EXSRCBRW_HXX
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */