1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
21 #include <com/sun/star/awt/XControlModel.hpp>
22 #include <com/sun/star/lang/XServiceInfo.hpp>
23 #include <com/sun/star/util/XCloneable.hpp>
24 #include <com/sun/star/io/XPersistObject.hpp>
25 #include <com/sun/star/sdbc/XConnection.hpp>
26 #include <comphelper/proparrhlp.hxx>
27 #include <comphelper/propertycontainer.hxx>
28 #include <comphelper/broadcasthelper.hxx>
29 #include <comphelper/uno3.hxx>
30 #include <cppuhelper/compbase4.hxx>
31 #include <connectivity/CommonTools.hxx>
36 // OColumnControlModel
37 typedef ::cppu::WeakAggComponentImplHelper4
< css::awt::XControlModel
38 , css::lang::XServiceInfo
39 , css::util::XCloneable
40 , css::io::XPersistObject
41 > OColumnControlModel_BASE
;
43 class OColumnControlModel
;
45 class OColumnControlModel
: public ::comphelper::OMutexAndBroadcastHelper
46 ,public ::comphelper::OPropertyContainer
47 ,public ::comphelper::OPropertyArrayUsageHelper
< OColumnControlModel
>
48 ,public OColumnControlModel_BASE
52 css::uno::Reference
< css::sdbc::XConnection
> m_xConnection
;
53 css::uno::Reference
< css::beans::XPropertySet
> m_xColumn
;
54 OUString m_sDefaultControl
;
55 css::uno::Any m_aTabStop
;
61 void registerProperties();
64 virtual ~OColumnControlModel() override
;
65 OColumnControlModel(const OColumnControlModel
* _pSource
);
67 explicit OColumnControlModel();
72 // css::lang::XServiceInfo
73 DECLARE_SERVICE_INFO();
75 virtual css::uno::Sequence
<css::uno::Type
> SAL_CALL
getTypes() override
;
76 virtual css::uno::Sequence
<sal_Int8
> SAL_CALL
getImplementationId() override
;
78 // css::uno::XAggregation
79 virtual css::uno::Any SAL_CALL
queryAggregation( const css::uno::Type
& aType
) override
;
81 // css::io::XPersistObject
82 virtual OUString SAL_CALL
getServiceName() override
;
83 virtual void SAL_CALL
write(const css::uno::Reference
< css::io::XObjectOutputStream
>& _rxOutStream
) override
;
84 virtual void SAL_CALL
read(const css::uno::Reference
< css::io::XObjectInputStream
>& _rxInStream
) override
;
86 // OPropertyArrayUsageHelper
87 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo() override
;
88 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper() override
;
89 virtual ::cppu::IPropertyArrayHelper
* createArrayHelper() const override
;
92 virtual css::uno::Reference
< css::util::XCloneable
> SAL_CALL
createClone( ) override
;
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */