merge the formfield patch from ooo-build
[ooovba.git] / connectivity / source / inc / OTypeInfo.hxx
blob5840322787b2622d9380a78cb98100a4f70ec858
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: OTypeInfo.hxx,v $
10 * $Revision: 1.7 $
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 ************************************************************************/
31 #ifndef _CONNECTIVITY_OTYPEINFO_HXX_
32 #define _CONNECTIVITY_OTYPEINFO_HXX_
34 #include <com/sun/star/sdbc/ColumnSearch.hpp>
35 #include <com/sun/star/sdbc/DataType.hpp>
36 #include "connectivity/dbtoolsdllapi.hxx"
38 namespace connectivity
40 struct OTypeInfo
42 ::rtl::OUString aTypeName; // Name des Types in der Datenbank
43 ::rtl::OUString aLiteralPrefix; // Prefix zum Quoten
44 ::rtl::OUString aLiteralSuffix; // Suffix zum Quoten
45 ::rtl::OUString aCreateParams; // Parameter zum Erstellen
46 ::rtl::OUString aLocalTypeName;
48 sal_Int32 nPrecision; // Laenge des Types
50 sal_Int16 nMaximumScale; // Nachkommastellen
51 sal_Int16 nMinimumScale; // Min Nachkommastellen
53 sal_Int16 nType; // Datenbanktyp
54 sal_Int16 nSearchType; // kann nach dem Typen gesucht werden
55 sal_Int16 nNumPrecRadix; // indicating the radix, which is usually 2 or 10
57 sal_Bool bCurrency : 1, // Waehrung
58 bAutoIncrement : 1, // Ist es ein automatisch incrementierendes Feld
59 bNullable : 1, // Kann das Feld NULL annehmen
60 bCaseSensitive : 1, // Ist der Type Casesensitive
61 bUnsigned : 1, // Ist der Type Unsigned
62 bEmpty_1 : 1, // for later use
63 bEmpty_2 : 1;
65 OTypeInfo()
66 :nPrecision(0)
67 ,nMaximumScale(0)
68 ,nMinimumScale(0)
69 ,nType( ::com::sun::star::sdbc::DataType::OTHER)
70 ,nSearchType( ::com::sun::star::sdbc::ColumnSearch::FULL)
71 ,bCurrency(sal_False)
72 ,bAutoIncrement(sal_False)
73 ,bNullable(sal_True)
74 ,bCaseSensitive(sal_False)
75 ,bUnsigned(sal_False)
78 inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW( () )
79 { return ::rtl_allocateMemory( nSize ); }
80 inline static void * SAL_CALL operator new( size_t /*nSize*/,void* _pHint ) SAL_THROW( () )
81 { return _pHint; }
82 inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () )
83 { ::rtl_freeMemory( pMem ); }
84 inline static void SAL_CALL operator delete( void * /*pMem*/,void* /*_pHint*/ ) SAL_THROW( () )
85 { }
87 sal_Bool operator == (const OTypeInfo& lh) const { return lh.nType == nType; }
88 sal_Bool operator != (const OTypeInfo& lh) const { return lh.nType != nType; }
90 inline ::rtl::OUString getDBName() const { return aTypeName; }
93 #endif // _CONNECTIVITY_OTYPEINFO_HXX_