merged tag ooo/OOO330_m14
[LibreOffice.git] / extensions / source / bibliography / formcontrolcontainer.hxx
blobf62ac2978574fe0b349b400dda6fd2120b352de7
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 EXTENSIONS_BIB_FORMCONTROLCONTAINER_HXX
29 #define EXTENSIONS_BIB_FORMCONTROLCONTAINER_HXX
31 #include <comphelper/broadcasthelper.hxx>
32 #include "loadlisteneradapter.hxx"
33 #include <com/sun/star/awt/XControlContainer.hpp>
35 class BibDataManager;
37 //.........................................................................
38 namespace bib
40 //.........................................................................
42 //=====================================================================
43 //= FormControlContainer
44 //=====================================================================
45 class FormControlContainer
46 :public ::comphelper::OBaseMutex
47 ,public ::bib::OLoadListener
49 private:
50 OLoadListenerAdapter* m_pFormAdapter;
51 ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable >
52 m_xForm;
53 private:
54 void implSetDesignMode( sal_Bool _bDesign );
56 protected:
57 FormControlContainer( );
58 ~FormControlContainer( );
60 sal_Bool isFormConnected() const { return NULL != m_pFormAdapter; }
61 void connectForm( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable >& _rxForm );
62 void disconnectForm();
64 void ensureDesignMode();
66 virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >
67 getControlContainer() = 0;
69 protected:
70 // XLoadListener equivalents
71 virtual void _loaded( const ::com::sun::star::lang::EventObject& _rEvent );
72 virtual void _unloading( const ::com::sun::star::lang::EventObject& _rEvent );
73 virtual void _unloaded( const ::com::sun::star::lang::EventObject& _rEvent );
74 virtual void _reloading( const ::com::sun::star::lang::EventObject& _rEvent );
75 virtual void _reloaded( const ::com::sun::star::lang::EventObject& _rEvent );
79 //.........................................................................
80 } // namespace bib
81 //.........................................................................
83 #endif // EXTENSIONS_BIB_FORMCONTROLCONTAINER_HXX