Bump version to 5.0-14
[LibreOffice.git] / dbaccess / source / ui / uno / ColumnModel.hxx
blob1fa4941b7f6fd2b3927aa8d8411bf786f3dd6b28
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_DBACCESS_SOURCE_UI_UNO_COLUMNMODEL_HXX
20 #define INCLUDED_DBACCESS_SOURCE_UI_UNO_COLUMNMODEL_HXX
22 #include <com/sun/star/awt/XControlModel.hpp>
23 #include <com/sun/star/lang/XServiceInfo.hpp>
24 #include <com/sun/star/util/XCloneable.hpp>
25 #include <com/sun/star/io/XPersistObject.hpp>
26 #include <com/sun/star/sdbc/XConnection.hpp>
27 #include <comphelper/proparrhlp.hxx>
28 #include <comphelper/propertycontainer.hxx>
29 #include <comphelper/broadcasthelper.hxx>
30 #include <comphelper/uno3.hxx>
31 #include <cppuhelper/compbase4.hxx>
32 #include "apitools.hxx"
34 namespace dbaui
37 // OColumnControlModel
38 typedef ::cppu::WeakAggComponentImplHelper4 < ::com::sun::star::awt::XControlModel
39 , ::com::sun::star::lang::XServiceInfo
40 , ::com::sun::star::util::XCloneable
41 , ::com::sun::star::io::XPersistObject
42 > OColumnControlModel_BASE;
44 class OColumnControlModel;
46 class OColumnControlModel : public ::comphelper::OMutexAndBroadcastHelper
47 ,public ::comphelper::OPropertyContainer
48 ,public ::comphelper::OPropertyArrayUsageHelper< OColumnControlModel >
49 ,public OColumnControlModel_BASE
52 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> m_xORB;
53 // [properties]
54 ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> m_xConnection;
55 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xColumn;
56 OUString m_sDefaultControl;
57 ::com::sun::star::uno::Any m_aTabStop;
58 bool m_bEnable;
59 sal_Int16 m_nBorder;
60 sal_Int32 m_nWidth;
61 // [properties]
63 inline ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> getORB() const { return m_xORB; }
64 void registerProperties();
65 protected:
67 virtual ~OColumnControlModel();
68 OColumnControlModel(const OColumnControlModel* _pSource
69 ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
70 public:
71 OColumnControlModel(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
73 // UNO Anbindung
74 DECLARE_XINTERFACE( )
76 // ::com::sun::star::lang::XServiceInfo
77 DECLARE_SERVICE_INFO_STATIC();
79 virtual css::uno::Sequence<css::uno::Type> SAL_CALL getTypes()
80 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
81 virtual css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId()
82 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
84 // com::sun::star::uno::XAggregation
85 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
87 // ::com::sun::star::io::XPersistObject
88 virtual OUString SAL_CALL getServiceName() throw ( ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
89 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, std::exception) SAL_OVERRIDE;
90 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, std::exception) SAL_OVERRIDE;
92 // OPropertyArrayUsageHelper
93 DECLARE_PROPERTYCONTAINER_DEFAULTS( );
95 virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
98 } // namespace dbaui
99 #endif // INCLUDED_DBACCESS_SOURCE_UI_UNO_COLUMNMODEL_HXX
101 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */