merged tag ooo/OOO330_m14
[LibreOffice.git] / extensions / source / bibliography / framectr.hxx
blobfeadb6751cb67d59e927daec7e0b54831a52efe9
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef _BIB_FRAMECTR_HXX
29 #define _BIB_FRAMECTR_HXX
30 #include <com/sun/star/beans/XPropertyChangeListener.hpp>
31 #include <com/sun/star/frame/XDispatchProvider.hpp>
32 #include <com/sun/star/frame/XController.hpp>
33 #include <com/sun/star/frame/XDispatch.hpp>
34 #include <com/sun/star/form/XLoadable.hpp>
35 #include <com/sun/star/lang/XServiceInfo.hpp>
36 #include <com/sun/star/frame/XDispatchInformationProvider.hpp>
37 #include <cppuhelper/implbase5.hxx>
38 #include <svl/svarray.hxx>
40 #include "bibmod.hxx"
41 class BibDataManager;
42 class BibFrameCtrl_Impl;
43 namespace com{namespace sun{namespace star{
44 namespace form { namespace runtime {
45 class XFormController;
46 } }
47 }}}
48 class BibStatusDispatch
50 public:
51 ::com::sun::star::util::URL aURL;
52 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > xListener;
53 BibStatusDispatch( const ::com::sun::star::util::URL& rURL, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > xRef )
54 : aURL( rURL )
55 , xListener( xRef )
59 typedef BibStatusDispatch* BibStatusDispatchPtr;
60 SV_DECL_PTRARR_DEL( BibStatusDispatchArr, BibStatusDispatchPtr, 4, 4 )
62 class BibFrameController_Impl : public cppu::WeakImplHelper5 <
63 ::com::sun::star::lang::XServiceInfo,
64 ::com::sun::star::frame::XController,
65 ::com::sun::star::frame::XDispatch,
66 ::com::sun::star::frame::XDispatchProvider,
67 ::com::sun::star::frame::XDispatchInformationProvider
70 friend class BibFrameCtrl_Impl;
71 BibFrameCtrl_Impl* pImp;
72 BibStatusDispatchArr aStatusListeners;
73 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xWindow;
74 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame;
75 sal_Bool bDisposing;
76 sal_Bool bHierarchical;
77 ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable > m_xDatMan;
78 BibDataManager* pDatMan;
79 HdlBibModul pBibMod;
81 DECL_STATIC_LINK( BibFrameController_Impl, DisposeHdl, void* );
83 sal_Bool SaveModified(const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController>& xController);
84 public:
85 BibFrameController_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > & xComponent,
86 BibDataManager* pDatMan);
87 ~BibFrameController_Impl();
90 void activate();
91 void deactivate();
93 void ChangeDataSource(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs);
94 void RemoveFilter();
96 // ::com::sun::star::lang::XServiceInfo
97 virtual ::rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException);
98 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& sServiceName ) throw (::com::sun::star::uno::RuntimeException);
99 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException);
101 // ::com::sun::star::frame::XController
102 virtual void SAL_CALL attachFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & xFrame ) throw (::com::sun::star::uno::RuntimeException);
103 virtual sal_Bool SAL_CALL attachModel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xModel ) throw (::com::sun::star::uno::RuntimeException);
104 virtual sal_Bool SAL_CALL suspend( sal_Bool bSuspend ) throw (::com::sun::star::uno::RuntimeException);
105 virtual ::com::sun::star::uno::Any SAL_CALL getViewData() throw (::com::sun::star::uno::RuntimeException);
106 virtual void SAL_CALL restoreViewData( const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::uno::RuntimeException);
107 virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL getFrame() throw (::com::sun::star::uno::RuntimeException);
108 virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > SAL_CALL getModel() throw (::com::sun::star::uno::RuntimeException);
110 // ::com::sun::star::lang::XComponent
111 virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
112 virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener ) throw (::com::sun::star::uno::RuntimeException);
113 virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener ) throw (::com::sun::star::uno::RuntimeException);
115 // ::com::sun::star::frame::XDispatchProvider
116 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);
117 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches( const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor >& aDescripts) throw (::com::sun::star::uno::RuntimeException);
119 //class ::com::sun::star::frame::XDispatch
120 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);
121 virtual void SAL_CALL addStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xControl, const ::com::sun::star::util::URL& aURL) throw (::com::sun::star::uno::RuntimeException);
122 virtual void SAL_CALL removeStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xControl, const ::com::sun::star::util::URL& aURL) throw (::com::sun::star::uno::RuntimeException);
124 // ::com::sun::star::frame::XDispatchInformationProvider
125 virtual ::com::sun::star::uno::Sequence< ::sal_Int16 > SAL_CALL getSupportedCommandGroups( ) throw (::com::sun::star::uno::RuntimeException);
126 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchInformation > SAL_CALL getConfigurableDispatchInformation( ::sal_Int16 CommandGroup ) throw (::com::sun::star::uno::RuntimeException);
129 #endif