merge the formfield patch from ooo-build
[ooovba.git] / dbaccess / source / ui / uno / ColumnModel.hxx
blobc2635d06aaf3b490a67f5ff25bab8526ac4c4b89
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: ColumnModel.hxx,v $
10 * $Revision: 1.6 $
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 ************************************************************************/
30 #ifndef DBAUI_COLUMNMODEL_HXX
31 #define DBAUI_COLUMNMODEL_HXX
33 #ifndef _COM_SUN_STAR_AWT_XCONTROLMODEL_HPP_
34 #include <com/sun/star/awt/XControlModel.hpp>
35 #endif
36 #ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
37 #include <com/sun/star/lang/XServiceInfo.hpp>
38 #endif
39 #ifndef _COM_SUN_STAR_UTIL_XCLONEABLE_HPP_
40 #include <com/sun/star/util/XCloneable.hpp>
41 #endif
42 #ifndef _COM_SUN_STAR_IO_XPERSISTOBJECT_HPP_
43 #include <com/sun/star/io/XPersistObject.hpp>
44 #endif
45 #ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
46 #include <com/sun/star/sdbc/XConnection.hpp>
47 #endif
48 #ifndef _COMPHELPER_PROPERTY_ARRAY_HELPER_HXX_
49 #include <comphelper/proparrhlp.hxx>
50 #endif
51 #ifndef _COMPHELPER_PROPERTYCONTAINER_HXX_
52 #include <comphelper/propertycontainer.hxx>
53 #endif
54 #ifndef _COMPHELPER_BROADCASTHELPER_HXX_
55 #include <comphelper/broadcasthelper.hxx>
56 #endif
57 #ifndef _COMPHELPER_UNO3_HXX_
58 #include <comphelper/uno3.hxx>
59 #endif
60 #ifndef _CPPUHELPER_COMPBASE4_HXX_
61 #include <cppuhelper/compbase4.hxx>
62 #endif
63 #ifndef _DBASHARED_APITOOLS_HXX_
64 #include "apitools.hxx"
65 #endif
67 //.........................................................................
68 namespace dbaui
70 //.........................................................................
72 //==================================================================
73 // OColumnControlModel
74 //==================================================================
75 typedef ::cppu::WeakAggComponentImplHelper4 < ::com::sun::star::awt::XControlModel
76 , ::com::sun::star::lang::XServiceInfo
77 , ::com::sun::star::util::XCloneable
78 , ::com::sun::star::io::XPersistObject
79 > OColumnControlModel_BASE;
81 class OColumnControlModel;
83 class OColumnControlModel : public ::comphelper::OMutexAndBroadcastHelper
84 ,public ::comphelper::OPropertyContainer
85 ,public ::comphelper::OPropertyArrayUsageHelper< OColumnControlModel >
86 ,public OColumnControlModel_BASE
89 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> m_xORB;
90 // [properties]
91 ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> m_xConnection;
92 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xColumn;
93 ::rtl::OUString m_sDefaultControl;
94 ::com::sun::star::uno::Any m_aTabStop;
95 sal_Bool m_bEnable;
96 sal_Int16 m_nBorder;
97 sal_Int32 m_nWidth;
98 // [properties]
100 inline ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> getORB() const { return m_xORB; }
101 void registerProperties();
102 protected:
104 virtual ~OColumnControlModel();
105 OColumnControlModel(const OColumnControlModel* _pSource
106 ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
107 public:
108 OColumnControlModel(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
110 // UNO Anbindung
111 DECLARE_XINTERFACE( )
113 // ::com::sun::star::lang::XServiceInfo
114 DECLARE_SERVICE_INFO_STATIC();
116 // XTypeProvider
117 DECLARE_TYPEPROVIDER( );
119 // com::sun::star::uno::XAggregation
120 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
122 // ::com::sun::star::io::XPersistObject
123 virtual ::rtl::OUString SAL_CALL getServiceName() throw ( ::com::sun::star::uno::RuntimeException);
124 virtual void SAL_CALL write(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectOutputStream>& _rxOutStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
125 virtual void SAL_CALL read(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectInputStream>& _rxInStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
128 // OPropertyArrayUsageHelper
129 DECLARE_PROPERTYCONTAINER_DEFAULTS( );
131 virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone( ) throw (::com::sun::star::uno::RuntimeException);
134 //.........................................................................
135 } // namespace dbaui
136 //.........................................................................
137 #endif // DBAUI_COLUMNMODEL_HXX