update dev300-m58
[ooovba.git] / dbaccess / source / ui / inc / ColumnControlWindow.hxx
blob938ec6900eb57b0867883de9cbe300b97d6c55e8
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ColumnControlWindow.hxx,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef DBAUI_COLUMNCONTROLWINDOW_HXX
31 #define DBAUI_COLUMNCONTROLWINDOW_HXX
33 #ifndef DBAUI_FIELDDESCRIPTIONCONTROL_HXX
34 #include "FieldDescControl.hxx"
35 #endif
36 #ifndef DBAUI_TYPEINFO_HXX
37 #include "TypeInfo.hxx"
38 #endif
39 #ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
40 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
41 #endif
42 #ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTER_HPP_
43 #include <com/sun/star/util/XNumberFormatter.hpp>
44 #endif
46 //.........................................................................
47 namespace dbaui
49 //.........................................................................
50 // =============================================================================================
51 // OColumnControlWindow
52 // =============================================================================================
53 class OColumnControlWindow : public OFieldDescControl
55 ::com::sun::star::lang::Locale m_aLocale;
56 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> m_xORB;
57 ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> m_xConnection;
58 mutable ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > m_xFormatter; // a number formatter working with the connection's NumberFormatsSupplier
60 OTypeInfoMap m_aDestTypeInfo;
61 ::std::vector<OTypeInfoMap::iterator> m_aDestTypeInfoIndex;
63 mutable TOTypeInfoSP m_pTypeInfo; // default type
64 String m_sTypeNames; // these type names are the ones out of the resource file
65 ::rtl::OUString m_sAutoIncrementValue;
66 sal_Bool m_bAutoIncrementEnabled;
67 protected:
68 virtual void ActivateAggregate( EControlType eType );
69 virtual void DeactivateAggregate( EControlType eType );
71 virtual ::com::sun::star::lang::Locale GetLocale() const;
72 virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > GetFormatter() const;
73 virtual TOTypeInfoSP getTypeInfo(sal_Int32 _nPos);
74 virtual sal_Bool isAutoIncrementValueEnabled() const;
75 virtual ::rtl::OUString getAutoIncrementValue() const;
76 virtual void CellModified(long nRow, USHORT nColId );
78 public:
79 OColumnControlWindow(Window* pParent
80 ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
81 virtual ~OColumnControlWindow();
83 void setConnection(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xCon);
85 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData> getMetaData();
86 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> getConnection();
87 virtual const OTypeInfoMap* getTypeInfo() const;
88 TOTypeInfoSP getDefaultTyp() const;
90 //.........................................................................
91 } // namespace dbaui
92 //.........................................................................
93 #endif // DBAUI_COLUMNCONTROLWINDOW_HXX