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