merge the formfield patch from ooo-build
[ooovba.git] / extensions / source / bibliography / framectr.hxx
blob624ab7ecb34bc1dfd72aafd50eee798601cc374a
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: framectr.hxx,v $
10 * $Revision: 1.13 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _BIB_FRAMECTR_HXX
32 #define _BIB_FRAMECTR_HXX
33 #include <com/sun/star/beans/XPropertyChangeListener.hpp>
34 #include <com/sun/star/frame/XDispatchProvider.hpp>
35 #include <com/sun/star/frame/XController.hpp>
36 #include <com/sun/star/frame/XDispatch.hpp>
37 #include <com/sun/star/form/XLoadable.hpp>
38 #include <com/sun/star/lang/XServiceInfo.hpp>
39 #include <com/sun/star/frame/XDispatchInformationProvider.hpp>
40 #include <cppuhelper/implbase5.hxx>
41 #include <svtools/svarray.hxx>
43 #include "bibmod.hxx"
44 class BibDataManager;
45 class BibFrameCtrl_Impl;
46 namespace com{namespace sun{namespace star{
47 namespace form{
48 class XFormController;
50 }}}
51 class BibStatusDispatch
53 public:
54 ::com::sun::star::util::URL aURL;
55 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > xListener;
56 BibStatusDispatch( const ::com::sun::star::util::URL& rURL, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > xRef )
57 : aURL( rURL )
58 , xListener( xRef )
62 typedef BibStatusDispatch* BibStatusDispatchPtr;
63 SV_DECL_PTRARR_DEL( BibStatusDispatchArr, BibStatusDispatchPtr, 4, 4 )
65 class BibFrameController_Impl : public cppu::WeakImplHelper5 <
66 ::com::sun::star::lang::XServiceInfo,
67 ::com::sun::star::frame::XController,
68 ::com::sun::star::frame::XDispatch,
69 ::com::sun::star::frame::XDispatchProvider,
70 ::com::sun::star::frame::XDispatchInformationProvider
73 friend class BibFrameCtrl_Impl;
74 BibFrameCtrl_Impl* pImp;
75 BibStatusDispatchArr aStatusListeners;
76 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xWindow;
77 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame;
78 sal_Bool bDisposing;
79 sal_Bool bHierarchical;
80 ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable > m_xDatMan;
81 BibDataManager* pDatMan;
82 HdlBibModul pBibMod;
84 DECL_STATIC_LINK( BibFrameController_Impl, DisposeHdl, void* );
86 sal_Bool SaveModified(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController>& xController);
87 public:
88 BibFrameController_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > & xComponent,
89 BibDataManager* pDatMan);
90 ~BibFrameController_Impl();
93 void activate();
94 void deactivate();
96 void ChangeDataSource(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs);
97 void RemoveFilter();
99 // ::com::sun::star::lang::XServiceInfo
100 virtual ::rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException);
101 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& sServiceName ) throw (::com::sun::star::uno::RuntimeException);
102 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException);
104 // ::com::sun::star::frame::XController
105 virtual void SAL_CALL attachFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & xFrame ) throw (::com::sun::star::uno::RuntimeException);
106 virtual sal_Bool SAL_CALL attachModel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xModel ) throw (::com::sun::star::uno::RuntimeException);
107 virtual sal_Bool SAL_CALL suspend( sal_Bool bSuspend ) throw (::com::sun::star::uno::RuntimeException);
108 virtual ::com::sun::star::uno::Any SAL_CALL getViewData() throw (::com::sun::star::uno::RuntimeException);
109 virtual void SAL_CALL restoreViewData( const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::uno::RuntimeException);
110 virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL getFrame() throw (::com::sun::star::uno::RuntimeException);
111 virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > SAL_CALL getModel() throw (::com::sun::star::uno::RuntimeException);
113 // ::com::sun::star::lang::XComponent
114 virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
115 virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener ) throw (::com::sun::star::uno::RuntimeException);
116 virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener ) throw (::com::sun::star::uno::RuntimeException);
118 // ::com::sun::star::frame::XDispatchProvider
119 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);
120 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);
122 //class ::com::sun::star::frame::XDispatch
123 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);
124 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);
125 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);
127 // ::com::sun::star::frame::XDispatchInformationProvider
128 virtual ::com::sun::star::uno::Sequence< ::sal_Int16 > SAL_CALL getSupportedCommandGroups( ) throw (::com::sun::star::uno::RuntimeException);
129 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchInformation > SAL_CALL getConfigurableDispatchInformation( ::sal_Int16 CommandGroup ) throw (::com::sun::star::uno::RuntimeException);
132 #endif