bump product version to 6.3.0.0.beta1
[LibreOffice.git] / extensions / source / bibliography / framectr.hxx
blob8b6209c1d98bcbc4ae4e84a29279ab22478b67e0
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_EXTENSIONS_SOURCE_BIBLIOGRAPHY_FRAMECTR_HXX
21 #define INCLUDED_EXTENSIONS_SOURCE_BIBLIOGRAPHY_FRAMECTR_HXX
22 #include <com/sun/star/beans/XPropertyChangeListener.hpp>
23 #include <com/sun/star/frame/XDispatchProvider.hpp>
24 #include <com/sun/star/frame/XController.hpp>
25 #include <com/sun/star/frame/XDispatch.hpp>
26 #include <com/sun/star/form/XLoadable.hpp>
27 #include <com/sun/star/lang/XServiceInfo.hpp>
28 #include <com/sun/star/frame/XDispatchInformationProvider.hpp>
29 #include <cppuhelper/implbase.hxx>
30 #include <vector>
31 #include <memory>
33 #include "bibmod.hxx"
34 class BibDataManager;
35 class BibFrameCtrl_Impl;
36 namespace com{namespace sun{namespace star{
37 namespace form { namespace runtime {
38 class XFormController;
39 } }
40 }}}
41 class BibStatusDispatch
43 public:
44 css::util::URL aURL;
45 css::uno::Reference< css::frame::XStatusListener > xListener;
46 BibStatusDispatch( const css::util::URL& rURL, const css::uno::Reference< css::frame::XStatusListener >& rRef )
47 : aURL( rURL )
48 , xListener( rRef )
52 typedef std::vector<std::unique_ptr<BibStatusDispatch> > BibStatusDispatchArr;
54 class BibFrameController_Impl : public cppu::WeakImplHelper <
55 css::lang::XServiceInfo,
56 css::frame::XController,
57 css::frame::XDispatch,
58 css::frame::XDispatchProvider,
59 css::frame::XDispatchInformationProvider
62 friend class BibFrameCtrl_Impl;
63 rtl::Reference<BibFrameCtrl_Impl> mxImpl;
64 BibStatusDispatchArr aStatusListeners;
65 css::uno::Reference< css::awt::XWindow > xWindow;
66 css::uno::Reference< css::frame::XFrame > xFrame;
67 bool bDisposing;
68 rtl::Reference<BibDataManager> m_xDatMan;
70 DECL_LINK( DisposeHdl, void*, void );
72 static bool SaveModified(const css::uno::Reference< css::form::runtime::XFormController>& xController);
73 public:
74 BibFrameController_Impl( const css::uno::Reference< css::awt::XWindow > & xComponent,
75 BibDataManager* pDatMan);
76 virtual ~BibFrameController_Impl() override;
79 void ChangeDataSource(const css::uno::Sequence< css::beans::PropertyValue >& aArgs);
80 void RemoveFilter();
82 // css::lang::XServiceInfo
83 virtual OUString SAL_CALL getImplementationName() override;
84 virtual sal_Bool SAL_CALL supportsService( const OUString& sServiceName ) override;
85 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
87 // css::frame::XController
88 virtual void SAL_CALL attachFrame( const css::uno::Reference< css::frame::XFrame > & xFrame ) override;
89 virtual sal_Bool SAL_CALL attachModel( const css::uno::Reference< css::frame::XModel > & xModel ) override;
90 virtual sal_Bool SAL_CALL suspend( sal_Bool bSuspend ) override;
91 virtual css::uno::Any SAL_CALL getViewData() override;
92 virtual void SAL_CALL restoreViewData( const css::uno::Any& Value ) override;
93 virtual css::uno::Reference< css::frame::XFrame > SAL_CALL getFrame() override;
94 virtual css::uno::Reference< css::frame::XModel > SAL_CALL getModel() override;
96 // css::lang::XComponent
97 virtual void SAL_CALL dispose() override;
98 virtual void SAL_CALL addEventListener( const css::uno::Reference< css::lang::XEventListener > & aListener ) override;
99 virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::lang::XEventListener > & aListener ) override;
101 // css::frame::XDispatchProvider
102 virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch( const css::util::URL& aURL, const OUString& aTargetFrameName, sal_Int32 nSearchFlags) override;
103 virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches( const css::uno::Sequence< css::frame::DispatchDescriptor >& aDescripts) override;
105 //class css::frame::XDispatch
106 virtual void SAL_CALL dispatch(const css::util::URL& aURL, const css::uno::Sequence< css::beans::PropertyValue >& aArgs) override;
107 virtual void SAL_CALL addStatusListener(const css::uno::Reference< css::frame::XStatusListener > & xControl, const css::util::URL& aURL) override;
108 virtual void SAL_CALL removeStatusListener(const css::uno::Reference< css::frame::XStatusListener > & xControl, const css::util::URL& aURL) override;
110 // css::frame::XDispatchInformationProvider
111 virtual css::uno::Sequence< ::sal_Int16 > SAL_CALL getSupportedCommandGroups( ) override;
112 virtual css::uno::Sequence< css::frame::DispatchInformation > SAL_CALL getConfigurableDispatchInformation( ::sal_Int16 CommandGroup ) override;
115 #endif
117 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */