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 .
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 <rtl/ref.hxx>
31 #include <tools/link.hxx>
37 class BibFrameCtrl_Impl
;
38 namespace com
{namespace sun
{namespace star
{
39 namespace form
{ namespace runtime
{
40 class XFormController
;
43 class BibStatusDispatch
47 css::uno::Reference
< css::frame::XStatusListener
> xListener
;
48 BibStatusDispatch( const css::util::URL
& rURL
, const css::uno::Reference
< css::frame::XStatusListener
>& rRef
)
54 typedef std::vector
<std::unique_ptr
<BibStatusDispatch
> > BibStatusDispatchArr
;
56 class BibFrameController_Impl
: public cppu::WeakImplHelper
<
57 css::lang::XServiceInfo
,
58 css::frame::XController
,
59 css::frame::XDispatch
,
60 css::frame::XDispatchProvider
,
61 css::frame::XDispatchInformationProvider
64 friend class BibFrameCtrl_Impl
;
65 rtl::Reference
<BibFrameCtrl_Impl
> mxImpl
;
66 BibStatusDispatchArr aStatusListeners
;
67 css::uno::Reference
< css::awt::XWindow
> xWindow
;
68 css::uno::Reference
< css::frame::XFrame
> xFrame
;
70 rtl::Reference
<BibDataManager
> m_xDatMan
;
72 DECL_LINK( DisposeHdl
, void*, void );
74 static bool SaveModified(const css::uno::Reference
< css::form::runtime::XFormController
>& xController
);
76 BibFrameController_Impl( const css::uno::Reference
< css::awt::XWindow
> & xComponent
,
77 BibDataManager
* pDatMan
);
78 virtual ~BibFrameController_Impl() override
;
81 void ChangeDataSource(const css::uno::Sequence
< css::beans::PropertyValue
>& aArgs
);
84 // css::lang::XServiceInfo
85 virtual OUString SAL_CALL
getImplementationName() override
;
86 virtual sal_Bool SAL_CALL
supportsService( const OUString
& sServiceName
) override
;
87 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
89 // css::frame::XController
90 virtual void SAL_CALL
attachFrame( const css::uno::Reference
< css::frame::XFrame
> & xFrame
) override
;
91 virtual sal_Bool SAL_CALL
attachModel( const css::uno::Reference
< css::frame::XModel
> & xModel
) override
;
92 virtual sal_Bool SAL_CALL
suspend( sal_Bool bSuspend
) override
;
93 virtual css::uno::Any SAL_CALL
getViewData() override
;
94 virtual void SAL_CALL
restoreViewData( const css::uno::Any
& Value
) override
;
95 virtual css::uno::Reference
< css::frame::XFrame
> SAL_CALL
getFrame() override
;
96 virtual css::uno::Reference
< css::frame::XModel
> SAL_CALL
getModel() override
;
98 // css::lang::XComponent
99 virtual void SAL_CALL
dispose() override
;
100 virtual void SAL_CALL
addEventListener( const css::uno::Reference
< css::lang::XEventListener
> & aListener
) override
;
101 virtual void SAL_CALL
removeEventListener( const css::uno::Reference
< css::lang::XEventListener
> & aListener
) override
;
103 // css::frame::XDispatchProvider
104 virtual css::uno::Reference
< css::frame::XDispatch
> SAL_CALL
queryDispatch( const css::util::URL
& aURL
, const OUString
& aTargetFrameName
, sal_Int32 nSearchFlags
) override
;
105 virtual css::uno::Sequence
< css::uno::Reference
< css::frame::XDispatch
> > SAL_CALL
queryDispatches( const css::uno::Sequence
< css::frame::DispatchDescriptor
>& aDescripts
) override
;
107 //class css::frame::XDispatch
108 virtual void SAL_CALL
dispatch(const css::util::URL
& aURL
, const css::uno::Sequence
< css::beans::PropertyValue
>& aArgs
) override
;
109 virtual void SAL_CALL
addStatusListener(const css::uno::Reference
< css::frame::XStatusListener
> & xControl
, const css::util::URL
& aURL
) override
;
110 virtual void SAL_CALL
removeStatusListener(const css::uno::Reference
< css::frame::XStatusListener
> & xControl
, const css::util::URL
& aURL
) override
;
112 // css::frame::XDispatchInformationProvider
113 virtual css::uno::Sequence
< ::sal_Int16
> SAL_CALL
getSupportedCommandGroups( ) override
;
114 virtual css::uno::Sequence
< css::frame::DispatchInformation
> SAL_CALL
getConfigurableDispatchInformation( ::sal_Int16 CommandGroup
) override
;
119 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */