1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef CONNECTIVITY_USTRINGDESCRIPTION_IMPL_HXX
29 #define CONNECTIVITY_USTRINGDESCRIPTION_IMPL_HXX
30 
31 #define IMPLEMENT_CONSTASCII_USTRING(name)	\
32 UStringDescription name(connectivity::dbtools::get##name)
33 
34 UStringDescription::UStringDescription(PVFN _fCharFkt)
35 {
36 	pZeroTerminatedName = (*_fCharFkt)();
37 	nLength = 0;
38 	const sal_Char*	pIter = pZeroTerminatedName;
39 	while((*pIter++) != '\0')
40 		++nLength;
41 }
42 // -------------------------------------------------------------------------
43 UStringDescription::~UStringDescription()
44 {
45 }
46 
47 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_QUERYTIMEOUT			);
48 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_MAXFIELDSIZE			);
49 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_MAXROWS				);
50 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_CURSORNAME			);
51 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_RESULTSETCONCURRENCY	);
52 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_RESULTSETTYPE			);
53 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FETCHDIRECTION		);
54 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FETCHSIZE				);
55 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_ESCAPEPROCESSING		);
56 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_USEBOOKMARKS			);
57 
58 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_NAME);
59 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_TYPE);
60 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_TYPENAME);
61 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_PRECISION);
62 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_SCALE);
63 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_ISNULLABLE);
64 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_ISAUTOINCREMENT);
65 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_ISROWVERSION);
66 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_DESCRIPTION);
67 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_DEFAULTVALUE);
68 
69 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_REFERENCEDTABLE);
70 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_UPDATERULE);
71 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_DELETERULE);
72 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_CATALOG);
73 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_ISUNIQUE);
74 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_ISPRIMARYKEYINDEX);
75 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_ISCLUSTERED);
76 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_ISASCENDING);
77 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_SCHEMANAME);
78 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_CATALOGNAME);
79 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_COMMAND);
80 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_CHECKOPTION);
81 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_PASSWORD);
82 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_RELATEDCOLUMN);
83 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_ISSEARCHABLE);
84 
85 IMPLEMENT_CONSTASCII_USTRING(STAT_INVALID_INDEX);
86 
87 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FUNCTION);
88 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_TABLENAME);
89 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_REALNAME);
90 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_DBASEPRECISIONCHANGED);
91 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_ISCURRENCY);
92 
93 IMPLEMENT_CONSTASCII_USTRING(PROPERTY_ISBOOKMARKABLE);
94 //============================================================
95 //= error messages
96 //============================================================
97 IMPLEMENT_CONSTASCII_USTRING(ERRORMSG_SEQUENCE);
98 IMPLEMENT_CONSTASCII_USTRING(SQLSTATE_SEQUENCE);
99 IMPLEMENT_CONSTASCII_USTRING(SQLSTATE_GENERAL);
100 //============================================================
101 //= different
102 //============================================================
103 IMPLEMENT_CONSTASCII_USTRING(STR_DELIMITER);
104 
105 #endif // CONNECTIVITY_USTRINGDESCRIPTION_IMPL_HXX
106 
107