1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
22 #include "brwctrlr.hxx"
24 #include <comphelper/interfacecontainer3.hxx>
25 #include <comphelper/uno3.hxx>
27 // SbaExternalSourceBrowser
31 class SbaXFormAdapter
;
32 class SbaExternalSourceBrowser final
33 :public SbaXDataBrowserController
34 ,public css::util::XModifyBroadcaster
36 ::comphelper::OInterfaceContainerHelper3
<css::util::XModifyListener
> m_aModifyListeners
;
37 // for multiplexing the modify events
38 rtl::Reference
<SbaXFormAdapter
> m_pDataSourceImpl
;
39 bool m_bInQueryDispatch
;
40 // our queryDispatch will ask our frame, which first will ask our queryDispatch, so we need to protect against
44 SbaExternalSourceBrowser(const css::uno::Reference
< css::uno::XComponentContext
>& _rM
);
47 DECLARE_UNO3_DEFAULTS(SbaExternalSourceBrowser
, SbaXDataBrowserController
)
48 virtual css::uno::Any SAL_CALL
queryInterface(const css::uno::Type
& _rType
) override
;
49 // virtual css::uno::Sequence< css::uno::Reference< css::reflection::XIdlClass > > getIdlClasses();
51 // static css::uno::Reference< css::reflection::XIdlClass > getStaticIdlClass();
53 // css::frame::XDispatch
54 virtual void SAL_CALL
dispatch(const css::util::URL
& aURL
, const css::uno::Sequence
< css::beans::PropertyValue
>& aArgs
) override
;
56 // css::frame::XDispatchProvider
57 virtual css::uno::Reference
< css::frame::XDispatch
> SAL_CALL
queryDispatch(const css::util::URL
& aURL
, const OUString
& aTargetFrameName
, sal_Int32 nSearchFlags
) override
;
59 // css::util::XModifyListener
60 virtual void SAL_CALL
modified(const css::lang::EventObject
& aEvent
) override
;
62 // css::util::XModifyBroadcaster
63 virtual void SAL_CALL
addModifyListener(const css::uno::Reference
< css::util::XModifyListener
> & aListener
) override
;
64 virtual void SAL_CALL
removeModifyListener(const css::uno::Reference
< css::util::XModifyListener
> & aListener
) override
;
66 // css::lang::XComponent
67 virtual void SAL_CALL
disposing() override
;
69 // css::form::XLoadListener
70 virtual void SAL_CALL
unloading(const css::lang::EventObject
& aEvent
) override
;
72 // css::lang::XEventListener
73 virtual void SAL_CALL
disposing(const css::lang::EventObject
& Source
) override
;
76 virtual OUString SAL_CALL
getImplementationName() override
;
77 virtual css::uno::Sequence
<OUString
> SAL_CALL
getSupportedServiceNames() override
;
80 virtual ~SbaExternalSourceBrowser() override
;
82 virtual css::uno::Reference
< css::sdbc::XRowSet
> CreateForm() override
;
83 virtual bool InitializeForm( const css::uno::Reference
< css::beans::XPropertySet
>& i_formProperties
) override
;
85 virtual bool LoadForm() override
;
87 void Attach(const css::uno::Reference
< css::sdbc::XRowSet
> & xMaster
);
91 void startListening();
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */