xref: /aoo41x/main/svx/source/inc/formcontroller.hxx (revision cdf0e10c)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir #ifndef _SVX_FMCTRLER_HXX
28*cdf0e10cSrcweir #define _SVX_FMCTRLER_HXX
29*cdf0e10cSrcweir 
30*cdf0e10cSrcweir #include "delayedevent.hxx"
31*cdf0e10cSrcweir #include "formdispatchinterceptor.hxx"
32*cdf0e10cSrcweir #include "sqlparserclient.hxx"
33*cdf0e10cSrcweir 
34*cdf0e10cSrcweir /** === begin UNO includes === **/
35*cdf0e10cSrcweir #include <com/sun/star/awt/XControl.hpp>
36*cdf0e10cSrcweir #include <com/sun/star/awt/XControlModel.hpp>
37*cdf0e10cSrcweir #include <com/sun/star/awt/XFocusListener.hpp>
38*cdf0e10cSrcweir #include <com/sun/star/awt/XItemListener.hpp>
39*cdf0e10cSrcweir #include <com/sun/star/awt/XMouseListener.hpp>
40*cdf0e10cSrcweir #include <com/sun/star/awt/XTabController.hpp>
41*cdf0e10cSrcweir #include <com/sun/star/awt/XTextComponent.hpp>
42*cdf0e10cSrcweir #include <com/sun/star/container/XContainerListener.hpp>
43*cdf0e10cSrcweir #include <com/sun/star/container/XEnumerationAccess.hpp>
44*cdf0e10cSrcweir #include <com/sun/star/container/XIndexContainer.hpp>
45*cdf0e10cSrcweir #include <com/sun/star/form/DatabaseDeleteEvent.hpp>
46*cdf0e10cSrcweir #include <com/sun/star/form/DatabaseParameterEvent.hpp>
47*cdf0e10cSrcweir #include <com/sun/star/form/ErrorEvent.hpp>
48*cdf0e10cSrcweir #include <com/sun/star/form/validation/XFormComponentValidityListener.hpp>
49*cdf0e10cSrcweir #include <com/sun/star/form/XConfirmDeleteBroadcaster.hpp>
50*cdf0e10cSrcweir #include <com/sun/star/form/XConfirmDeleteListener.hpp>
51*cdf0e10cSrcweir #include <com/sun/star/form/XDatabaseParameterBroadcaster2.hpp>
52*cdf0e10cSrcweir #include <com/sun/star/form/XDatabaseParameterListener.hpp>
53*cdf0e10cSrcweir #include <com/sun/star/form/runtime/XFormController.hpp>
54*cdf0e10cSrcweir #include <com/sun/star/form/runtime/XFilterController.hpp>
55*cdf0e10cSrcweir #include <com/sun/star/form/XFormControllerListener.hpp>
56*cdf0e10cSrcweir #include <com/sun/star/form/XGridControlListener.hpp>
57*cdf0e10cSrcweir #include <com/sun/star/form/XLoadListener.hpp>
58*cdf0e10cSrcweir #include <com/sun/star/form/XResetListener.hpp>
59*cdf0e10cSrcweir #include <com/sun/star/frame/DispatchDescriptor.hpp>
60*cdf0e10cSrcweir #include <com/sun/star/frame/XDispatch.hpp>
61*cdf0e10cSrcweir #include <com/sun/star/frame/XDispatchProvider.hpp>
62*cdf0e10cSrcweir #include <com/sun/star/frame/XDispatchProviderInterception.hpp>
63*cdf0e10cSrcweir #include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
64*cdf0e10cSrcweir #include <com/sun/star/frame/XModel.hpp>
65*cdf0e10cSrcweir #include <com/sun/star/lang/XMultiServiceFactory.hpp>
66*cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
67*cdf0e10cSrcweir #include <com/sun/star/script/XEventAttacherManager.hpp>
68*cdf0e10cSrcweir #include <com/sun/star/sdb/XRowSetApproveBroadcaster.hpp>
69*cdf0e10cSrcweir #include <com/sun/star/sdb/XRowSetApproveListener.hpp>
70*cdf0e10cSrcweir #include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
71*cdf0e10cSrcweir #include <com/sun/star/sdb/XSQLErrorBroadcaster.hpp>
72*cdf0e10cSrcweir #include <com/sun/star/sdb/XSQLErrorListener.hpp>
73*cdf0e10cSrcweir #include <com/sun/star/sdbc/XRowSetListener.hpp>
74*cdf0e10cSrcweir #include <com/sun/star/task/XInteractionHandler.hpp>
75*cdf0e10cSrcweir #include <com/sun/star/util/XModeSelector.hpp>
76*cdf0e10cSrcweir #include <com/sun/star/util/XModifyBroadcaster.hpp>
77*cdf0e10cSrcweir #include <com/sun/star/util/XModifyListener.hpp>
78*cdf0e10cSrcweir /** === end UNO includes === **/
79*cdf0e10cSrcweir 
80*cdf0e10cSrcweir #include <comphelper/broadcasthelper.hxx>
81*cdf0e10cSrcweir #include <comphelper/componentcontext.hxx>
82*cdf0e10cSrcweir #include <comphelper/proparrhlp.hxx>
83*cdf0e10cSrcweir #include <comphelper/stl_types.hxx>
84*cdf0e10cSrcweir #include <connectivity/sqlparse.hxx>
85*cdf0e10cSrcweir #include <cppuhelper/propshlp.hxx>
86*cdf0e10cSrcweir #include <tools/debug.hxx>
87*cdf0e10cSrcweir #include <vcl/timer.hxx>
88*cdf0e10cSrcweir 
89*cdf0e10cSrcweir #if ! defined(INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_22)
90*cdf0e10cSrcweir #define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_22
91*cdf0e10cSrcweir #define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 22
92*cdf0e10cSrcweir #include <comphelper/implbase_var.hxx>
93*cdf0e10cSrcweir #endif
94*cdf0e10cSrcweir 
95*cdf0e10cSrcweir struct FmXTextComponentLess : public ::std::binary_function< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent >, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent> , sal_Bool>
96*cdf0e10cSrcweir {
97*cdf0e10cSrcweir     sal_Bool operator() (const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent >& x, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent >& y) const
98*cdf0e10cSrcweir     {
99*cdf0e10cSrcweir         return reinterpret_cast<sal_Int64>(x.get()) < reinterpret_cast<sal_Int64>(y.get());
100*cdf0e10cSrcweir     }
101*cdf0e10cSrcweir };
102*cdf0e10cSrcweir 
103*cdf0e10cSrcweir typedef ::std::map< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent >, ::rtl::OUString, FmXTextComponentLess> FmFilterRow;
104*cdf0e10cSrcweir typedef ::std::vector< FmFilterRow > FmFilterRows;
105*cdf0e10cSrcweir typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > > FmFormControllers;
106*cdf0e10cSrcweir 
107*cdf0e10cSrcweir class FmFormView;
108*cdf0e10cSrcweir class Window;
109*cdf0e10cSrcweir 
110*cdf0e10cSrcweir namespace svxform
111*cdf0e10cSrcweir {
112*cdf0e10cSrcweir     typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextComponent > >    FilterComponents;
113*cdf0e10cSrcweir     class ControlBorderManager;
114*cdf0e10cSrcweir     struct FmFieldInfo;
115*cdf0e10cSrcweir 
116*cdf0e10cSrcweir     typedef ::comphelper::WeakComponentImplHelper22 <   ::com::sun::star::form::runtime::XFormController
117*cdf0e10cSrcweir                                                     ,   ::com::sun::star::form::runtime::XFilterController
118*cdf0e10cSrcweir                                                     ,   ::com::sun::star::awt::XFocusListener
119*cdf0e10cSrcweir                                                     ,   ::com::sun::star::form::XLoadListener
120*cdf0e10cSrcweir                                                     ,   ::com::sun::star::beans::XPropertyChangeListener
121*cdf0e10cSrcweir                                                     ,   ::com::sun::star::awt::XTextListener
122*cdf0e10cSrcweir                                                     ,   ::com::sun::star::awt::XItemListener
123*cdf0e10cSrcweir                                                     ,   ::com::sun::star::container::XContainerListener
124*cdf0e10cSrcweir                                                     ,   ::com::sun::star::util::XModifyListener
125*cdf0e10cSrcweir                                                     ,   ::com::sun::star::form::XConfirmDeleteListener
126*cdf0e10cSrcweir                                                     ,   ::com::sun::star::sdb::XSQLErrorListener
127*cdf0e10cSrcweir                                                     ,   ::com::sun::star::sdbc::XRowSetListener
128*cdf0e10cSrcweir                                                     ,   ::com::sun::star::sdb::XRowSetApproveListener
129*cdf0e10cSrcweir                                                     ,   ::com::sun::star::form::XDatabaseParameterListener
130*cdf0e10cSrcweir                                                     ,   ::com::sun::star::lang::XServiceInfo
131*cdf0e10cSrcweir                                                     ,   ::com::sun::star::form::XResetListener
132*cdf0e10cSrcweir                                                     ,   ::com::sun::star::frame::XDispatch
133*cdf0e10cSrcweir                                                     ,   ::com::sun::star::awt::XMouseListener
134*cdf0e10cSrcweir                                                     ,   ::com::sun::star::form::validation::XFormComponentValidityListener
135*cdf0e10cSrcweir                                                     ,   ::com::sun::star::task::XInteractionHandler
136*cdf0e10cSrcweir                                                     ,   ::com::sun::star::form::XGridControlListener
137*cdf0e10cSrcweir                                                     ,   ::com::sun::star::form::runtime::XFeatureInvalidation
138*cdf0e10cSrcweir                                                     >   FormController_BASE;
139*cdf0e10cSrcweir 
140*cdf0e10cSrcweir     //==================================================================
141*cdf0e10cSrcweir     // FormController
142*cdf0e10cSrcweir     //==================================================================
143*cdf0e10cSrcweir     class ColumnInfoCache;
144*cdf0e10cSrcweir     class SAL_DLLPRIVATE FormController :public ::comphelper::OBaseMutex
145*cdf0e10cSrcweir                                         ,public FormController_BASE
146*cdf0e10cSrcweir                                         ,public ::cppu::OPropertySetHelper
147*cdf0e10cSrcweir                                         ,public DispatchInterceptor
148*cdf0e10cSrcweir                                         ,public ::comphelper::OAggregationArrayUsageHelper< FormController >
149*cdf0e10cSrcweir                                         ,public ::svxform::OSQLParserClient
150*cdf0e10cSrcweir     {
151*cdf0e10cSrcweir         typedef ::std::map  <   sal_Int16,
152*cdf0e10cSrcweir                                 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >
153*cdf0e10cSrcweir                             >   DispatcherContainer;
154*cdf0e10cSrcweir 
155*cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation>				m_xAggregate;
156*cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabController>			m_xTabController;
157*cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>					m_xActiveControl, m_xCurrentControl;
158*cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>		m_xModelAsIndex;
159*cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::script::XEventAttacherManager>	m_xModelAsManager;
160*cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>				m_xParent;
161*cdf0e10cSrcweir         ::comphelper::ComponentContext                                                      m_aContext;
162*cdf0e10cSrcweir         // Composer used for checking filter conditions
163*cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer >       m_xComposer;
164*cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >             m_xInteractionHandler;
165*cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormControllerContext > m_xContext;
166*cdf0e10cSrcweir 
167*cdf0e10cSrcweir         ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> >	m_aControls;
168*cdf0e10cSrcweir         ::cppu::OInterfaceContainerHelper
169*cdf0e10cSrcweir                                     m_aActivateListeners,
170*cdf0e10cSrcweir                                     m_aModifyListeners,
171*cdf0e10cSrcweir                                     m_aErrorListeners,
172*cdf0e10cSrcweir                                     m_aDeleteListeners,
173*cdf0e10cSrcweir                                     m_aRowSetApproveListeners,
174*cdf0e10cSrcweir                                     m_aParameterListeners,
175*cdf0e10cSrcweir                                     m_aFilterListeners;
176*cdf0e10cSrcweir 
177*cdf0e10cSrcweir         FmFormControllers			m_aChilds;
178*cdf0e10cSrcweir         FilterComponents            m_aFilterComponents;
179*cdf0e10cSrcweir         FmFilterRows                m_aFilterRows;
180*cdf0e10cSrcweir 
181*cdf0e10cSrcweir         Timer						m_aTabActivationTimer;
182*cdf0e10cSrcweir         Timer                       m_aFeatureInvalidationTimer;
183*cdf0e10cSrcweir 
184*cdf0e10cSrcweir         ::svxform::ControlBorderManager*
185*cdf0e10cSrcweir                                     m_pControlBorderManager;
186*cdf0e10cSrcweir 
187*cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormOperations >
188*cdf0e10cSrcweir                                     m_xFormOperations;
189*cdf0e10cSrcweir         DispatcherContainer         m_aFeatureDispatchers;
190*cdf0e10cSrcweir         ::std::set< sal_Int16 >     m_aInvalidFeatures;     // for asynchronous feature invalidation
191*cdf0e10cSrcweir 
192*cdf0e10cSrcweir         ::rtl::OUString				m_aMode;
193*cdf0e10cSrcweir 
194*cdf0e10cSrcweir         ::svxform::DelayedEvent     m_aLoadEvent;
195*cdf0e10cSrcweir         ::svxform::DelayedEvent     m_aToggleEvent;
196*cdf0e10cSrcweir         ::svxform::DelayedEvent     m_aActivationEvent;
197*cdf0e10cSrcweir         ::svxform::DelayedEvent     m_aDeactivationEvent;
198*cdf0e10cSrcweir 
199*cdf0e10cSrcweir         ::std::auto_ptr< ColumnInfoCache >
200*cdf0e10cSrcweir                                     m_pColumnInfoCache;
201*cdf0e10cSrcweir 
202*cdf0e10cSrcweir         sal_Int32					m_nCurrentFilterPosition;	// current level for filtering (or-criteria)
203*cdf0e10cSrcweir 
204*cdf0e10cSrcweir         sal_Bool					m_bCurrentRecordModified    : 1;
205*cdf0e10cSrcweir         sal_Bool					m_bCurrentRecordNew         : 1;
206*cdf0e10cSrcweir         sal_Bool					m_bLocked			        : 1;
207*cdf0e10cSrcweir         sal_Bool					m_bDBConnection	            : 1;	// Focuslistener nur fuer Datenbankformulare
208*cdf0e10cSrcweir         sal_Bool					m_bCycle			        : 1;
209*cdf0e10cSrcweir         sal_Bool					m_bCanInsert		        : 1;
210*cdf0e10cSrcweir         sal_Bool					m_bCanUpdate		        : 1;
211*cdf0e10cSrcweir         sal_Bool					m_bCommitLock	            : 1;	// lock the committing of controls see focusGained
212*cdf0e10cSrcweir         sal_Bool					m_bModified		            : 1;	// ist der Inhalt eines Controls modifiziert ?
213*cdf0e10cSrcweir         sal_Bool					m_bControlsSorted           : 1;
214*cdf0e10cSrcweir         sal_Bool					m_bFiltering                : 1;
215*cdf0e10cSrcweir         sal_Bool					m_bAttachEvents             : 1;
216*cdf0e10cSrcweir         sal_Bool					m_bDetachEvents             : 1;
217*cdf0e10cSrcweir         bool                        m_bAttemptedHandlerCreation : 1;
218*cdf0e10cSrcweir         bool                        m_bSuspendFilterTextListening;          // no bit field, passed around as reference
219*cdf0e10cSrcweir 
220*cdf0e10cSrcweir         // as we want to intercept dispatches of _all_ controls we're responsible for, and an object implementing
221*cdf0e10cSrcweir         // the ::com::sun::star::frame::XDispatchProviderInterceptor interface can intercept only _one_ objects dispatches, we need a helper class
222*cdf0e10cSrcweir         DECLARE_STL_VECTOR(DispatchInterceptionMultiplexer*, Interceptors);
223*cdf0e10cSrcweir         Interceptors	m_aControlDispatchInterceptors;
224*cdf0e10cSrcweir 
225*cdf0e10cSrcweir     public:
226*cdf0e10cSrcweir         FormController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & _rxORB );
227*cdf0e10cSrcweir 
228*cdf0e10cSrcweir     protected:
229*cdf0e10cSrcweir         ~FormController();
230*cdf0e10cSrcweir 
231*cdf0e10cSrcweir     // XInterface
232*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& type) throw ( ::com::sun::star::uno::RuntimeException );
233*cdf0e10cSrcweir         virtual void SAL_CALL acquire() throw ();
234*cdf0e10cSrcweir         virtual void SAL_CALL release() throw ();
235*cdf0e10cSrcweir 
236*cdf0e10cSrcweir     // XTypeProvider
237*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
238*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException);
239*cdf0e10cSrcweir 
240*cdf0e10cSrcweir     // XDispatch
241*cdf0e10cSrcweir         virtual void SAL_CALL dispatch( const ::com::sun::star::util::URL& _rURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rArgs ) throw (::com::sun::star::uno::RuntimeException);
242*cdf0e10cSrcweir         virtual void SAL_CALL addStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& _rxListener, const ::com::sun::star::util::URL& _rURL ) throw (::com::sun::star::uno::RuntimeException);
243*cdf0e10cSrcweir         virtual void SAL_CALL removeStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& _rxListener, const ::com::sun::star::util::URL& _rURL ) throw (::com::sun::star::uno::RuntimeException);
244*cdf0e10cSrcweir 
245*cdf0e10cSrcweir     // ::com::sun::star::container::XChild
246*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> SAL_CALL getParent(void) throw( ::com::sun::star::uno::RuntimeException );
247*cdf0e10cSrcweir         virtual void SAL_CALL setParent(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& Parent) throw( ::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException );
248*cdf0e10cSrcweir 
249*cdf0e10cSrcweir     // ::com::sun::star::lang::XEventListener
250*cdf0e10cSrcweir         virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException );
251*cdf0e10cSrcweir 
252*cdf0e10cSrcweir     // OComponentHelper
253*cdf0e10cSrcweir         virtual void SAL_CALL disposing();
254*cdf0e10cSrcweir 
255*cdf0e10cSrcweir     // OPropertySetHelper
256*cdf0e10cSrcweir         virtual sal_Bool SAL_CALL convertFastPropertyValue( ::com::sun::star::uno::Any & rConvertedValue, ::com::sun::star::uno::Any & rOldValue,
257*cdf0e10cSrcweir                                                 sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue )
258*cdf0e10cSrcweir                     throw( ::com::sun::star::lang::IllegalArgumentException );
259*cdf0e10cSrcweir 
260*cdf0e10cSrcweir         virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw( ::com::sun::star::uno::Exception );
261*cdf0e10cSrcweir         virtual void SAL_CALL getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const;
262*cdf0e10cSrcweir 
263*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw( ::com::sun::star::uno::RuntimeException );
264*cdf0e10cSrcweir         virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper();
265*cdf0e10cSrcweir 
266*cdf0e10cSrcweir         using OPropertySetHelper::getFastPropertyValue;
267*cdf0e10cSrcweir 
268*cdf0e10cSrcweir         // XFilterController
269*cdf0e10cSrcweir         virtual ::sal_Int32 SAL_CALL getFilterComponents() throw (::com::sun::star::uno::RuntimeException);
270*cdf0e10cSrcweir         virtual ::sal_Int32 SAL_CALL getDisjunctiveTerms() throw (::com::sun::star::uno::RuntimeException);
271*cdf0e10cSrcweir         virtual void SAL_CALL addFilterControllerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFilterControllerListener >& _Listener ) throw( ::com::sun::star::uno::RuntimeException );
272*cdf0e10cSrcweir         virtual void SAL_CALL removeFilterControllerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFilterControllerListener >& _Listener ) throw( ::com::sun::star::uno::RuntimeException );
273*cdf0e10cSrcweir         virtual void SAL_CALL setPredicateExpression( ::sal_Int32 _Component, ::sal_Int32 _Term, const ::rtl::OUString& _PredicateExpression ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
274*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > SAL_CALL getFilterComponent( ::sal_Int32 _Component ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
275*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::rtl::OUString > > SAL_CALL getPredicateExpressions() throw( ::com::sun::star::uno::RuntimeException );
276*cdf0e10cSrcweir         virtual void SAL_CALL removeDisjunctiveTerm( ::sal_Int32 _Term ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
277*cdf0e10cSrcweir         virtual void SAL_CALL appendEmptyDisjunctiveTerm() throw (::com::sun::star::uno::RuntimeException);
278*cdf0e10cSrcweir         virtual ::sal_Int32 SAL_CALL getActiveTerm() throw (::com::sun::star::uno::RuntimeException);
279*cdf0e10cSrcweir         virtual void SAL_CALL setActiveTerm( ::sal_Int32 _ActiveTerm ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
280*cdf0e10cSrcweir 
281*cdf0e10cSrcweir     // XElementAccess
282*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Type SAL_CALL getElementType(void) throw( ::com::sun::star::uno::RuntimeException );
283*cdf0e10cSrcweir         virtual sal_Bool SAL_CALL hasElements(void) throw( ::com::sun::star::uno::RuntimeException );
284*cdf0e10cSrcweir 
285*cdf0e10cSrcweir     // ::com::sun::star::container::XEnumerationAccess
286*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration> SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
287*cdf0e10cSrcweir 
288*cdf0e10cSrcweir     // ::com::sun::star::container::XContainerListener
289*cdf0e10cSrcweir         virtual void SAL_CALL elementInserted(const ::com::sun::star::container::ContainerEvent& rEvent) throw( ::com::sun::star::uno::RuntimeException );
290*cdf0e10cSrcweir         virtual void SAL_CALL elementReplaced(const ::com::sun::star::container::ContainerEvent& rEvent) throw( ::com::sun::star::uno::RuntimeException );
291*cdf0e10cSrcweir         virtual void SAL_CALL elementRemoved(const ::com::sun::star::container::ContainerEvent& rEvent) throw( ::com::sun::star::uno::RuntimeException );
292*cdf0e10cSrcweir 
293*cdf0e10cSrcweir     // XLoadListener
294*cdf0e10cSrcweir         virtual void SAL_CALL loaded(const ::com::sun::star::lang::EventObject& rEvent) throw( ::com::sun::star::uno::RuntimeException );
295*cdf0e10cSrcweir         virtual void SAL_CALL unloaded(const ::com::sun::star::lang::EventObject& rEvent) throw( ::com::sun::star::uno::RuntimeException );
296*cdf0e10cSrcweir         virtual void SAL_CALL unloading(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException );
297*cdf0e10cSrcweir         virtual void SAL_CALL reloading(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException );
298*cdf0e10cSrcweir         virtual void SAL_CALL reloaded(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException );
299*cdf0e10cSrcweir 
300*cdf0e10cSrcweir     // XModeSelector
301*cdf0e10cSrcweir         virtual void SAL_CALL setMode(const ::rtl::OUString& Mode) throw( ::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException );
302*cdf0e10cSrcweir         virtual ::rtl::OUString SAL_CALL getMode(void) throw( ::com::sun::star::uno::RuntimeException );
303*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedModes(void) throw( ::com::sun::star::uno::RuntimeException );
304*cdf0e10cSrcweir         virtual sal_Bool SAL_CALL supportsMode(const ::rtl::OUString& Mode) throw( ::com::sun::star::uno::RuntimeException );
305*cdf0e10cSrcweir 
306*cdf0e10cSrcweir     // ::com::sun::star::container::XIndexAccess
307*cdf0e10cSrcweir         virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
308*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 Index) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
309*cdf0e10cSrcweir 
310*cdf0e10cSrcweir     // XModifyBroadcaster
311*cdf0e10cSrcweir         virtual void SAL_CALL addModifyListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener>& l) throw( ::com::sun::star::uno::RuntimeException );
312*cdf0e10cSrcweir         virtual void SAL_CALL removeModifyListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener>& l) throw( ::com::sun::star::uno::RuntimeException );
313*cdf0e10cSrcweir 
314*cdf0e10cSrcweir     // XFocusListener
315*cdf0e10cSrcweir         virtual void SAL_CALL focusGained(const  ::com::sun::star::awt::FocusEvent& e) throw( ::com::sun::star::uno::RuntimeException );
316*cdf0e10cSrcweir         virtual void SAL_CALL focusLost(const  ::com::sun::star::awt::FocusEvent& e) throw( ::com::sun::star::uno::RuntimeException );
317*cdf0e10cSrcweir 
318*cdf0e10cSrcweir     // XMouseListener
319*cdf0e10cSrcweir         virtual void SAL_CALL mousePressed( const ::com::sun::star::awt::MouseEvent& _rEvent ) throw (::com::sun::star::uno::RuntimeException);
320*cdf0e10cSrcweir         virtual void SAL_CALL mouseReleased( const ::com::sun::star::awt::MouseEvent& _rEvent ) throw (::com::sun::star::uno::RuntimeException);
321*cdf0e10cSrcweir         virtual void SAL_CALL mouseEntered( const ::com::sun::star::awt::MouseEvent& _rEvent ) throw (::com::sun::star::uno::RuntimeException);
322*cdf0e10cSrcweir         virtual void SAL_CALL mouseExited( const ::com::sun::star::awt::MouseEvent& _rEvent ) throw (::com::sun::star::uno::RuntimeException);
323*cdf0e10cSrcweir 
324*cdf0e10cSrcweir     // XFormComponentValidityListener
325*cdf0e10cSrcweir         virtual void SAL_CALL componentValidityChanged( const ::com::sun::star::lang::EventObject& _rSource ) throw (::com::sun::star::uno::RuntimeException);
326*cdf0e10cSrcweir 
327*cdf0e10cSrcweir     // XInteractionHandler
328*cdf0e10cSrcweir         virtual void SAL_CALL handle( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionRequest >& Request ) throw (::com::sun::star::uno::RuntimeException);
329*cdf0e10cSrcweir 
330*cdf0e10cSrcweir     // XGridControlListener
331*cdf0e10cSrcweir         virtual void SAL_CALL columnChanged( const ::com::sun::star::lang::EventObject& _event ) throw (::com::sun::star::uno::RuntimeException);
332*cdf0e10cSrcweir 
333*cdf0e10cSrcweir     // ::com::sun::star::beans::XPropertyChangeListener -> aenderung der stati
334*cdf0e10cSrcweir         virtual void SAL_CALL propertyChange(const  ::com::sun::star::beans::PropertyChangeEvent& evt) throw( ::com::sun::star::uno::RuntimeException );
335*cdf0e10cSrcweir 
336*cdf0e10cSrcweir     // XTextListener		   -> modify setzen
337*cdf0e10cSrcweir         virtual void SAL_CALL textChanged(const  ::com::sun::star::awt::TextEvent& rEvent) throw( ::com::sun::star::uno::RuntimeException );
338*cdf0e10cSrcweir 
339*cdf0e10cSrcweir     // XItemListener			-> modify setzen
340*cdf0e10cSrcweir         virtual void SAL_CALL itemStateChanged(const  ::com::sun::star::awt::ItemEvent& rEvent) throw( ::com::sun::star::uno::RuntimeException );
341*cdf0e10cSrcweir 
342*cdf0e10cSrcweir     // XModifyListener   -> modify setzen
343*cdf0e10cSrcweir         virtual void SAL_CALL modified(const ::com::sun::star::lang::EventObject& rEvent) throw( ::com::sun::star::uno::RuntimeException );
344*cdf0e10cSrcweir 
345*cdf0e10cSrcweir     // XFormController
346*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormOperations > SAL_CALL getFormOperations() throw (::com::sun::star::uno::RuntimeException);
347*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> SAL_CALL getCurrentControl(void) throw( ::com::sun::star::uno::RuntimeException );
348*cdf0e10cSrcweir         virtual void SAL_CALL addActivateListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormControllerListener>& l) throw( ::com::sun::star::uno::RuntimeException );
349*cdf0e10cSrcweir         virtual void SAL_CALL removeActivateListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormControllerListener>& l) throw( ::com::sun::star::uno::RuntimeException );
350*cdf0e10cSrcweir         virtual void SAL_CALL addChildController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController >& _ChildController ) throw( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException );
351*cdf0e10cSrcweir 
352*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormControllerContext > SAL_CALL getContext() throw (::com::sun::star::uno::RuntimeException);
353*cdf0e10cSrcweir         virtual void SAL_CALL setContext( const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormControllerContext >& _context ) throw (::com::sun::star::uno::RuntimeException);
354*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler > SAL_CALL getInteractionHandler() throw (::com::sun::star::uno::RuntimeException);
355*cdf0e10cSrcweir         virtual void SAL_CALL setInteractionHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& _interactionHandler ) throw (::com::sun::star::uno::RuntimeException);
356*cdf0e10cSrcweir 
357*cdf0e10cSrcweir     // XTabController
358*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> > SAL_CALL getControls(void) throw( ::com::sun::star::uno::RuntimeException );
359*cdf0e10cSrcweir 
360*cdf0e10cSrcweir         virtual void SAL_CALL setModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel>& Model) throw( ::com::sun::star::uno::RuntimeException );
361*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabControllerModel> SAL_CALL getModel() throw( ::com::sun::star::uno::RuntimeException );
362*cdf0e10cSrcweir 
363*cdf0e10cSrcweir         virtual void SAL_CALL setContainer(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer>& Container) throw( ::com::sun::star::uno::RuntimeException );
364*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer> SAL_CALL getContainer() throw( ::com::sun::star::uno::RuntimeException );
365*cdf0e10cSrcweir 
366*cdf0e10cSrcweir         virtual void SAL_CALL autoTabOrder() throw( ::com::sun::star::uno::RuntimeException );
367*cdf0e10cSrcweir         virtual void SAL_CALL activateTabOrder() throw( ::com::sun::star::uno::RuntimeException );
368*cdf0e10cSrcweir 
369*cdf0e10cSrcweir         virtual void SAL_CALL activateFirst() throw( ::com::sun::star::uno::RuntimeException );
370*cdf0e10cSrcweir         virtual void SAL_CALL activateLast() throw( ::com::sun::star::uno::RuntimeException );
371*cdf0e10cSrcweir 
372*cdf0e10cSrcweir     // com::sun::star::sdbc::XRowSetListener
373*cdf0e10cSrcweir         virtual void SAL_CALL cursorMoved(const ::com::sun::star::lang::EventObject& event) throw( ::com::sun::star::uno::RuntimeException );
374*cdf0e10cSrcweir         virtual void SAL_CALL rowChanged(const ::com::sun::star::lang::EventObject& event) throw( ::com::sun::star::uno::RuntimeException );
375*cdf0e10cSrcweir         virtual void SAL_CALL rowSetChanged(const ::com::sun::star::lang::EventObject& event) throw( ::com::sun::star::uno::RuntimeException );
376*cdf0e10cSrcweir 
377*cdf0e10cSrcweir     // XRowSetApproveListener
378*cdf0e10cSrcweir         virtual sal_Bool SAL_CALL approveCursorMove(const ::com::sun::star::lang::EventObject& event) throw( ::com::sun::star::uno::RuntimeException );
379*cdf0e10cSrcweir         virtual sal_Bool SAL_CALL approveRowChange(const  ::com::sun::star::sdb::RowChangeEvent& event) throw( ::com::sun::star::uno::RuntimeException );
380*cdf0e10cSrcweir         virtual sal_Bool SAL_CALL approveRowSetChange(const ::com::sun::star::lang::EventObject& event) throw( ::com::sun::star::uno::RuntimeException );
381*cdf0e10cSrcweir 
382*cdf0e10cSrcweir     // XRowSetApproveBroadcaster
383*cdf0e10cSrcweir         virtual void SAL_CALL addRowSetApproveListener(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XRowSetApproveListener>& listener) throw( ::com::sun::star::uno::RuntimeException );
384*cdf0e10cSrcweir         virtual void SAL_CALL removeRowSetApproveListener(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XRowSetApproveListener>& listener) throw( ::com::sun::star::uno::RuntimeException );
385*cdf0e10cSrcweir 
386*cdf0e10cSrcweir     // XSQLErrorBroadcaster
387*cdf0e10cSrcweir         virtual void SAL_CALL errorOccured(const ::com::sun::star::sdb::SQLErrorEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException );
388*cdf0e10cSrcweir 
389*cdf0e10cSrcweir     // XSQLErrorListener
390*cdf0e10cSrcweir         virtual void SAL_CALL addSQLErrorListener(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSQLErrorListener>& _rListener) throw( ::com::sun::star::uno::RuntimeException );
391*cdf0e10cSrcweir         virtual void SAL_CALL removeSQLErrorListener(const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSQLErrorListener>& _rListener) throw( ::com::sun::star::uno::RuntimeException );
392*cdf0e10cSrcweir 
393*cdf0e10cSrcweir     // XDatabaseParameterBroadcaster2
394*cdf0e10cSrcweir         virtual void SAL_CALL addDatabaseParameterListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XDatabaseParameterListener>& aListener) throw( ::com::sun::star::uno::RuntimeException );
395*cdf0e10cSrcweir         virtual void SAL_CALL removeDatabaseParameterListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XDatabaseParameterListener>& aListener) throw( ::com::sun::star::uno::RuntimeException );
396*cdf0e10cSrcweir 
397*cdf0e10cSrcweir     // XDatabaseParameterBroadcaster
398*cdf0e10cSrcweir         virtual void SAL_CALL addParameterListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XDatabaseParameterListener>& aListener) throw( ::com::sun::star::uno::RuntimeException );
399*cdf0e10cSrcweir         virtual void SAL_CALL removeParameterListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XDatabaseParameterListener>& aListener) throw( ::com::sun::star::uno::RuntimeException );
400*cdf0e10cSrcweir 
401*cdf0e10cSrcweir     // XDatabaseParameterListener
402*cdf0e10cSrcweir         virtual sal_Bool SAL_CALL approveParameter(const ::com::sun::star::form::DatabaseParameterEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException );
403*cdf0e10cSrcweir 
404*cdf0e10cSrcweir     // XConfirmDeleteBroadcaster
405*cdf0e10cSrcweir         virtual void SAL_CALL addConfirmDeleteListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XConfirmDeleteListener>& aListener) throw( ::com::sun::star::uno::RuntimeException );
406*cdf0e10cSrcweir         virtual void SAL_CALL removeConfirmDeleteListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XConfirmDeleteListener>& aListener) throw( ::com::sun::star::uno::RuntimeException );
407*cdf0e10cSrcweir 
408*cdf0e10cSrcweir     // XConfirmDeleteListener
409*cdf0e10cSrcweir         virtual sal_Bool SAL_CALL confirmDelete(const  ::com::sun::star::sdb::RowChangeEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException );
410*cdf0e10cSrcweir 
411*cdf0e10cSrcweir     // XServiceInfo
412*cdf0e10cSrcweir         virtual sal_Bool SAL_CALL supportsService(const ::rtl::OUString& ServiceName) throw(::com::sun::star::uno::RuntimeException);
413*cdf0e10cSrcweir         virtual ::rtl::OUString	SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
414*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Sequence< ::rtl::OUString >	SAL_CALL getSupportedServiceNames(void) throw(::com::sun::star::uno::RuntimeException);
415*cdf0e10cSrcweir 
416*cdf0e10cSrcweir     // XResetListener
417*cdf0e10cSrcweir         virtual sal_Bool SAL_CALL approveReset(const ::com::sun::star::lang::EventObject& rEvent) throw( ::com::sun::star::uno::RuntimeException );
418*cdf0e10cSrcweir         virtual void SAL_CALL resetted(const ::com::sun::star::lang::EventObject& rEvent) throw( ::com::sun::star::uno::RuntimeException );
419*cdf0e10cSrcweir 
420*cdf0e10cSrcweir         // XFeatureInvalidation
421*cdf0e10cSrcweir         virtual void SAL_CALL invalidateFeatures( const ::com::sun::star::uno::Sequence< ::sal_Int16 >& Features ) throw (::com::sun::star::uno::RuntimeException);
422*cdf0e10cSrcweir         virtual void SAL_CALL invalidateAllFeatures(  ) throw (::com::sun::star::uno::RuntimeException);
423*cdf0e10cSrcweir 
424*cdf0e10cSrcweir // method for registration
425*cdf0e10cSrcweir         static  ::com::sun::star::uno::Sequence< ::rtl::OUString >	getSupportedServiceNames_Static(void);
426*cdf0e10cSrcweir 
427*cdf0e10cSrcweir         // comphelper::OPropertyArrayUsageHelper
428*cdf0e10cSrcweir         virtual void fillProperties(
429*cdf0e10cSrcweir             ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rProps,
430*cdf0e10cSrcweir             ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rAggregateProps
431*cdf0e10cSrcweir             ) const;
432*cdf0e10cSrcweir 
433*cdf0e10cSrcweir     protected:
434*cdf0e10cSrcweir         // DispatchInterceptor
435*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch>
436*cdf0e10cSrcweir             interceptedQueryDispatch(
437*cdf0e10cSrcweir                     const ::com::sun::star::util::URL& aURL,
438*cdf0e10cSrcweir                     const ::rtl::OUString& aTargetFrameName,
439*cdf0e10cSrcweir                     sal_Int32 nSearchFlags
440*cdf0e10cSrcweir                 )   throw( ::com::sun::star::uno::RuntimeException );
441*cdf0e10cSrcweir 
442*cdf0e10cSrcweir         virtual ::osl::Mutex* getInterceptorMutex() { return &m_aMutex; }
443*cdf0e10cSrcweir 
444*cdf0e10cSrcweir         /// update all our dispatchers
445*cdf0e10cSrcweir         void    updateAllDispatchers() const;
446*cdf0e10cSrcweir 
447*cdf0e10cSrcweir         /** disposes all dispatchers in m_aFeatureDispatchers, and empties m_aFeatureDispatchers
448*cdf0e10cSrcweir         */
449*cdf0e10cSrcweir         void    disposeAllFeaturesAndDispatchers() SAL_THROW(());
450*cdf0e10cSrcweir 
451*cdf0e10cSrcweir         void startFiltering();
452*cdf0e10cSrcweir         void stopFiltering();
453*cdf0e10cSrcweir         void setFilter(::std::vector<FmFieldInfo>&);
454*cdf0e10cSrcweir         void startListening();
455*cdf0e10cSrcweir         void stopListening();
456*cdf0e10cSrcweir 
457*cdf0e10cSrcweir         /** ensures that we have an interaction handler, if possible
458*cdf0e10cSrcweir 
459*cdf0e10cSrcweir             If an interaction handler was provided at creation time (<member>initialize</member>), this
460*cdf0e10cSrcweir             one will be used. Else, an attempt is made to create an <type scope="com::sun::star::sdb">InteractionHandler</type>
461*cdf0e10cSrcweir             is made.
462*cdf0e10cSrcweir 
463*cdf0e10cSrcweir             @return <TRUE/>
464*cdf0e10cSrcweir                 if and only if <member>m_xInteractionHandler</member> is valid when the method returns
465*cdf0e10cSrcweir         */
466*cdf0e10cSrcweir         bool ensureInteractionHandler();
467*cdf0e10cSrcweir 
468*cdf0e10cSrcweir         /** replaces one of our controls with another one
469*cdf0e10cSrcweir 
470*cdf0e10cSrcweir             Upon successful replacing, the old control will be disposed. Also, internal members pointing
471*cdf0e10cSrcweir             to the current or active control will be adjusted. Yet more, if the replaced control was
472*cdf0e10cSrcweir             the active control, the new control will be made active.
473*cdf0e10cSrcweir 
474*cdf0e10cSrcweir             @param _rxExistentControl
475*cdf0e10cSrcweir                 The control to replace. Must be one of the controls in our ControlContainer.
476*cdf0e10cSrcweir             @param _rxNewControl
477*cdf0e10cSrcweir                 The control which should replace the existent control.
478*cdf0e10cSrcweir             @return
479*cdf0e10cSrcweir                 <TRUE/> if and only if the control was successfully replaced
480*cdf0e10cSrcweir         */
481*cdf0e10cSrcweir         bool    replaceControl(
482*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxExistentControl,
483*cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxNewControl
484*cdf0e10cSrcweir         );
485*cdf0e10cSrcweir 
486*cdf0e10cSrcweir         // we're listening at all bound controls for modifications
487*cdf0e10cSrcweir         void startControlModifyListening(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl);
488*cdf0e10cSrcweir         void stopControlModifyListening(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl);
489*cdf0e10cSrcweir 
490*cdf0e10cSrcweir         void setLocks();
491*cdf0e10cSrcweir         void setControlLock(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl);
492*cdf0e10cSrcweir         void addToEventAttacher(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl);
493*cdf0e10cSrcweir         void removeFromEventAttacher(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl);
494*cdf0e10cSrcweir         void toggleAutoFields(sal_Bool bAutoFields);
495*cdf0e10cSrcweir         void unload() throw( ::com::sun::star::uno::RuntimeException );
496*cdf0e10cSrcweir         void removeBoundFieldListener();
497*cdf0e10cSrcweir 
498*cdf0e10cSrcweir         void startFormListening( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxForm, sal_Bool _bPropertiesOnly  );
499*cdf0e10cSrcweir         void stopFormListening( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxForm, sal_Bool _bPropertiesOnly );
500*cdf0e10cSrcweir 
501*cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> findControl( ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> >& rCtrls, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel>& rxCtrlModel, sal_Bool _bRemove, sal_Bool _bOverWrite ) const;
502*cdf0e10cSrcweir 
503*cdf0e10cSrcweir         void insertControl(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl);
504*cdf0e10cSrcweir         void removeControl(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& xControl);
505*cdf0e10cSrcweir 
506*cdf0e10cSrcweir         /// called when a new control is to be handled by the controller
507*cdf0e10cSrcweir         void implControlInserted( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& _rxControl, bool _bAddToEventAttacher );
508*cdf0e10cSrcweir         /// called when a control is not to be handled by the controller anymore
509*cdf0e10cSrcweir         void implControlRemoved( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& _rxControl, bool _bRemoveFromEventAttacher );
510*cdf0e10cSrcweir 
511*cdf0e10cSrcweir         /** sets m_xCurrentControl, plus does administrative tasks depending on it
512*cdf0e10cSrcweir         */
513*cdf0e10cSrcweir         void    implSetCurrentControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl );
514*cdf0e10cSrcweir 
515*cdf0e10cSrcweir         /** invalidates the FormFeatures which depend on the current control
516*cdf0e10cSrcweir         */
517*cdf0e10cSrcweir         void    implInvalidateCurrentControlDependentFeatures();
518*cdf0e10cSrcweir 
519*cdf0e10cSrcweir         bool    impl_isDisposed_nofail() const { return FormController_BASE::rBHelper.bDisposed; }
520*cdf0e10cSrcweir         void    impl_checkDisposed_throw() const;
521*cdf0e10cSrcweir 
522*cdf0e10cSrcweir         void    impl_onModify();
523*cdf0e10cSrcweir 
524*cdf0e10cSrcweir         /** adds the given filter row to m_aFilterRows, setting m_nCurrentFilterPosition to 0 if the newly added
525*cdf0e10cSrcweir             row is the first one.
526*cdf0e10cSrcweir 
527*cdf0e10cSrcweir             @precond
528*cdf0e10cSrcweir                 our mutex is locked
529*cdf0e10cSrcweir         */
530*cdf0e10cSrcweir         void    impl_addFilterRow( const FmFilterRow& _row );
531*cdf0e10cSrcweir 
532*cdf0e10cSrcweir         /** adds an empty filter row to m_aFilterRows, and notifies our listeners
533*cdf0e10cSrcweir         */
534*cdf0e10cSrcweir         void    impl_appendEmptyFilterRow( ::osl::ClearableMutexGuard& _rClearBeforeNotify );
535*cdf0e10cSrcweir 
536*cdf0e10cSrcweir         sal_Bool isLocked() const {return m_bLocked;}
537*cdf0e10cSrcweir         sal_Bool determineLockState() const;
538*cdf0e10cSrcweir 
539*cdf0e10cSrcweir         Window* getDialogParentWindow();
540*cdf0e10cSrcweir             // returns the window which should be used as parent window for dialogs
541*cdf0e10cSrcweir 
542*cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor>	createInterceptor(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterception>& _xInterception);
543*cdf0e10cSrcweir             // create a new interceptor, register it on the given object
544*cdf0e10cSrcweir         void							deleteInterceptor(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterception>& _xInterception);
545*cdf0e10cSrcweir             // if createInterceptor was called for the given object the according interceptor will be removed
546*cdf0e10cSrcweir             // from the objects interceptor chain and released
547*cdf0e10cSrcweir 
548*cdf0e10cSrcweir         /** checks all form controls belonging to our form for validity
549*cdf0e10cSrcweir 
550*cdf0e10cSrcweir             If a form control supports the XValidatableFormComponent interface, this is used to determine
551*cdf0e10cSrcweir             the validity of the control. If the interface is not supported, the control is supposed to be
552*cdf0e10cSrcweir             valid.
553*cdf0e10cSrcweir 
554*cdf0e10cSrcweir             @param _rFirstInvalidityExplanation
555*cdf0e10cSrcweir                 if the method returns <FALSE/> (i.e. if there is an invalid control), this string contains
556*cdf0e10cSrcweir                 the explanation for the invalidity, as obtained from the validator.
557*cdf0e10cSrcweir 
558*cdf0e10cSrcweir             @param _rxFirstInvalidModel
559*cdf0e10cSrcweir                 if the method returns <FALSE/> (i.e. if there is an invalid control), this contains
560*cdf0e10cSrcweir                 the control model
561*cdf0e10cSrcweir 
562*cdf0e10cSrcweir             @return
563*cdf0e10cSrcweir                 <TRUE/> if and only if all controls belonging to our form are valid
564*cdf0e10cSrcweir         */
565*cdf0e10cSrcweir         bool    checkFormComponentValidity(
566*cdf0e10cSrcweir                     ::rtl::OUString& /* [out] */ _rFirstInvalidityExplanation,
567*cdf0e10cSrcweir                     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& /* [out] */ _rxFirstInvalidModel
568*cdf0e10cSrcweir                 ) SAL_THROW(());
569*cdf0e10cSrcweir 
570*cdf0e10cSrcweir         /** locates the control which belongs to a given model
571*cdf0e10cSrcweir         */
572*cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >
573*cdf0e10cSrcweir                 locateControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& _rxModel ) SAL_THROW(());
574*cdf0e10cSrcweir 
575*cdf0e10cSrcweir         // set the text for all filters
576*cdf0e10cSrcweir         void impl_setTextOnAllFilter_throw();
577*cdf0e10cSrcweir 
578*cdf0e10cSrcweir         // in filter mode we do not listen for changes
579*cdf0e10cSrcweir         sal_Bool isListeningForChanges() const {return m_bDBConnection && !m_bFiltering && !isLocked();}
580*cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> isInList(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer>& xPeer) const;
581*cdf0e10cSrcweir 
582*cdf0e10cSrcweir         DECL_LINK( OnActivateTabOrder, void* );
583*cdf0e10cSrcweir         DECL_LINK( OnInvalidateFeatures, void* );
584*cdf0e10cSrcweir         DECL_LINK( OnLoad, void* );
585*cdf0e10cSrcweir         DECL_LINK( OnToggleAutoFields, void* );
586*cdf0e10cSrcweir         DECL_LINK( OnActivated, void* );
587*cdf0e10cSrcweir         DECL_LINK( OnDeactivated, void* );
588*cdf0e10cSrcweir     };
589*cdf0e10cSrcweir 
590*cdf0e10cSrcweir }   // namespace svxform
591*cdf0e10cSrcweir 
592*cdf0e10cSrcweir #endif	// _SVX_FMCTRLER_HXX
593*cdf0e10cSrcweir 
594