1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef DBAUI_COLUMNMODEL_HXX
29 #define DBAUI_COLUMNMODEL_HXX
31 #include <com/sun/star/awt/XControlModel.hpp>
32 #include <com/sun/star/lang/XServiceInfo.hpp>
33 #include <com/sun/star/util/XCloneable.hpp>
34 #include <com/sun/star/io/XPersistObject.hpp>
35 #include <com/sun/star/sdbc/XConnection.hpp>
36 #include <comphelper/proparrhlp.hxx>
37 #include <comphelper/propertycontainer.hxx>
38 #include <comphelper/broadcasthelper.hxx>
39 #include <comphelper/uno3.hxx>
40 #include <cppuhelper/compbase4.hxx>
41 #include "apitools.hxx"
43 //.........................................................................
46 //.........................................................................
48 //==================================================================
49 // OColumnControlModel
50 //==================================================================
51 typedef ::cppu::WeakAggComponentImplHelper4
< ::com::sun::star::awt::XControlModel
52 , ::com::sun::star::lang::XServiceInfo
53 , ::com::sun::star::util::XCloneable
54 , ::com::sun::star::io::XPersistObject
55 > OColumnControlModel_BASE
;
57 class OColumnControlModel
;
59 class OColumnControlModel
: public ::comphelper::OMutexAndBroadcastHelper
60 ,public ::comphelper::OPropertyContainer
61 ,public ::comphelper::OPropertyArrayUsageHelper
< OColumnControlModel
>
62 ,public OColumnControlModel_BASE
65 ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
> m_xORB
;
67 ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XConnection
> m_xConnection
;
68 ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> m_xColumn
;
69 ::rtl::OUString m_sDefaultControl
;
70 ::com::sun::star::uno::Any m_aTabStop
;
76 inline ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
> getORB() const { return m_xORB
; }
77 void registerProperties();
80 virtual ~OColumnControlModel();
81 OColumnControlModel(const OColumnControlModel
* _pSource
82 ,const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
>& _rxFactory
);
84 OColumnControlModel(const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
>& _rxFactory
);
89 // ::com::sun::star::lang::XServiceInfo
90 DECLARE_SERVICE_INFO_STATIC();
93 DECLARE_TYPEPROVIDER( );
95 // com::sun::star::uno::XAggregation
96 virtual ::com::sun::star::uno::Any SAL_CALL
queryAggregation( const ::com::sun::star::uno::Type
& aType
) throw(::com::sun::star::uno::RuntimeException
);
98 // ::com::sun::star::io::XPersistObject
99 virtual ::rtl::OUString SAL_CALL
getServiceName() throw ( ::com::sun::star::uno::RuntimeException
);
100 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
);
101 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
);
104 // OPropertyArrayUsageHelper
105 DECLARE_PROPERTYCONTAINER_DEFAULTS( );
107 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::util::XCloneable
> SAL_CALL
createClone( ) throw (::com::sun::star::uno::RuntimeException
);
110 //.........................................................................
112 //.........................................................................
113 #endif // DBAUI_COLUMNMODEL_HXX
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */