1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef DBAUI_COLUMNMODEL_HXX 24 #define DBAUI_COLUMNMODEL_HXX 25 26 #ifndef _COM_SUN_STAR_AWT_XCONTROLMODEL_HPP_ 27 #include <com/sun/star/awt/XControlModel.hpp> 28 #endif 29 #ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ 30 #include <com/sun/star/lang/XServiceInfo.hpp> 31 #endif 32 #ifndef _COM_SUN_STAR_UTIL_XCLONEABLE_HPP_ 33 #include <com/sun/star/util/XCloneable.hpp> 34 #endif 35 #ifndef _COM_SUN_STAR_IO_XPERSISTOBJECT_HPP_ 36 #include <com/sun/star/io/XPersistObject.hpp> 37 #endif 38 #ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_ 39 #include <com/sun/star/sdbc/XConnection.hpp> 40 #endif 41 #ifndef _COMPHELPER_PROPERTY_ARRAY_HELPER_HXX_ 42 #include <comphelper/proparrhlp.hxx> 43 #endif 44 #ifndef _COMPHELPER_PROPERTYCONTAINER_HXX_ 45 #include <comphelper/propertycontainer.hxx> 46 #endif 47 #ifndef _COMPHELPER_BROADCASTHELPER_HXX_ 48 #include <comphelper/broadcasthelper.hxx> 49 #endif 50 #ifndef _COMPHELPER_UNO3_HXX_ 51 #include <comphelper/uno3.hxx> 52 #endif 53 #ifndef _CPPUHELPER_COMPBASE4_HXX_ 54 #include <cppuhelper/compbase4.hxx> 55 #endif 56 #ifndef _DBASHARED_APITOOLS_HXX_ 57 #include "apitools.hxx" 58 #endif 59 60 //......................................................................... 61 namespace dbaui 62 { 63 //......................................................................... 64 65 //================================================================== 66 // OColumnControlModel 67 //================================================================== 68 typedef ::cppu::WeakAggComponentImplHelper4 < ::com::sun::star::awt::XControlModel 69 , ::com::sun::star::lang::XServiceInfo 70 , ::com::sun::star::util::XCloneable 71 , ::com::sun::star::io::XPersistObject 72 > OColumnControlModel_BASE; 73 74 class OColumnControlModel; 75 76 class OColumnControlModel : public ::comphelper::OMutexAndBroadcastHelper 77 ,public ::comphelper::OPropertyContainer 78 ,public ::comphelper::OPropertyArrayUsageHelper< OColumnControlModel > 79 ,public OColumnControlModel_BASE 80 { 81 82 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> m_xORB; 83 // [properties] 84 ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> m_xConnection; 85 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xColumn; 86 ::rtl::OUString m_sDefaultControl; 87 ::com::sun::star::uno::Any m_aTabStop; 88 sal_Bool m_bEnable; 89 sal_Int16 m_nBorder; 90 sal_Int32 m_nWidth; 91 // [properties] 92 getORB() const93 inline ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> getORB() const { return m_xORB; } 94 void registerProperties(); 95 protected: 96 97 virtual ~OColumnControlModel(); 98 OColumnControlModel(const OColumnControlModel* _pSource 99 ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory); 100 public: 101 OColumnControlModel(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory); 102 103 // UNO Anbindung 104 DECLARE_XINTERFACE( ) 105 106 // ::com::sun::star::lang::XServiceInfo 107 DECLARE_SERVICE_INFO_STATIC(); 108 109 // XTypeProvider 110 DECLARE_TYPEPROVIDER( ); 111 112 // com::sun::star::uno::XAggregation 113 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); 114 115 // ::com::sun::star::io::XPersistObject 116 virtual ::rtl::OUString SAL_CALL getServiceName() throw ( ::com::sun::star::uno::RuntimeException); 117 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); 118 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); 119 120 121 // OPropertyArrayUsageHelper 122 DECLARE_PROPERTYCONTAINER_DEFAULTS( ); 123 124 virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone( ) throw (::com::sun::star::uno::RuntimeException); 125 }; 126 127 //......................................................................... 128 } // namespace dbaui 129 //......................................................................... 130 #endif // DBAUI_COLUMNMODEL_HXX 131