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 .
19 #ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_COLUMNCONTROLWINDOW_HXX
20 #define INCLUDED_DBACCESS_SOURCE_UI_INC_COLUMNCONTROLWINDOW_HXX
22 #include "FieldDescControl.hxx"
23 #include "TypeInfo.hxx"
24 #include <com/sun/star/uno/XComponentContext.hpp>
25 #include <com/sun/star/util/XNumberFormatter.hpp>
29 // OColumnControlWindow
30 class OColumnControlWindow
: public OFieldDescControl
32 ::com::sun::star::lang::Locale m_aLocale
;
33 ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
> m_xContext
;
34 ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XConnection
> m_xConnection
;
35 mutable ::com::sun::star::uno::Reference
< ::com::sun::star::util::XNumberFormatter
> m_xFormatter
; // a number formatter working with the connection's NumberFormatsSupplier
37 OTypeInfoMap m_aDestTypeInfo
;
38 ::std::vector
<OTypeInfoMap::iterator
> m_aDestTypeInfoIndex
;
40 mutable TOTypeInfoSP m_pTypeInfo
; // default type
41 OUString m_sTypeNames
; // these type names are the ones out of the resource file
42 OUString m_sAutoIncrementValue
;
43 bool m_bAutoIncrementEnabled
;
45 virtual void ActivateAggregate( EControlType eType
) SAL_OVERRIDE
;
46 virtual void DeactivateAggregate( EControlType eType
) SAL_OVERRIDE
;
48 virtual ::com::sun::star::lang::Locale
GetLocale() const SAL_OVERRIDE
;
49 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::util::XNumberFormatter
> GetFormatter() const SAL_OVERRIDE
;
50 virtual TOTypeInfoSP
getTypeInfo(sal_Int32 _nPos
) SAL_OVERRIDE
;
51 virtual bool isAutoIncrementValueEnabled() const SAL_OVERRIDE
;
52 virtual OUString
getAutoIncrementValue() const SAL_OVERRIDE
;
53 virtual void CellModified(long nRow
, sal_uInt16 nColId
) SAL_OVERRIDE
;
56 OColumnControlWindow(vcl::Window
* pParent
57 ,const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>& _rxContext
);
59 void setConnection(const ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XConnection
>& _xCon
);
61 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XDatabaseMetaData
> getMetaData() SAL_OVERRIDE
;
62 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XConnection
> getConnection() SAL_OVERRIDE
;
63 virtual const OTypeInfoMap
* getTypeInfo() const SAL_OVERRIDE
;
64 TOTypeInfoSP
getDefaultTyp() const;
67 #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_COLUMNCONTROLWINDOW_HXX
69 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */